/* =========================================
   CONFIGURACIÓN BASE
   ========================================= */
body {
    background-color: #111316; /* --bx-dark-depth solicitado */
    color: #8D99AE;
    font-family: 'Poppins', sans-serif;
    font-display: swap;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.5px;
}

.text-brand { color: var(--bx-brand); }
.text-gray { color: #8D99AE; }
.ls-2 { letter-spacing: 2px; }

/* Espaciado de secciones */
.section-padding {
    padding: 100px 0;
}

/* =========================================
   1. HERO SECTION
   ========================================= */
.about-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    margin-top: -85px; /* Detrás del navbar */
    padding-top: 85px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Agrega este Media Query al final del CSS */
@media (max-width: 768px) {
    .about-hero {
        height: auto;       /* Deja que el contenido defina la altura */
        min-height: 350px;  /* Reducimos la altura mínima en móvil */
        padding-bottom: 40px; /* Un poco de aire abajo */
    }
    
    .display-3 {
        font-size: 2.2rem; /* Texto más pequeño pinta más rápido */
    }
}

/* Fijamos la altura mínima del texto para que no 'empuje' el contenido al cargar */
h1.display-3 {
    min-height: 120px; /* Reserva el espacio para el título */
    font-size: 2.5rem; /* Aseguramos tamaño en móvil */
    line-height: 1.2;
}

/* Fijamos la altura del Hero para que no baile */
.about-hero {
    min-height: 450px !important; /* Fuerza la altura para evitar colapso */
}

/* Fondo con imagen técnica y overlay oscuro */
.about-hero-bg {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        z-index: 0;
        /* FONDO POR DEFECTO (MÓVIL): Un degradado gris oscuro técnico */
        background: radial-gradient(circle at center, #2c3038 0%, #111316 100%);
    }
    
    /* Solo mostramos la etiqueta IMG si es PC o si la imagen carga */
    .about-hero-bg img {
        width: 100%; height: 100%; object-fit: cover;
        opacity: 0.15;
    }

/* Gradiente inferior para mezclar con la siguiente sección */
.about-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 150px;
    background: linear-gradient(to top, #111316 0%, transparent 100%);
    z-index: 1;
}

.section-badge {
    display: inline-block;
    background: rgba(255, 31, 46, 0.1);
    color: var(--bx-brand);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 31, 46, 0.2);
}

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

/* Indicador de Scroll */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 5;
    opacity: 0.7;
}

.scroll-indicator .line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--bx-brand) 0%, transparent 100%);
}

/* =========================================
   2. HISTORIA SECTION (Stack de Imágenes)
   ========================================= */
.image-stack {
    position: relative;
    padding: 20px;
}

.img-main {
    width: 100%;
    /* Ejemplo de rectángulo con un ligero corte poligonal (ajustable) */
    clip-path: polygon(5% 0%, 100% 0%, 95% 100%, 0% 100%);
    object-fit: cover;
}

.about-glow-stack {
    filter: drop-shadow(20px 35px 15px rgba(153, 9, 9, 0.473));
}


/* =========================================
   3. STATS STRIP
   ========================================= */
.bg-darker {
    background-color: #0b0c0e; /* Un tono aún más oscuro que el fondo base */
}

.border-y-subtle {
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.counter {
    background: linear-gradient(45deg, var(--bx-brand) 0%, #ff5e6a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0;
}

/* =========================================
   4. PROCESS SECTION (Tarjetas de Pasos)
   ========================================= */
.process-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 40px 30px;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.step-number {
    position: absolute;
    top: 0;
    right: 20px;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255,255,255,0.02);
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    transition: 0.3s;
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(26, 29, 33, 1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--bx-white);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
    transition: 0.3s;
}

/* Hover Effects */
.process-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-10px);
    border-color: var(--bx-brand);
}

.process-card:hover .step-number {
    color: rgba(255, 31, 46, 0.1); /* Número se pone rojo sutil */
}

.process-card:hover .icon-wrapper {
    background: var(--bx-brand);
    border-color: var(--bx-brand);
    box-shadow: 0 0 20px rgba(255, 31, 46, 0.4);
}

/* Tarjeta activa por defecto (Paso 2) */
.active-card {
    border-color: rgba(255, 31, 46, 0.3);
}

.active-card .icon-wrapper {
    color: var(--bx-brand);
}

/* =========================================
   5. CTA MINI
   ========================================= */
.cta-box {
    background: radial-gradient(circle at center, #1e2229 0%, #111316 100%);
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

/* Efecto de luz roja trasera */
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,31,46,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.btn-brand-glow {
    background-color: var(--bx-brand);
    color: white;
    border: none;
    transition: 0.3s;
    box-shadow: 0 5px 20px rgba(255, 31, 46, 0.3);
}

.btn-brand-glow:hover {
    background-color: #d6001c; /* Un rojo un poco más oscuro */
    box-shadow: 0 10px 30px rgba(255, 31, 46, 0.5);
    transform: scale(1.05);
    color: white;
}

/* Responsive */
@media (max-width: 991px) {
    .image-stack { margin-bottom: 40px; }
    .img-secondary { width: 150px; bottom: -15px; }
    .display-3 { font-size: 2.5rem; }
}

h1.display-3 {
    /* TRUCO LCP: Usamos fuentes de sistema primero. Carga en 0ms. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    
    /* TRUCO CLS: Reservamos altura para que no salte al cambiar la fuente */
    min-height: 1.2em; 
}