/* ==========================================================
   MILSEC · PREGUNTAS FRECUENTES
   components/faq/faq.css
========================================================== */

.faq-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at top left,
            rgba(19, 131, 128, 0.08),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f7fbfb 100%
        );
}

.faq-section::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    top: -230px;
    right: -190px;
    border-radius: 50%;
    background: rgba(19, 131, 128, 0.06);
    pointer-events: none;
}

/* ==========================================================
   CONTENEDOR PRINCIPAL
========================================================== */

.faq-wrapper {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
    align-items: start;
    gap: 72px;
}

/* ==========================================================
   IMAGEN
========================================================== */

.faq-image {
    position: sticky;
    top: 110px;
    width: 100%;
    overflow: hidden;
    border-radius: 30px;
    background: #dcebea;
    box-shadow:
        0 25px 65px rgba(15, 23, 42, 0.14);
}

.faq-image::before {
    content: "";
    display: block;
    padding-top: 112%;
}

.faq-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(15, 23, 42, 0) 55%,
            rgba(15, 23, 42, 0.15) 100%
        );
    pointer-events: none;
}

.faq-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition:
        transform 0.7s ease,
        filter 0.7s ease;
}

.faq-image:hover img {
    transform: scale(1.035);
}

/* ==========================================================
   CONTENIDO
========================================================== */

.faq-content {
    min-width: 0;
}

.faq-content .section-header {
    margin-bottom: 30px;
}

.faq-content .section-header--left {
    max-width: 680px;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.faq-content .section-description {
    max-width: 650px;
}

/* ==========================================================
   LISTA FAQ
========================================================== */

.faq-list {
    border-top: 1px solid rgba(15, 23, 42, 0.11);
}

/* ==========================================================
   ÍTEM
========================================================== */

.faq-item {
    position: relative;
    border-bottom: 1px solid rgba(15, 23, 42, 0.11);
}

.faq-item summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
    padding: 22px 50px 22px 0;
    color: #16272b;
    font-size: 1.03rem;
    font-weight: 600;
    line-height: 1.5;
    list-style: none;
    cursor: pointer;
    transition:
        color 0.3s ease,
        padding-left 0.3s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::marker {
    display: none;
}

/* Flecha */

.faq-item summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #334155;
    border-bottom: 2px solid #334155;
    transform:
        translateY(-68%)
        rotate(45deg);
    transition:
        transform 0.35s ease,
        border-color 0.35s ease;
}

.faq-item summary:hover {
    color: #118b8b;
}

.faq-item summary:hover::after {
    border-color: #118b8b;
}

.faq-item[open] summary {
    color: #118b8b;
}

.faq-item[open] summary::after {
    border-color: #118b8b;
    transform:
        translateY(-25%)
        rotate(225deg);
}

/* ==========================================================
   RESPUESTA
========================================================== */

.faq-item p {
    max-width: 640px;
    margin: 0;
    padding: 0 52px 24px 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.75;
    animation: faqReveal 0.35s ease both;
}

@keyframes faqReveal {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   ESTADO ACTIVO
========================================================== */

.faq-item[open] {
    background:
        linear-gradient(
            90deg,
            rgba(19, 131, 128, 0.045),
            transparent 70%
        );
}

.faq-item[open] summary {
    padding-left: 15px;
}

.faq-item[open] p {
    padding-left: 15px;
}

/* ==========================================================
   ACCESIBILIDAD
========================================================== */

.faq-item summary:focus-visible {
    outline: 3px solid rgba(19, 131, 128, 0.24);
    outline-offset: 5px;
    border-radius: 8px;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1024px) {
    .faq-wrapper {
        grid-template-columns: minmax(280px, 0.85fr) minmax(380px, 1.15fr);
        gap: 45px;
    }

    .faq-image {
        top: 90px;
    }

    .faq-item summary {
        font-size: 0.98rem;
    }
}

/* ==========================================================
   MÓVIL Y TABLET VERTICAL
========================================================== */

@media (max-width: 820px) {
    .faq-wrapper {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .faq-image {
        position: relative;
        top: auto;
        max-width: 620px;
        margin: 0 auto;
    }

    .faq-image::before {
        padding-top: 72%;
    }

    .faq-content .section-header--left {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .faq-content .section-description {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================================
   MÓVIL
========================================================== */

@media (max-width: 576px) {
    .faq-wrapper {
        gap: 32px;
    }

    .faq-image {
        border-radius: 22px;
    }

    .faq-image::before {
        padding-top: 82%;
    }

    .faq-content .section-header {
        margin-bottom: 20px;
    }

    .faq-item summary {
        min-height: 68px;
        padding:
            18px
            42px
            18px
            0;
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .faq-item summary::after {
        right: 5px;
        width: 9px;
        height: 9px;
    }

    .faq-item p {
        padding:
            0
            38px
            20px
            0;
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .faq-item[open] summary {
        padding-left: 10px;
    }

    .faq-item[open] p {
        padding-left: 10px;
    }
}

/* ==========================================================
   MOVIMIENTO REDUCIDO
========================================================== */

@media (prefers-reduced-motion: reduce) {
    .faq-image img,
    .faq-item summary,
    .faq-item summary::after,
    .faq-item p {
        animation: none;
        transition: none;
    }
}