/* --- Root / Reset / Base --- */
:root {
    --primary: #ff9800; 
    --secondary: #2196f3; 
    --dark: #2d3436;
    --text: #4a4e51;
    --light: #f5f6fa;
    --white: #ffffff;
    --transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    --animation-speed: 0.8s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background-color: var(--light);
    overflow-x: hidden;
    line-height: 1.6;
}

body.loading { overflow: hidden; }

h1, h2, h3 { color: var(--dark); margin-bottom: 15px; }
h1 { font-size: 4rem; font-family: 'Comic Sans MS', cursive, sans-serif; text-shadow: 2px 5px 15px rgba(0,0,0,0.4); }
h2 { font-size: 3rem; text-align: center; margin-bottom: 30px; }
p { margin-bottom: 20px; font-size: 1.1rem; }
img { max-width: 100%; height: auto; display: block; border-radius: 10px; }

/* --- Preloader --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--white);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s var(--transition), visibility 0.5s var(--transition);
}
#preloader.fade-out { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; }
.logo-loader { max-width: 200px; margin-bottom: 20px; animation: pulse 2s infinite; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- Container & Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.container-large { max-width: 1400px; }
.bg-light { background-color: var(--white); }
.pt-150 { padding-top: 150px; } 
.pt-80 { padding-top: 80px; }
.mt-50 { margin-top: 50px; }
.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 35px;
    border-radius: 30px;
    text-decoration: none; 
    font-weight: bold; 
    font-size: 1.1rem;
    line-height: 1.2; 
    cursor: pointer; 
    transition: var(--transition);
    text-align: center;
}
.btn:hover { transform: translateY(-5px); }

.btn-primary { 
    background-color: var(--primary); 
    color: var(--white); 
    border: none;
}
.btn-primary.nav-item:hover, .btn-primary.nav-item.active { 
    color: var(--white) !important; 
}

/* Solución definitiva al "Botón Fantasma" */
.btn-secondary { 
    background-color: transparent; 
    border: 2px solid var(--primary); 
    color: var(--primary); 
}
.btn-secondary:hover { 
    background-color: var(--primary); 
    color: var(--white) !important; 
}

.btn-reserve { background-color: var(--primary); color: var(--white); padding: 10px 25px; border-radius: 20px; font-size: 0.9rem; border: none; }

/* --- Header & Nav --- */
#main-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 130px; 
    background-color: transparent; 
    z-index: 1000; transition: var(--transition);
}
#main-header.scrolled {
    background-color: var(--dark); 
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    height: 70px; 
}

.header-container {
    max-width: 1400px; margin: 0 auto; padding: 0 30px;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo-area { display: flex; align-items: center; }

.logo { 
    max-width: 130px; 
    margin-right: 15px; 
    transition: max-width 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
#main-header.scrolled .logo { max-width: 50px; }

.site-title { 
    font-size: 1.4rem; font-weight: bold; color: var(--primary); 
    font-family: 'Comic Sans MS', cursive, sans-serif; 
    transition: font-size 0.4s ease;
}
#main-header.scrolled .site-title { font-size: 1.2rem; }

.nav-links { list-style: none; display: flex; }
.nav-item {
    text-decoration: none; color: var(--white); font-weight: bold;
    margin: 0 15px; position: relative; padding-bottom: 5px;
    transition: color 0.3s ease;
}
#main-header.scrolled .nav-item { color: var(--white); } 

.nav-item::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px;
    background-color: var(--primary); transition: width 0.3s ease;
}
.nav-item:hover, .nav-item.active { color: var(--primary); }
.nav-item.active::after { width: 100%; }

.cta-area { display: flex; align-items: center; gap: 15px; }

/* --- Botón WhatsApp Flotante --- */
.whatsapp-flotante {
    position: fixed; bottom: 30px; right: 30px;
    background-color: #25d366; color: #FFF;
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-flotante:hover { transform: scale(1.1); box-shadow: 0 12px 30px rgba(37, 211, 102, 0.7); }

/* --- Sections & SPA Sim --- */
.page-section { display: none; min-height: 100vh; }
.page-section.visible { display: block; }

/* --- Hero --- */
.hero-wrapper {
    position: relative; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; overflow: hidden; background: #000;
}
.hero-image {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.6; transition: transform var(--transition); 
}
.hero-content { text-align: center; max-width: 800px; padding: 50px; }
.hero-content h1 { color: #ffffff; text-shadow: 2px 4px 20px rgba(0,0,0,0.9); }
.hero-content p { color: #ffffff; font-size: 1.4rem; text-shadow: 1px 3px 15px rgba(0,0,0,0.9); }

/* --- Landing Snippets --- */
.landing-snippet { padding: 80px 0; }
.snippet-content { display: flex; align-items: center; gap: 50px; }
.snippet-content.row-reverse { flex-direction: row-reverse; }
.snippet-text { flex: 1; text-align: left; }
.snippet-text h2 { text-align: left; }
.snippet-img { flex: 1; display: flex; justify-content: center; }

.snippet-img img { 
    width: 100%; max-width: 460px; 
    aspect-ratio: 1 / 1; 
    object-fit: cover; border-radius: 20px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
}

/* --- Galería Cuadrada (Pesca Inicio) --- */
.snippet-gallery-grid {
    flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px;
}
.snippet-gallery-grid img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: 15px; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.snippet-gallery-grid img:hover { transform: scale(1.03); }

/* --- Carrusel CSS (Restaurante) --- */
.restaurant-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    scrollbar-width: none; 
}
.restaurant-carousel::-webkit-scrollbar { display: none; }
.carousel-item {
    flex: 0 0 calc(33.333% - 14px); 
    scroll-snap-align: start;
}
.carousel-item img {
    width: 100%;
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* --- Hero Interno (Para sección de Pesca) --- */
.internal-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px; /* Compensa el header fijo */
    overflow: hidden;
}
.internal-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    z-index: -1;
}
.internal-hero-content { text-align: center; padding: 20px; z-index: 1; }
.internal-hero-content h2 { color: var(--white); font-size: 3.5rem; text-shadow: 2px 4px 15px rgba(0,0,0,0.8); margin-bottom: 10px; }
.internal-hero-content p { color: var(--white); font-size: 1.3rem; text-shadow: 1px 3px 10px rgba(0,0,0,0.8); }

/* --- Galería Interna Espectacular --- */
.internal-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 60px;
}
.internal-gallery .gallery-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.4s ease;
}
.internal-gallery .gallery-img:hover {
    transform: scale(1.05);
}

