:root {
    --primary-color: #4a90e2;
    --bg-color: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-main: #2d3436;
    --sidebar-width: 250px;
    --transition-speed: 0.3s;
}

body {
    flex-grow: 1;
    font-family: "Noto Sans", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    height: auto;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
}

select {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    outline: none;
}

select:focus {
    border-color: #0056b3;
}

.container {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#timer {
    font-size: 2.5rem;
    font-weight: bold;
    color: #0056b3;
    margin-top: 1rem;
}

/* Side Navigation */
.sidenav {
    height: 100vh;
    width: 220px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #f9c22e;
    padding-top: 20px;
}

.sidenav h2 {
    color: black;
    text-align: center;
}

.sidenav a {
    display: block;
    color: black;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: bold;
}

.sidenav a:hover {
    background-color: #e0aa1f;
}

/* Mobile styles */
@media (max-width: 768px) {
    .sidenav {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidenav.active {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .menu-toggle {
        display: block !important;
        background-color: none;
    }
}

/* Burger button */
.menu-toggle {
    font-family: "Noto Sans", Arial, sans-serif;
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: #f9c22e;
    color: black;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 8px;
}

.top-bar {
    height: 50px;
    width: 100%;
    background-color: #f9c22e;
    color: #333 !important;
    position: fixed;
    top: 0;
    left: 0;
    /* box-shadow: 0 4px 15px rgba(0,0,0,0.1); */
}

/* --- About Page Specific Styling --- */

.about-container {
    max-width: 600px; /* Limit width for better readability */
    text-align: left; /* Text is easier to read left-aligned */
}

.about-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.content-text p {
    line-height: 1.6;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #555;
}

hr {
    border: 0;
    height: 1px;
    background: rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.milestones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 1rem;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.milestone-item span {
    font-size: 1.5rem;
}

.milestone-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-main);
}

.compact-timer {
    font-size: 1.5rem !important; /* Smaller than the home page */
    margin-bottom: 2rem;
    background: rgba(74, 144, 226, 0.1); /* Light blue tint */
    padding: 10px;
    border-radius: 12px;
    display: inline-block;
}

/* Ensure it looks good inside the left-aligned About text */
.about-container #timer {
    text-align: center;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   Gallery Grid & Photocards
   ========================================= */

.gallery-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
    /* Default: A single vertical column for mobile screens */
    grid-template-columns: 1fr; 
}

/* Tablet screens (600px and up): 2 columns side-by-side */
@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop screens (900px and up): 3 columns side-by-side */
@media (min-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.photocard {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photocard:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.photocard img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Ensures images fill the box without squishing */
    display: block;
}

.photocard-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.photo-location {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.photo-date {
    font-size: 0.9em;
    color: #777;
}

/* =========================================
   Modal Styling
   ========================================= */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Black background with opacity */
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: zoomIn 0.3s ease;
}

.modal-text {
    margin-top: 15px;
    color: #333;
}

.modal-text h2 { margin: 0 0 5px 0; }
.modal-text h4 { margin: 0 0 15px 0; color: #666; font-weight: normal; }

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 20;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
}

/* Modal open animation */
@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* =========================================
   Carousel Styling
   ========================================= */
.carousel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background-color: rgba(249, 194, 46, 0.8);
}

/* Position buttons on left and right */
#prevBtn { left: 10px; }
#nextBtn { right: 10px; }

/* Hide buttons if there is only 1 photo */
.carousel-btn.hidden { display: none; }

.carousel-dots {
    text-align: center;
    margin-top: 10px;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden; /* Hides images that are "off-screen" to the sides */
    border-radius: 8px;
    position: relative;
    /* Optional: give it a max height if you want to control sizing */
    max-height: 50vh; 
}

.carousel-track {
    display: flex;
    /* This is the magic line that creates the smooth slide! */
    transition: transform 0.4s ease-in-out; 
    width: 100%;
}

.carousel-track img {
    /* Forces every image to be exactly 100% of the viewport's width */
    width: 100%; 
    flex-shrink: 0; /* Prevents Flexbox from squishing the images */
    max-height: 50vh;
    object-fit: cover;
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: rgb(249, 194, 46);
}