/* ============================================================
   FAQ — Estilos específicos de la página Preguntas Frecuentes
   Depende de global.css (tokens, .container, .btn, fuentes)
============================================================ */

/* HERO */
.faq-hero {
    padding: 140px 0 100px;
    background:
        linear-gradient(180deg, rgba(26,26,46,0.7) 0%, rgba(26,26,46,0.85) 100%),
        url('https://images.unsplash.com/photo-1512820790803-83ca734da794?auto=format&fit=crop&w=1600&q=80')
        center / cover no-repeat;
    text-align: center;
    color: #fff;
    border-bottom: 1px solid var(--line);
}

.faq-hero-pill {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border-radius: var(--r-pill);
    color: var(--primary);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 24px;
    box-shadow: var(--sh-sm);
}

.faq-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 16px;
    letter-spacing: -.5px;
    color: #fff;
    text-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.faq-hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,.9);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 5px rgba(0,0,0,.3);
}

/* Buscador */
.faq-search-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 32px;
}

.faq-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: .5;
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 18px 24px 18px 58px;
    border-radius: var(--r-pill);
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    font-size: 1.05rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    color: var(--text);
}

.faq-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(124,92,191,.15);
}

/* Topic pills */
.topic-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.topic-pill {
    padding: 8px 20px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--r-pill);
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    text-decoration: none;
}

.topic-pill:hover {
    background: #fff;
    border-color: #fff;
    color: var(--text);
    transform: translateY(-2px);
}

/* ---- LAYOUT ---- */
.faq-layout {
    display: flex;
    gap: 48px;
    padding: 60px 0 100px;
}

/* SIDEBAR */
.faq-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.faq-sidebar-sticky {
    position: sticky;
    top: 96px;
}

.faq-index-card {
    background: #fff;
    border-radius: var(--r-card);
    padding: 24px;
    box-shadow: var(--sh-sm);
    margin-bottom: 24px;
}

.faq-index-card h3 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-soft);
    margin-bottom: 16px;
}

.faq-index-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0;
}

.faq-index-list a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .15s, color .15s;
    text-decoration: none;
    margin: 0 -12px;
}

.faq-index-list a:hover,
.faq-index-list a.active {
    background: var(--bg-alt);
    color: var(--primary);
}

.faq-index-list a.active {
    font-weight: 600;
}

/* Contact card in sidebar */
.faq-contact-card {
    background: var(--bg-alt);
    border-radius: var(--r-card);
    padding: 24px;
    text-align: center;
}

.faq-contact-card h4 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--r-pill);
    font-weight: 700;
    font-size: .9rem;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
    transition: background .2s, transform .2s, box-shadow .2s;
    text-decoration: none;
}

.btn-wa:hover {
    background: #1EBE5C;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37,211,102,.3);
}

.faq-contact-card p {
    font-size: .8rem;
    color: var(--text-soft);
    margin: 0;
}

/* CONTENT */
.faq-content {
    flex: 1;
    min-width: 0;
}

.faq-section {
    margin-bottom: 64px;
    scroll-margin-top: 96px;
    padding: 16px;
    margin-left: -16px;
    margin-right: -16px;
    border-radius: var(--r-card);
    transition: background .6s ease;
}

.faq-section.highlight {
    background: var(--bg-alt);
}

.faq-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-alt);
}

.faq-section-icon { font-size: 2rem; }

.faq-section-header h2 {
    font-size: 1.7rem;
    color: var(--primary);
    margin: 0;
}

/* ACCORDIONS */
.accordion-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: background .2s, border-color .2s;
}

.accordion-item:hover {
    background: var(--bg-alt);
    border-color: #D6CCEB;
}

.accordion-item.active {
    background: var(--bg-alt);
    border-color: var(--primary);
}

.accordion-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 16px;
}

.accordion-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.accordion-icon {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 300;
    line-height: 1;
    flex-shrink: 0;
    transition: transform .3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
}

.accordion-content {
    padding: 0 24px 20px;
    font-size: .95rem;
    color: #444460;
    line-height: 1.7;
}

.accordion-content a {
    color: var(--primary);
    font-weight: 600;
}

.accordion-content a:hover {
    text-decoration: underline;
}

mark {
    background-color: rgba(255,217,61,.4);
    padding: 0 2px;
    border-radius: 2px;
    color: inherit;
}

/* Sin resultados */
.faq-no-results {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: var(--r-card);
    border: 2px dashed var(--line);
    display: none;
}

.faq-no-results p {
    margin-bottom: 24px;
    color: var(--text-soft);
    font-size: 1.05rem;
}

/* ---- CTA CONTACTO ---- */
.faq-cta {
    background:
        linear-gradient(135deg, rgba(124,92,191,.5) 0%, rgba(26,26,46,.85) 100%),
        url('https://images.unsplash.com/photo-1532012197267-da84d127e765?auto=format&fit=crop&w=1600&q=80')
        center / cover no-repeat;
    padding: 80px 0;
    text-align: center;
    color: #fff;
    border-radius: var(--r-card);
    margin: 0 0 60px;
    box-shadow: var(--sh-md);
}

.faq-cta h2 {
    font-size: 2.3rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.faq-cta > p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.9);
    margin-bottom: 40px;
}

.faq-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

.faq-c-card {
    background: #fff;
    padding: 28px 24px;
    border-radius: var(--r-card);
    box-shadow: var(--sh-sm);
    transition: transform .2s, box-shadow .2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text);
    text-decoration: none;
}

.faq-c-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sh-md);
}

.faq-c-icon { font-size: 2.2rem; margin-bottom: 14px; }

.faq-c-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.faq-c-card p {
    font-size: .9rem;
    color: var(--text-soft);
    margin-bottom: 20px;
    flex-grow: 1;
}

.faq-c-btn {
    font-weight: 700;
    font-size: .9rem;
    color: var(--primary);
}

/* ---- TRUST BAR ---- */
.faq-trust {
    padding: 40px 0 60px;
}

.faq-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.faq-trust-item { padding: 0 16px; }

.faq-trust-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.faq-trust-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text);
}

.faq-trust-desc {
    font-size: .875rem;
    color: var(--text-soft);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
    .faq-layout { flex-direction: column; gap: 32px; }
    .faq-sidebar { width: 100%; }
    .faq-sidebar-sticky { position: static; }

    .faq-index-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .faq-index-list a {
        background: #fff;
        border: 1px solid var(--line);
        margin: 0;
        border-radius: var(--r-pill);
    }

    .faq-contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .faq-hero { padding: 100px 0 70px; }
    .faq-hero h1 { font-size: 2.2rem; }

    .topic-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .topic-pills::-webkit-scrollbar { display: none; }

    .faq-contact-grid { grid-template-columns: 1fr; }
    .faq-trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .faq-trust-grid { grid-template-columns: 1fr; gap: 28px; }
}
