/* Endless Visions - Optimized Style Sheet
    Revised for Responsive Navigation and Mobile Support
*/

/* 1. Reset & Base Typography */
html, body, div, span, ul, li, h1, h2, h3, h4, p, a, img, header, nav, footer, section {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box; /* Ensures padding doesn't break width */
    vertical-align: baseline;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f4f9;
    color: #4e4d56;
    line-height: 1.6;
    overflow-x: hidden; /* Prevents side-scrolling on mobile */
}

h1, h2, h3 { 
    font-family: 'Old Standard TT', serif; 
    text-transform: uppercase; 
    color: #2b325f;
}

a { text-decoration: none; transition: 0.3s; }

/* 2. Layout Wrapper */
#wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 3. Navigation Header */
#top_container {
    width: 100%;
    background: #2b325f;
    height: 36px;
}

#top_navigation {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: right;
}

#top_navigation ul li {
    display: inline-block;
}

#top_navigation ul li a {
    color: #c2c2c2;
    padding: 5px 15px;
    font-size: 14px;
    text-transform: uppercase;
}

header {
    width: 100%;
    background: #2b325f;
    border-top: 2px solid #fff;
    border-bottom: 2px solid #fff;
    padding: 10px 0;
    position: relative;
}

header .container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.media_bkg img {
    height: 60px;
    width: auto;
    display: block;
}

/* 4. Desktop Menu */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    padding: 10px 20px;
    color: #c2c2c2;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .1em;
}

nav ul li a:hover { color: #fff; }

/* 5. Mobile Menu Icon (Hamburger) */
.mobile_menu_icon {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
}

.mobile_menu_icon span, 
.mobile_menu_icon span:before, 
.mobile_menu_icon span:after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile_menu_icon span { top: 10px; }
.mobile_menu_icon span:before { top: -10px; }
.mobile_menu_icon span:after { top: 10px; }

/* Hamburger animation to 'X' */
.mobile_menu_icon.active span { background: transparent; }
.mobile_menu_icon.active span:before { transform: rotate(45deg); top: 0; }
.mobile_menu_icon.active span:after { transform: rotate(-45deg); top: 0; }

/* 6. Main Content Area */
.main-content-flex {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.carousel-container {
    max-width: 375px;
    width: 100%;
}

.carousel-frame img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.carousel-description {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.buy-button {
    display: inline-block;
    background: #1e24be;
    color: #fff;
    padding: 15px 30px;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 20px;
}

/* 7. Footer */
footer {
    background: #2b325f;
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    margin-top: auto;
}

.white_box { border: 1px solid #fff; padding: 5px 10px; }

/* 8. Responsive Breakpoints */
@media screen and (max-width: 768px) {
    .mobile_menu_icon {
        display: block; /* Show hamburger */
    }

    nav {
        display: none; /* Hide menu by default */
        position: absolute;
        top: 100%; /* Sits right under header */
        left: 0;
        width: 100%;
        background: #2b325f;
        padding: 20px 0;
        z-index: 1000;
        border-bottom: 2px solid #fff;
    }

    /* JavaScript toggles this class */
    nav.nav-open {
        display: block !important;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        padding: 10px 0;
    }

    .main-content-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* --- Desktop Layout (Default) --- */
.header-flex-container {
    display: flex;
    justify-content: center; /* Centers logo on desktop */
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
}

.mobile-trigger-wrapper {
    display: none; /* Hide icon wrapper on desktop */
}

/* --- Mobile Layout (768px and below) --- */
@media screen and (max-width: 768px) {
    .header-flex-container {
        justify-content: space-between; /* Logo left, Hamburger right */
    }

    .mobile-trigger-wrapper {
        display: block; /* Show icon wrapper on mobile */
        height: 30px;
        width: 30px;
    }

    .mobile_menu_icon {
        display: block;
        position: relative;
        top: 5px; /* Adjust to align vertically with your logo */
    }

    /* Keep the logo from getting squashed */
    .main-logo {
        height: 50px; 
    }

    /* Ensure the menu drops down correctly below the logo row */
    nav {
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background: #2b325f;
        display: none;
        z-index: 9999;
    }

    nav.nav-open {
        display: block !important;
    }
}

