/* =============================================================================
   Page-level components, in the shared navy/gold system.

   events.php, gallery.php and announcements.php previously used a completely
   separate look (a `gradient-bg-primary` header, different colours, a different
   mobile menu), so the site changed identity as visitors moved through it.
   These components bring them onto the same design language as everything else.
   ========================================================================== */

/* --- Page hero (smaller than the homepage hero) ---------------------------- */
.page-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 20%, rgba(201,162,39,.28), transparent 55%);
    pointer-events: none;
}
.page-hero .inner { position: relative; z-index: 1; max-width: 46rem; }
.page-hero .eyebrow {
    display: inline-block;
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gold-light);
    border: 1px solid rgba(240,200,74,.4);
    border-radius: 30px;
    padding: .35rem 1rem;
    margin-bottom: 1.1rem;
}
.page-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.15;
    margin-bottom: .9rem;
    color: #fff;
}
.page-hero h1 em { color: var(--gold-light); font-style: normal; }
.page-hero p {
    font-size: 1.05rem;
    line-height: 1.75;
    opacity: .9;
    max-width: 38rem;
    margin: 0 auto;
}

/* --- Breadcrumbs ------------------------------------------------------------ */
.breadcrumbs {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}
.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    max-width: 1240px;
    margin: 0 auto;
    padding: .9rem 2rem;
}
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs li[aria-current] { color: var(--text-muted); }
.breadcrumbs li + li::before { content: '/'; color: var(--border); margin-right: .5rem; }

/* --- Generic page section --------------------------------------------------- */
.section { max-width: 1240px; margin: 0 auto; padding: 3.5rem 2rem; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 3.5vw, 2.15rem);
    color: var(--navy);
    margin-bottom: .6rem;
}
.section-head p { color: var(--text-muted); font-size: .98rem; line-height: 1.75; max-width: 40rem; margin: 0 auto; }
.section-head::after {
    content: '';
    display: block;
    width: 56px; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    margin: 1.1rem auto 0;
}

/* --- Filter pills ------------------------------------------------------------ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
    margin-bottom: 2.25rem;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.15rem;
    border-radius: 30px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    font-size: .87rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s, transform .15s;
}
.filter-pill:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.filter-pill.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.filter-pill.active i { color: var(--gold-light); }

/* --- Card grid --------------------------------------------------------------- */
.card-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* --- Event card --------------------------------------------------------------- */
.event-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(10,33,88,.15); }

.event-media { position: relative; aspect-ratio: 16 / 10; background: #eef0f6; overflow: hidden; }
.event-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.event-card:hover .event-media img { transform: scale(1.05); }
.event-media.placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: rgba(255,255,255,.35);
    font-size: 2.5rem;
}

.event-date-badge {
    position: absolute;
    top: 1rem; left: 1rem;
    background: var(--white);
    border-radius: 10px;
    padding: .5rem .7rem;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 4px 14px rgba(10,33,88,.2);
    min-width: 56px;
}
.event-date-badge .day { display: block; font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.event-date-badge .mon {
    display: block; font-size: .68rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}

.event-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.event-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.18rem;
    color: var(--navy);
    margin-bottom: .75rem;
    line-height: 1.35;
}
.event-meta { display: grid; gap: .4rem; margin-bottom: .9rem; }
.event-meta span {
    display: flex; align-items: center; gap: .55rem;
    font-size: .85rem; color: var(--text-muted);
}
.event-meta i { color: var(--gold); width: 14px; text-align: center; flex-shrink: 0; }
.event-body > p { color: var(--text-muted); font-size: .9rem; line-height: 1.7; margin-bottom: 1.1rem; }
.event-actions { margin-top: auto; display: flex; gap: .6rem; flex-wrap: wrap; }

.badge-past {
    display: inline-block;
    background: #eef0f6; color: var(--text-muted);
    font-size: .7rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    padding: .2rem .6rem; border-radius: 20px;
    margin-bottom: .6rem;
}

/* --- Small buttons -------------------------------------------------------------- */
.btn-sm {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .55rem 1.05rem;
    border-radius: 8px;
    font-size: .84rem; font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer; font-family: inherit;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn-sm:hover { transform: translateY(-1px); }
.btn-sm.solid  { background: var(--navy); color: #fff; }
.btn-sm.solid:hover { background: var(--blue); }
.btn-sm.ghost  { background: var(--white); color: var(--navy); border-color: var(--border); }
.btn-sm.ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm.gold   { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--navy); }

/* --- Gallery ---------------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #eef0f6;
    aspect-ratio: 4 / 3;
    border: 0; padding: 0; margin: 0;
    cursor: zoom-in;
    display: block;
    width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item figcaption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem .9rem .9rem;
    background: linear-gradient(transparent, rgba(10,33,88,.88));
    color: #fff;
    text-align: left;
    font-size: .88rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s, transform .25s;
}
.gallery-item:hover figcaption,
.gallery-item:focus-visible figcaption { opacity: 1; transform: translateY(0); }
.gallery-item .type-chip {
    position: absolute; top: .7rem; right: .7rem;
    background: rgba(10,33,88,.82); color: #fff;
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: .25rem .6rem; border-radius: 20px;
}

/* --- Lightbox ---------------------------------------------------------------------- */
.lightbox {
    position: fixed; inset: 0; z-index: 1500;
    background: rgba(6,16,44,.94);
    display: none;
    align-items: center; justify-content: center;
    padding: 2rem 1.5rem;
}
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox img, .lightbox video {
    max-width: min(1100px, 100%);
    max-height: 82vh;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.lightbox-caption {
    position: absolute; left: 0; right: 0; bottom: 1.5rem;
    text-align: center; color: #fff; font-size: .92rem; padding: 0 2rem;
}
.lightbox-close {
    position: absolute; top: 1.25rem; right: 1.25rem;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.14); color: #fff;
    border: 0; cursor: pointer; font-size: 1.15rem;
}
.lightbox-close:hover { background: rgba(255,255,255,.26); }

/* --- Announcement / article list ------------------------------------------------- */
.post-list { display: grid; gap: 1.5rem; max-width: 52rem; margin: 0 auto; }
.post {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.post:hover { transform: translateX(3px); box-shadow: 0 10px 32px rgba(10,33,88,.12); }
.post-date {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .78rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .6rem;
}
.post h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem; color: var(--navy); margin-bottom: .7rem; line-height: 1.35;
}
.post p { color: var(--text-muted); font-size: .95rem; line-height: 1.8; }
.post .attachment { margin-top: 1.1rem; }
.post.is-new { border-left-color: var(--blue); }
.post .new-chip {
    background: var(--blue); color: #fff;
    font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: .2rem .55rem; border-radius: 20px; margin-left: .5rem; vertical-align: middle;
}

/* --- Live stream banner -------------------------------------------------------------- */
.live-banner {
    background: linear-gradient(135deg, #7a1420, #b3261e);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex; flex-wrap: wrap; gap: 1.25rem;
    align-items: center; justify-content: space-between;
    margin-bottom: 2.5rem;
}
.live-banner h3 { font-size: 1.2rem; margin-bottom: .3rem; color: #fff; }
.live-banner p { opacity: .88; font-size: .92rem; margin: 0; }
.live-dot {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%;
    background: #fff; margin-right: .5rem;
    animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

@media (max-width: 720px) {
    .section { padding: 2.5rem 1.25rem; }
    .breadcrumbs ol { padding: .8rem 1.25rem; }
    .page-hero { min-height: 260px; padding: 3rem 1.25rem; }
}
