/* ==========================================================================
   CASECOVERY TRIAGE — GUÍA DE ESTILO OFICIAL DE MARCA & LANDING PAGE V3
   ========================================================================== */

:root {
    /* Paleta Principal de Marca */
    --brand-blue: #0057FF;
    --brand-blue-hover: #0045CC;
    --brand-blue-subtle: #EBF2FF;
    --brand-cyan: #38bdf8;
    --brand-green: #10b981;
    --brand-security: #00A86B;
    --brand-amber: #f59e0b;
    --brand-red: #ef4444;
    
    /* Burbujas y Participantes */
    --bubble-actor-bg: #E2F9CB;
    --bubble-actor-border: #bbf7d0;
    --bubble-defendant-bg: #F4F7FC;
    --bubble-defendant-border: #e2e8f0;
    --bubble-system-bg: #FEF3C7;
    --bubble-system-border: #FDE68A;
    
    /* Modo Oscuro (Mesa de Trabajo Web / GUI / Hero) */
    --bg-dark-main: #0b0f19;
    --bg-dark-card: #151d30;
    --bg-dark-card-hover: #1c2742;
    --border-dark: #2a3859;
    
    /* Texto */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    
    /* Tipografía */
    --font-family-primary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --font-family-mono: 'Consolas', 'Courier New', monospace;
    
    /* Radios y Sombras */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

/* Reset y Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-primary);
    color: var(--text-primary);
    background-color: #f8fafc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 80px;
}

/* ==========================================================================
   1. HEADER & NAVEGACIÓN (LOGO BALANCEADO & ALINEACIÓN HORIZONTAL PERFECTA)
   ========================================================================== */
.main-header {
    background-color: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 6px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Header: Isotipo oficial balanceado y optimizado (46px de alto) */
.brand-isotipo {
    height: 46px !important;
    width: auto !important;
    max-height: none !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 87, 255, 0.35));
    transition: transform 0.25s ease;
}

.brand-isotipo:hover {
    transform: scale(1.03);
}

/* Tipografía oficial blanca: exactamente el 60% del alto del logo (28px) */
.brand-typography-img {
    height: 28px !important;
    width: auto !important;
    max-height: none !important;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 87, 255, 0.45));
    transition: transform 0.25s ease;
}

.brand-typography-img:hover {
    transform: scale(1.02);
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.accent-badge {
    background: var(--brand-blue);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
    flex-shrink: 0;
}

.nav-links a {
    color: #94a3b8;
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ==========================================================================
   SELECTOR DE IDIOMAS (LANGUAGE DROPDOWN)
   ========================================================================== */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--brand-blue);
    transform: translateY(-1px);
}

.lang-label {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 500;
    margin-right: 2px;
}

.lang-flag {
    font-size: 14px;
    line-height: 1;
}

.lang-text {
    letter-spacing: 0.02em;
}

.lang-arrow {
    font-size: 8.5px;
    opacity: 0.7;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 185px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 3px;
    z-index: 1000;
    backdrop-filter: blur(12px);
    animation: fadeInScale 0.15s ease-out forwards;
}

.lang-menu.show {
    display: flex;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: transparent;
    color: #e2e8f0;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.15s ease;
}

.lang-option:hover {
    background: rgba(0, 87, 255, 0.2);
    color: #ffffff;
}

.lang-option.active {
    background: var(--brand-blue);
    color: #ffffff;
    font-weight: 700;
}

/* ==========================================================================
   BOTONES Y DESTELLO METÁLICO (CTA SHIMMER)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 14.5px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-blue);
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 87, 255, 0.35);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 45%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    animation: ctaShimmer 3.2s infinite;
}

@keyframes ctaShimmer {
    0% { left: -60%; }
    28% { left: 140%; }
    100% { left: 140%; }
}

.btn-primary:hover {
    background: var(--brand-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 87, 255, 0.5);
}

.btn-secondary {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
}

.btn-secondary:hover {
    background: #334155;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-large {
    padding: 16px 34px;
    font-size: 16.5px;
    border-radius: var(--radius-lg);
    font-weight: 700;
}

/* ==========================================================================
   2. HERO SECTION & ANIMACIÓN DE ENTRADA DEL CHAT
   ========================================================================== */
.hero-section {
    background: radial-gradient(circle at 80% 20%, #1e2e4a 0%, #0b0f19 70%);
    color: #ffffff;
    padding: 70px 24px 90px;
    border-bottom: 1px solid var(--border-dark);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 32px;
}

.cta-group {
    margin-bottom: 24px;
}

.cta-subtext {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 10px;
}

.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: fit-content;
}

