:root {
    /* --- FONTS --- */
    --header-font: "Caveat", cursive; 
    --body-font: "Playfair Display", Georgia, serif;
    
    /* --- COLORS (CLASSY BEIGE/BROWN/OLIVE SCHEME) --- */
    --timeline-line-color: #d1c9bd; /* Soft Taupe */
    --timeline-dot-color: #654321; /* Medium Brown */
    --main-bg: #fcfbf8;            /* Light Cream/Beige */
    --card-bg: #ffffff;
    --text-color: #3a3530;         /* Deep Dark Brown/Charcoal */
    --nav-bg: #e7e4db;             /* Light Beige/Taupe for Nav Bar */
    --nav-active: #556b2f;         /* Dark Olive Green Accent */
    --nav-active-text: #fff;
    --header-bg: #fff;
    --country-header-bg: #e7e4db;  /* Matching Nav Background */
    
    /* Navigation Bar Highlighting */
    --country-active-bg: #dce0cf;  /* Very Light Sage/Olive for background highlight */
    
    /* Day Entry Alternating Colors */
    --day-entry-bg-odd: #ffffff;  /* White */
    --day-entry-bg-even: #fcfbf8; /* Light Cream */
    
    --thai-support-color: #A6192E; /* Red/Crimson for Thai flag hint */
    --int-support-color: #1A73E8;  /* Placeholder blue/Can use the olive color */
    --mobile-nav-bg: #333333; /* Dark Grey background for mobile nav/menu */
    --mobile-nav-text: #f0f0f0; /* Light text for contrast */
    --day-divider-color: #654321; /* ⬅️ UPDATED: Using timeline-dot-color (#654321) for a brown divider */
}

html {
    /* Adjust top padding to account for header + nav height */
    scroll-padding-top: 220px; 
    scroll-behavior: smooth; 
}
body {
    font-family: var(--body-font); 
    margin: 0;
    background-color: var(--main-bg);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 17px; /* Improved base font size */
}
* { box-sizing: border-box; }

.header {
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--timeline-line-color); 
}
.header h1 { 
    margin: 0; 
    font-size: 2.5rem; 
    font-family: var(--header-font); 
}
.header h2 { 
    margin: 0; 
    font-size: 1.5rem; 
    font-family: var(--header-font); 
}
.header p { margin: 0.25rem 0 0; font-size: 1.1rem; color: #787068; } 

/* --- UPDATED: Visually Pleasing Donation Link --- */
.donation-link {
    display: inline-block;
    margin-top: 1.5rem; /* Increased margin for better separation */
    padding: 0.75rem 1.5rem; /* More generous padding */
    background-color: var(--nav-active);
    color: var(--nav-active-text);
    text-decoration: none;
    border-radius: 8px; /* More rounded corners */
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* Subtle lift effect */
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--nav-active); /* Solid border for definition */
}

.donation-link:hover {
    background-color: #6f8f4a; /* Slightly darker olive on hover */
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); /* Enhanced shadow on hover */
}

/* ------ Navigation Bar and Flag/Date Styles ------*/
.date-navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--timeline-line-color); 
    z-index: 100;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    white-space: nowrap;
}
.country-nav-group {
    display: inline-block;
    vertical-align: top; 
    margin-right: 1.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
    border: 1px solid transparent; 
}
.country-nav-group.active {
    background-color: var(--country-active-bg);
    border-color: var(--timeline-line-color); 
}
.country-info {
    display: flex;
    align-items: center;
    gap: 0.5rem; 
    margin-bottom: 0.5rem;
}
.country-info img {
    width: 20px; 
    height: auto;
    border-radius: 2px;
    box-shadow: 0 0px 2px rgba(0,0,0,0.1);
}
.country-title-dates {
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 0.75rem; 
}
/* FIX: Added h2 style to use the header font */
.country-info h2 { 
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    font-family: var(--header-font);
}
.country-info h3 {
    margin: 0;
    font-size: 1.3rem; 
    color: var(--text-color);
    font-family: var(--header-font); 
}
.country-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #787068; 
    font-weight: 400;
}
.date-navbar-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap; 
}
.date-navbar a {
    display: inline-block;
    padding: 0.25rem 0.75rem; 
    text-decoration: none;
    color: var(--text-color);
    border-radius: 4px; 
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    border: none;
    background-color: #fff;
}
.date-navbar a:hover { 
    background-color: var(--country-active-bg); 
}
.date-navbar a.active {
    background-color: var(--nav-active);
    color: var(--nav-active-text);
    border: 1px solid var(--nav-active); 
}

