/**
 * ============================================================================
 * ARCHIVO: style.css (PUBLIC DESIGN SYSTEM - CANCLAIM ENTERPRISE v8.5)
 * PROYECTO: CLAIM CA OS | Sistema Operativo de Reclamaciones Aéreas
 * ============================================================================
 * NÚCLEO VISUAL PÚBLICO ABSOLUTO. Integra:
 * 1. Tokens de Marca Corporativa (Navy Blue, Maple Red, Gold).
 * 2. Soporte Estructural para todos los 8 bloques del Page Builder.
 * 3. UX Premium del Wizard de Reclamación Legal.
 * 4. Efectos Glassmorphism, Sombras de Elevación y Animaciones Suaves.
 * 5. Sistema Responsivo Completo (Parches Móviles y Tablet).
 * 6. Motor Visual del Live Editor (CMS).
 * ============================================================================
 */

/* ==========================================================================
   1. VARIABLES MAESTRAS (DESIGN TOKENS)
   ========================================================================== */
:root {
    /* Identidad de Marca CanClaim  */
    --navy: #122543;         /* Azul Profundo: Seguridad legal, Confianza corporativa */
    --navy-light: #1A365D;
    --navy-dark: #0B172A;
    --red-canclaim: #E32A26; /* Maple Red: Identidad 100% Canadiense, Call to Actions */
    --red-hover: #C5221F;
    --gold: #D4AF37;         /* Oro: Insignias, Testimonios y Compensaciones */
    --gold-light: #FDE047;
    
    /* Superficies, Fondos y Capas Neutras */
    --white: #FFFFFF;
    --bg-light: #F8FAFC;     /* Fondo principal de la web */
    --bg-alt: #F1F5F9;       /* Fondo alternativo para separar secciones */
    --text-main: #1E293B;    /* Texto principal (Casi negro) */
    --text-muted: #64748B;   /* Texto secundario / descriptivo */
    --border-color: #E2E8F0;
    
    /* Geometría, Dimensiones y Efectos */
    --nav-height: 85px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(18, 37, 67, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(18, 37, 67, 0.1);
    --shadow-lg: 0 20px 50px -12px rgba(18, 37, 67, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
}

/* ==========================================================================
   2. RESET Y ESTILOS BASE GLOBALES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body.canclaim-public-body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
}

p {
    margin-bottom: 15px;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px;
}

.section-padding {
    padding: 100px 0;
}

/* Clases Utilitarias */
.bg-light { background-color: var(--bg-light); }
.bg-alt { background-color: var(--bg-alt); }
.bg-navy { background-color: var(--navy); }
.text-white { color: var(--white); }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.full-width { width: 100%; justify-content: center; }
.hidden { display: none !important; }

/* ==========================================================================
   3. BOTONES (CALL TO ACTIONS)
   ========================================================================== */
.primary-btn {
    background-color: var(--red-canclaim);
    color: var(--white);
    padding: 15px 32px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(227, 42, 38, 0.25);
}

.primary-btn:hover {
    background-color: var(--red-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 42, 38, 0.4);
    color: var(--white);
}

.secondary-btn {
    background-color: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
    padding: 13px 30px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    text-decoration: none;
}

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

/* ==========================================================================
   4. HEADER Y NAVEGACIÓN (TOPBAR)
   ========================================================================== */
.main-header {
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(18, 37, 67, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
}

.main-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--navy);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.main-nav a:hover {
    color: var(--red-canclaim);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--navy);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-toggle:hover {
    color: var(--red-canclaim);
}

/* ==========================================================================
   5. COMPONENTES DEL PAGE BUILDER (BLOQUES DINÁMICOS)
   ========================================================================== */
.page-builder-canvas {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
}

/* A. Bloque Hero (Portada) */
.hero-block {
    padding: 140px 0;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--white);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(11, 23, 42, 0.9) 0%, rgba(18, 37, 67, 0.7) 100%);
    z-index: 1;
}

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

.hero-content h1 {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 400;
}

/* B. Cintillo Promocional */
.promo-banner {
    background-color: var(--red-canclaim);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}
.promo-banner h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
}

/* C. Sección Split (Imagen / Texto) */
.split-block {
    padding: 100px 0;
    background-color: var(--white);
}

