/* assets/css/casos-exito.css */

/* --- Grid Principal --- */
.casos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    /* margin-top: 2rem; */
    /* margin-top: var(--margin-layout-desktop); */
}

/* --- Card Container --- */
.caso-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.caso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* --- Header: Especialidad --- */
.caso-header {
    background-color: var(--primary-color-1, #1e5385);
    /* Fallback si la var no carga */
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--secondary-color-5, #B11F1F);
}

.caso-tag {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.caso-tag i {
    color: #e5bc6b;
    /* Dorado legacy */
}

/* --- Body --- */
.caso-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.caso-title {
    color: var(--primary-color-1, #1e5385);
    font-size: 1.25rem;
    font-weight: 700;
    /* margin-bottom: 5px; */
    line-height: 1.4;
    min-height: 2.5rem;
    /* Alineación visual */
}

/* --- Badge: Resultado --- */
.caso-result {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.caso-desc {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* --- Footer & Botón --- */
.caso-footer {
    margin-top: auto;
}

.btn-caso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: var(--primary-color-1, #1e5385);
    border: 2px solid var(--primary-color-1, #1e5385);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-caso:hover {
    background-color: var(--primary-color-1, #1e5385);
    color: #fff;

}

.slogan2 {
    margin: 3em auto;
    font-size: 1.2em;
    text-align: left;
    padding-left: 0.5rem;
}

.slogan2>p>br {
    display: none;
}


/* 1. Igualar la estructura del contenedor (Hero Casos) a la del Hero Principal */
.hero-casos {
    position: relative;
    height: 65vh;
    /* Misma altura que .hero */
    max-height: 580px;
    display: flex;
    /* Necesario para centrar el contenido */
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

/* 2. Forzar al H1 a comportarse como el SPAN de la estructura 1 */
.texto-hero2 h1 {
    /* "inherit" o "1em" hace que tome el tamaño exacto del padre (.texto-hero2) 
       evitando que el navegador lo multiplique */
    font-size: 1em;

    /* Resetear márgenes por defecto del navegador */
    margin: 0;

    /* La Estructura 1 tiene font-weight: normal en el padre, 
       pero tus H1 globales tienen var(--font-medium). 
       Aquí lo forzamos a normal para que sea idéntico. */
    font-weight: normal;

    /* Asegurar el color blanco */
    color: #ffffff;
}

/* Opcional: Ajuste del subtítulo (párrafo) en Estructura 2 para que no flote raro */
.texto-hero2 p {
    position: relative;
    z-index: 2;
    letter-spacing: 1px;
    font-size: 0.4em;
    margin-top: 15px;
}


/* --- Responsivo --- */
@media (max-width: 600px) {
    .casos-grid {
        grid-template-columns: 1fr;
        /* margin-top: var(--margin-layout-mobile); */
    }


    .texto-hero2 h1 {
        font-size: 41.8px !important;
        /* Forzar tamaño en móvil */
    }

    .texto-hero2 p {
        font-size: 0.25em;
    }

    .hero-casos {
        height: 50vh;
        max-height: 305px;
    }


    .slogan2 {
        margin: 2em auto;
        font-size: 1em;
        /* text-align: center; */
    }

    .slogan2>p>br {
        display: block;
    }


    .slogan2 span:nth-child(3) {
        display: none;
    }

}