/* ------ Timeline and Country Header Styles ------*/

.timeline {
    width: 100%;
    margin: 0 auto; /* Removed top margin, let cover page handle vertical space */
    padding: 0 1rem;
    min-height: 50vh;
}
.country-header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 3rem; 
    padding-bottom: 2rem;
}
.country-header-content img {
    width: 33vw; 
    max-width: 350px; 
    height: auto; 
    object-fit: contain; 
    margin-bottom: 2.5rem; 
    border-radius: 8px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.3); 
    border: 1px solid rgba(0,0,0,0.1); 
}
.country-header-content h1 {
    font-family: var(--header-font);
    font-size: 4.5rem; 
    margin: 0.5rem 0;
    color: var(--text-color);
}
.country-header-content h2 {
    font-family: var(--header-font); 
    font-size: 1.5rem; 
    margin: 0;
    color: #787068; 
    font-weight: 400;
}
.loading-placeholder { text-align: center; color: #888; padding-top: 5rem; }

/* --- CORE TIMELINE STYLES (DESKTOP) --- */
.day-entry {
    display: grid;
    /* Split into a 1.5fr (Content) and 1fr (Images) column for a 60:40 split */
    grid-template-columns: 1.5fr auto 1fr;
    gap: 2rem; 
    margin-bottom: 3rem;
    align-items: start;
    animation: fadeIn 0.5s ease-in-out;
    background-color: var(--day-entry-bg-odd);
    padding: 1.5rem 1rem;
    border-radius: 12px; /* Added rounded corners for day entries */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Alternating Timeline Layout (Content on Left/Images on Right) --- */
.day-entry:nth-child(even) {
    background-color: var(--day-entry-bg-even);
    /* Flipped Split for Even Days (Images 1fr, Content 1.5fr) */
    grid-template-columns: 1fr auto 1.5fr;
}

/* ⬅️ NEW: Border for all day entries to separate them */
.day-entry {
    /* ⬅️ NOW USING THE BROWN COLOR VARIABLE */
    border-bottom: 1px solid var(--day-divider-color); 
}
/* Remove border from the last item to keep it clean */
.day-entry:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.day-content {
    /* Odd days: content on the left column (1.5fr) */
    grid-column: 1; 
    text-align: initial;
    padding-top: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- Content styling for EVEN (left) entries (moves to 3rd column, which is now 1.5fr) --- */
.day-entry:nth-child(even) .day-content {
    grid-column: 3;
}

/* Re-apply alignment to text elements (Right align for odd, Left for even) */
.day-content h2,
.day-content p {
    text-align: right; 
}
.day-entry:nth-child(even) .day-content h2,
.day-entry:nth-child(even) .day-content p {
    text-align: left; 
}

/* --- In-Text Image Formatting (NEW) --- */
.day-content .intext-image {
    display: flex;
    justify-content: center; /* Center the image */
    margin: 1.5rem 0; /* Add vertical space */
}

.day-content .intext-image img {
    max-width: 80%;
    width: 400px; /* Medium size */
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); 
}
/* --- End In-Text Image Formatting --- */

.day-content h2 { 
    margin: 0 0 0.5rem 0; 
    font-size: 1.75rem; 
    color: var(--text-color); 
    font-family: var(--header-font);
}
.day-content p { 
    margin: 0 0 1rem 0; 
    color: var(--text-color); 
    font-size: 1.1rem;
    overflow-wrap: break-word;
}

.day-content table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; text-align: left; }
.day-content th, .day-content td { border: 1px solid #ddd; padding: 8px; }
.day-content tr:nth-child(even) { background-color: var(--day-entry-bg-even); } 

.timeline-line-container {
    grid-column: 2;
    width: 4px;
    height: 100%;
    background-color: var(--timeline-line-color);
    position: relative;
    align-self: stretch;
}
.timeline-dot {
    position: absolute;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-color: var(--timeline-dot-color);
    border-radius: 50%;
    border: 3px solid var(--main-bg);
}
.day-images {
    /* Odd days: images on the right column (1fr) */
    grid-column: 3;
    display: grid;
    /* Adjusted minmax to allow for 2 columns of smaller images on desktop */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 1rem; 
    /* Right align the images within the grid column */
    justify-content: end; 
}

/* --- Image styling for EVEN (left) entries (moves to 1st column, which is now 1fr) --- */
.day-entry:nth-child(even) .day-images {
    grid-column: 1;
    /* Left align the images for even days */
    justify-content: start; 
}

.day-images img {
    max-width: 400px;
    width: 100%;
    height: auto; 
    object-fit: initial;
    aspect-ratio: initial;
    
    border-radius: 12px;
    background-color: #eee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03); 
    display: block;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; 
}

/* Subtle hover effect for images */
.day-images img:hover {
    transform: scale(1.02); 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); 
    z-index: 10;
}

/* Placeholder shells while waiting to load */
.day-shell {
  margin: 2rem auto;
  padding: 0 1rem;
  min-height: 420px; 
}

/* --- Apply day-entry styling to shell for consistent look --- */
.day-shell, .day-shell-skeleton {
    margin: 0; 
    padding: 1.5rem 1rem;
    border-radius: 12px;
}
.day-shell:nth-child(even) {
    background-color: var(--day-entry-bg-even);
}
.day-shell:nth-child(odd) {
    background-color: var(--day-entry-bg-odd);
}


.day-shell-skeleton {
  display: grid;
  /* UPDATED: Matches the new primary grid for odd days */
  grid-template-columns: 1.5fr auto 1fr;
  gap: 2rem; 
  align-items: start;
  animation: fadeIn 0.3s ease-in-out;
}
/* --- Align skeleton content for even entries --- */
.day-shell:nth-child(even) .day-shell-skeleton {
    /* UPDATED: Matches the new primary grid for even days */
    grid-template-columns: 1fr auto 1.5fr;
}

/* Odd Day Skeleton Positioning (content on left, 1.5fr) */
.day-shell-skeleton .skeleton-line:not(.skeleton-title) {
    grid-column: 1; 
}
.day-shell-skeleton .skeleton-title {
    grid-column: 1; 
    text-align: right; 
}
.day-shell-skeleton .skeleton-thumb-row {
    grid-column: 3; /* Images on right (1fr) */
    justify-content: end; /* Ensure skeleton thumbs align right */
}

/* Even Day Skeleton Positioning (content on right, 1.5fr) */
.day-shell:nth-child(even) .day-shell-skeleton .skeleton-line:not(.skeleton-title) {
    grid-column: 3; 
}
.day-shell:nth-child(even) .day-shell-skeleton .skeleton-title {
    grid-column: 3; 
    text-align: left;
}
.day-shell:nth-child(even) .day-shell-skeleton .skeleton-thumb-row {
    grid-column: 1; /* Images on left (1fr) */
    justify-content: start; /* Ensure skeleton thumbs align left */
}

.day-shell-skeleton .timeline-line-container {
    grid-column: 2;
}


.skeleton-line {
  height: 14px;
  margin: 10px 0; 
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0ed 25%, #f6f6f3 37%, #f0f0ed 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}
.skeleton-title { height: 24px; width: 60%;}

.skeleton-thumb-row {
  gap: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.skeleton-thumb {
  height: 140px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f0f0ed 25%, #f6f6f3 37%, #f0f0ed 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Back To Top Button Styles */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--nav-active); 
    color: var(--nav-active-text);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    text-decoration: none; 
    z-index: 1000;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* keeps your sticky nav behavior pleasant while scrolling */
html { scroll-behavior: smooth; }

/* --- DESKTOP: Video Block Styles --- */

.day-video-block {
    /* This makes the video block span the full width 
       of the parent .day-images grid */
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 1.5rem; /* Keeps a nice space above the photos */
    text-align: center;
}

/* This rule makes the loaded video responsive */
.day-video-block video.day-video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}


/* Large pill-style button that fits the journal theme */
.video-load-btn {
    width: 100%;
    padding: 1.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--header-font);
    color: var(--text-color); /* Black/dark brown font */
    background-color: var(--country-active-bg);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    /* Added for the new JS */
    display: inline-flex; 
    justify-content: center;
    align-items: center;
}

.video-load-btn:hover {
    background-color: #6f8f4a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.video-load-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* --- UPDATED VIDEO CONTAINER (for Aspect Ratio) --- */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 720px; /* Cap the max size */
    margin: 0.75rem auto 0; /* Center the container */
    border-radius: 12px; /* Rounded corners on the container */
    background: #000; /* Black background for letterboxing */
}

/* --- NEW STYLES FOR BOTH VIDEO AND IFRAME --- */
.video-container .day-video,
.video-container .day-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px; /* Rounded corners on the video/iframe itself */
}


/* Close button under the video */
.video-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 1rem; /* Increased top margin */
    padding: 0.75rem 1.5rem; /* Made button larger */
    z-index: 20;

    font-size: 1rem; /* Increased font size */
    font-weight: 700; /* Copied from load button */
    font-family: var(--header-font); /* Copied from load button */

    border-radius: 12px; /* Copied from load button */
    border: none; /* Copied from load button */
    cursor: pointer;

    /* --- STYLES AS REQUESTED --- */
    background-color: var(--country-active-bg); /* Light green */
    color: var(--text-color); /* Black/dark brown font */
    
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* Copied from load button */
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, color 0.2s;
}