/* Teléfono interactivo mock */
.phone-chat-container {
    background: #0f172a;
    border: 3px solid #334155;
    border-radius: 28px;
    padding: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    max-width: 380px;
    margin: 0 auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.chat-time {
    font-size: 11px;
    color: #64748b;
}

.chat-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Animación de Entrada del Chat (WhatsApp Vivo) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-feed .bubble {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.4;
    max-width: 88%;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chat-feed .bubble:nth-child(1) {
    animation-delay: 0.5s;
}

.chat-feed .bubble:nth-child(2) {
    animation-delay: 1.5s;
}

.chat-feed .bubble:nth-child(3),
.chat-feed .bubble.audio-bubble {
    animation-delay: 2.5s;
}

.bubble .metadata {
    font-size: 9.5px;
    font-weight: 700;
    margin-bottom: 2px;
}

.bubble-receiver {
    align-self: flex-start;
    background: #1e293b;
    color: #f1f5f9;
    border-bottom-left-radius: 2px;
}

.bubble-receiver .metadata {
    color: #94a3b8;
}

.bubble-sender {
    align-self: flex-end;
    background: #064e3b;
    color: #ecfdf5;
    border-bottom-right-radius: 2px;
}

.bubble-sender .metadata {
    color: #6ee7b7;
}

.audio-player-embed {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 5px 8px;
    border-radius: 6px;
    margin: 4px 0;
    font-family: var(--font-family-mono);
    font-size: 11px;
}

.play-btn {
    color: #34d399;
    font-size: 12px;
}

.audio-wave {
    color: #10b981;
    letter-spacing: -1px;
}

.audio-duration {
    color: #94a3b8;
    margin-left: auto;
    font-size: 10px;
}

.ia-transcript {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 11px;
    color: #d1fae5;
}

.sparkle {
    color: #fbbf24;
}

.transcript-text {
    font-style: italic;
    margin-top: 2px;
}

/* ==========================================================================
   3. SECCIONES: DOLOR, SOLUCIÓN, PASOS Y PRECIOS
   ========================================================================== */
.section-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 42px 24px;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.grid-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card,
.solution-card,
.step-card,
.pricing-card {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover,
.solution-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 30px rgba(0, 87, 255, 0.12);
    border-color: rgba(0, 87, 255, 0.35);
}

.step-card:hover {
    transform: translateY(-4px);
}

.problem-section {
    background: #ffffff;
}

.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
}

.card-alert {
    border-top: 4px solid var(--brand-red);
}

.card-alert h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.card-alert p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   SOLUCIÓN Y SLOGAN TRIAGE
   ========================================================================== */
.solution-section {
    background: #f1f5f9;
}

.logo-banner-center {
    text-align: center;
    margin-bottom: 18px;
}

.brand-logo-main {
    height: 56px !important;
    width: auto !important;
    max-height: none !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 87, 255, 0.25));
}

.brand-slogan-triage {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--brand-blue);
    margin-top: 6px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.solution-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 20px 20px;
    box-shadow: var(--shadow-sm);
}

.solution-card span[class^="icon-"] {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.solution-card h3 {
    font-size: 16.5px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
}

.solution-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.how-it-works-section {
    background: #ffffff;
}

.step-card {
    text-align: center;
    padding: 20px 16px;
}

.step-number {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-blue);
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    box-shadow: 0 4px 12px rgba(0, 87, 255, 0.3);
}

.step-card h3 {
    font-size: 16.5px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pricing-section {
    background: #0b0f19;
    color: #ffffff;
}

.pricing-section .section-title {
    color: #ffffff;
}

.pricing-card {
    background: #151d30;
    border: 1px solid #2a3859;
    border-radius: var(--radius-lg);
    padding: 34px 26px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 87, 255, 0.5);
}

.pricing-card.featured {
    border-color: var(--brand-blue);
    background: #19243d;
    box-shadow: 0 10px 30px rgba(0, 87, 255, 0.25);
    transform: scale(1.03);
}

.pricing-card.featured:hover {
    transform: scale(1.04) translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 87, 255, 0.35);
}

.popular-tag {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--brand-blue);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.pricing-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}

.pricing-desc {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.price-box {
    margin-bottom: 24px;
}

.price {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
}

.period {
    font-size: 14px;
    color: #94a3b8;
    margin-left: 4px;
}

.price-features {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
}

.price-features li {
    font-size: 13.5px;
    color: #cbd5e1;
    margin-bottom: 10px;
}

/* ==========================================================================
   FOOTER & PULSO DE SEGURIDAD
   ========================================================================== */
.main-footer {
    background: #060911;
    color: #64748b;
    border-top: 1px solid #1e293b;
    padding: 40px 24px 30px;
}

.footer-container {
    max-width: 1140px;
    margin: 0 auto;
    text-align: center;
}

.integrity-banner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.integrity-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.shield-badge {
    background: #064e3b;
    color: #34d399;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.integrity-hash {
    font-family: var(--font-family-mono);
    font-size: 12px;
    color: var(--brand-cyan);
    display: inline-flex;
    align-items: center;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    background-color: var(--brand-security);
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(0, 168, 107, 0.7);
    animation: pulseSecurity 1.8s infinite;
    vertical-align: middle;
}

@keyframes pulseSecurity {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 168, 107, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 9px rgba(0, 168, 107, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 168, 107, 0);
    }
}

.footer-notice {
    font-size: 12px;
    color: #64748b;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 18px 0 12px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.footer-separator {
    color: #334155;
    font-size: 12px;
}

.footer-bottom {
    font-size: 13px;
    color: #475569;
}

/* Responsividad */
@media (max-width: 900px) {
    .brand-isotipo {
        height: 75px !important;
    }
    .hero-container {
        grid-template-columns: 1fr;
    }
    .grid-3-cols, .grid-2-cols {
        grid-template-columns: 1fr;
    }
    .pricing-card.featured {
        transform: none;
    }
    .nav-links {
        display: none;
    }
}