.split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.split-container.reverse {
    direction: rtl;
}
.split-container.reverse > * {
    direction: ltr;
}

.split-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.split-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.split-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* D. Grilla de Servicios / Opciones */
.services-grid {
    padding: 80px 0;
    background-color: var(--bg-alt);
}
.s-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--navy);
}

/* E. Testimonios */
.testimonials-block {
    padding: 100px 0;
    background: var(--navy);
    color: var(--white);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.testimonial-card p {
    font-size: 1.05rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}
.testimonial-card .stars {
    color: var(--gold);
    margin-bottom: 15px;
}

/* F. FAQ Accordion */
.faq-block {
    padding: 80px 0;
}
.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
}
.faq-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.faq-question {
    padding: 20px;
    font-weight: 700;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
}
.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-muted);
    display: none;
}
.faq-item.active .faq-answer {
    display: block;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

/* ==========================================================================
   6. WIZARD DE RECLAMACIÓN LEGAL (NÚCLEO DE NEGOCIO)
   ========================================================================== */
.wizard-section {
    position: relative;
    z-index: 10;
}

.wizard-section .section-header {
    margin-bottom: 50px;
}

.wizard-section .section-header h2 {
    font-size: 2.8rem;
    color: var(--navy);
}

.wizard-container {
    max-width: 850px;
    margin: 0 auto;
    background: var(--white);
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.wizard-step {
    display: none;
}

.wizard-step.step-active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.wizard-step h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--navy);
    border-bottom: 2px solid var(--bg-alt);
    padding-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--navy);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wizard-input,
.wizard-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    color: var(--text-main);
    background-color: var(--bg-light);
    transition: var(--transition);
}

.wizard-input:focus,
.wizard-select:focus {
    border-color: var(--navy);
    background-color: var(--white);
    outline: none;
    box-shadow: 0 0 0 4px rgba(18, 37, 67, 0.08);
}

.wizard-footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* Contenedor de Firma Digital (Canvas) */
.signature-wrapper {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    position: relative;
    margin-top: 15px;
    overflow: hidden;
}

.signature-wrapper canvas {
    width: 100%;
    height: 250px;
    cursor: crosshair;
    background: var(--white);
}

.btn-clear-sig {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-canclaim);
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

/* ==========================================================================
   7. SECCIÓN FIJA: DERECHOS DEL PASAJERO
   ========================================================================== */
.rights-section {
    background-color: var(--white);
}

.rights-section .section-header h2 {
    font-size: 2.5rem;
}

.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.right-card {
    background: var(--bg-light);
    padding: 50px 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
}

.right-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--navy);
    background: var(--white);
}

.right-icon {
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    color: var(--gold);
    transition: var(--transition);
}

.right-card:hover .right-icon {
    background: var(--gold);
    color: var(--white);
}

.right-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.right-badge {
    display: inline-block;
    background: rgba(227, 42, 38, 0.1);
    color: var(--red-canclaim);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-top: 20px;
}

/* ==========================================================================
   8. ESTADÍSTICAS CORPORATIVAS (TRUST SIGNALS)
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    color: var(--red-canclaim);
    margin-bottom: 10px;
    line-height: 1;
}

.stat-item p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ==========================================================================
   9. FOOTER INSTITUCIONAL
   ========================================================================== */
.main-footer {
    border-top: 5px solid var(--red-canclaim);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 80px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 25px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    max-width: 400px;
}

.footer-links h4, 
.footer-contact h4 {
    color: var(--white);
    margin-bottom: 30px;
    font-size: 1.2rem;
    font-family: 'Montserrat', sans-serif;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1.05rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--red-canclaim);
    padding-left: 8px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.footer-contact i {
    color: var(--gold);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--red-canclaim);
    transform: translateY(-5px);
}

.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 60px 0 30px;
}

.footer-bottom {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ==========================================================================
   10. MODALES Y TOASTS GLOBALES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-alt);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.close-btn:hover {
    background: var(--red-canclaim);
    color: var(--white);
    transform: rotate(90deg);
}

.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    background: var(--white);
    color: var(--navy);
    padding: 18px 25px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    border-left: 5px solid var(--navy);
}

/* ==========================================================================
   11. INDICADORES DE CMS (LIVE EDITOR)
   ========================================================================== */
