﻿/* ============================================================
   FAQ.CSS — SG Informática
   ============================================================ */

.fq-section {
    background: #f8f9fb;
    padding: 80px 0;
}

.fq-container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Encabezado ── */
.fq-head {
    text-align: center;
    margin-bottom: 52px;
}

.fq-tag {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6C63FF;
    background: #f0effe;
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 14px;
}

.fq-head__title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.fq-head__sub {
    font-size: 1rem;
    color: #5a5a7a;
    margin: 0;
}

/* ── Layout: 2 columnas ── */
.fq-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

/* ── Accordion ── */
.fq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fq-item {
    background: #ffffff;
    border: 1px solid #e8eaf0;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

    .fq-item:hover {
        box-shadow: 0 4px 16px rgba(108,99,255,0.08);
    }

    .fq-item.is-open {
        border-color: rgba(108,99,255,0.3);
        box-shadow: 0 4px 20px rgba(108,99,255,0.10);
    }

/* ── Pregunta ── */
.fq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

    .fq-q:hover {
        background: #fafafa;
    }

.fq-item.is-open .fq-q {
    background: #faf9ff;
}

.fq-q span {
    font-size: 0.94rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
}

.fq-q__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #e0dff8;
    background: #f0effe;
    color: #6C63FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.2s ease;
}

.fq-item.is-open .fq-q__icon {
    transform: rotate(180deg);
    background: #6C63FF;
    border-color: #6C63FF;
    color: #fff;
}

/* ── Respuesta ── */
.fq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1), padding 0.3s ease;
    padding: 0 20px;
}

.fq-item.is-open .fq-a {
    max-height: 300px;
    padding: 0 20px 18px;
}

.fq-a p {
    font-size: 0.9rem;
    color: #5a5a7a;
    line-height: 1.7;
    margin: 0;
    border-top: 1px solid #f0f0f8;
    padding-top: 14px;
}

/* ── Card de contacto ── */
.fq-contact {
    background: #ffffff;
    border: 1.5px solid #e8eaf0;
    border-radius: 20px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    position: sticky;
    top: 88px;
}

.fq-contact__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #f0effe;
    color: #6C63FF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.fq-contact__title {
    font-size: 1rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

.fq-contact__desc {
    font-size: 0.85rem;
    color: #5a5a7a;
    margin: 0;
    line-height: 1.5;
}

.fq-contact__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #6C63FF, #8B5CF6);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(108,99,255,0.35);
    width: 100%;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .fq-contact__btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(108,99,255,0.45);
        color: #fff;
    }

.fq-contact__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    color: #9090b0;
}

/* ── Tablet (< 1024px) ── */
@media (max-width: 1023px) {
    .fq-layout {
        grid-template-columns: 1fr;
    }

    .fq-contact {
        position: static;
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }
}

/* ── Mobile (< 640px) ── */
@media (max-width: 639px) {
    .fq-section {
        padding: 56px 0;
    }

    .fq-container {
        padding: 0 16px;
    }

    .fq-head {
        margin-bottom: 36px;
    }

    .fq-q {
        padding: 15px 16px;
    }

    .fq-item.is-open .fq-a {
        padding: 0 16px 16px;
    }
}
