/* =============================================
   MOONLY — PREGUNTAS FRECUENTES (faq.css)
   Buscador en vivo + tabs por categoría + acordeón.
   Mismo patrón de breadcrumb/hero que planes.css.
   ============================================= */

body.faq-body {
    background-image:
        linear-gradient(var(--bg-page-overlay), var(--bg-page-overlay)),
        url('../images/home/fondo.png');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ── BREADCRUMB (idéntico a planes.css) ── */
.breadcrumb-bar {
    padding: calc(var(--navbar-h, 190px) + 24px) 0 0;
    position: relative; z-index: 1;
}
.breadcrumb-bar .container { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.breadcrumb-bar a { color: var(--muted); transition: color .15s; }
.breadcrumb-bar a:hover { color: var(--cyan); }
.breadcrumb-bar .current { color: var(--text); font-weight: 600; }
.breadcrumb-bar i { font-size: .65rem; opacity: .6; }

/* ── HERO ── */
.faq-hero { padding: 36px 0 30px; position: relative; z-index: 1; text-align: center; }
.faq-hero .container { max-width: 720px; }
.faq-hero-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(122,221,255,.1); border: 1px solid var(--border);
    color: var(--cyan); font-size: 1.4rem; margin-bottom: 20px;
}
.faq-hero-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; margin-bottom: 12px; letter-spacing: -.5px; }
.faq-hero-desc { color: var(--muted); font-size: .98rem; line-height: 1.65; max-width: 560px; margin: 0 auto 28px; }

/* ── BUSCADOR ── */
.faq-search-wrap {
    position: relative;
    max-width: 540px; margin: 0 auto;
}
.faq-search-wrap i.fa-magnifying-glass {
    position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: .9rem; pointer-events: none;
}
.faq-search {
    width: 100%;
    background: var(--bg-elevated); border: 1px solid var(--border-soft);
    border-radius: 14px; padding: 15px 18px 15px 46px;
    color: var(--text); font-size: .95rem; font-family: inherit;
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.faq-search::placeholder { color: var(--muted); }
.faq-search:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); }
.faq-search-clear {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--hover-bg); color: var(--muted);
    display: none; align-items: center; justify-content: center;
    font-size: .7rem; cursor: pointer; transition: background .15s, color .15s;
}
.faq-search-clear:hover { background: var(--border-soft); color: var(--text); }
.faq-search-wrap.has-value .faq-search-clear { display: flex; }

.faq-search-meta {
    margin-top: 12px; font-size: .8rem; color: var(--muted); text-align: center;
    min-height: 18px;
}
.faq-search-meta strong { color: var(--cyan); }

/* ── TABS DE CATEGORÍA ── */
.faq-tabs-section { padding: 0 20px 8px; position: relative; z-index: 1; }
.faq-tabs {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    max-width: 980px; margin: 0 auto 8px;
}
.faq-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 30px;
    background: var(--bg-elevated); border: 1px solid var(--border-soft);
    color: var(--muted); font-size: .85rem; font-weight: 600;
    cursor: pointer; transition: background .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.faq-tab i { font-size: .8rem; opacity: .85; }