.video-close-btn:hover {
    /* --- HOVER STYLES AS REQUESTED --- */
    background-color: var(--nav-active); /* Dark green */
    color: var(--nav-active-text); /* White font */
    
    transform: translateY(-2px); /* Copied from load button */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); /* Copied from load button */
    z-index: 20;
}

/* ------ Mobile Styles (Max-width: 800px) ------*/

@media (max-width: 800px) {
    html { 
        scroll-padding-top: 150px; 
    } 
    body { font-size: 24px; }

    .country-info img { width: 18px; } 
    /* FIX: Added h2 style for mobile */
    .country-info h2 { 
        font-size: 0.9rem;
        font-family: var(--header-font); 
    }
    .country-info h3 { 
        font-size: 0.8rem;
        /* Keep h3 on mobile using the same font */
        font-family: var(--header-font); 
    }
    .country-info p { font-size: 1rem; }
    .country-title-dates { gap: 0.7rem; }

    .header h1 { font-size: 2.1rem; font-family: var(--header-font); }
    .header h2 { font-size: 1.8rem; font-family: var(--header-font); }
    .header h3 { font-size: 1.5rem; font-family: var(--header-font); }
    
    /* --- Mobile: Switch to Single-Column Timeline (Reverts to Fixed Layout) --- */
    .day-entry, .day-entry:nth-child(even) {
        grid-template-columns: 1fr; /* ⬅️ CRITICAL CHANGE: Single column grid */
        gap: 0; /* Remove gap as there's only one column */
        margin-bottom: 2rem;
        background-color: var(--day-entry-bg-odd); 
        padding: 1rem 0.5rem;
        /* NEW: Add border to separate days */
        border-bottom: 1px solid var(--day-divider-color); 
        border-radius: 0; /* Remove rounded corners for border continuity */
        box-shadow: none; /* Remove shadow for cleaner mobile look */
    }
    /* Remove the bottom border from the last mobile day entry */
    .day-entry:last-of-type {
        border-bottom: none;
    }

    /* ⬅️ NEW: HIDE THE TIMELINE LINE AND DOT COLUMN */
    .timeline-line-container, 
    .timeline-dot { 
        display: none; 
    }

    .day-content, .day-entry:nth-child(even) .day-content { 
        grid-column: 1; /* ⬅️ CRITICAL CHANGE: Content is now column 1 */
        /* Reset alignment for mobile */
        text-align: initial; 
        padding-top: 0; 
    }

    .day-content p { 
        font-size: 1.2rem; 
        overflow-wrap: break-word;
    }

    /* Re-apply alignment to text elements for mobile */
    .day-content h2,
    .day-content p,
    .day-entry:nth-child(even) .day-content h2,
    .day-entry:nth-child(even) .day-content p {
        text-align: center; /* ⬅️ CRITICAL CHANGE: ALL text is CENTERED */
    }
    
    .day-content .intext-image {
        display: flex; /* Ensure flex is used */
        justify-content: center; /* Center the image in the content */
        margin: 1rem 0;
    }
    .day-content .intext-image img {
        width: 100%; /* Take full width of the content column on mobile */
        max-width: 300px; /* Cap size if mobile column is very wide */
    }
    
    /* Day Images: Ensure the image gallery is centered */
    .day-images, .day-entry:nth-child(even) .day-images { 
        grid-column: 1; /* ⬅️ CRITICAL CHANGE: Images are now column 1 */
        margin-top: 1rem; 
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem; 
        
        /* ⬅️ CRITICAL CHANGE: Center the grid items within the container */
        justify-content: center; 
        
        /* NEW: Center the image container block itself */
        max-width: 400px; 
        margin-left: auto;
        margin-right: auto;
    }

    /* Ensure images are fully responsive on mobile */
    .day-images img {
        max-width: 100%; 
    }

    .day-video-block {
        /* This makes the video block span the full width 
           of the parent .day-images grid */
        grid-column: 1 / -1;
        width: 100%;
        margin-bottom: 1.5rem; /* Keeps a nice space above the photos */
    }

    /* This rule makes the loaded video responsive */
    .day-video-block video.day-video {
        width: 100%;
        height: auto;
        border-radius: 12px;
        display: block;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    }

    /* Reset skeleton layout for mobile */
    .day-shell-skeleton, .day-shell:nth-child(even) .day-shell-skeleton {
        grid-template-columns: 1fr; /* Single column */
        gap: 0; 
    }
    /* Hiding the timeline column in the skeleton too */
    .day-shell-skeleton .timeline-line-container {
        display: none;
    }
    
    /* Reset skeleton text/image positioning to the single column */
    .day-shell-skeleton .skeleton-title,
    .day-shell:nth-child(even) .day-shell-skeleton .skeleton-title,
    .day-shell-skeleton .skeleton-line:not(.skeleton-title),
    .day-shell:nth-child(even) .day-shell-skeleton .skeleton-line:not(.skeleton-title) {
        grid-column: 1; 
        text-align: center; /* Centering skeleton text lines */
        margin-left: auto;
        margin-right: auto;
    }
    .day-shell-skeleton .skeleton-title {
        width: 60%; /* Re-center the title line */
    }
    .day-shell-skeleton .skeleton-line:not(.skeleton-title) {
        width: 80%;
    }
    
    .day-shell-skeleton .skeleton-thumb-row,
    .day-shell:nth-child(even) .day-shell-skeleton .skeleton-thumb-row {
        grid-column: 1; /* Images are now column 1 */
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem; 
        justify-content: center;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .country-header-content img {
        width: 150px; 
        max-width: none; 
        margin-bottom: 1.5rem;
    }

    .country-header-content h1 {
        font-size: 3.5rem; 
        font-family: var(--header-font); 
    }

    .country-header-content h2 {
        /* NEW: Center align the date range in the country header for mobile */
        text-align: center; 
        font-size: 2.3rem;
        font-family: var(--header-font); 
    }
    .country-header-content h3 {
        /* ⬅️ FIX: The alignment for the h3 (date range) was being implicitly handled by .country-header-content's align-items: center. This property keeps it consistent. */
        font-size: 1.8rem;
        font-family: var(--header-font); 
    }

    /* 1. Dark Grey Background for Mobile Nav Area */
    .date-navbar {
        /* Adjusted width of the drawer */
        width: 70vw; 
        background-color: var(--mobile-nav-bg); 
        border-color: #555555;
    }
    
    /* Ensure country groups stand out against the new dark background */
    .country-nav-group {
        display: block; /* Ensure full width block */
        margin: 0 0 1rem 0;
        padding: 0.5rem 0;
        width: 100%;
        background-color: transparent !important;
        
        /* Optional: Add a light divider between country groups in the drawer */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    }
    /* Remove border from the last country group */
    .date-navbar .country-nav-group:last-of-type {
        border-bottom: none;
    }

    .country-info h2,
    .country-info h3 { 
        color: var(--mobile-nav-text); /* Light text on dark background */
        font-family: var(--header-font); 
    }
    /* Set flag and country info to be centered in the drawer */
    .country-info {
        justify-content: center;
    }


    /* 2. Adjust Country/Date Hierarchy in Mobile Nav */
    .country-info h2 { 
        font-size: 1.2rem; /* INCREASED: Country name (Primary Heading) */
    }
    .country-info h3 { 
        font-size: 1.0rem; /* INCREASED: Date Range (Secondary Heading) */
    }

    /* 3. Adjust Day Links (The "Day" text you said was too big) */
    .date-navbar a {
        /* ⬅️ CRITICAL CHANGE: Making day font smaller */
        font-size: 0.8rem; 
        background: #fff;
        border-radius: 999px;
        padding: 0.3rem 0.7rem;
    }

    .date-navbar a.active {
        background-color: var(--nav-active);
    }

}

/* --- Lightbox/Image Modal Styles (FIXED FOR CONTINUOUS FLOW) --- */
.image-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.image-modal.open {
    opacity: 1;
    visibility: visible;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.modal-content-wrapper {
    position: relative;
    width: 90%;
    height: 90%;
}

.image-carousel {
    /* CRITICAL FIX: Allows continuous horizontal flow of images */
    display: flex;
    gap: 1.5rem; /* Spacing between images */
    overflow-x: auto; /* Makes it scrollable */
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    background: transparent;
    padding: 0 5%; /* Padding for context/not touching the edge */
    align-items: center;
    
    /* FIX: Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* FIX: Hide scrollbar for Chrome, Safari and Opera */
.image-carousel::-webkit-scrollbar {
    display: none;
}

/* CRITICAL FIX: Defines image size for continuous flow */
.image-carousel .carousel-image {
    min-width: 400px; /* Minimum size for visibility */
    max-width: 60vw; /* Maximum size, for large screens */
    flex-shrink: 0; /* Prevents images from shrinking */
    height: 90%;
    object-fit: contain;
    display: block;
    margin: 0;
}

@media (max-width: 800px) {
    .image-carousel .carousel-image {
        min-width: 80vw; /* Ensure large presence on mobile */
        max-width: 90vw;
    }
}

/* Navigation buttons for the carousel */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2001;
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}


.cover-page {
    /* New styles for the full-screen cover background */
    min-height: 100vh; /* Make it full height of the viewport */
    display: flex; /* For centering the content */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    
    /* Background Image Properties */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('assets/Photos/Others/worldMap.png'); 
    background-size: cover;                        
    background-position: center center;            
    background-repeat: no-repeat;                  
}

/* The element that is inside the cover page */
.cover-page .country-header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem; /* Adjusted padding */
    
    /* Ensure content is visible on top of the dark background */
    color: white; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); 
}

