/* ============================================================================
 * search-trials.css — Estilos del Lote J
 *
 * Rediseño visual sobre la landing /buscar-ensayos.
 * Paleta canónica all-blue de _tokens.css (cyan→sky→blue→navy) +
 * estados semánticos (success verde, warning ámbar) en iconos de stats.
 *
 * Estructura del CSS:
 *   1. HERO — gradient diagonal navy→blue-700→blue-400
 *   2. DOORS — 3 cards con jerarquía y header coloreado distinto
 *   3. STATS — 4 contadores con iconos semánticos
 *   4. COMMUNITY — banda final cálida con escudo
 *   5. RESPONSIVE
 *   6. ANIMATIONS
 * ============================================================================ */


/* ───────────────────────────────────────────────────────────────────────
 * MAIN container
 * ─────────────────────────────────────────────────────────────────────── */
.st-main {
    background: var(--bg-body, #f8fafc);
    min-height: 100vh;
}


/* ═══════════════════════════════════════════════════════════════════════
 * 1. HERO — gradient diagonal all-blue
 * ═══════════════════════════════════════════════════════════════════════ */
.st-hero {
    background: linear-gradient(135deg,
        var(--color-navy, #002855) 0%,
        var(--color-blue-700, #0056a3) 50%,
        var(--color-blue-400, #3b82f6) 100%);
    color: white;
    padding: 72px 32px 100px;
    position: relative;
    overflow: hidden;
}
.st-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 70%;
    height: 220%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 55%);
    pointer-events: none;
}
.st-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 50%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}
.st-hero-inner {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.st-eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: 999px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.st-hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: white;
}
.st-hero-lead {
    font-size: 19px;
    line-height: 1.55;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}
.st-hero-lead strong {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 6px;
}
.st-reassurance {
    margin-top: 28px;
    font-size: 16px;
    opacity: 0.85;
    font-weight: 500;
}
.st-reassurance::before {
    content: '✦';
    margin-right: 10px;
    color: rgba(255, 255, 255, 0.7);
}


/* ═══════════════════════════════════════════════════════════════════════
 * 2. DOORS — 3 cards con jerarquía
 *    Card 1 (perfil)   → cyan/sky  (claro, accesible)
 *    Card 2 (guiada)   → blue primary  (FEATURED, recomendado)
 *    Card 3 (avanzada) → navy oscuro  (profundo, experto)
 * ═══════════════════════════════════════════════════════════════════════ */
.st-doors-section {
    margin-top: -52px;
    padding: 0 32px 64px;
    position: relative;
    z-index: 2;
}
.st-doors {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.st-door {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 250ms ease, box-shadow 250ms ease;
    position: relative;
}
.st-door:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 40, 85, 0.12);
}

/* Header colorido */
.st-door-header {
    height: 100px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.st-door-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 50%);
}

