*,
*:before,
*:after {

    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    /* Ensures the body covers the full screen height */
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: #f1efdc;
    /* Brand Body Font */
    font-family: 'Alegreya Sans', sans-serif;
    color: #5E3A1E;
}

/* Brand Heading Font */
h1,
h2,
h3,
.logo-bar,
.nav-links a {
    font-family: 'Tenor Sans', sans-serif;
    text-transform: uppercase;
    /* Tenor Sans looks great in caps for Italian brands */
    letter-spacing: 0.05em;
}

.main-header {
    width: 100%;
    /*     
    background: linear-gradient(0deg, rgba(241, 239, 220, 0.9) 0%, rgba(241, 239, 220, 0.9) 100%),
        url('../assets/images/tile-background.jpg');

    background-size: contain;
    background-position: center;
    background-repeat: repeat;
    opacity: 30; */

}

.logo-bar {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.logo img {
    height: 160px;
    /* Adjust based on your SVG */
    padding: 8px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.1));
}

/* Nav Bar Styles */
.nav-bar {
    background-color: #f1efdc;
    padding: 20px 0;
    position: relative;
    border-top: 1px solid #5E3A1E40;
    border-bottom: 1px solid #1D705B40;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 80px;
}

.nav-links a {
    text-decoration: none;
    color: #5E3A1E;
    font-weight: 600;
    font-size: 1rem;
    /* ADD THESE FOR THE BUTTON EFFECT */
    padding: 10px 20px;
    /* Adds clickable area around the text */
    border-radius: 4px;
    /* Matches your hero-btn shape */
    transition: all 0.3s ease;
    /* Makes the color swap smooth */
    display: inline-block;
    /* Ensures padding works correctly */
}

/* THE HOVER STATE */
.nav-links a:hover {
    background-color: #E8E0B0;
    /* Light Brand Yellow */
    color: #1D705B;

    text-decoration: underline;
    text-underline-offset: 8px;
    /* Brand Green */
}

/* Hide toggle by default */
.nav-toggle,
.nav-toggle-label {
    display: none;
}

main {
    flex: 1;
    /* This tells the main section to grow and take up all available space */
    /* box-shadow: 0px 50px 80px 0px rgba(0, 0, 0, 0.15); */
    position: relative;
    z-index: 1;

}

.hero {
    width: 100%;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    /* Vertically centers the text with the image */
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    /* Tenor Sans can handle a bit more scale */
    color: #1D705B;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 450;
    line-height: 1.6;
    color: #5E3A1E;
    margin-bottom: 30px;
    font-family: 'Alegreya Sans', sans-serif;
}

.hero-btn {
    display: inline-block;
    background-color: #1D705B;
    color: white;
    margin-top: 2rem;
    padding: 18px 32px;
    text-decoration: none;
    font-family: 'Tenor Sans', sans-serif;
    /* Keep buttons consistent with headings */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.hero-btn:hover {
    background-color: #E8E0B0;
    color: #1D705B;
}

/* Image Side */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* --- Market Section (Hero-Style Flex) --- */
.market-section {
    width: 100%;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    background-color: #f1efdc;
    border-top: 1px solid #5E3A1E40;
}

.market-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    /* Vertically center text with grid */
    gap: 40px;
}

.market-content {
    flex: 1;
}

.market-content h1 {
    font-size: 3.5rem;
    /* Tenor Sans can handle a bit more scale */
    color: #1D705B;
    margin-bottom: 20px;
    line-height: 1.1;
}

.market-content p {
    font-size: 1.3rem;
    font-weight: 450;
    line-height: 1.6;
    color: #5E3A1E;
    margin-bottom: 30px;
    font-family: 'Alegreya Sans', sans-serif;
}

.market-icon {
    width: 20rem;
    margin-top: 6rem;
    display: block;
}

.market-grid-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Default Desktop Grid (3x4 or 4x3 depending on screen) */
.market-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 4rem;

}

.market-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

/* --- Video Section (Hero-Style Flex) --- */
.video-section {
    width: 100%;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    background: linear-gradient(0deg, rgba(29, 112, 91, 0.05) 0%, rgba(241, 239, 220, 1) 100%);
    border-top: 1px solid #5E3A1E40;
}

.video-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 60px;
}

.video-frame-wrapper {
    flex: 1.2;
    /* Gives the video a bit more prominence */
}

.video-content {
    flex: 1;
    text-align: center;
}

.video-content h2 {
    font-size: 2.8rem;
    color: #1D705B;
    margin-bottom: 20px;
}

/* Responsive Iframe Container */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Wine Club Section (Hero-Style Flex) --- */
.wine-section {
    width: 100%;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    background-color: #f1efdc;
    /* Matching your brand cream */
    border-top: 1px solid #5E3A1E40;
}

.wine-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 60px;
}

.wine-image-wrapper {
    flex: 1.2;
}

.wine-feature-img {
    width: 100%;
    max-width: 400px;
    /* Adjust this number to your preferred size */
    height: auto;
    display: block;
    margin: 0 auto;
    /* Keeps it centered within its column */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(94, 58, 30, 0.15);
    object-fit: cover;
}

.wine-content {
    flex: 1;
    text-align: center;
}

.wine-content h2 {
    font-size: 2.8rem;
    color: #1D705B;
    margin-bottom: 20px;
}

