/* ==========================================================================
   SISTEMA DE DISEÑO PREMIUM & UX MEJORADA
   Basado en la identidad visual de "Bajo la Sombra de sus Alas A.C."
   Inspirado en la serenidad, calidez y alta conversión de Sunset Bay Academy
   ========================================================================== */

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-serif: 'Fraunces', Georgia, serif;
    
    /* Colores Principales del Logotipo (Bajo la Sombra de sus Alas) */
    --brand-teal: #246E85;
    --brand-teal-dark: #174E5F;
    --brand-teal-hover: #1D5C70;
    --brand-teal-light: #F0F6F8;
    --brand-teal-subtle: #D2E4EB;
    --brand-cyan: #4596AE;
    
    /* Acento Cálido Sereno y Humano (Madera Cálida / Terracota Suave) */
    --brand-amber: #246E85;
    --brand-amber-hover: #174E5F;
    --brand-amber-light: #EBF4F7;
    --brand-warm-accent: #B26A40;
    --brand-warm-subtle: #F9F2ED;
    
    /* Tipografía y Neutros */
    --neutral-900: #141E24;
    --neutral-800: #1D2B33;
    --neutral-700: #31424E;
    --neutral-600: #4D616F;
    --neutral-500: #718492;
    --neutral-300: #D3E0E6;
    --neutral-200: #E6EFF3;
    --neutral-100: #F3F7F9;
    --neutral-50: #F9FBFC;
    
    /* Sombras Elevadas, Suaves y Clínicas */
    --shadow-subtle: 0 2px 8px rgba(20, 30, 36, 0.04);
    --shadow-card: 0 10px 30px -4px rgba(20, 30, 36, 0.06), 0 2px 6px -1px rgba(20, 30, 36, 0.03);
    --shadow-elevated: 0 20px 40px -8px rgba(36, 110, 133, 0.12), 0 4px 12px -2px rgba(20, 30, 36, 0.04);
    --shadow-pop: 0 8px 24px -4px rgba(36, 110, 133, 0.28);
    
    /* Radios */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;
}

html, body {
    overflow-x: clip;
}

body {
    background-color: var(--neutral-50);
    color: var(--neutral-700);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-serif);
    color: var(--neutral-900);
    letter-spacing: -0.025em;
    font-weight: 600;
}

