/* =========================================
   1. GLOBAL RESET & BASICS
   ========================================= */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    /* Use standard window scrolling instead of internal div scrolling */
    width: 100%; 
    overflow-x: hidden; 
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: white;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
    /* Old solid color: background-color: #051428; */
    
    /* New Semi-Transparent "Glass" Style */
    background-color: rgba(5, 20, 40, 0.95); /* 0.85 means 85% visible */
    backdrop-filter: blur(8px); /* Blurs the text scrolling behind it */
    -webkit-backdrop-filter: blur(8px); /* Safari support */
    
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    transition: height 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle edge definition */
}

.logo img {
    max-height: 80px; /* Slightly reduced for better fit */
    display: block;
}

/* --- Desktop Nav (Default) --- */
nav {
    flex-grow: 1;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 20px;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: red;
}

/* Grey separator lines (Desktop only) */
nav ul li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background-color: grey;
}

/* --- Hamburger Menu Button (Hidden on Desktop) --- */
.menu-toggle {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* =========================================
   3. MAIN CONTENT LAYOUT
   ========================================= */
main {
    flex: 1 0 auto;
    /* Padding Top is handled by JS, but we set a safe default */
    padding: 120px 20px 60px 20px; 
    max-width: 100%;
    box-sizing: border-box;
}

.announcements, .links, .content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 2em;
    text-align: center;
    color: #051428;
}

h2 {
    font-size: 1.5em;
    margin-top: 20px;
    color: blue;
}

a {
    color: #0D0D19;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

a:hover {
    color: red;
}

/* =========================================
   4. CONTENT MODULES (Articles, Frames, Lists)
   ========================================= */

/* Articles */
.announcements article, .links ul {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.announcements article h2 {
    margin: 0;
}

/* Sections */
.section {
    margin-bottom: 40px;
    text-align: center;
}

.section h3 {
    color: #333;
    font-weight: bold;
}

/* Images & Frames */
.frame {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 10px auto;
    background-color: #f9f9f9;
    max-width: fit-content;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-frame {
    @extend .frame; /* Concepts borrowed from frame */
    border: 1px solid #ddd;
    padding: 20px;
    margin: 10px auto;
    background-color: #f9f9f9;
    max-width: fit-content;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Responsive Image Classes */
.responsive-img, .real-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}
.large-img {
    max-width: 80%;
    height: auto;
    margin-bottom: 10px;
}
.small-img {
    max-width: 320px;
    height: auto;
    margin-bottom: 10px;
}

/* Container for side-by-side elements */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 20px;
}

.container .frame {
    width: 48%;
    box-sizing: border-box;
}

/* Before/After Comparison */
.before-after {
    display: flex;
    justify-content: space-between;
    margin-bottom: -30px;
    text-align: center;
}
.before-after h3 {
    width: 48%;
}

/* Translation Lists (Star bullet points) */
.translation-list {
    list-style: none;
    padding-left: 0;
}
.translation-list li {
    display: flex;
    align-items: center;
}
.translation-list li::before {
    content: "★";
    color: red;
    font-size: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Progress Reports */
.progress-report { margin-bottom: 20px; }

.progress-item {
    margin-bottom: 5px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.6);
    background-color: #e0e0e0;
    overflow: hidden;
}
.progress-item:nth-child(odd) { background-color: #f5f5f5; }

.progress-item-date {
    float: left;
    width: 120px;
    font-weight: bold;
}
.progress-item-text {
    margin-left: 130px;
    text-align: left;
}
.new-month { margin-top: 40px; }

/* =========================================
   5. SPECIAL ANIMATIONS (Snake Border)
   ========================================= */
.announce-box {
    --announce-size: min(90vw, 420px);
    position: relative;
    width: var(--announce-size);
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px auto;
    border-radius: 54px;
    background: #0D0D19;
    color: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,.25);
}

.announce-content {
    padding: 24px;
    text-align: center;
    z-index: 1;
}

.announce-title { font-size: clamp(18px, 2.2vw, 28px); font-weight: 800; margin-bottom: 6px; }
.announce-sub { font-size: clamp(14px, 1.8vw, 18px); font-weight: 700; color: #ffd400; margin-bottom: 6px; }
.announce-date { font-size: clamp(12px, 1.6vw, 16px); opacity: .9; }
.announce-box a { color: #ffd400; text-decoration: underline; }

.snake-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.snake-border rect {
    stroke: #FF3B3B;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 80 310;
    animation: ic-snake-move 2.0s linear infinite;
}

@keyframes ic-snake-move {
    to { stroke-dashoffset: -390; }
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    /* Old solid color: background-color: #051428; */
    
    /* New Semi-Transparent "Glass" Style */
    background-color: rgba(5, 20, 40, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    color: white;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle edge definition */
}

/* =========================================
   7. RESPONSIVE / MOBILE STYLES
   ========================================= */

/* Triggers on Tablets and Phones (1024px and below) */
@media (max-width: 1024px) {
    header {
        flex-wrap: wrap; /* Allows the menu to drop down */
        padding: 10px 15px;
    }

    /* Show the hamburger button */
    .menu-toggle {
        display: flex;
    }

    /* Hide the Navigation Bar initially */
    nav {
        display: none;
        width: 100%;
        margin-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.2); /* Lighter border */
        
        /* Make the dropdown menu slightly transparent too */
        background-color: rgba(5, 20, 40, 0.98); 
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    /* Show Navigation when JS adds .active class */
    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column; /* Stack items vertically */
        align-items: center;
        width: 100%;
    }

    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #1a2639; /* Slight divider */
    }

    nav ul li a {
        display: block;
        padding: 15px 0; /* Big touch target */
        font-size: 18px;
    }

    /* Remove the grey vertical lines */
    nav ul li:not(:last-child)::after {
        display: none;
    }

    /* Animation: Turn Hamburger into X */
    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    /* Content Adjustments */
    .container .frame, .before-after h3 {
        width: 100%; /* Full width on mobile */
        margin-bottom: 20px;
    }
    
    .before-after {
        flex-direction: column;
    }
    
    .large-img {
        max-width: 100%;
    }

    /* Video Frame Fixes */
    .video-frame iframe {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }
}

/* Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    .logo img {
        max-height: 50px;
    }
    
    /* Stack progress report dates and text */
    .progress-item-date {
        float: none;
        width: auto;
        margin-bottom: 5px;
        display: block;
    }
    .progress-item-text {
        margin-left: 0;
    }
    
    /* Footer tweaks */
    footer {
        font-size: 0.8em;
        padding: 8px 0;
    }
}