.st-door--profile  .st-door-header {
    background: linear-gradient(135deg, var(--color-cyan, #0ea5e9) 0%, var(--color-sky, #0284c7) 100%);
}
.st-door--guided   .st-door-header {
    background: linear-gradient(135deg, var(--color-blue-500, #2563eb) 0%, var(--color-blue-700, #0056a3) 100%);
}
.st-door--advanced .st-door-header {
    background: linear-gradient(135deg, var(--color-blue-900, #003d7a) 0%, var(--color-navy, #002855) 100%);
}

.st-door-icon {
    width: 64px;
    height: 64px;
    color: white;
    z-index: 1;
    position: relative;
}
.st-door-icon svg { width: 100%; height: 100%; }

/* FEATURED — destacada */
.st-door--featured {
    transform: translateY(-12px);
    box-shadow: 0 20px 48px -8px rgba(0, 40, 85, 0.25);
    border: 2px solid var(--color-blue-500, #2563eb);
}
.st-door--featured:hover { transform: translateY(-18px); }
.st-door--featured .st-door-header { height: 120px; }
.st-door--featured .st-door-icon { width: 76px; height: 76px; }

.st-ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    background: white;
    color: var(--color-blue-700, #0056a3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.st-ribbon::before {
    content: '★';
    color: var(--color-blue-500, #2563eb);
    margin-right: 5px;
}

/* Body del card */
.st-door-body {
    padding: 28px 28px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.st-door-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #334155);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.st-door-time svg {
    width: 13px;
    height: 13px;
}
.st-door-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-navy, #002855);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.st-door--featured .st-door-title { font-size: 26px; }
.st-door-text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted, #334155);
    margin-bottom: 22px;
    flex-grow: 1;
}

/* CTAs por puerta */
.st-door-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14.5px;
    transition: all 200ms ease;
}
.st-door-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 200ms ease;
}
.st-door:hover .st-door-cta svg { transform: translateX(4px); }

.st-door--profile .st-door-cta {
    background: var(--color-blue-50, #eff6ff);
    color: var(--color-sky, #0284c7);
    border: 1.5px solid var(--color-cyan, #0ea5e9);
}
.st-door--profile:hover .st-door-cta {
    background: linear-gradient(135deg, var(--color-cyan, #0ea5e9), var(--color-sky, #0284c7));
    color: white;
    border-color: transparent;
}

.st-door--guided .st-door-cta {
    background: linear-gradient(135deg, var(--color-blue-500, #2563eb), var(--color-blue-700, #0056a3));
    color: white;
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.4);
}
.st-door--guided:hover .st-door-cta {
    background: linear-gradient(135deg, var(--color-blue-700, #0056a3), var(--color-navy, #002855));
    box-shadow: 0 10px 24px -4px rgba(37, 99, 235, 0.55);
}

.st-door--advanced .st-door-cta {
    background: var(--color-blue-50, #eff6ff);
    color: var(--color-navy, #002855);
    border: 1.5px solid var(--color-blue-900, #003d7a);
}
.st-door--advanced:hover .st-door-cta {
    background: linear-gradient(135deg, var(--color-blue-900, #003d7a), var(--color-navy, #002855));
    color: white;
    border-color: transparent;
}


/* ═══════════════════════════════════════════════════════════════════════
 * 3. STATS — fondo blanco + 4 iconos coloreados (semánticos)
 * ═══════════════════════════════════════════════════════════════════════ */
.st-stats-wrap {
    background: white;
    border-top: 1px solid var(--border-color, #e2e8f0);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    padding: 56px 32px;
}
.st-stats {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.st-stat {
    text-align: center;
    padding: 16px;
}
.st-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: white;
}
.st-stat-icon svg {
    width: 28px;
    height: 28px;
}

/* 4 colores semánticos según convención del proyecto */
.st-stat-icon--success { background: linear-gradient(135deg, var(--color-success, #059669), #10b981); }
.st-stat-icon--blue    { background: linear-gradient(135deg, var(--color-blue-500, #2563eb), var(--color-blue-700, #0056a3)); }
.st-stat-icon--warning { background: linear-gradient(135deg, var(--color-warning, #d97706), var(--color-warning-dark, #92400e)); }
.st-stat-icon--cyan    { background: linear-gradient(135deg, var(--color-cyan, #0ea5e9), var(--color-sky, #0284c7)); }

.st-stat-num {
    font-size: 38px;
    font-weight: 800;
    color: var(--color-navy, #002855);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.st-stat-label {
    font-size: 14px;
    color: var(--text-muted, #334155);
    font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════════════
 * 4. COMMUNITY — banda final con escudo y CTA
 * ═══════════════════════════════════════════════════════════════════════ */
.st-community {
    padding: 64px 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-blue-50, #eff6ff) 0%, var(--bg-light, #f8fafc) 100%);
}
.st-community-shield {
    width: 72px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}
.st-community-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-navy, #002855);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.st-community-text {
    font-size: 17px;
    color: var(--text-muted, #334155);
    max-width: 540px;
    margin: 0 auto 24px;
    line-height: 1.6;
}
.st-community-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--color-blue-700, #0056a3);
    border: 2px solid var(--color-blue-500, #2563eb);
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 200ms ease;
}
.st-community-cta:hover {
    background: linear-gradient(135deg, var(--color-blue-500, #2563eb), var(--color-blue-700, #0056a3));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.4);
}


/* ═══════════════════════════════════════════════════════════════════════
 * 5. RESPONSIVE
 * ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 880px) {
    .st-hero { padding: 56px 24px 80px; }
    .st-hero-title { font-size: 36px; }
    .st-hero-lead { font-size: 16px; }
    .st-doors {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .st-door--featured {
        transform: none;
        order: -1;
    }
    .st-door--featured:hover { transform: translateY(-6px); }
    .st-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .st-stat-num { font-size: 30px; }
    .st-community { padding: 48px 24px; }
}

@media (max-width: 480px) {
    .st-hero-title { font-size: 30px; }
    .st-doors-section { padding: 0 16px 48px; }
    .st-stats-wrap { padding: 40px 16px; }
    .st-community-title { font-size: 20px; }
}


/* ═══════════════════════════════════════════════════════════════════════
 * 6. ANIMATIONS — entry en cascada
 * ═══════════════════════════════════════════════════════════════════════ */
@keyframes stRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.st-hero-inner > *,
.st-door,
.st-stat,
.st-community > * {
    animation: stRise 600ms ease-out backwards;
}
.st-eyebrow                          { animation-delay: 0ms; }
.st-hero-title                       { animation-delay: 80ms; }
.st-hero-lead                        { animation-delay: 160ms; }
.st-reassurance                      { animation-delay: 240ms; }
.st-door:nth-child(1)                { animation-delay: 320ms; }
.st-door:nth-child(2)                { animation-delay: 400ms; }
.st-door:nth-child(3)                { animation-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .st-door--featured { transform: translateY(-12px); }
}