/* 1. TOP NOTICE BAR */
.top-notice-bar {
    background: linear-gradient(90deg, #121B20 0%, #1A2830 100%);
    color: #D3E0E8;
    font-size: 0.84rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-notice-bar a {
    color: #FFFFFF;
    transition: color 0.2s ease;
}
.top-notice-bar a:hover {
    color: var(--brand-cyan);
}

/* 2. NAVBAR PREMIUM */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--neutral-200);
    padding: 14px 0;
    transition: all 0.3s ease;
}
.navbar-custom .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.navbar-custom .nav-link {
    color: var(--neutral-700) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 8px 16px !important;
    border-radius: var(--radius-pill);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.navbar-custom .nav-link:hover {
    color: var(--brand-teal) !important;
    background-color: var(--brand-teal-light);
}
.navbar-custom .nav-link.active {
    color: var(--brand-teal) !important;
    background-color: var(--brand-teal-light);
    font-weight: 600;
}

/* 3. BOTONES CON JERARQUÍA VISUAL CLARA */
.btn-primary-cta {
    background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    border: none;
    box-shadow: 0 8px 22px -4px rgba(36, 110, 133, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary-cta:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--brand-teal-hover) 0%, #12404E 100%);
    box-shadow: 0 12px 28px -4px rgba(36, 110, 133, 0.45);
    color: #FFFFFF !important;
}

.btn-secondary-teal {
    background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    border: none;
    box-shadow: 0 6px 18px rgba(36, 110, 133, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}
.btn-secondary-teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(36, 110, 133, 0.32);
    color: #FFFFFF !important;
}

.btn-outline-custom {
    background-color: #FFFFFF;
    color: var(--brand-teal) !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--neutral-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-outline-custom:hover {
    border-color: var(--brand-teal);
    background-color: var(--brand-teal-light);
    color: var(--brand-teal-dark) !important;
}

/* Compatibilidad de nombres existentes */
.btn-clay {
    background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
    color: #FFFFFF !important;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    border: none;
    box-shadow: 0 6px 20px rgba(36, 110, 133, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}
.btn-clay:hover {
    transform: translateY(-2px);
    color: #FFFFFF !important;
    background: linear-gradient(135deg, var(--brand-teal-hover) 0%, #12404E 100%);
}

.btn-outline-clay {
    background-color: #FFFFFF;
    color: var(--brand-teal) !important;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--neutral-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-outline-clay:hover {
    border-color: var(--brand-teal);
    background-color: var(--brand-teal-light);
}
.btn-outline-clay:hover {
    border-color: var(--brand-teal);
    background-color: var(--brand-teal-light);
}

/* 4. PILLS & BADGES ELEGANTES */
.pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.80rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.02em;
}
.pill-teal {
    background-color: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    border: 1px solid var(--brand-teal-subtle);
}
.pill-amber {
    background-color: var(--brand-amber-light);
    color: var(--brand-amber-hover);
    border: 1px solid #F5DBCB;
}
.pill-sage {
    background-color: #EEF7F2;
    color: #2D6A4F;
    border: 1px solid #D1EADE;
}

/* 5. HERO SECTION REDISEÑADA */
.hero-wrapper {
    background: linear-gradient(180deg, #F5FAFC 0%, #EAF3F6 60%, #FAFCFD 100%);
    padding: 64px 0 72px;
    position: relative;
    border-bottom: 1px solid var(--neutral-200);
}
.hero-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: radial-gradient(rgba(36, 110, 133, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* 6. FORMULARIOS DE ALTA CONVERSIÓN */
.form-card-hero {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-elevated);
    border: 1.5px solid var(--neutral-200);
    position: relative;
}
.form-card-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-teal) 0%, var(--brand-amber) 100%);
    border-radius: 4px 4px 0 0;
}
.form-control, .form-select {
    background-color: var(--neutral-50);
    border: 1.5px solid var(--neutral-300);
    border-radius: var(--radius-md);
    padding: 11px 16px;
    font-size: 0.92rem;
    color: var(--neutral-900);
    transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
    background-color: #FFFFFF;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 4px rgba(36, 110, 133, 0.12);
    outline: none;
}

/* MICROFORMULARIO RÁPIDO DE 3 PREGUNTAS (FRONTERA MX / USA) */
.microform-box {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: var(--shadow-elevated);
    border: 1.5px solid var(--neutral-200);
    position: relative;
}
.microform-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-teal) 0%, var(--brand-cyan) 100%);
    border-radius: 4px 4px 0 0;
}
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    font-size: 0.78rem;
    font-weight: 700;
    margin-right: 8px;
    border: 1px solid var(--brand-teal-subtle);
}
.phone-group-border {
    display: flex;
    gap: 8px;
}
.phone-country-select {
    max-width: 145px;
    flex-shrink: 0;
    font-weight: 600;
    background-color: #FFFFFF;
}
.phone-number-input {
    letter-spacing: 0.05em;
    font-family: monospace, sans-serif;
    font-size: 1rem;
    font-weight: 600;
}
.phone-number-input::placeholder {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    letter-spacing: normal;
    font-weight: 400;
}

/* 7. TARJETAS DE CENTROS (CENTRO CAAZ Y CENTRO VARONES) */
.center-card {
    background: #FFFFFF;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.center-card:hover {
    transform: translateY(-6px);
    border-color: var(--neutral-300);
    box-shadow: var(--shadow-elevated);
}
.center-card-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--neutral-200);
    background: linear-gradient(180deg, var(--neutral-50) 0%, #FFFFFF 100%);
}
.center-card-header.youth {
    border-top: 4px solid var(--brand-cyan);
}
.center-card-header.adults {
    border-top: 4px solid var(--brand-teal);
}
.center-card-body {
    padding: 28px;
    flex-grow: 1;
}
.center-card-footer {
    padding: 18px 28px 24px;
    background-color: var(--neutral-50);
    border-top: 1px solid var(--neutral-200);
}

/* 8. PROCESO CLÍNICO EN PASOS CONECTADOS */
.process-step-card {
    background: #FFFFFF;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-subtle);
    height: 100%;
    position: relative;
}
.process-step-card:hover {
    border-color: var(--brand-teal);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}
.step-number-bubble {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 16px;
    border: 2px solid var(--brand-teal-subtle);
}

/* 9. BLOG CARDS */
.blog-card {
    background: #FFFFFF;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-teal);
    box-shadow: var(--shadow-card);
}
.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}
@media (min-width: 768px) {
    .blog-article-thumb {
        max-width: 240px !important;
        height: 170px !important;
    }
}