.cover-page .country-header-content h1 {
    color: white; /* Ensure the main title is white on the dark map background */
    font-size: 6rem; /* Made cover title larger */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.cover-page .country-header-content h2 {
    color: white; /* Ensure the date range/subtitle is white on the dark map background */
    font-size: 2rem; /* Made cover subtitle larger */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

@media (max-width: 800px) {
    .cover-page .country-header-content h1 {
        font-size: 4rem; 
    }
    .cover-page .country-header-content h2 {
        font-size: 1.5rem; 
    }
    .donation-link {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
}

/* ===== Mobile Hamburger & Drawer Nav ===== */
.hamburger {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  background: #ffffffcc;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1100;
  display: none; /* shown in mobile via media query */
}
.hamburger span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text-color);
  transition: transform .25s ease, opacity .25s ease;
}
/* X animation when open */
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1040;
}

/* Drawer behavior on mobile */
@media (max-width: 800px) {
  .hamburger { display: inline-block; }

  /* Turn the horizontal scroller into a left drawer */
.date-navbar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 70vw; /* ⬅️ Changed to 70vw to match new styling */
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: normal;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,0.2);
    z-index: 1050;
  }
  .date-navbar.open { transform: translateX(0); }

  /* When open, stop body scroll */
  body.menu-open { overflow: hidden; }

  /* Country block spacing inside drawer */
  .country-nav-group { 
    display: block; 
    margin: 0 0 1rem 0; 
    width: 100%;
  }

  /* Stack title + date range and center them */
  .country-title-dates {
    flex-direction: column;       /* was row on desktop */
    align-items: center;          /* center horizontally */
    gap: 0.25rem;
    text-align: center;
    width: 100%;
  }
  
  /* Day links inside drawer */
  .date-navbar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center; /* Center the links */
  }
  .date-navbar a {
    font-size: 0.8rem; 
    background: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
  }

  .date-navbar a.active {
    background-color: var(--nav-active);
  }

}