/* assets/css/style.css - VERSIÓN FINAL MÓVIL OPTIMIZADA */

/* --- VARIABLES --- */
:root {
    --primary: #003366;    /* Azul Brauch */
    --secondary: #0056b3;  /* Azul más claro */
    --accent: #e63946;     /* Rojo ofertas/botones */
    --light: #f4f6f9;
    --dark: #333;
    --white: #ffffff;
    --text-gray: #666;
}

/* Reset básico para evitar desbordes */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll lateral no deseado en toda la web */
}

/* --- CABECERA SLIM --- */
header {
    background: var(--primary);
    color: var(--white);
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link { display: flex; align-items: center; text-decoration: none; }
.web-logo { max-height: 45px; width: auto; transition: transform 0.3s; }
.web-logo:hover { transform: scale(1.05); }

.nav-links a {
    color: #ccc;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--white); }

.cta-whatsapp {
    background: #25D366;
    color: white !important;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    white-space: nowrap; /* Evita que el texto del botón se rompa */
}

/* --- HERO SLIDER --- */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: #000;
}
.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 51, 102, 0.4);
    z-index: 1;
}
.hero-content {
    position: relative; z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
    padding: 0 20px;
    width: 100%;
}
.hero h1 { font-size: 3rem; margin-bottom: 10px; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.hero p { font-size: 1.4rem; font-weight: 300; }

/* --- CONTENEDOR Y CARDS --- */
.container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

.section-title {
    text-align: center; color: var(--primary); margin-bottom: 40px;
    font-size: 2rem; position: relative; text-transform: uppercase; font-weight: 700;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: var(--accent); margin: 10px auto;
}

.packages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.package-card {
    background: var(--white); border-radius: 10px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.package-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

.card-img { height: 220px; overflow: hidden; background: #eee; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.package-card:hover .card-img img { transform: scale(1.05); }

.card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-meta { font-size: 0.85rem; color: var(--text-gray); text-transform: uppercase; margin-bottom: 5px; font-weight: bold; }
.card-title { font-size: 1.4rem; color: var(--primary); margin: 5px 0 10px 0; font-weight: 700; line-height: 1.3;}
.card-price { font-size: 1.5rem; color: var(--accent); font-weight: 800; margin-top: auto; text-align: right; }

/* --- PÁGINA DETALLE --- */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }

/* CORRECCIÓN GALERÍA */
.gallery-main {
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 8px;
}
.gallery-main img { 
    width: 100%; 
    height: auto; 
    display: block; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

.gallery-thumbs { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; /* Permite scroll horizontal */
    padding-bottom: 10px; /* Espacio para el scrollbar */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    scrollbar-width: none; /* Ocultar barra en Firefox */
}
.gallery-thumbs::-webkit-scrollbar { display: none; /* Ocultar barra en Chrome/Safari */ }

.gallery-thumbs img {
    width: 80px; 
    height: 80px; 
    object-fit: cover; 
    border-radius: 4px;
    cursor: pointer; 
    opacity: 0.7; 
    transition: 0.2s; 
    border: 2px solid transparent;
    flex-shrink: 0; /* Evita que las imágenes se aplasten */
}
.gallery-thumbs img:hover { opacity: 1; border-color: var(--primary); }

.sidebar-card {
    background: var(--white); padding: 30px; border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); position: sticky; top: 80px; border: 1px solid #eee;
}
.detail-title { color: var(--primary); font-size: 2.2rem; margin-bottom: 10px; font-weight: 800; line-height: 1.2; word-wrap: break-word; }
.detail-price { color: var(--accent); font-size: 2.5rem; font-weight: 800; transition: opacity 0.2s; }

.btn-whatsapp-big {
    display: block; background-color: #25D366; color: white; text-align: center;
    padding: 15px; border-radius: 50px; font-size: 1.1rem; font-weight: bold;
    text-decoration: none; margin-top: 20px; box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s;
}
.btn-whatsapp-big:hover { transform: scale(1.02); }

/* --- SELECTOR PEQUEÑO --- */
.mini-currency-select {
    padding: 5px 10px; border-radius: 5px; border: 1px solid #ccc; font-weight: bold;
    color: var(--primary); cursor: pointer; outline: none; font-size: 0.9rem; background: white;
}

/* --- CAJA PUNTOS DE SALIDA --- */
.departure-box {
    margin-top: 25px; background: #f8f9fa; padding: 20px; border-radius: 12px;
    border-left: 5px solid var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.departure-box h4 {
    margin: 0 0 15px 0; color: var(--primary); font-size: 1.1rem; text-transform: uppercase;
    border-bottom: 1px solid #eee; padding-bottom: 10px;
}
.departure-list { list-style: none; padding: 0; margin: 0; }
.departure-list li {
    margin-bottom: 8px; display: flex; align-items: flex-start; gap: 10px;
    font-weight: 500; color: #555;
}
.departure-icon { font-size: 1.2rem; line-height: 1; flex-shrink: 0; }

/* --- MONEDA FLOTANTE --- */
.currency-floater {
    position: fixed; bottom: 20px; right: 20px; background: white;
    padding: 8px 15px; border-radius: 50px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999; display: flex; align-items: center; gap: 10px; border: 2px solid var(--primary);
}
.currency-floater label { font-weight: bold; color: var(--primary); font-size: 0.9rem; }
.currency-floater select { border: none; background: transparent; font-weight: bold; font-size: 1rem; cursor: pointer; outline: none; }

/* --- ESTRELLAS EN DETALLES --- */
.web-details-content { font-size: 1.1rem; color: #444; line-height: 1.8; overflow-wrap: break-word; } /* Evita desborde de texto */
.web-details-content ul { list-style: none !important; padding: 0; margin: 20px 0; }
.web-details-content li { position: relative; padding-left: 35px; margin-bottom: 10px; font-weight: 500; }
.web-details-content li::before { content: '⭐'; position: absolute; left: 0; top: 2px; font-size: 1.1rem; }
.web-details-content p { position: relative; padding-left: 35px; margin-bottom: 15px; }
.web-details-content p::before { content: '⭐'; position: absolute; left: 0; top: 0; font-size: 1.1rem; }

/* --- FOOTER --- */
footer { background: var(--primary); color: #ccc; text-align: center; padding: 40px 0; margin-top: 60px; }
footer a { color: var(--white); text-decoration: none; }
footer .dev-credit { margin-top: 20px; font-size: 0.8rem; opacity: 0.6; }

/* ========================================= */
/* 📱 AJUSTES ESPECÍFICOS PARA MÓVILES       */
/* ========================================= */
@media (max-width: 768px) {
    /* Contenedor general: márgenes más pequeños */
    .container {
        padding: 20px 15px;
        width: 100%;
        overflow-x: hidden;
    }

    /* Navbar: apilar elementos */
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    .web-logo { max-height: 40px; }
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    .nav-links a { margin: 0; font-size: 0.9rem; }

    /* Hero: menos altura */
    .hero { height: 400px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.1rem; }

    /* Detalle del viaje: una sola columna */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Galería Móvil: Ajuste clave */
    .gallery {
        width: 100%; /* Asegura que no se salga */
        overflow: hidden;
    }
    .gallery-main img {
        width: 100%;
        height: auto;
    }
    .gallery-thumbs {
        justify-content: flex-start; /* Alinear a la izquierda para scroll */
        padding-bottom: 5px;
    }
    .gallery-thumbs img {
        width: 70px;
        height: 70px;
    }

    /* Sidebar: ya no es sticky en móvil */
    .sidebar-card {
        position: static;
        margin-top: 0;
        padding: 20px;
    }

    /* Títulos */
    .detail-title { font-size: 1.8rem; }
    .section-title { font-size: 1.6rem; margin-bottom: 25px; }

    /* Botón flotante: más pequeño */
    .currency-floater {
        bottom: 10px;
        right: 10px;
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}