@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #003F87;
    --primary-dark: #002652;
    --secondary: #CE1126;
    --tertiary: #D6CEBD;
    --bg-color: #f8f9fa;
    --text-dark: #333333;
    --text-light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 63, 135, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.2;
}

p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

/* Subpage Utilities */
.page-header {
    padding: 10rem 0 4rem;
    background: var(--primary-dark);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--tertiary);
    animation: slideUp 0.8s ease forwards;
}

.page-header p {
    font-size: 1.5rem;
    opacity: 0.9;
    animation: slideUp 0.8s ease 0.2s forwards;
}

.content-section {
    padding: 4rem 0;
    background: white;
}

.content-section:nth-child(even) {
    background: var(--bg-color);
}

.content-block {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: var(--glass-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.content-block h2 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 2rem;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.content-block h3 {
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-block ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-block li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.advancement-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.advancement-content .content-block {
    max-width: none;
    scroll-margin-top: 6rem;
}

.side-menu {
    position: sticky;
    top: 6rem;
    background: var(--primary-dark);
    padding: 1.25rem 0;
    border-radius: 18px;
    box-shadow: 0 16px 35px rgba(0, 38, 82, 0.18);
    overflow: hidden;
}

.side-menu h2 {
    color: var(--tertiary);
    font-size: 1.1rem;
    margin: 0 1.25rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.side-menu nav {
    display: flex;
    flex-direction: column;
}

.side-menu a {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    padding: 0.9rem 1.25rem;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.side-menu a:hover,
.side-menu a:focus {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: var(--secondary);
    color: white;
    padding-left: 1.5rem;
}

.side-menu a.is-active {
    background: rgba(255, 255, 255, 0.16);
    border-left-color: var(--tertiary);
    color: white;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 1.5rem;
    /* Matches the text size exactly */
    width: auto;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.6rem;
}

.nav-links li a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
    transition: var(--transition);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: var(--secondary);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--primary);
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('images/hero.png') center/cover no-repeat;
    color: var(--text-light);
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: slideUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    animation: slideUp 1s ease 0.3s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(206, 17, 38, 0.4);
}

.btn-primary:hover {
    background-color: #A30D1E;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(206, 17, 38, 0.6);
}

.hero .btn {
    animation: slideUp 1s ease 0.6s forwards;
    opacity: 0;
    transform: translateY(30px);
}

/* About Section */
.about {
    background-color: var(--bg-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    padding-right: 2rem;
}

.glass-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.about-image-card {
    padding: 1.5rem;
}

/* Troop Stats */
.stats-section {
    background: white;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-color);
    border-radius: 18px;
    padding: 2rem 1.25rem;
    text-align: center;
    border: 1px solid rgba(0, 63, 135, 0.08);
    box-shadow: 0 10px 25px rgba(0, 63, 135, 0.08);
}

.stat-number {
    display: block;
    color: var(--primary-dark);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.stat-label {
    display: block;
    color: var(--secondary);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-note {
    display: block;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Activities Grid */
.activities {
    background: white;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.activity-card {
    background: var(--bg-color);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: var(--transition);
    transform: scaleY(0);
    transform-origin: bottom;
}

.activity-card:hover {
    color: white;
}

.activity-card:hover::before {
    transform: scaleY(1);
}

.activity-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.activity-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    transition: var(--transition);
}

.activity-card:hover .activity-icon {
    color: white;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.info-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--tertiary);
}

/* Events Grid */
.events {
    background-color: var(--bg-color);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.event-card {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.event-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}

.event-card:hover .event-img {
    transform: scale(1.05);
}

.event-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.event-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.event-location {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Meetings & Contact */
.meetings-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-card h3,
.meeting-card h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-icon {
    background: var(--primary-dark);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.contact-item p {
    margin-bottom: 0;
}

.contact-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text-dark);
}

/* Leader headshot, right-aligned inside a contact row */
.contact-photo {
    /* Sized to span the role / name / email rows it sits beside */
    width: 132px;
    height: 132px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center;
    margin-right: 1.55rem;
    flex-shrink: 0;
    border: 4px solid white;
    box-shadow: 0 4px 16px rgba(0, 38, 82, 0.22);
}

/* Stand-in avatar for a leader with no photo yet, so rows stay aligned */
.contact-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 2rem;
}

/* Larger headshots narrow the text column, so ease the role heading down a step */
#contact .contact-item strong {
    font-size: 1.1rem;
}

/* Email line: small envelope glyph sitting on the address baseline */
.contact-email {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.contact-email i {
    color: var(--secondary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .contact-photo {
        width: 96px;
        height: 96px;
        margin-right: 0.9rem;
    }

    .contact-photo-placeholder {
        font-size: 1.5rem;
    }
}

.nav-links li a.active-nav-link {
    color: var(--secondary);
}

.nav-links li a.active-nav-link::after {
    width: 100%;
}

/* Mobile Nav Drawer & Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-nav-toggle:hover {
    background: rgba(0, 63, 135, 0.08);
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -340px;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 1001;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.is-open {
    right: 0;
}

.mobile-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
}

.mobile-nav-links li a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.mobile-nav-links li a.active-nav-link {
    color: var(--secondary);
}

.mobile-nav-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* Announcement Bar */
.announcement-bar {
    color: white;
    padding: 0.85rem 0;
    position: relative;
    z-index: 90;
    margin-top: 72px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.announcement-alert {
    background: linear-gradient(135deg, #B31942, #800A23);
}

.announcement-info {
    background: linear-gradient(135deg, #003F87, #002652);
}

.announcement-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.announcement-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.announcement-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.announcement-title {
    font-weight: 700;
}

.announcement-sep {
    opacity: 0.5;
}

.announcement-message {
    opacity: 0.95;
}

.announcement-link {
    color: var(--tertiary);
    font-weight: 600;
    text-decoration: underline;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.announcement-link:hover {
    color: white;
}

.announcement-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: opacity 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.announcement-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

/* Event Image Wrapping & Badges */
.event-img-wrap {
    position: relative;
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.event-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 38, 82, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-date-tag {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
}

/* Enhanced Multi-Column Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr;
    gap: 2.5rem;
    text-align: left;
    margin-bottom: 3rem;
}

.footer-col p {
    font-size: 0.95rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.footer-links-list {
    list-style: none;
    padding: 0;
}

.footer-links-list li {
    margin-bottom: 0.5rem;
}

.footer-links-list li a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer-links-list li a:hover {
    color: var(--tertiary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

/* Animations */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section,
.scroll-reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.975);
    filter: blur(8px);
    visibility: hidden;
    transition:
        opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.fade-in-section.is-visible,
.scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
    visibility: visible;
}

.scroll-reveal.reveal-left {
    transform: translateX(-42px) scale(0.975);
}

.scroll-reveal.reveal-right {
    transform: translateX(42px) scale(0.975);
}

.scroll-reveal.reveal-pop {
    transform: translateY(28px) scale(0.94);
}

.scroll-reveal.reveal-left.is-visible,
.scroll-reveal.reveal-right.is-visible,
.scroll-reveal.reveal-pop.is-visible {
    transform: none;
}

@media (prefers-reduced-motion: reduce) {

    .fade-in-section,
    .scroll-reveal {
        opacity: 1;
        transform: none;
        filter: none;
        visibility: visible;
        transition: none;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 900px) {

    .advancement-layout,
    .about-grid,
    .stats-grid,
    .grid-3,
    .events-grid,
    .meetings-contact {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .about-image-card {
        padding: 1rem;
    }

    .side-menu {
        position: static;
    }
}

@media (min-width: 600px) and (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: block !important;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col p,
    .footer-col .logo {
        justify-content: center;
        margin: 0 auto 0.75rem;
    }

    .announcement-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .announcement-close {
        align-self: flex-end;
        margin-top: -1.5rem;
    }
}

/* ==========================================================================
   Gallery Page Styles
   ========================================================================== */

.gallery-page {
    background-color: #f1f4f8;
}

.gallery-hero {
    position: relative;
    padding: 9rem 0 3.5rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #001733 100%);
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(206, 17, 38, 0.15), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(0, 63, 135, 0.25), transparent 50%);
    pointer-events: none;
}

.gallery-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(214, 206, 189, 0.2);
    border: 1px solid rgba(214, 206, 189, 0.35);
    color: var(--tertiary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

/* Gallery Controls Section */
.gallery-section {
    padding: 3rem 0 5rem;
}

.gallery-controls-card {
    background: var(--glass-bg);
    border: 1px solid rgba(0, 63, 135, 0.08);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 35px rgba(0, 38, 82, 0.06);
    margin-bottom: 2.5rem;
    backdrop-filter: blur(16px);
}

.gallery-controls-top {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.gallery-search-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.gallery-search-box .search-icon {
    position: absolute;
    left: 1.2rem;
    color: var(--primary);
    font-size: 1rem;
    pointer-events: none;
}

.gallery-search-box input {
    width: 100%;
    padding: 0.85rem 2.75rem 0.85rem 2.85rem;
    background: white;
    border: 1.5px solid #d5dfea;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    transition: var(--transition);
}

.gallery-search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 63, 135, 0.12);
}

.search-clear-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #8a99a8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.search-clear-btn:hover {
    color: var(--secondary);
}

.gallery-view-switch {
    display: flex;
    background: #e9eef5;
    padding: 4px;
    border-radius: 12px;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #5a6e85;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.view-toggle-btn.active {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(0, 38, 82, 0.12);
}

.gallery-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e7edf5;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.year-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.year-tab-btn {
    background: white;
    border: 1px solid #cbd8e6;
    color: #485c72;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.year-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f6ff;
}

.year-tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 63, 135, 0.25);
}

.category-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-pill {
    background: white;
    border: 1px solid #cbd8e6;
    color: #485c72;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
}

.category-pill i {
    font-size: 0.8rem;
    color: var(--primary);
}

.category-pill:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: #fff5f5;
}

.category-pill.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 38, 82, 0.2);
}

.category-pill.active i {
    color: var(--tertiary);
}

.gallery-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #d5e0ec;
    font-size: 0.88rem;
    color: #6c7c8c;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gallery-count-text {
    font-weight: 700;
    color: var(--primary-dark);
}

.gallery-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #7b8b9b;
}

/* Gallery Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.gallery-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 38, 82, 0.07);
    border: 1px solid rgba(0, 63, 135, 0.08);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    outline: none;
}

.gallery-card:hover,
.gallery-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(0, 38, 82, 0.16);
    border-color: rgba(0, 63, 135, 0.25);
}

.gallery-card-media {
    position: relative;
    width: 100%;
    height: 240px;
    background: #e2e8f0;
    overflow: hidden;
}

.gallery-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-card:hover .gallery-card-media img,
.gallery-card:focus-visible .gallery-card-media img {
    transform: scale(1.06);
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 38, 82, 0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card:hover .gallery-card-overlay,
.gallery-card:focus-visible .gallery-card-overlay {
    opacity: 1;
}

.gallery-zoom-badge {
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-zoom-badge {
    transform: translateY(0);
}

.gallery-badges-top {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.badge-year {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.5px;
}

.badge-category {
    background: rgba(0, 38, 82, 0.85);
    backdrop-filter: blur(6px);
    color: var(--tertiary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.gallery-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gallery-card-title {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.gallery-card-location {
    font-size: 0.88rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-card-caption {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.55;
    margin-bottom: 0;
    font-weight: 300;
}

/* Timeline View Layout */
.timeline-wrapper {
    position: relative;
    padding: 1rem 0;
}

.timeline-year-group {
    margin-bottom: 3.5rem;
}

.timeline-year-marker {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.timeline-year-bubble {
    background: var(--primary);
    color: white;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 63, 135, 0.25);
}

.timeline-year-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(to right, var(--primary) 0%, rgba(0, 63, 135, 0.1) 100%);
    border-radius: 3px;
}

.timeline-year-count {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    background: #fff0f0;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
}

.timeline-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

/* Empty State */
.gallery-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: 20px;
    border: 2px dashed #cbd8e6;
}