.faq-tab .faq-tab-count {
    font-size: .7rem; font-weight: 700; color: var(--muted);
    background: var(--hover-bg); border-radius: 10px; padding: 1px 7px;
}
.faq-tab:hover { color: var(--text); border-color: var(--border); }
.faq-tab.active {
    color: var(--text); border-color: var(--cyan);
    background: rgba(122,221,255,.1);
}
.faq-tab.active .faq-tab-count { background: var(--cyan); color: #04101a; }

/* ── LISTADO PRINCIPAL ── */
.faq-section { padding: 30px 20px 60px; position: relative; z-index: 1; }
.faq-wrap { max-width: 780px; margin: 0 auto; }

/* Encabezado de categoría dentro del listado (cuando se ve "Todas") */
.faq-category-heading {
    display: flex; align-items: center; gap: 12px;
    margin: 38px 0 16px;
}
.faq-category-heading:first-child { margin-top: 0; }
.faq-category-heading-icon {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    background: rgba(122,221,255,.1); border: 1px solid var(--border);
    color: var(--cyan); display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
}
.faq-category-heading-text { font-size: 1.05rem; font-weight: 800; color: var(--text); letter-spacing: -.2px; }

/* ── ACORDEÓN ── */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
    background: var(--bg-elevated); border: 1px solid var(--border-soft);
    border-radius: 14px; overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item:hover { border-color: var(--border); }
.faq-item.open { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 12px 28px rgba(122,221,255,.1); }

.faq-question {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 22px; cursor: pointer;
    user-select: none;
}
.faq-question-text { font-size: .95rem; font-weight: 700; color: var(--text); line-height: 1.45; }
.faq-question-icon {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    background: var(--hover-bg); color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; transition: transform .3s ease, background .2s, color .2s;
}
.faq-item.open .faq-question-icon { transform: rotate(180deg); background: var(--cyan); color: #04101a; }

.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height .35s ease;
}
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner {
    padding: 0 22px 20px;
    color: var(--text-soft); font-size: .88rem; line-height: 1.7;
}
.faq-answer-inner p { margin-bottom: 10px; }
.faq-answer-inner p:last-child { margin-bottom: 0; }
.faq-answer-inner strong { color: var(--text); font-weight: 700; }
.faq-answer-inner a { color: var(--cyan); font-weight: 600; }
.faq-answer-inner a:hover { text-decoration: underline; }
.faq-answer-inner ul { margin: 8px 0 10px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.faq-answer-inner ul li { display: flex; align-items: flex-start; gap: 8px; }
.faq-answer-inner ul li::before { content: '\f111'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .4rem; color: var(--cyan); margin-top: 7px; flex-shrink: 0; }

/* Resaltado de coincidencias de búsqueda */
mark.faq-highlight {
    background: rgba(122,221,255,.25); color: var(--text);
    border-radius: 3px; padding: 0 2px;
}

/* Estado vacío (sin resultados) */
.faq-empty {
    text-align: center; padding: 60px 20px;
    color: var(--muted);
}
.faq-empty i { font-size: 2rem; color: var(--border); margin-bottom: 16px; display: block; }
.faq-empty-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.faq-empty-desc { font-size: .88rem; max-width: 360px; margin: 0 auto; line-height: 1.6; }

/* ── CTA FINAL: SOPORTE ── */
.faq-cta {
    margin-top: 48px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 30px 34px; border-radius: 18px;
    background: var(--bg-elevated); border: 1px solid var(--border-soft);
}
.faq-cta-text-title { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.faq-cta-text-desc { font-size: .88rem; color: var(--muted); max-width: 420px; line-height: 1.6; }
.faq-cta-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.faq-cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 10px;
    font-weight: 700; font-size: .85rem; white-space: nowrap;
    transition: background .2s, border-color .2s, box-shadow .2s, filter .2s;
}
.faq-cta-btn.primary {
    background: var(--cyan); border: 1px solid var(--cyan); color: #04101a;
}
.faq-cta-btn.primary:hover { filter: brightness(1.05); box-shadow: 0 0 18px var(--cyan-glow); }
.faq-cta-btn.secondary {
    background: rgba(122,221,255,.1); border: 1px solid rgba(122,221,255,.25); color: var(--text);
}
.faq-cta-btn.secondary:hover { background: rgba(122,221,255,.18); border-color: var(--cyan); }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
    .faq-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .faq-tabs::-webkit-scrollbar { display: none; }
    .faq-cta { flex-direction: column; align-items: stretch; text-align: center; }
    .faq-cta-buttons { justify-content: center; }
    .faq-question { padding: 16px 18px; gap: 12px; }
    .faq-question-text { font-size: .9rem; }
    .faq-answer-inner { padding: 0 18px 18px; }
}

@media (max-width: 480px) {
    .faq-cta-buttons { flex-direction: column; }
    .faq-cta-btn { width: 100%; justify-content: center; }
}