/* ===============================
   GALLERY THEME (MATCH VIDEOS)
=================================*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Montserrat:wght@500;600;700;800&display=swap');
@import url("style.css");

:root {
    --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --primary: #002b5c;
    --accent: #0ea5e9;
    --background: #ffffff;

    --header-bg: rgba(0, 43, 92, 0.95);
    --header-text: #ffffff;
    --nav-hover: rgba(14, 165, 233, 0.2);
}

/* DARK MODE */

body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --card-bg: #1e293b;
    --goal-color: #22c55e;
    --yellow-card: #facc15;
    --red-card: #ef4444;
}

:root[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #0b1724;
    --card-bg: #ffffff;
    --header-bg: #002b4f;
    --header-text: #ffffff;
    --nav-hover: #001f3a;
    --secondary-bg: #f0f4f8;
}

:root[data-theme="dark"] {
    --bg-color: #0b0f14;
    --text-color: #e6eef6;
    --card-bg: #0f1720;
    --header-bg: #00131f;
    --header-text: #e6eef6;
    --nav-hover: #003a66;
    --secondary-bg: #0b1220;
}

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


/* ===============================
   HEADER + NAV (FIXED)
=================================*/

body {
    font-family: var(--font-base);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;

    transition: background-color 0.3s, color 0.3s;
    letter-spacing: -0.3px;

    color: var(--text-color);
    background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* ===============================
   PAGE HERO
=================================*/

.page-hero {
    margin: 30px 20px 50px 20px;
    padding: 40px 20px;

    text-align: center;

    border-radius: 20px;
    background: linear-gradient(135deg, rgba( 0, 123, 255, 0.05) 0%, rgba( 0, 123, 255, 0.02) 100%);
}

.page-hero h2 {
    font-size: 36px;
    font-weight: 700;

    background: linear-gradient(135deg, #007aff, #003d82);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-hero p {
    font-size: 18px;
    font-weight: 500;

    opacity: 0.8;
    color: var(--text-color);
}

/* ===============================
   FILTER BUTTONS
=================================*/

.gallery-filters {
    text-align: center;
    margin: 20px 0 40px;
}

.gallery-filters button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    margin: 6px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s ease;
}

.gallery-filters button:hover,
.gallery-filters button.active {
    background: var(--accent);
}

/* ===============================
   GALLERY GRID
=================================*/

.gallery-container {
    width: 95%;
    max-width: 1200px;
    margin: auto;
}

.subsection {
    margin-bottom: 60px;
}

.subsection h3 {
    border-left: 5px solid var(--accent);
    padding-left: 10px;
    margin-bottom: 20px;
    color: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ===============================
   GALLERY ITEMS
=================================*/

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    text-align: center;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.gallery-item p {
    padding: 10px;
    font-weight: 600;
    font-size: 14px;
}

/* ===============================
   LIGHTBOX
=================================*/

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 10px;
}

/* CLOSE BUTTON */

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--accent);
}

/* ===============================
   RESPONSIVE
=================================*/

@media (max-width: 768px) {

    .header-top {
        flex-direction: column;
        gap: 10px;
    }

    nav ul {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
    }

    nav ul li {
        grid-column: span 1;
    }

    nav a,
    nav ul li a {
        font-size: 12px;
        padding: 6px 8px;
    }

    .page-hero h2 {
        font-size: 24px;
    }

    .page-hero p {
        font-size: 15px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .gallery-item img {
        height: 170px;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: 8px;
    }

    nav a,
    nav ul li a {
        font-size: 11px;
        padding: 4px 7px;
    }

    .page-hero h2 {
        font-size: 22px;
    }

    .page-hero p {
        font-size: 14px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
}

@media (min-width: 992px) {
    nav ul {
        flex-wrap: nowrap;
    }

    nav ul li {
        flex: 0 1 auto;
        min-width: 0;
        max-width: none;
    }
}