/**
 * Ardee ATLA Theme — Additional layout & component styles
 */

/* ── Header fixed spacer ─────────────────────────────────────── */
body {
    padding-top: 73px; /* header height + accent line */
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255,255,255,0.97);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

/* ── Mobile header adjustments ─────────────────────────────────── */
@media (max-width: 1023px) {
    body { padding-top: 73px; }
    .page-hero { padding: 4rem 0 3rem; }
    .page-hero h1 { font-size: 1.75rem !important; }
}

/* ── Page Hero ───────────────────────────────────────────────── */
.page-hero {
    position: relative;
    background: #1A3166;
    padding: 6rem 0 4rem;
    overflow: hidden;
}
.page-hero img.page-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.page-hero .page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #1A3166, rgba(26,49,102,0.9), rgba(26,49,102,0.6));
}

@media (min-width: 1024px) {
    .page-hero { padding: 8rem 0 5rem; }
}

/* ── Desktop nav display fix ─────────────────────────────────── */
.site-header nav.hide-mobile {
    display: none;
}
@media (min-width: 1024px) {
    .site-header nav.hide-mobile {
        display: flex !important;
        align-items: center;
    }
}

/* ── Mobile nav styles ───────────────────────────────────────── */
.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-nav-links li {
    margin-bottom: 0.125rem;
}
.mobile-nav-links li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s ease;
}
.mobile-nav-links li a:hover,
.mobile-nav-links li.current-menu-item a {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* ── Archive / blog grid ─────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
    background: #fff;
    border: 1px solid var(--ardee-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(26,49,102,0.1);
}
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-card-body {
    padding: 1.5rem;
}
.blog-card-body h3 {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--ardee-navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.blog-card-body h3 a {
    color: inherit;
    transition: color 0.2s;
}
.blog-card-body h3 a:hover { color: var(--ardee-orange); }
.blog-card-body .excerpt {
    color: var(--ardee-text-muted);
    font-size: 14px;
    line-height: 1.6;
}
.blog-card-meta {
    color: var(--ardee-text-light);
    font-size: 12px;
    margin-bottom: 0.75rem;
}

/* ── Program cards ───────────────────────────────────────────── */
.program-card {
    background: #fff;
    border: 1px solid var(--ardee-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.program-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(26,49,102,0.1);
    border-color: rgba(244,121,32,0.2);
}
.program-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.program-card-body h3 {
    color: var(--ardee-navy);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0.625rem;
    flex: 1;
}
.program-card-body h3 a { color: inherit; transition: color 0.2s; }
.program-card-body h3 a:hover { color: var(--ardee-orange); }
.program-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #F0F2F8;
    margin-top: auto;
}

/* ── Course filter bar ───────────────────────────────────────── */
.course-filters {
    background: #fff;
    border-bottom: 1px solid var(--ardee-border);
    padding: 1.25rem 0;
    position: sticky;
    top: 73px;
    z-index: 30;
}

/* ── Contact form ────────────────────────────────────────────── */
.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--ardee-border);
    background: #fff;
    transition: border-color 0.2s;
}
.contact-card:hover {
    border-color: rgba(244,121,32,0.25);
}
.contact-card .icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: #EEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Single post / page content ──────────────────────────────── */
.single-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 0;
}

/* ── 404 page ────────────────────────────────────────────────── */
.error-404 {
    text-align: center;
    padding: 6rem 0;
}
.error-404 h1 {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--ardee-navy);
    opacity: 0.15;
}
.error-404 h2 {
    font-family: var(--font-serif);
    color: var(--ardee-navy);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}
.error-404 p {
    color: var(--ardee-text-muted);
    margin-bottom: 2rem;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    font-size: 14px;
    font-weight: 600;
    color: var(--ardee-text-muted);
    border: 1px solid var(--ardee-border);
    transition: all 0.2s;
}
.pagination .page-numbers:hover {
    border-color: var(--ardee-navy);
    color: var(--ardee-navy);
}
.pagination .page-numbers.current {
    background: var(--ardee-navy);
    color: #fff;
    border-color: var(--ardee-navy);
}

/* ── WordPress compatibility ─────────────────────────────────── */
.wp-caption { max-width: 100%; }
.wp-caption img { border-radius: 0.75rem; }
.wp-caption-text { font-size: 13px; color: var(--ardee-text-muted); margin-top: 0.5rem; }
.alignnone, .aligncenter, .alignleft, .alignright { margin: 1rem 0; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}