.gallery-empty-state i {
    font-size: 3.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.gallery-empty-state h3 {
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.gallery-empty-state p {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

/* Facebook Media & Community Section */
.fb-media-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 4rem;
    border: 1px solid rgba(0, 63, 135, 0.1);
    box-shadow: 0 10px 30px rgba(0, 38, 82, 0.08);
}

.fb-media-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.fb-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e7f3ff;
    color: #1877f2;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.fb-header-left h2 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.fb-header-left p {
    color: #64748b;
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 0;
}

.fb-header-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-facebook {
    background: #1877f2;
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-facebook:hover {
    background: #1464cc;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.3);
}

.btn-facebook-outline {
    background: transparent;
    color: #1877f2;
    border: 2px solid #1877f2;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-facebook-outline:hover {
    background: #e7f3ff;
    transform: translateY(-2px);
}

.fb-media-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* Digital Photo Frame Player */
.digital-frame-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.digital-frame-outer {
    width: 100%;
    max-width: 540px;
    background: linear-gradient(145deg, #2b201a 0%, #15100c 100%);
    padding: 16px;
    border-radius: 20px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    border: 1px solid #3d2f26;
}

.digital-frame-bezel {
    background: #0d0d0f;
    padding: 8px;
    border-radius: 12px;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.digital-frame-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.digital-frame-screen:fullscreen {
    border-radius: 0;
    aspect-ratio: auto;
    width: 100vw;
    height: 100vh;
}

.frame-slide-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.frame-slide-layer.is-active {
    opacity: 1;
    z-index: 2;
}

.frame-slide-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    animation: kenBurnsZoom 8s ease-in-out infinite alternate;
}

@keyframes kenBurnsZoom {
    0% {
        transform: scale(1.02) translate(0, 0);
    }
    100% {
        transform: scale(1.12) translate(-1.5%, -1.5%);
    }
}

.frame-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 45%);
    pointer-events: none;
    z-index: 4;
}

.frame-top-bar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.frame-live-tag {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #ff3b30;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff3b30;
    animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.frame-counter {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.frame-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    backdrop-filter: blur(6px);
    padding: 2.5rem 1.25rem 1rem;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.frame-meta {
    flex: 1;
    min-width: 0;
}

.frame-badges {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.frame-title {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    line-height: 1.25;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frame-location {
    color: var(--tertiary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.frame-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.frame-ctrl-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.frame-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.frame-play-btn {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-color: rgba(255, 255, 255, 0.4);
}

.frame-play-btn:hover {
    background: var(--secondary);
}

.frame-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 6;
}

.frame-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #1877f2, var(--tertiary));
    box-shadow: 0 0 6px rgba(24, 119, 242, 0.8);
}

.fb-album-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fb-shortcut-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fb-shortcut-item:hover {
    transform: translateX(6px);
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 38, 82, 0.08);
    border-color: #cbd5e1;
}

.shortcut-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #e7f3ff;
    color: #1877f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.shortcut-text h4 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.shortcut-text p {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.shortcut-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1877f2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.2s ease;
}

.shortcut-link:hover {
    gap: 0.6rem;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .fb-media-header {
        flex-direction: column;
    }
    .fb-media-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Call to Action Banner */
.gallery-cta-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 4rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 15px 40px rgba(0, 38, 82, 0.2);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.cta-icon {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--tertiary);
    flex-shrink: 0;
}

.cta-text h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.cta-text p {
    font-size: 0.98rem;
    opacity: 0.9;
    margin-bottom: 0;
    max-width: 550px;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
    padding: 0.8rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    font-family: inherit;
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary-dark);
    border-color: white;
}

/* ==========================================================================
   Accessible Lightbox Modal
   ========================================================================== */

dialog.gallery-lightbox {
    position: fixed;
    inset: 0;
    margin: auto;
    width: 92vw;
    max-width: 1100px;
    max-height: 92vh;
    border: none;
    border-radius: 20px;
    background: #0f172a;
    color: white;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
    padding: 0;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

dialog.gallery-lightbox[open] {
    display: flex;
    animation: zoomModal 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomModal {
    from {
        opacity: 0;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

dialog.gallery-lightbox::backdrop {
    background: rgba(0, 15, 35, 0.85);
    backdrop-filter: blur(10px);
}

.lightbox-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 92vh;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.lightbox-badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.lightbox-location-tag {
    font-size: 0.85rem;
    color: var(--tertiary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.3rem;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lightbox-counter-badge {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    color: #cbd5e1;
}

.lightbox-tool-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.lightbox-tool-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.lightbox-tool-btn.close-btn:hover {
    background: var(--secondary);
}

.lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020617;
    overflow: hidden;
    min-height: 280px;
}

.lightbox-img-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.lightbox-img-frame img {
    max-width: 100%;
    max-height: calc(88vh - 180px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s ease;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-nav-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
    border-color: var(--primary);
}

.lightbox-nav-btn.prev {
    left: 1.25rem;
}

.lightbox-nav-btn.next {
    right: 1.25rem;
}

.lightbox-footer {
    padding: 1.25rem 1.75rem;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.lightbox-caption-text {
    font-size: 1rem;
    color: #e2e8f0;
    margin-bottom: 0;
    line-height: 1.5;
    flex: 1;
    font-weight: 300;
}

.lightbox-footer-tips {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.78rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.lightbox-footer-tips kbd {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
}

/* ==========================================================================
   Responsive Adjustments for Gallery
   ========================================================================== */

@media (max-width: 900px) {
    .gallery-controls-top {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-view-switch {
        align-self: flex-start;
    }

    .gallery-cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .cta-content {
        flex-direction: column;
    }

    .cta-text p {
        margin: 0 auto;
    }

    .lightbox-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .lightbox-footer-tips {
        display: none;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-card-media {
        height: 200px;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .btn {
        width: 100%;
        text-align: center;
    }

    .lightbox-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .lightbox-nav-btn.prev {
        left: 0.5rem;
    }

    .lightbox-nav-btn.next {
        right: 0.5rem;
    }
}
/* ==========================================================================
   EAGLE SCOUT WALL OF HONOR (eagle-scouts.html)
   ========================================================================== */

.eagle-hero {
    position: relative;
    padding: 9rem 0 3.5rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #001733 100%);
    overflow: hidden;
}

.eagle-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 18%, rgba(201, 162, 39, 0.22), transparent 42%),
        radial-gradient(circle at 18% 82%, rgba(206, 17, 38, 0.18), transparent 48%);
    pointer-events: none;
}

.eagle-hero .container {
    position: relative;
    z-index: 1;
}

.eagle-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(201, 162, 39, 0.18);
    border: 1px solid rgba(243, 217, 139, 0.4);
    color: #f3d98b;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.eagle-section {
    padding: 3rem 0 5rem;
}

/* Leader setup notice */
.eagle-sample-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #fff8e5;
    border: 1px solid #f0d999;
    border-left: 5px solid #c9a227;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    color: #5c4708;
}

.eagle-sample-notice i {
    color: #c9a227;
    margin-top: 0.2rem;
}

.eagle-sample-notice code {
    background: rgba(201, 162, 39, 0.15);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Eagle Photo Submission Notice */
.eagle-submission-notice {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, #f8fafd 0%, #eef4fc 100%);
    border: 1px solid #d0e0f5;
    border-left: 5px solid var(--primary);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 63, 135, 0.05);
}

.eagle-submission-icon {
    width: 52px;
    height: 52px;
    background: rgba(0, 63, 135, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.eagle-submission-text h3 {
    margin: 0 0 0.35rem 0;
    color: var(--primary-dark);
    font-size: 1.15rem;
    font-weight: 700;
}

.eagle-submission-text p {
    margin: 0;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.55;
}

.eagle-submission-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.eagle-submission-text a:hover {
    color: var(--primary-dark);
}

@media (max-width: 600px) {
    .eagle-submission-notice {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
        padding: 1rem 1.15rem;
    }
}

/* Controls */
.eagle-controls-card .gallery-controls-top {
    margin-bottom: 1rem;
}

.eagle-result-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    background: rgba(0, 63, 135, 0.08);
    padding: 0.5rem 0.9rem;
    border-radius: 50px;
}

.eagle-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.eagle-filter-btn {
    padding: 0.5rem 1.1rem;
    border: 1.5px solid #d5dfea;
    background: white;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.eagle-filter-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.eagle-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 6px 16px rgba(0, 63, 135, 0.25);
}

/* Portrait grid */
.eagle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 2rem;
}

.eagle-card {
    background: white;
    border: 1px solid rgba(0, 63, 135, 0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 38, 82, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.eagle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 38, 82, 0.14);
}

.eagle-card:focus-visible {
    border-color: var(--primary);
    outline: none;
}

/* Hide portraits completely for now */
.eagle-portrait {
    display: none !important;
}

.eagle-year-tag {
    display: none !important;
}

.eagle-sample-tag {
    display: none !important;
}

/* Engraved brass nameplate */
.eagle-nameplate {
    position: relative;
    text-align: center;
    padding: 2rem 1.5rem 2.2rem;
    background: linear-gradient(160deg, #6a5417 0%, #a8862a 22%, #f0dda0 50%, #a8862a 78%, #6a5417 100%);
    border-top: 2px solid rgba(255, 255, 255, 0.35);
    border-bottom: 2px solid rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.35), inset 0 -3px 8px rgba(0, 0, 0, 0.28);
    /* Grows to fill the card so plates stay flush across a row, Palm chip or not */
    flex: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.eagle-nameplate::before,
.eagle-nameplate::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6d5, #7a6018 70%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.eagle-nameplate::before {
    left: 10px;
}

.eagle-nameplate::after {
    right: 10px;
}

.eagle-nameplate-rank {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #4a3a08;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.eagle-nameplate-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #2f2405;
    margin: 0.25rem 0 0.15rem;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 -1px 1px rgba(0, 0, 0, 0.25);
    line-height: 1.25;
}

.eagle-nameplate-emblem {
    display: block;
    height: 48px;
    width: auto;
    flex-shrink: 0;
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 2px 3px rgba(47, 36, 5, 0.45));
}

.eagle-nameplate-year {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    background: rgba(47, 36, 5, 0.18);
    border: 1px solid rgba(74, 58, 8, 0.35);
    color: #3b2c06;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.eagle-palm-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    background: rgba(47, 36, 5, 0.82);
    color: #f3d98b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.22rem 0.6rem;
    border-radius: 50px;
}

/* Card body */
.eagle-card-body {
    padding: 1.1rem 1.25rem 1.4rem;
    flex: 1;
}

.eagle-card-body:empty {
    display: none;
}

.eagle-quote {
    margin-top: 0.9rem;
    padding-left: 0.85rem;
    border-left: 3px solid var(--tertiary);
    font-size: 0.92rem;
    font-style: italic;
    color: #55606d;
}

.eagle-card.is-placeholder .eagle-nameplate-name {
    opacity: 0.85;
}

/* Path to Eagle callout */
.eagle-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 15px 40px rgba(0, 38, 82, 0.25);
}

.eagle-cta-icon {
    font-size: 2rem;
    color: #f3d98b;
    background: rgba(255, 255, 255, 0.12);
    width: 66px;
    height: 66px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.eagle-cta-text {
    flex: 1;
    min-width: 260px;
}

.eagle-cta-text h2 {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.eagle-cta-text p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Lightbox tweaks */
.eagle-lightbox-frame img {
    /* Leaves room for the stacked nameplate details below the portrait */
    max-height: 58vh;
}

.eagle-lightbox-footer {
    /* Override the gallery footer's side-by-side row: stack the nameplate details */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.eagle-lightbox-name {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.2rem;
}

.eagle-lightbox-meta {
    font-size: 0.95rem;
    color: var(--tertiary);
    margin-bottom: 0.5rem;
}

.eagle-lightbox-footer .lightbox-footer-tips {
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .eagle-hero {
        padding: 7rem 0 2.5rem;
    }

    .eagle-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.25rem;
    }

    .eagle-controls-card .gallery-controls-top {
        flex-direction: column;
        align-items: stretch;
    }

    .eagle-result-count {
        text-align: center;
    }

    .eagle-nameplate-name {
        font-size: 1.1rem;
    }

    .eagle-cta {
        text-align: center;
        justify-content: center;
    }
}
