/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --primary: #2299C0;       /* Azul Turquesa (Títulos) */
    --secondary: #86B817;     /* Verde suave (Logo VALLARTA) */
    --accent: #A3D9E8;        /* Azul Agua claro */
    --dark: #14141F;          /* Texto muy oscuro / Footer */
    --white: #ffffff;
    --text-color: #444444;    /* Gris oscuro para lectura suave */
    --shadow: 0 10px 30px rgba(34, 153, 192, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body { 
    font-family: 'Lexend', sans-serif; 
    color: var(--text-color); 
    background: var(--white); 
    line-height: 1.8;
    font-size: 18px;
    letter-spacing: -0.01em;
    padding-top: 140px; /* Compensación para el header fijo */
}

/* CONFIGURACIÓN DE TÍTULOS */
h1, h2, h3, h4 { 
    font-family: 'Outfit', sans-serif; 
    color: var(--primary); 
    font-weight: 700; 
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Ajuste fluido para evitar cortes en móviles */
h1 { font-size: clamp(2rem, 6vw, 3.8rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); letter-spacing: -0.02em; }

a { text-decoration: none; transition: 0.3s ease; }
ul { list-style: none; }

img { max-width: 100%; height: auto; display: block; }

/* AJUSTE DE LOGO OPTIMIZADO */
#logo img {
    max-height: 85px; 
    max-width: 100%;
    width: auto;
    object-fit: contain;
    transition: 0.3s ease; 
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.py-60 { padding: 60px 0; }
.text-center { text-align: center; }
.bg-light { background-color: #f9f9f9; }

/* =========================================
   2. TOP LINE (RETRÁCTIL)
   ========================================= */
#top_line {
    background: #011931; /* Azul Oscuro Profundo */
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    border-bottom: 1px solid #333;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    max-height: 50px;
    opacity: 1;
}

#top_line a {
    color: #fff !important;
    font-weight: 600;
}

#top_line a:hover {
    color: var(--secondary) !important;
}

/* =========================================
   3. NAVEGACIÓN DINÁMICA (FIXED & COLLAPSE)
   ========================================= */
header {
    background: var(--white);
    position: fixed; /* Fijo para que siempre se vea */
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease-in-out; 
}

header.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

header.scrolled #top_line {
    max-height: 0;
    padding: 0;
    opacity: 0;
}

header.scrolled #logo img {
    max-height: 65px; 
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 95px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

header.scrolled .nav-container {
    min-height: 75px;
}

.nav-links {
    display: flex;
    gap: 18px; /* Ajustado para 7 ítems */
}

.nav-links a {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem; /* Ajustado para 7 ítems */
    white-space: nowrap;
}

.nav-links a:hover { color: var(--primary); }

/* SUBMENÚ */
.has-submenu { position: relative; }

.has-submenu > a i {
    font-size: 0.7rem;
    margin-left: 3px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.has-submenu:hover > a i {
    transform: rotate(180deg);
}

.submenu-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 260px;
    box-shadow: var(--shadow);
    border-radius: 12px;
    border-top: 4px solid var(--primary);
    padding: 15px 0;
}

.has-submenu:hover .submenu-list { display: block; }

.submenu-list li a {
    padding: 10px 25px;
    font-size: 0.95rem;
    display: block;
}

.submenu-list li a:hover { background: #f0f7f9; color: var(--primary); }

/* =========================================
   4. HERO Y BOTONES (HOME)
   ========================================= */
.hero-home {
    min-height: 80vh; /* Cambiado a min-height para evitar cortes */
    height: auto;
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center; 
    color: var(--white);
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    text-align: center;      
    background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('img/puerto-vallarta-tours-12.webp');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-top: -40px; 
    padding: 40px 20px; /* Padding añadido */
}

.hero-home p {
    margin: 20px auto 30px; 
    max-width: 800px;
    font-weight: 500;
    font-size: 1.3rem;
}

.hero-title { 
    color: var(--white) !important; 
    margin-bottom: 10px;
    font-weight: 800;
}

.btn-main { 
    background: var(--secondary); 
    color: white; 
    font-family: 'Outfit', sans-serif;
    padding: 12px 35px; 
    border-radius: 50px; 
    font-weight: 700; 
    display: inline-block; 
    font-size: 0.95rem; 
    box-shadow: 0 4px 15px rgba(134, 184, 23, 0.3);
    margin: 0 auto; 
    transition: 0.3s ease;
}

.btn-main:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 153, 192, 0.4);
}

