:root {
    --primary-color: #8BC34A; /* Vert gazon */
    --secondary-color: #388E3C; /* Vert foncé */
    --text-color: #333;
    --bg-light: #f4f9f4;
    --font-title: 'Fredoka One', cursive;
    --font-text: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-text);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, .logo {
    font-family: var(--font-title);
}

/* Navigation */
header {
    position: fixed;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.left-brand {
    cursor: default;
}

.navbar-logo {
    height: 45px;
    width: auto;
    border-radius: 50%;
    object-fit: contain;
    border: 1px solid #eee;
}

.camping-logo {
    transition: transform 0.3s ease;
}

.camping-logo:hover {
    transform: scale(1.08);
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: var(--secondary-color);
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
}

/* Sections génériques */
.section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: auto;
    text-align: center;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: var(--bg-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
}

/* Ocultar la imagen móvil por defecto (vista ordenador) */
.hero-img-mobile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    display: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

/* Parcours & Cartes */
.features, .pricing {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.price-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Banner de información de tarifas */
.rates-banner {
    background: #e8f5e9; /* Fondo verde muy claro */
    border-left: 5px solid var(--secondary-color);
    padding: 1.2rem 2rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 2.5rem auto 0 auto;
    text-align: center;
    box-shadow: 0 4px 12px rgba(56, 142, 60, 0.08);
}

.rates-banner p {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.feature-card:hover .card-image {
    transform: scale(1.08);
}

.card-content {
    padding: 1.5rem;
    text-align: left;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
}

.price-card.highlight {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
}

.price {
    font-size: 3rem;
    font-family: var(--font-title);
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Contact Section Layout & Form */
.contact-container {
    display: flex;
    gap: 3rem;
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.contact-info p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-light);
    padding: 1.2rem;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-text strong {
    font-size: 0.9rem;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-text a, .contact-text span {
    font-size: 1.05rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.contact-text a:hover {
    color: var(--primary-color);
}

.contact-form-wrapper {
    flex: 1.2;
}

.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-text);
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.15);
}

.form-response {
    margin-top: 1.5rem;
    padding: 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    animation: fadeIn 0.4s ease forwards;
}

.form-response.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.form-response.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.whatsapp-tooltip {
    visibility: hidden;
    width: 145px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.whatsapp-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 25px;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-float {
    animation: pulse 2s infinite;
}

/* Footer & Logos */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    height: 65px;
    width: auto;
    border-radius: 50%;
    background-color: white;
    padding: 2px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Responsive (Mobiles) */
@media (max-width: 1024px) {
    /* Mostrar imagen fija en móviles, ocultar el vídeo horizontal de escritorio */
    .hero-video-desktop {
        display: none;
    }
    .hero-img-mobile {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: -1; /* Keeps it behind the logo and burger menu but covers screen */
        font-size: 1.5rem;
        gap: 2.5rem;
        box-shadow: none;
    }
    .nav-links.active {
        display: flex;
    }
    .burger-menu {
        display: flex;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .contact-container {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-icon {
        width: 26px;
        height: 26px;
    }
    .whatsapp-tooltip {
        display: none;
    }
    .logo-text {
        display: none;
    }
    header {
        position: fixed !important;
        background: transparent !important;
        box-shadow: none !important;
        transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
    }
    header.scrolled {
        background: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    .navbar {
        justify-content: center;
        padding-top: 1.5rem;
    }
    .left-brand {
        margin: 0 auto;
    }
    .navbar-logo {
        height: 70px !important;
        width: 70px !important;
        border: 3px solid white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    .burger-menu {
        position: absolute;
        right: 20px;
        background: rgba(255, 255, 255, 0.85);
        padding: 8px;
        border-radius: 8px;
    }
}

/* Language Selector */
.lang-selector {
    position: relative;
    display: inline-block;
    margin-right: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: var(--font-text);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-color);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lang-btn:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001;
    min-width: 100px;
    border: 1px solid #eee;
}

.lang-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.lang-dropdown button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 15px;
    text-align: left;
    font-family: var(--font-text);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-dropdown button:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .logo-container.right-brand {
        gap: 0.5rem;
    }
    .lang-btn {
        padding: 4px 8px;
    }
    .lang-label {
        display: none;
    }
}

/* Google Map styling */
.map-container {
    margin-top: 3rem;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 5px solid white;
    transition: transform 0.3s ease;
}

.map-container:hover {
    transform: translateY(-3px);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 350px;
}

/* 12-Holes Gallery Modal */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background-color: var(--bg-light);
    margin: auto;
    padding: 3rem 2rem;
    border-radius: 25px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: #888;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

.gallery-title {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    font-family: var(--font-title);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-card {
    position: relative;
    background: white;
    border-radius: 18px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    overflow: hidden;
    /* Corrección para bug de esquinas redondeadas en Safari */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.gallery-img-wrapper {
    position: relative;
    width: 100%;
    height: 180px; /* Restauramos la proporción original */
    overflow: hidden;
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.4s ease;
    z-index: 1;
}

.gallery-img-ground {
    /* Desplaza la foto hacia abajo otro 10% (35% en total) */
    object-position: center 35%;
}

.gallery-img.active {
    opacity: 1;
}

.gallery-card:hover .gallery-img.active {
    transform: scale(1.06);
}

/* Selector de Vista (Suelo / Aire) */
.view-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    padding: 3px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.view-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.view-btn:hover {
    transform: scale(1.1);
}

.view-btn.active {
    background: var(--secondary-color);
    box-shadow: 0 2px 6px rgba(56, 142, 60, 0.3);
}

.gallery-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(56, 142, 60, 0.5); /* Verde al 50% de transparencia */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px); /* Compatibilidad con Safari (Mac/iOS) */
    border: 1px solid rgba(255, 255, 255, 0.25); /* Borde estilo cristal */
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.gallery-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gallery-card-content h4 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin: 0;
}

.gallery-card-content p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

@keyframes slideDownGallery {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#btn-gallery-hide {
    display: block;
    margin: 2.5rem auto 0;
}

/* Lightbox pour Images */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 90%;
    max-height: 90vh;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    object-fit: contain;
}

.lightbox.show img, .lightbox.show .lightbox-container {
    transform: scale(1);
}

/* Contenedor de doble vista */
.lightbox-dual-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 45%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-dual-item {
    transform: scale(1);
}

.lightbox-dual-item img {
    max-width: 100% !important;
    max-height: 78vh !important;
}

.lightbox-caption {
    color: white;
    font-family: var(--font-title);
    margin-top: 12px;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .lightbox-container {
        flex-direction: column;
        gap: 20px;
    }
    .lightbox-dual-item {
        max-width: 90%;
    }
    .lightbox-dual-item img {
        max-height: 38vh !important;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 3001;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* Small and Outline buttons */
.btn-sm {
    padding: 8px 18px;
    font-size: 0.95rem;
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Mobile optimizations for Logos and Lang Selector */
@media (max-width: 1024px) {
    .camping-logo {
        display: none !important;
    }
    
    .lang-selector {
        position: fixed;
        bottom: 20px;
        right: 80px; /* To the left of the WhatsApp widget */
        z-index: 1000;
        margin: 0;
    }
    
    .lang-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: white;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        border: none;
    }
    
    .lang-label {
        display: none;
    }
    
    .lang-flag {
        font-size: 1.6rem;
        margin: 0;
    }
    
    .lang-dropdown {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 5px;
    }
}
