/* === LAYOUT & SECTIONS === */
main {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    /* Correction for mobile horizontal scroll */
}

.section {
    position: relative;
    padding: 5rem var(--safe-area);
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.hero-section {
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    line-height: 1.1;
}

.section-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--color-accent);
    margin-bottom: 1rem;
    display: block;
    font-weight: 500;
}

/* Spacing */
.mt-2 {
    margin-top: 2rem;
}

.mt-4 {
    margin-top: 4rem;
}

/* === CELLAR ATMOSPHERE ELEMENTS === */

.cellar-arch {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image:
        radial-gradient(ellipse at 50% -10%, transparent 40%, rgba(60, 40, 20, 0.12) 70%),
        linear-gradient(90deg, rgba(60, 40, 20, 0.04) 0%, transparent 25%, transparent 75%, rgba(60, 40, 20, 0.04) 100%);
}

.cellar-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1001;
    background: radial-gradient(circle at center, transparent 50%, rgba(60, 40, 20, 0.04) 100%);
    mix-blend-mode: multiply;
}

/* === MOBILE MENU BUTTON === */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2000;
    /* Extremely high */
}

.mobile-menu-overlay {
    display: none;
}

.mobile-menu-btn span {
    width: 26px;
    height: 1.5px;
    background: var(--color-text);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === RESPONSIVE LAYOUT === */

/* Tablet & Mobile */
@media (max-width: 968px) {
    .main-nav {
        background: linear-gradient(to bottom, rgba(245, 239, 230, 0.6) 0%, rgba(245, 239, 230, 0) 100%);
        backdrop-filter: none;
        padding: 0.8rem 5%;
        z-index: 1500;
        pointer-events: none;
        /* Let clicks pass through empty areas */
    }

    .main-nav .logo {
        font-size: 1.1rem;
        letter-spacing: 0.12em;
    }

    .main-nav .logo,
    .main-nav .mobile-menu-btn {
        pointer-events: auto;
        /* Re-enable clicks on interactive elements */
    }

    .main-nav.scrolled {
        background: rgba(245, 239, 230, 0.15);
        backdrop-filter: blur(5px);
        padding: 0.5rem 5%;
        border-bottom: 1px solid rgba(158, 122, 46, 0.25);
    }

    .section {
        padding: 3rem 1rem 2rem;
        min-height: auto;
    }

    .container {
        padding: 0;
        width: 100%;
    }

    .hero-section {
        padding-top: 10rem;
        /* More space for fixed content */
        justify-content: flex-start;
        /* Stop vertical centering */
        min-height: 100vh;
    }

    /* Old nested nav-links: Hide on mobile */
    .nav-links {
        display: none !important;
    }

    /* New Dedicated Mobile Overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        /* Full screen width */
        width: 100%;
        height: 100vh;
        background: rgba(245, 239, 230, 0.97);
        /* Less opaque */
        backdrop-filter: blur(15px);
        /* Strong blur */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        transform: translateY(-100%);
        /* Slide from top */
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        /* Smooth elegant slide */
        z-index: 9999;
    }

    .mobile-menu-overlay.open {
        transform: translateY(0);
    }

    .mobile-nav-links {
        list-style: none;
        width: 100%;
        text-align: center;
    }

    .mobile-nav-links li {
        margin-bottom: 2rem;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .mobile-menu-overlay.open .mobile-nav-links li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger delay for items */
    .mobile-menu-overlay.open .mobile-nav-links li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .mobile-menu-overlay.open .mobile-nav-links li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .mobile-menu-overlay.open .mobile-nav-links li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .mobile-menu-overlay.open .mobile-nav-links li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .mobile-menu-overlay.open .mobile-nav-links li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .mobile-menu-overlay.open .mobile-nav-links li:nth-child(6) {
        transition-delay: 0.6s;
    }

    .mobile-nav-links a {
        font-family: var(--font-heading);
        font-size: 1.8rem;
        color: var(--color-text);
        text-decoration: none;
        display: block;
        padding: 0.5rem;
    }

    .mobile-nav-links a:hover {
        color: var(--color-accent);
    }

    /* Button adjustments */
    .mobile-menu-btn {
        display: flex;
        z-index: 10000;
        /* Must be higher than overlay */
        position: relative;
    }



    body.menu-open {
        overflow: hidden;
    }

    /* Bottle visibility tweak removed to allow bottle.css to control positioning */

    .gallery-carousel {
        height: 400px;
    }


}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-section {
        padding-top: 7rem;
    }

    .hero-title {
        font-size: 2.6rem !important;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .card {
        padding: 2.5rem 1.5rem;
    }

    .gallery-carousel {
        height: 320px;
    }
}

/* Touch-friendly targets */
@media (max-width: 968px) {

    .btn-primary,
    .nav-btn,
    .dot {
        min-height: 44px;
        min-width: 44px;
    }
}

/* === FOOTER === */
.main-footer {
    background: #ebe3d6;
    padding: 5rem 0 3rem;
    border-top: 1px solid rgba(60, 40, 20, 0.1);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

.footer-brand .footer-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.footer-brand .footer-desc {
    color: rgba(59, 46, 36, 0.6);
    line-height: 1.6;
}

.footer-social {
    display: flex;
    justify-content: center;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(60, 40, 20, 0.12);
    border-radius: 50%;
    color: var(--color-text);
    transition: all 0.3s ease;
    cursor: default;
    /* No link interaction for now */
}

.social-icon:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(158, 122, 46, 0.08);
}

.footer-map iframe {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 20px rgba(60, 40, 20, 0.1);
}

.footer-map iframe:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(60, 40, 20, 0.08);
    color: rgba(59, 46, 36, 0.5);
    font-size: 0.9rem;
}

/* Tablet & Mobile Footer */
@media (max-width: 968px) {
    .main-footer {
        padding: 4rem 0 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-map iframe {
        height: 250px;
    }
}

/* === COOKIE CONSENT & PRIVACY === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(245, 239, 230, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-accent);
    padding: 2rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(60, 40, 20, 0.08);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-bottom: 0.5rem;
}

.cookie-text h4 {
    font-family: var(--font-heading);
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(60, 40, 20, 0.15);
    color: var(--color-text);
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--color-text);
    background: rgba(60, 40, 20, 0.03);
}

/* Map Placeholder */
.footer-map {
    position: relative;
    background: #ddd4c5;
    border-radius: 4px;
    overflow: hidden;
}

.map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(235, 227, 214, 0.95);
    z-index: 5;
    text-align: center;
    padding: 1rem;
    transition: opacity 0.5s;
}

/* If map is loaded, hide placeholder */
.footer-map.loaded .map-placeholder {
    opacity: 0;
    pointer-events: none;
}

.map-placeholder p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-dim);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookie-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-buttons .btn-secondary,
    .cookie-buttons .btn-primary {
        width: 100%;
        justify-content: center;
    }
}