/* =========================================
   5. TOURS GRID (CENTRADO Y SEO)
   ========================================= */
.tours-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.tour-card {
    flex: 0 1 350px;
    box-shadow: var(--shadow);
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.tour-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.tour-card-content {
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tour-card-content h3 {
    font-size: 1.15rem;
    margin-bottom: 15px;
    color: var(--primary);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-card-content p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.tour-meta {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 20px;
    font-weight: 600;
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
}

.tour-meta i { color: var(--primary); }

.tour-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(34, 153, 192, 0.2);
}

/* =========================================
   6. WHATSAPP, FAQ Y FOOTER
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 1000;
}

.faq-item {
    background: #fff;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    overflow: hidden;
}

.faq-item summary {
    padding: 22px 25px;
    font-weight: 700;
    cursor: pointer;
    color: var(--primary);
    font-family: 'Outfit';
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--secondary);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '−';
    color: var(--primary);
}

.faq-item summary:hover { background: #fcfcfc; }

.faq-item p {
    padding: 0 25px 22px;
    color: #555;
    font-size: 0.95rem;
}

footer { 
    background: #011931; 
    color: white; 
    padding: 80px 0 30px; 
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

footer h4 { color: var(--accent); margin-bottom: 20px; font-family: 'Outfit'; } 
footer a { color: rgba(255,255,255,0.8); }
footer a:hover { color: var(--white); text-decoration: underline; }

footer p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

footer p i {
    color: var(--primary);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

footer strong {
    color: var(--white);
}

.social-icons { display: flex; gap: 15px; font-size: 1.5rem; margin-top: 15px; }
.social-icons a { color: white; transition: 0.3s; }
.social-icons a:hover { color: var(--primary); transform: translateY(-3px); }

/* =========================================
   7. ESTILOS PÁGINAS INTERNAS (PARALLAX & SIDEBAR)
   ========================================= */

.page-header {
    background-color: var(--primary); 
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 80vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 60px;
    margin-top: -40px; 
}

/* Headers Específicos */
.header-ballenas { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('img/avistamiento-ballenas-puerto-vallarta.webp'); }
.header-marietas { background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.4)), url('img/islas-marietas-hidden-beach.webp'); }
.header-buceo { background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.5)), url('img/buceo-islas-marietas-vallarta.webp'); }
.header-tortugas { background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.5)), url('img/liberacion-tortugas-marinas.webp'); }