/* 10. SECCIÓN DE CONTACTO OSCURA CON MÁXIMO CONTRASTE Y LEGIBILIDAD */
.contact-section-dark {
    background: linear-gradient(145deg, #131E24 0%, #1A2932 100%);
    color: #FFFFFF;
    padding: 72px 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.contact-section-dark h2 {
    color: #FFFFFF !important;
}
.contact-section-dark p, .contact-section-dark span {
    color: #D3E0E8;
}
.contact-info-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: background 0.2s ease;
}
.contact-info-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 11. BOTÓN FLOTANTE PERMANENTE DE WHATSAPP */
.floating-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background-color: #25D366;
    color: #FFFFFF !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 14px 36px rgba(37, 211, 102, 0.55);
}

/* Micro-animación de pulso */
@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981;
    animation: pulseDot 2s infinite ease-in-out;
}

/* 12. UTILIDADES DE ALTA CONVERSIÓN Y TRANSICIONES */
.shadow-xs {
    box-shadow: 0 1px 3px rgba(20, 30, 36, 0.05);
}
.transition-all {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-shadow:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card) !important;
}
.hover-teal:hover {
    color: var(--brand-teal) !important;
}
.step-number-bubble {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
    color: #FFFFFF;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(36, 110, 133, 0.3);
}

/* 13. ESTILOS LIMPIOS Y MINIMALISTAS PARA EL FOOTER (UX SERENA) */
.footer-clean-link {
    color: #8C9CA8;
    text-decoration: none;
    font-size: 0.84rem;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 5px 0; /* Touch-target táctil accesible */
}
.footer-clean-link:hover {
    color: #FFFFFF;
}

.hover-cyan {
    transition: color 0.2s ease;
}
.hover-cyan:hover {
    color: var(--brand-cyan) !important;
}

/* ==========================================================================
   14. SISTEMA RESPONSIVE INTEGRAL: MOBILE & TABLET UX ERGONOMÍA
   ========================================================================== */

/* TABLETS Y MÓVILES (< 992px) */
@media (max-width: 991.98px) {
    .hero-wrapper {
        padding: 52px 0 60px;
    }
    .display-4 {
        font-size: 2.2rem;
    }
    .display-5 {
        font-size: 2rem;
    }
    .display-6 {
        font-size: 1.75rem;
    }
}

/* SMARTPHONES Y TABLETS COMPACTAS (< 768px) */
@media (max-width: 767.98px) {
    /* Desactivar auto-zoom en iOS Safari en formularios */
    .form-control, .form-select, .form-control-sm {
        font-size: 16px !important;
    }

    /* Reducción ergonómica de paddings en tarjetas y cajas */
    .form-card-hero, .microform-box {
        padding: 24px 18px;
        border-radius: var(--radius-lg);
    }
    .center-card-body {
        padding: 20px 18px;
    }
    .center-card-header {
        padding: 18px 18px 14px;
    }
    .center-card-footer {
        padding: 16px 18px;
    }
    
    /* Botones CTA adaptados para pantallas táctiles */
    .btn-primary-cta, .btn-secondary-teal, .btn-clay {
        padding: 12px 18px;
        font-size: 0.92rem;
        letter-spacing: -0.01em;
    }
    .btn-outline-custom, .btn-outline-clay {
        padding: 11px 16px;
        font-size: 0.90rem;
    }

    /* Selector telefónico flexible: evita desbordamiento en pantallas angostas */
    .phone-group-border {
        gap: 6px;
    }
    .phone-country-select {
        max-width: 108px !important;
        font-size: 0.85rem !important;
        padding-left: 8px;
        padding-right: 22px;
    }
    .phone-number-input {
        font-size: 0.95rem;
        padding: 10px 12px;
    }

    /* Botón flotante de WhatsApp ergonómico (evita solapes y soporta Safe Area) */
    .floating-whatsapp {
        width: 54px;
        height: 54px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        right: 18px;
        font-size: 1.5rem;
    }
}

/* SMARTPHONES COMPACTOS (< 576px) */
@media (max-width: 575.98px) {
    .hero-wrapper {
        padding: 42px 0 48px;
    }
    
    /* Pills y Badges flexibles */
    .pill-tag {
        white-space: normal;
        text-align: center;
        line-height: 1.35;
        font-size: 0.76rem;
        padding: 6px 12px;
    }

    /* Botones full-width en pantallas pequeñas cuando se apilan */
    .btn-mobile-full {
        width: 100% !important;
        text-align: center;
        justify-content: center;
    }

    /* Asegurar modales legibles y accesibles */
    .modal-dialog {
        margin: 12px;
    }
    .modal-body {
        padding: 20px 16px !important;
    }
}