.wine-subtext {
    font-style: italic;
    font-size: 1.1rem;
    margin-top: -15px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.map-section {
    padding: 60px 20px;
    background-color: #f1efdc;
    border-top: 1px solid #5E3A1E40;
}

.map-section h2 {
    font-family: 'Tenor Sans', sans-serif;
    color: #5E3A1E;
    text-align: center;
    margin-bottom: 40px;
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 400px;
    /* Adjust height for mobile */
    position: relative;
    height: 0;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #5E3A1E40;
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

/* --- Professional Footer Styles --- */

footer {
    width: 100%;
    background-color: #000;
    /* Fallback */
}

.footer-logo-container {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.responsive-footer-logo {
    width: 100%;
    /* Changed to 100% for a full-bleed look under the text */
    height: auto;
    display: block;
    object-fit: cover;
    opacity: 0.6;
    /* Slight dimming of the image itself */
}

/* The Dark Overlay */
.footer-logo-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.9) 80%);
    z-index: 1;
}

/* Content sitting on top of overlay */
.footer-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 40px 20px;
    color: #f1efdc;
    /* Using your brand cream color for text */
    text-align: center;
}

.footer-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    flex-wrap: wrap;
}

.footer-column h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #E8E0B0;
    /* Brand Yellow */
    border-bottom: 1px solid rgba(232, 224, 176, 0.3);
    padding-bottom: 5px;
}

.footer-column p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 1.5rem;
}

.social-icons a {
    color: #f1efdc;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #E8E0B0;
}

.footer-bottom {
    border-top: 1px solid rgba(241, 239, 220, 0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.credits {
    opacity: 0.6;
    margin-top: 5px;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

/* Modal Box */
.modal-content {
    background: #f1efdc;
    width: 90%;
    max-width: 800px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeInScale 0.4s ease-out;
}

.modal-inner {
    display: flex;
}

.modal-image-side {
    flex: 1;
    display: block;
}

.modal-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-text-side {
    flex: 1.2;
    padding: 50px 40px;
    text-align: center;
}

.modal-text-side h2 {
    color: #1D705B;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.modal-text-side p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #5E3A1E;
}

/* Form Styles */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-form input {
    padding: 12px;
    border: 1px solid #5E3A1E40;
    border-radius: 4px;
    font-family: 'Alegreya Sans', sans-serif;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #5E3A1E;
    z-index: 10;
}

/* Animation */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .video-container {
        flex-direction: column;
        /* Stacked layout for tablet/mobile */
        text-align: center;
        gap: 40px;
    }

    .video-frame-wrapper {
        width: 100%;
        max-width: 700px;
    }

    .wine-container {
        flex-direction: column;
        /* Stack image on top of text for mobile */
        text-align: center;
        gap: 40px;
    }

    .wine-image-wrapper {
        width: 100%;
        max-width: 600px;
    }
}


@media (max-width: 768px) {
    .hero-container {
        flex-direction: column-reverse;
        /* Stacks text on top of image */
        gap: 20px;
        text-align: center;
        padding-inline: 2rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-image {
        width: 100%;
        max-width: 300px;
        /* Prevents the SVG from becoming massive on tablets */
        margin: 0 auto;
    }

    .market-container {
        flex-direction: column-reverse;
        /* Stacked like your hero */
        text-align: center;
        padding-inline: 2rem;
    }

    .market-content h1 {
        font-size: 2.2rem;
    }

    .map-responsive {
        padding-bottom: 500px;
        /* Taller on desktop */
    }

    .footer-logo-container {
        min-height: 400px;
        /* Ensures space for text on mobile */
    }

    .responsive-footer-logo {
        height: 100%;
        object-fit: cover;
    }

    .footer-grid {
        gap: 30px;
        flex-direction: column;
    }

    .modal-inner {
        flex-direction: column;
    }

    .modal-image-side {
        display: none;
    }
}

/* --- Mobile View (600px and below) --- */
@media (max-width: 600px) {
    .nav-bar {
        padding: 20px 0;
    }

    .nav-toggle-label {
        display: block;
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
    }

    /* Hamburger Lines */
    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        background: #000;
        height: 2px;
        width: 25px;
        position: relative;
    }

    .nav-toggle-label span::before {
        content: '';
        top: 8px;
    }

    .nav-toggle-label span::after {
        content: '';
        bottom: 10px;
    }

    /* Hidden Menu State */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #1D705B;
        position: absolute;
        top: 100%;
        left: 0;
        text-align: left;
        padding: 20px;
        z-index: 10;
        gap: 16px;
        align-items: center;
    }

    /* Show menu when checkbox is checked */
    .nav-toggle:checked~.nav-links {
        display: flex;
    }

    .nav-links a {
        text-decoration: none;
        color: #fff;
        font-weight: 500;
        font-size: 0.9rem;
        margin-block: 32px;

    }

    .market-grid {
        grid-template-columns: repeat(3, 87.5px);
        gap: 8px;
        margin-top: 4rem;
        /* Tight gap to fit width */
    }

    .market-grid img {
        width: 87.5px;
        height: 87.5px;
    }

    .video-content h2 {
        font-size: 1.8rem;
    }

    .wine-content h2 {
        font-size: 2rem;
    }

    .footer-logo-container {
        padding: 0;
        /* Allows the image to go edge-to-edge on small phones */
    }
}