:root {
    --primary-green: #0d7a5f;
    --dark-green: #0a5c48;
    --white: #ffffff;
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

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

body,
html {
    width: 100%;
    height: 100%;
    font-family: 'Montserrat', sans-serif;
    color: var(--white);
    background-color: var(--primary-green);
    overflow: hidden;
    /* Prevent body scroll to let custom main container handle snapping */
}

/* Scroll Container Setup for CSS scroll-snap */
.scroll-container {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    position: relative;
}

/* Individual Full Screen Section */
.scroll-section {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    /* Helps stack if it's contact section */
    flex-direction: column;
}

/* Fixed Logo Area */
.fixed-header {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
    pointer-events: none;
}

.fixed-header .logo {
    height: 70px;
    /* Adjust based on logo proportions */
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    pointer-events: auto;
    cursor: pointer;
}

/* Language Selector */
.lang-selector {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 1000;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 1px;
    pointer-events: none;
    text-shadow: var(--text-shadow);
}

.lang-selector span {
    pointer-events: auto;
    cursor: default;
}

/* Fixed Navigation Menu Pill */
.fixed-nav {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(13, 122, 95, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 40px;
    overflow: hidden;
    /* crops active item gracefully */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 760px;
    overflow-x: auto;
}

/* Hide scrollbar on nav if it scrolls horizontally on mobile */
.fixed-nav::-webkit-scrollbar {
    display: none;
}

.fixed-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.fixed-nav ul {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    list-style: none;
    min-width: max-content;
    margin: 0;
    padding: 0;
}

.fixed-nav li {
    margin: 0;
    display: flex;
}

.fixed-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    padding: 15px 22px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border-radius: 40px;
}

.fixed-nav a:hover,
.fixed-nav a.active,
.fixed-nav a.always-active {
    background-color: var(--white);
    color: var(--primary-green);
}

/* Swiper Overrides */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bg-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Darker overlay to make white text readable */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Content inside slides */
.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 750px;
    padding: 40px;
    padding-bottom: 60px;
    /* offset for nav pill */
}

.slide-content h2 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-shadow: var(--text-shadow);
}

.slide-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 300;
    text-shadow: var(--text-shadow);
    margin-bottom: 25px;
}

.slide-content .btn-link {
    display: inline-block;
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--white);
    padding-bottom: 4px;
    text-shadow: var(--text-shadow);
    transition: opacity 0.3s ease;
    margin-top: 15px;
}

.slide-content .btn-link:hover {
    opacity: 0.8;
}

/* Swiper Arrow Styling */
.swiper-button-next,
.swiper-button-prev {
    color: var(--white) !important;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    opacity: 1;
}

/* Reduce arrow size slightly if needed */
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.8rem !important;
}

/* ------------------------------------- */
/* Contact Section (Section 6)           */
/* ------------------------------------- */
.contact-section {
    background-color: var(--primary-green);
    /* Crece según su contenido: título + formulario + footer no se recortan
       aunque superen la altura de la pantalla. */
    height: auto;
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: 140px;
    padding-bottom: 40px;
    scroll-snap-align: none;
}

.contact-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.contact-container h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    outline: none;
}

.contact-form textarea {
    min-height: 120px;
    border-radius: 15px;
    resize: none;
}

.contact-form button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 200px;
    margin: 10px auto 0;
}

.contact-form button:hover {
    background-color: #333;
}

/* Footer Box in Contact Section */
.footer-box {
    background-color: var(--white);
    color: var(--primary-green);
    width: 90%;
    max-width: 1000px;
    margin: 30px auto 120px;
    /* 120px margin bottom to not collide with fixed nav pill */
    padding: 30px 40px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.footer-item {
    font-size: 0.85rem;
    line-height: 1.5;
}

.brand-info .logo-footer {
    height: 40px;
    /* Mas pequeño que el de cabecera */
    width: auto;
    margin-bottom: 15px;
    filter: brightness(0) saturate(100%) invert(32%) sepia(61%) saturate(1178%) hue-rotate(126deg) brightness(91%) contrast(90%);
    /* Convertimos el SVG negro al verde #0d7a5f */
}

.address-details p {
    font-size: 0.85rem;
    letter-spacing: normal;
    margin: 2px 0;
}

.address-details a,
.social a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}

/* Mobile Navigation Base Styles (Hidden on Desktop by default) */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    justify-content: center;
    gap: 15px;
    align-items: center;
    pointer-events: none;
}

.mobile-nav-bar>* {
    pointer-events: auto;
}

.hamburger-btn {
    background-color: var(--primary-green);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.mobile-pedido-btn {
    background-color: var(--white);
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 15px 30px;
    border-radius: 30px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.mobile-overlay-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-green);
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.close-menu-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 80%;
    max-width: 300px;
    align-items: center;
}

.menu-pill {
    background-color: var(--white);
    color: var(--primary-green);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 0.9rem;
    padding: 15px 20px;
    border-radius: 30px;
    width: 100%;
    text-align: center;
    display: block;
}

.mobile-nav-links .pedido-online-pill {
    margin-top: 20px;
    font-weight: 600;
}

.mobile-lang-selector {
    position: absolute;
    bottom: 40px;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.mobile-lang-selector strong {
    font-weight: 700;
}

/* Privacy Page Styles */
.privacy-page {
    background-color: var(--primary-green);
    color: var(--white);
    height: 100vh;
    overflow-y: auto;
}

.privacy-header {
    text-align: center;
    padding: 40px 20px;
}

.privacy-header .logo {
    width: 200px;
    filter: brightness(0) invert(1);
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px 80px;
    line-height: 1.6;
    font-weight: 300;
}

.privacy-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
}

.privacy-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 15px;
}

.privacy-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 10px;
}

.privacy-content p {
    margin-bottom: 20px;
}

.privacy-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.privacy-content li {
    margin-bottom: 10px;
}

.privacy-content a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .fixed-nav,
    .lang-selector {
        display: none !important;
    }

    .mobile-nav-bar {
        display: flex;
    }

    .mobile-overlay-menu {
        display: flex;
    }

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

    .slide-content p {
        font-size: 0.95rem;
    }

    .footer-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 25px;
        margin-bottom: 100px;
    }

    .contact-section {
        padding-top: 100px;
    }
}
/* --- CMS additions --- */
.lang-selector a,
.lang-selector strong,
.mobile-lang-selector a,
.mobile-lang-selector strong {
    pointer-events: auto;
}

.lang-selector a,
.mobile-lang-selector a {
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
    cursor: pointer;
}

.lang-selector a:hover,
.mobile-lang-selector a:hover {
    opacity: 1;
}

.form-feedback {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* El logo fijo se oculta sobre la sección de contacto para no tapar el formulario */
.fixed-header {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fixed-header.is-hidden {
    opacity: 0;
    visibility: hidden;
}