[data-cms] {
    transition: outline 0.2s, background-color 0.2s;
}

body.cms-edit-mode [data-cms]:hover {
    outline: 2px dashed var(--gold);
    outline-offset: 4px;
    background-color: rgba(212, 175, 55, 0.05);
    cursor: pointer;
}

.page-loader-placeholder {
    padding: 100px;
    text-align: center;
    color: var(--text-muted);
}

/* ==========================================================================
   12. PARCHES RESPONSIVOS DEFINITIVOS (MOBILE-FIRST)
   ========================================================================== */

/* Animaciones */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tablet (Landscape & Portrait) */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 3.2rem; }
    .split-container { gap: 40px; }
    .split-text h2 { font-size: 2.2rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 60px; }
    .stats-grid { gap: 20px; }
    .stat-number { font-size: 3rem; }
}

/* Mobile Devices (Smartphones) - REGLAS ESTRICTAS ANTI-SCROLL HORIZONTAL */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden !important;
        width: 100%;
    }

    /* Contenedores Forzados */
    section, .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .section-padding { padding: 60px 0 !important; }

    /* Header & Navbar */
    .main-nav, .nav-cta { display: none; } /* Ocultar menú en móvil */
    .mobile-toggle { display: block; }
    .main-logo { height: 35px; }

    /* Hero Block */
    .hero-block { padding: 100px 0; min-height: 60vh; text-align: center; }
    .hero-content h1 { font-size: 2.5rem !important; line-height: 1.2 !important; }
    .hero-content p { font-size: 1.1rem; }

    /* Split Sections (Fuerza a 1 columna) */
    .split-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center;
    }
    .split-container.reverse { direction: ltr; } /* Quitar RTL en móvil */
    .split-text h2 { font-size: 2rem !important; }

    /* Wizard y Formularios */
    .wizard-container { padding: 30px 20px; border-radius: var(--radius-md); }
    .wizard-section .section-header h2 { font-size: 2.2rem; }
    .wizard-step h3 { font-size: 1.4rem; text-align: center; }
    .form-row { grid-template-columns: 1fr !important; gap: 15px; }
    .wizard-footer { flex-direction: column; }
    .wizard-footer button { width: 100%; margin-bottom: 10px; }

    /* Grillas de Servicios y Derechos */
    .s-grid-container, .rights-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .right-card { padding: 30px 20px; }

    /* Estadísticas */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        text-align: center;
    }
    .footer-brand p { margin: 0 auto; }
    .social-links { justify-content: center; }
    .footer-contact p { justify-content: center; }

    /* Modales */
    .modal-overlay { padding: 15px; }
    .modal-content { max-height: 95vh; }
}

/* Micro-Móviles (iPhone SE, etc.) */
@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.1rem !important; }
    .stat-number { font-size: 2.5rem; }
    .wizard-input, .wizard-select { padding: 12px 15px; font-size: 1rem; }
}

/* ==========================================================================
   13. BLINDAJE EXTREMO CONTRA SELECCIÓN NATIVA (NIVEL DIOS)
   ========================================================================== */

/* Bloqueo absoluto de interacción de texto nativa solo cuando el editor está activo */
body.cms-edit-mode [data-cms] {
    -webkit-user-select: none !important; 
    -moz-user-select: none !important;    
    -ms-user-select: none !important;     
    user-select: none !important;         
    
    /* Bloquea el menú de "Copiar/Pegar/Buscar" al mantener presionado en iOS/Android */
    -webkit-touch-callout: none !important; 
    
    /* Elimina el destello de toque al 100% */
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important; 
    -webkit-tap-highlight-color: transparent !important;
    
    outline: 0 !important;
    cursor: default !important; /* Quita el cursor de "escribir texto" */
}

/* Si por algún milagro del navegador se selecciona el texto, lo hacemos invisible */
body.cms-edit-mode [data-cms]::selection {
    background: transparent !important; 
    color: inherit !important;
}
body.cms-edit-mode [data-cms]::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

/* Destrucción de cualquier borde de Focus nativo */
body.cms-edit-mode [data-cms]:focus,
body.cms-edit-mode [data-cms]:active,
body.cms-edit-mode [data-cms]:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Protección para el lapicito */
.cms-pencil-icon {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}