/* ============================================================
   SISTEMA DE DISEÑO: VIAJESTORE.CL — Cyber-Organic Ethos
   Última revisión: Pre-Producción
   ============================================================ */

/* --- VARIABLES GLOBALES DEL SISTEMA --- */
:root {
    /* Paleta Cyber-Organic Ethos */
    --primary:            #ddb7ff;  /* Neon Purple — acción principal */
    --primary-container:  #b76dff;
    --secondary:          #4edea3;  /* Vibrant Emerald — estado activo */
    --tertiary:           #89ceff;  /* Cyber Blue — datos técnicos */
    --background:         #131314;  /* Fondo profundo */
    --surface:            #1c1b1c;
    --surface-high:       #2a2a2b;
    --outline:            #988d9f;

    /* Aliases para compatibilidad con el código existente */
    --neon-green:         var(--secondary);
    --deep-purple:        var(--primary);
    --neon-green-glow:    rgba(78, 222, 163, 0.35);
    --deep-purple-glow:   rgba(221, 183, 255, 0.35);
    --whatsapp-green:     #25D366;

    /* Glassmorphism */
    --glass-bg:     rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Texto */
    --text-main:  #e5e2e3;
    --text-muted: #988d9f;
}

/* ============================================================
   IMPORTACIÓN DE FUENTES — SISTEMA TIPOGRÁFICO CYBER-ORGANIC
   - Space Grotesk: Títulos (geométrico, futurista)
   - Inter:         Cuerpo (máxima legibilidad)
   - JetBrains Mono: Badges/Labels (estética tech/código)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- BASE GLOBAL --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Evita zoom automático en iOS */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- UTILIDADES TIPOGRÁFICAS --- */
.font-display,
.font-orbitron,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

.font-body,
.font-poppins {
    font-family: 'Inter', sans-serif;
}

.font-tech { font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   FONDOS AMBIENTALES
   ============================================================ */
.bg-orchestrator {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(ellipse at 60% 30%, #1e1a3a 0%, #131314 60%);
    pointer-events: none;
}

.bg-forest-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url('bg-hero.png');
    background-size: cover;
    background-position: center top; /* Anclado arriba para mostrar la parte más impactante */
    opacity: 0.2;
    filter: saturate(1.3) contrast(1.1) blur(1.5px);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 80%);
    pointer-events: none;
}

.ambient-noise {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: 5;
    pointer-events: none;
}

/* ============================================================
   HERO — CARRUSEL DE FONDO
   ============================================================ */
.carousel-slide {
    transition: opacity 1.2s ease-in-out;
}

/* Las imágenes del carrusel se posicionan cubriendo todo el hero */
#hero-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%; /* Muestra la parte superior/central de la imagen */
}

/* Overlay oscuro sobre el carrusel para legibilidad del texto */
#hero-carousel .carousel-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        160deg,
        rgba(19,19,20,0.75) 0%,
        rgba(19,19,20,0.50) 50%,
        rgba(19,19,20,0.80) 100%
    );
}

/* ============================================================
   COMPONENTES: GLASSMORPHISM CARDS
   ============================================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    transition: backdrop-filter 0.4s ease, border-color 0.3s ease, background 0.3s ease;
}

.glass-card:hover {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(221, 183, 255, 0.25);
}

/* ============================================================
   COMPONENTES: FORMULARIOS
   ============================================================ */
.input-glass {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    -webkit-appearance: none; /* Elimina estilos nativos en iOS */
    appearance: none;
}

.input-glass::placeholder { color: var(--text-muted); }

.input-glass:focus {
    border-color: var(--secondary);
    background: rgba(78, 222, 163, 0.04);
    box-shadow: 0 0 0 3px rgba(78, 222, 163, 0.12);
}

/* Select nativo con estilo personalizado */
.input-glass option {
    background: #1c1b1c;
    color: var(--text-main);
}

/* ============================================================
   COMPONENTES: BOTONES PREMIUM
   ============================================================ */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    border: none;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, #00c98a 100%);
    color: #0a0a0b;
    box-shadow: 0 4px 20px var(--neon-green-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--neon-green-glow);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(78, 222, 163, 0.15);
}

/* ============================================================
   COMPONENTES: BADGES TÉCNICOS (JetBrains Mono)
   ============================================================ */
.badge-tech {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 5px 14px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-tech:hover {
    background: rgba(78, 222, 163, 0.12);
    border-color: rgba(78, 222, 163, 0.45);
    color: var(--secondary);
    box-shadow: 0 0 12px rgba(78, 222, 163, 0.3);
    transform: translateY(-1px);
}

/* ============================================================
   ANIMACIONES: SCROLL REVEAL
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   GRADIENTES DE TEXTO
   ============================================================ */
.text-gradient-green {
    background: linear-gradient(90deg, #4edea3 0%, #00c98a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-purple {
    background: linear-gradient(90deg, #ddb7ff 0%, #b76dff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-neon-green { color: var(--secondary); }
.text-deep-purple { color: var(--primary); }

/* ============================================================
   CARDS DE UPGRADES
   ============================================================ */
.upgrade-card {
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.upgrade-card:hover {
    border-color: var(--secondary) !important;
    box-shadow: 0 0 25px rgba(78, 222, 163, 0.12);
    transform: translateY(-3px);
}

/* ============================================================
   BOTONES FLOTANTES (Chat + WhatsApp)
   ============================================================ */
.btn-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    position: relative;
    z-index: 60;
    flex-shrink: 0;
}

.btn-chat-main {
    background: linear-gradient(135deg, #7c3aed 0%, #4edea3 100%);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-whatsapp-float {
    background-color: var(--whatsapp-green);
    margin-top: 10px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   MODAL DE AGENDAMIENTO
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--surface);                       /* surface color del sistema */
    border: 1px solid rgba(221, 183, 255, 0.2); /* borde sutil primary */
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 0 60px rgba(221, 183, 255, 0.08), 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Scrollbar del modal en dark mode */
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 9999px; }


/* ============================================================
   MEDIA QUERIES — RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Extra pequeño: < 480px */
@media (max-width: 480px) {
    .btn-premium {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }

    .badge-tech {
        font-size: 10px;
        padding: 4px 10px;
    }

    /* El hero en pantallas muy pequeñas */
    #hero-carousel img {
        object-position: 60% 30%; /* Desplaza la imagen hacia el centro en móviles muy pequeños */
    }

    .modal-content {
        padding: 1.5rem;
        border-radius: 16px;
    }
}

/* Tablet: 768px */
@media (min-width: 768px) and (max-width: 1023px) {
    #hero-carousel img {
        object-position: center 25%;
    }
}

/* Desktop grande */
@media (min-width: 1280px) {
    #hero-carousel img {
        object-position: center 20%; /* En desktop, muestra la parte alta de las imágenes */
    }
}
