/* ============================================================
   Denmark WA Weather - Common Site Styles
   Shared by gauges, trends and record templates
   ============================================================ */

:root {
    --primary-blue: #1a365d;
    --aviation-gold: #d69e2e;
    --background-light: #f7fafc;
    --slate-text: #2d3748;
}

/* GLOBAL */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--slate-text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.container {
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* HEADER */
header {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.35)),
        url('/images/header-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #0f172a;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    header {
        padding: 1.5rem 2rem !important;
    }
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

h1 {
    color: #fbbf24 !important;
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(15, 23, 42, 0.6) !important;
}

.subtitle {
    color: #f8fafc;
    font-size: 0.8rem;
    margin: 4px 0 0 0;
}

/* PAGE PROFILES - preserve the existing page dimensions/typography */
.gauges-page .container {
    width: 95% !important;
    max-width: 1350px !important;
}

.gauges-page header {
    z-index: 1000;
    text-align: center;
}

.gauges-page h1 {
    font-size: 1.75rem;
}

.gauges-page .subtitle {
    color: #f8fafc;
    font-size: 0.8rem;
}

.trends-page .container {
    width: 96% !important;
    max-width: 1600px !important;
}

.trends-page header {
    z-index: 50;
    text-align: center;
}

.trends-page h1 {
    font-size: 1.75rem;
}

.trends-page .subtitle {
    color: #f8fafc;
    font-size: 0.8rem;
}

.records-page {
    background-color: #f8fafc;
    color: #334155;
}

.records-page .container {
    width: 96% !important;
    max-width: 1600px !important;
}

.records-page header {
    z-index: 50;
}

/* NAVIGATION - matches the working Live Gauges page */
.nav-menu-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem;
    margin: 1.5rem auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    gap: 6px;
    box-sizing: border-box;
}

.nav-menu-item {
    color: #1a365d !important;
    text-decoration: none !important;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
}

.nav-menu-item:hover {
    background-color: #edf2f7 !important;
    color: #d69e2e !important;
}

.nav-menu-item.active {
    background-color: #1a365d !important;
    color: #ffffff !important;
    border-bottom: 3px solid #d69e2e !important;
}

/* SHARED RECORD-PAGE CONTENT */
.records-page .card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    box-sizing: border-box;
}

.records-page h2 {
    color: #0f172a;
    margin-top: 0;
    border-bottom: 2px solid #fbbf24;
    padding-bottom: 0.5rem;
    font-size: 1.4rem;
}

.records-page .weather-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.records-page .weather-table tr {
    border-bottom: 1px solid #e2e8f0;
}

.records-page .weather-table tr:last-child {
    border-bottom: none;
}

.records-page .weather-table td {
    padding: 12px 8px;
}

.records-page .param-label {
    font-weight: 700;
    color: #1e293b;
    width: 45%;
}

.records-page .param-value {
    font-weight: 600;
    color: #0f172a;
    text-align: right;
}

.records-page .param-time {
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    width: 25%;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.other-page .card {
            background-color: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 1rem;
            padding: 2rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            margin-bottom: 2rem;
        }
.other-page h2 {
            color: #0f172a;
            margin-top: 0;
            border-bottom: 2px solid #fbbf24;
            padding-bottom: 0.5rem;
            font-size: 1.4rem;
        }

/* Shared back button for sub-pages */
.back-btn {
            display: inline-block;
            background-color: #0f172a;
            color: #ffffff;
            text-decoration: none;
            padding: 10px 20px;
            font-size: 0.85rem;
            font-weight: 600;
            border-radius: 8px;
            margin-bottom: 1.5rem;
            transition: background-color 0.2s;
        }
        .back-btn:hover {
            background-color: #1e293b;
        }

/* OTHER / AVIATION GALLERY + LIGHTBOX */
.gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 16px;
            padding: 20px 0;
        }
        .gallery-item {
            background-color: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.04);
            transition: transform 0.2s;
        }
        .gallery-item:hover {
            transform: translateY(-4px);
        }
        .gallery-item img {
            width: 100%;
            height: 160px;
            object-fit: cover;
            display: block;
            cursor: pointer;
        }
        .gallery-caption {
            padding: 10px;
            font-size: 0.85rem;
            color: #334155;
            text-align: center;
            font-weight: 500;
        }

        /* The Pop-up Window (Hidden by Default) */
        .lightbox {
            display: none;
            position: fixed;
            z-index: 9999;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(15, 23, 42, 0.95);
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .lightbox-content {
            max-width: 90%;
            max-height: 80%;
            border-radius: 8px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        }
        #lightbox-caption {
            color: #fbbf24;
            margin-top: 15px;
            font-size: 1rem;
            font-weight: 600;
        }
        .close-btn {
            position: absolute;
            top: 20px;
            right: 30px;
            color: #ffffff;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
            transition: color 0.2s;
        }
        .close-btn:hover {
            color: #fbbf24;
        }

/* ============================================================
   HEADER HOME / CAPSULE NAVIGATION
   Used by aviation, SAAA and other non-weather pages
   ============================================================ */
header nav:not(.nav-menu-bar) {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

header nav:not(.nav-menu-bar) a {
    display: inline-block;
    background-color: #0f172a !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1rem !important;
    padding: 8px 18px !important;
    border-radius: 9999px !important;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.25);
    transition: all 0.2s ease-in-out;
}

header nav:not(.nav-menu-bar) a:hover {
    background-color: #fbbf24 !important;
    color: #0f172a !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(251, 191, 36, 0.3);
}

@media (min-width: 640px) {
    header nav:not(.nav-menu-bar) {
        margin-top: 0;
    }
}

/* ============================================================
   PLAIN SUB-PAGE CONTENT WIDTH
   Used by /other/ aircraft/gallery pages that have a plain <main>
   and no page-specific body class.
   ============================================================ */
body:not(.gauges-page):not(.trends-page):not(.records-page):not(.home-page) > main {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}
