/* Define color variables */
:root {
    --bg-color: #FDF8F5;
    --text-color: #6B3E19;
    --heading-color: #213b37;
    --accent-color: #213b37;
    --accent-color-light: #CEE4E0;
    --accent-hover-color: #4A847B;
    --nav-link-color: #A0847E;
    --white-color: #ffffff;
    --border-color: #EAE0DC;
    --menu-bg-color: #F8F0EC; /* Slightly darker bg for menu */
}

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

/* === MOBILE FIRST STYLES === */
body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

/* Add class to body when menu is open to prevent scrolling */
body.menu-open-no-scroll {
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation (Mobile: Hamburger) */
header {
    /*background-color: var(--white-color);*/
    padding: 10px 0; /* Adjusted padding */
    /*box-shadow: 0 1px 3px rgba(0,0,0,0.04);*/
    position: sticky;
    top: 0;
    z-index: 1000;
    /*border-bottom: 1px solid var(--border-color);*/
}

/* Use Flexbox on nav container for layout */
nav .container {
    display: flex;
    justify-content: flex-end; /* Push menu button to the right */
    align-items: center;
    position: relative; /* For menu positioning context */
}

/* Hamburger Button */
#menu-toggle {
    display: block; /* Show on mobile */
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1051; /* Above menu container */
    position: relative; /* Needed for stacking context */
}

#menu-toggle .hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--heading-color);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation to 'X' */
#menu-toggle.active .line1 {
    transform: translateY(8px) rotate(45deg);
}
#menu-toggle.active .line2 {
    opacity: 0;
}
#menu-toggle.active .line3 {
    transform: translateY(-8px) rotate(-45deg);
}


/* Navigation Menu Container (Mobile - Hidden) */
.menu-container {
    position: fixed; /* Take out of flow, relative to viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Full viewport height */
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay */
    z-index: 1040; /* Below hamburger, above content */
    opacity: 0; /* Hidden by default */
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex; /* To position the ul inside */
}

/* Show overlay when menu is open */
.menu-container.menu-open {
    opacity: 1;
    visibility: visible;
}

/* Navigation List (Mobile - Hidden Side Menu) */
#main-menu {
    list-style: none;
    position: absolute; /* Position within menu-container */
    top: 0;
    left: 0;
    width: 75%; /* Width of the side menu */
    max-width: 300px; /* Max width */
    height: 100%;
    background-color: var(--menu-bg-color);
    padding: 80px 20px 40px 20px; /* Padding inside menu */
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align links to the left */
    gap: 20px;
    transform: translateX(-100%); /* Hidden off-screen */
    transition: transform 0.4s ease;
    overflow-y: auto; /* Allow scrolling if menu is long */
}

/* Slide menu in when open */
.menu-container.menu-open #main-menu {
    transform: translateX(0);
}


#main-menu li a {
    text-decoration: none;
    color: var(--heading-color); /* Use heading color for prominence */
    font-weight: 400;
    font-size: 1.2em; /* Larger font size in menu */
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: block;
    padding: 8px 0;
}

#main-menu li a:hover {
    color: var(--accent-color); /* Use accent color on hover */
}


/* === STYLES FOR OTHER ELEMENTS (Mostly Unchanged) === */

/* Hero Section (Mobile) */
.hero { text-align: center; padding: 40px 15px 30px 15px; margin-top: 20px; }
.hero .intro-text { font-size: 0.9em; color: var(--nav-link-color); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: 2.5em; color: var(--heading-color); margin-bottom: 10px; font-weight: 700; line-height: 1.2; }
.hero .date-location { font-size: 1em; color: var(--text-color); margin-bottom: 20px; font-family: 'Lato', sans-serif; font-weight: 300; }
.hero p.welcome-note { font-size: 1em; margin: 0 auto 30px auto; color: var(--text-color); }
.hero img.couple-photo { max-width: 220px; width: 70%; height: auto; border-radius: 50%; margin: 25px auto 30px auto; display: block; border: 5px solid var(--white-color); box-shadow: 0 4px 10px rgba(0,0,0,0.07); }
#countdown { font-family: 'Lato', sans-serif; font-size: 1.1em; font-weight: 300; color: var(--heading-color); margin-top: 25px; letter-spacing: 1px; }
#countdown span { display: inline-block; margin: 0 3px; }
.cta-button { display: inline-block; background-color: var(--accent-color); color: var(--white-color); padding: 12px 30px; font-size: 1em; text-decoration: none; border-radius: 5px; margin-top: 30px; transition: background-color 0.3s ease, transform 0.2s ease; font-weight: 400; letter-spacing: 0.5px; border: 1px solid transparent; }
.cta-button:hover { background-color: var(--accent-hover-color); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
footer { text-align: center; padding: 40px 15px; margin-top: 40px; font-size: 0.85em; color: var(--nav-link-color); border-top: 1px solid var(--border-color); }
footer p { font-family: 'Playfair Display', serif; font-style: italic; }

/* === TABLET STYLES (min-width: 768px) === */
@media (min-width: 480px) {
    body { font-size: 17px; }
    .container { width: 85%; padding: 0 25px; }
    header { padding: 15px 0; } /* Slightly more padding */

    /* Hide Hamburger on Tablet+ */
    #menu-toggle {
        display: none;
    }

    /* Reset Mobile Menu Styles */
    nav .container {
        justify-content: center; /* Center nav links */
    }

    .menu-container {
        position: static; /* Back in flow */
        width: auto;
        height: auto;
        background: none;
        opacity: 1; /* Always visible */
        visibility: visible;
        transition: none;
        display: block; /* Reset display */
    }

    #main-menu {
        position: static; /* Back in flow */
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        padding: 0;
        transform: none; /* Reset transform */
        flex-direction: row; /* Horizontal layout */
        align-items: center; /* Align items vertically */
        gap: 30px;          /* Adjust gap */
        transition: none;
        overflow-y: visible;
    }

    #main-menu li a {
        font-size: 0.95em; /* Restore original size */
        letter-spacing: 0.5px;
        color: var(--nav-link-color); /* Restore original color */
        padding: 5px 0; /* Consistent padding */
    }
    #main-menu li a:hover {
        color: var(--heading-color); /* Restore original hover */
    }

    /* Other Tablet styles remain */
    .hero { padding: 60px 20px 50px 20px; margin-top: 30px; }
    .hero .intro-text { font-size: 1em; }
    .hero h1 { font-size: 3.5em; }
    .hero .date-location { font-size: 1.2em; }
    .hero p.welcome-note { font-size: 1.1em; }
    .hero img.couple-photo { max-width: 280px; margin: 30px auto 40px auto; border-width: 6px; }
    #countdown { font-size: 1.3em; margin-top: 30px; }
    #countdown span { margin: 0 5px; }
    .cta-button { padding: 14px 35px; font-size: 1.05em; margin-top: 35px; }
    footer { padding: 50px 20px; margin-top: 50px; font-size: 0.9em; }
}

/* === DESKTOP STYLES (min-width: 1024px) === */
@media (min-width: 1024px) {
    /* Reset menu styles again just in case */
    #main-menu { gap: 35px; }

    /* Other Desktop styles remain */
    .hero { padding: 80px 20px 60px 20px; }
    .hero h1 { font-size: 3.8em; }
    .hero .date-location { font-size: 1.3em; }
    .hero img.couple-photo { max-width: 300px; }
    #countdown { font-size: 1.4em; }
    .cta-button { margin-top: 40px; }
}