/* --- Tablas y Acordeón --- */
.fishing-details-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px; margin-top: 50px; margin-bottom: 50px; text-align: left;
}
.pricing-table-wrapper h3, .accordion-wrapper h3 { color: var(--primary); margin-bottom: 25px; font-size: 1.8rem; }

.pricing-table {
    width: 100%; border-collapse: collapse; background: var(--white);
    border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.pricing-table th, .pricing-table td { padding: 18px 25px; border-bottom: 1px solid #f0f0f0; }
.pricing-table th { background-color: var(--primary); color: var(--white); font-weight: bold; text-align: left; }
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table tr:hover td { background-color: #f9f9f9; }

.accordion-item {
    background: var(--white); border-radius: 10px; margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); overflow: hidden;
}
.accordion-header {
    width: 100%; padding: 20px 25px; background: none; border: none;
    text-align: left; font-size: 1.1rem; font-weight: bold; color: var(--dark);
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    transition: color 0.3s ease;
}
.accordion-header:hover, .accordion-header.active { color: var(--primary); }
.accordion-header .icon { font-size: 1.5rem; transition: transform 0.3s ease; }
.accordion-header.active .icon { transform: rotate(45deg); }
.accordion-content {
    max-height: 0; overflow: hidden; background: #fafafa;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1); 
}
.accordion-content p { padding: 0 25px 25px 25px; margin: 0; font-size: 1.05rem; }

/* --- Otras vistas internas --- */
.farm-content { display: flex; align-items: center; gap: 50px; margin-top: 40px; }
.farm-main-img { flex: 1; }
.farm-main-img img { box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.farm-details { flex: 1; text-align: left; }
.farm-details h3 { color: var(--primary); font-size: 2rem; }

.nature-tour { display: flex; justify-content: space-around; gap: 30px; margin-top: 40px; }
.tour-block { flex: 1; text-align: center; max-width: 300px; }
.circulo-img { border-radius: 50%; max-width: 250px; border: 10px solid var(--white); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

#main-footer { background-color: var(--dark); color: var(--light); padding: 50px 20px; text-align: center; }

/* --- Animaciones de Scroll --- */
.scroll-element {
    opacity: 0; visibility: hidden;
    transition: opacity var(--animation-speed) ease-out, transform var(--animation-speed) ease-out;
    will-change: opacity, transform;
}
.scroll-element.is-visible { opacity: 1; visibility: visible; transform: none !important; }
.fade-in-up { transform: translateY(60px); }
.fade-in-left { transform: translateX(-60px); }
.fade-in-right { transform: translateX(60px); }
.zoom-in { transform: scale(1.1); }

/* --- Responsividad --- */
@media (max-width: 992px) {
    .carousel-item { flex: 0 0 calc(50% - 10px); } 
    .internal-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links, .cta-area, .site-title { display: none; } 
    .header-container { justify-content: center; }
    .logo { max-width: 90px; margin-right: 0; }
    #main-header.scrolled .logo { max-width: 50px; }
    .snippet-content, .snippet-content.row-reverse { flex-direction: column; text-align: center; }
    .snippet-text h2 { text-align: center; }
    .farm-content, .nature-tour { flex-direction: column; }
    h1 { font-size: 2.5rem; }
    .whatsapp-flotante { bottom: 20px; right: 20px; width: 50px; height: 50px; }
    .carousel-item { flex: 0 0 85%; } 
    .internal-hero-content h2 { font-size: 2.5rem; }
}