/* ==========================================
   WHY CNA
========================================== */

.why{

    padding:8rem 0;

}

.section-header{

    text-align:center;

    max-width:720px;

    margin:0 auto 4rem;

}

.section-kicker{

    display:inline-block;

    margin-bottom:1rem;

    color:var(--color-primary);

    text-transform:uppercase;

    letter-spacing:.2em;

    font-size:.85rem;

}

.section-header h2{

    margin-bottom:1rem;

    font-size:clamp(2rem,5vw,3rem);

}

.section-header p{

    color:var(--text-secondary);

    line-height:1.8;

}

.why-grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:2rem;

}

.why-card{

    padding:2rem;

    border:1px solid var(--border-color);

    border-radius:20px;

    background:rgba(255,255,255,.03);

    transition:.3s;

}

.why-card:hover{

    transform:translateY(-8px);

}

.why-card h3{

    margin-bottom:1rem;

}

.why-card p{

    color:var(--text-secondary);

    line-height:1.7;

}

@media(max-width:992px){

    .why-grid{

        grid-template-columns:1fr;

    }

}


/* ==========================================
   POR QUÉ CNA — PREMIUM DESIGN
========================================== */

.why {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #050a1b;

    background-image:
        linear-gradient(
            180deg,
            rgba(4, 9, 25, 0.16),
            rgba(4, 9, 25, 0.30)
        ),
        url("../../assets/images/why-bg.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.why > .container {
    position: relative;
    z-index: 1;
}

.why .section-header {
    max-width: 800px;
}

/* Tarjetas con efecto cristal */
.why-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 2rem 1.6rem;

    background: linear-gradient(
        145deg,
        rgba(9, 28, 61, 0.94),
        rgba(4, 14, 34, 0.96)
    );

    border: 1px solid rgba(32, 168, 255, 0.45);
    border-radius: 20px;

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.why-card:hover {
    transform: translateY(-8px);
    border-color: rgba(41, 211, 255, 0.85);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.35),
        0 0 28px rgba(0, 173, 255, 0.16);
}

.why-card::after {
    content: "";
    position: absolute;
    bottom: 22px;
    left: 26px;
    width: 40px;
    height: 3px;
    border-radius: 5px;
    background: linear-gradient(90deg, #258bff, #23d5ef);
}

.why-card h3 {
    font-size: 1.08rem;
    line-height: 1.35;
}

.why-card p {
    padding-bottom: 22px;
}

/* Responsive */
@media (max-width: 992px) {
    .why-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .why-grid {
        grid-template-columns: 1fr;
    }

    .why {
        background-position: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .why-card {
        transition: none;
    }

    .why-card:hover {
        transform: none;
    }
}


/* Transición visual desde el Hero */

#why {
    position: relative;
    isolation: isolate;
}


#why::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 160px;
    z-index: 0;
    pointer-events: none;

    background: linear-gradient(
        to bottom,
        #050a1b 0%,
        rgba(5, 10, 27, 0.78) 35%,
        transparent 100%
    );
}

#why > .container {
    position: relative;
    z-index: 1;
}


/* Entrada suave del fondo de Por qué CNA */


/* Entrada suave del fondo de Por qué CNA */

#why {
    position: relative;
    isolation: isolate;
}


/* Transición inicial de Por qué CNA */

#why::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 180px;

    background: linear-gradient(
        to bottom,
        #050a1b 0%,
        rgba(5, 10, 27, 0.95) 30%,
        rgba(5, 10, 27, 0.65) 65%,
        rgba(5, 10, 27, 0) 100%
    );

    z-index: 0;
    pointer-events: none;
}

#why > .container {
    position: relative;
    z-index: 1;
}



/* ==========================================
   CNA — ICONOS PREMIUM
========================================== */

.why-icon {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 1.6rem;
    border-radius: 15px;

    color: #42d9ff;

    background: linear-gradient(
        145deg,
        rgba(30, 135, 255, 0.18),
        rgba(0, 195, 255, 0.05)
    );

    border: 1px solid rgba(58, 192, 255, 0.3);

    box-shadow:
        0 0 22px rgba(0, 170, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.why-icon svg {
    width: 27px;
    height: 27px;
    display: block;
}

/* Efecto al pasar el mouse */

.why-card:hover .why-icon {
    transform: translateY(-4px) scale(1.06);

    border-color: rgba(67, 220, 255, 0.75);

    box-shadow:
        0 0 28px rgba(0, 190, 255, 0.22),
        inset 0 0 15px rgba(0, 165, 255, 0.08);
}

/* Mejora de la transición de tarjetas */

.why-card {
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.why-card:hover {
    transform: translateY(-8px);

    border-color: rgba(62, 211, 255, 0.8);

    box-shadow:
        0 24px 55px rgba(0, 0, 0, 0.35),
        0 0 30px rgba(0, 175, 255, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .why-icon,
    .why-card {
        transition: none;
    }

    .why-card:hover,
    .why-card:hover .why-icon {
        transform: none;
    }
}


/* ==========================================
   CNA — GLOW INTERACTIVO
========================================== */

.why-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.why-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;

    background: radial-gradient(
        230px circle at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(37, 174, 255, 0.19),
        transparent 75%
    );

    opacity: 0;
    transition: opacity 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
    .why-card:hover::before {
        opacity: 1;
    }
}

/* ==========================================
   CNA — APARICIÓN ESCALONADA
========================================== */

.why-card.reveal-ready {
    opacity: 0;
    translate: 0 25px;

    transition:
        opacity 0.65s ease,
        translate 0.65s ease,
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;

    transition-delay: var(--reveal-delay, 0ms);
}

.why-card.reveal-ready.reveal-visible {
    opacity: 1;
    translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
    .why-card.reveal-ready {
        opacity: 1;
        translate: none;
        transition: none;
    }

    .why-card::before {
        display: none;
    }
}


/* POR QUÉ CNA — Desvanecimiento inferior */

.why {
    position: relative;
    isolation: isolate;
}

.why::after {
    content: "";
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 200px;

    background: linear-gradient(
        to bottom,
        rgba(5, 10, 27, 0) 0%,
        rgba(5, 10, 27, 0.40) 25%,
        rgba(5, 10, 27, 0.85) 55%,
        #050a1b 85%,
        #050a1b 100%
    );

    z-index: 1;
    pointer-events: none;
}

/* Mantener las tarjetas y textos delante del degradado */

.why > .container {
    position: relative;
    z-index: 2;
}