/* Sticky Sidebar */
.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 120px; 
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.info-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid var(--secondary);
    height: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.price-tag {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

/* --- CORRECCIÓN DE LISTAS (Para que no se corte el texto) --- */
.check-list { list-style: none; padding: 0; margin: 0; }

.check-list li { 
    margin-bottom: 12px; 
    display: flex; 
    align-items: flex-start;
    color: #555;
    width: 100%;
    position: relative;
}

.check-list li i { 
    color: var(--secondary);
    margin-right: 12px; 
    margin-top: 5px; 
    flex-shrink: 0; /* Evita que el icono se aplaste */
}

/* Regla para que el texto ocupe el espacio y baje de línea */
.check-list li strong, 
.check-list li span,
.check-list li div {
    flex: 1;
    min-width: 0; /* Permite el wrap en flexbox */
    white-space: normal; /* Asegura que el texto pueda saltar de línea */
    overflow-wrap: break-word;
}


/* =========================================
   8. RESPONSIVO (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    body { font-size: 17px; padding-top: 100px; }

    .nav-container { padding: 0 15px; min-height: 85px; }
    #logo { max-width: 140px; }
    #logo img { max-height: 60px; }

    /* Reducir padding horizontal para ganar espacio al texto */
    .container { padding: 0 15px; } 

    /* Reducir padding de las cajas blancas en móvil */
    .info-box, .guide-card, .detail-box {
        padding: 20px 15px; 
    }

    .nav-links { 
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        gap: 15px;
        z-index: 999;
        max-height: 80vh; 
        overflow-y: auto;
    }

    .nav-links.active { display: flex; }
    .menu-toggle { display: block !important; font-size: 1.8rem; color: var(--primary); }
    
    /* CORRECCIÓN H1 Y HERO (TU PETICIÓN) */
    .hero-home {
        padding-top: 140px; 
        padding-bottom: 60px;
        background-attachment: scroll; /* Fix para iOS */
        padding-left: 10px; /* Asegura márgenes internos */
        padding-right: 10px;
    }

    .hero-title, h1 { 
        font-size: clamp(2rem, 6vw, 2.8rem) !important;
        line-height: 1.2;
    }

    .hero-home p {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .btn-main {
        width: 80%;
        max-width: 300px;
        padding: 12px 20px;
    }

    .page-header, .header-ballenas, .header-marietas, .header-tortugas, .header-buceo { 
        background-attachment: scroll;
        height: 55vh; 
    }

    .tour-card { flex: 0 1 100%; }

    .faq-item summary { padding: 18px 15px; font-size: 0.95rem; }
    .faq-item p { padding: 0 15px 18px; }

    /* Estilos Submenú Móvil */
    .has-submenu .submenu-list {
        display: block;
        position: static;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        border-left: 2px solid var(--primary);
        background: #fdfdfd;
        padding: 5px 0 5px 15px;
        margin-top: 10px;
        min-width: 100%;
    }

    .nav-links:not(.active) .submenu-list { display: none; }
    .submenu-list li a { padding: 8px 15px; font-size: 0.9rem; }
}

/* Ajuste extra para pantallas muy pequeñas */
@media (max-width: 480px) {
    h1, .hero-title { font-size: 2rem !important; }
}

/* Soporte para tablets y laptops pequeñas */
@media (min-width: 769px) and (max-width: 1100px) {
    .nav-links { gap: 12px; }
    .nav-links a { font-size: 0.85rem; }
}

/* =========================================
   ESTILOS DEL FORMULARIO DE RESERVA
   ========================================= */
.tour-form .input-group {
    margin-bottom: 10px; 
    text-align: left;
}

.tour-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
    font-family: 'Outfit', sans-serif;
}

.tour-form label i { color: var(--primary); margin-right: 5px; }

.tour-form input, .tour-form select, .tour-form textarea {
    width: 100%;
    padding: 10px; 
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.9rem; 
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
}

.tour-form input:focus, .tour-form select:focus, .tour-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 153, 192, 0.1);
}

/* =========================================
   ESTILOS GUÍAS
   ========================================= */
.guide-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
    border-bottom: 3px solid transparent;
}

.guide-card:hover {
    transform: translateY(-5px);
    border-bottom: 3px solid var(--secondary);
}

.guide-img-container {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.guide-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.guide-card:hover .guide-img-container img { transform: scale(1.1); }

/* =========================================
   9. ESTILOS ESPECÍFICOS: MONARCA MASSAGE
   ========================================= */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 5px 15px rgba(128, 15, 15, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.price-table th {
    background-color: var(--secondary);
    color: white;
    padding: 15px;
    text-align: left;
}

.price-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.price-table tr:last-child td { border-bottom: none; }

.price-highlight {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
}

.massage-title {
    margin: 0;
    font-size: 1rem;
    color: var(--dark);
    font-weight: 700;
}

.massage-desc {
    font-size: 0.85rem;
    color: #666;
    font-weight: 400;
    display: block;
    margin-top: 3px;
}