/**
 * Bellota V2 — FAQs (Preguntanos)
 * Página pública con acordeón + buscador cliente-side.
 */

.faqs-page {
    max-width: 900px;
    padding-top: 32px;
    padding-bottom: 80px;
}

/* Buscador */
.faqs-search {
    margin-bottom: 40px;
    position: relative;
}
.faqs-search::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat center;
}
#faqs-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    color: #111;
}
#faqs-search-input:focus {
    outline: none;
    border-color: var(--c-brand, #b71c1c);
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.1);
}

/* Grupos por categoría */
.faqs-group {
    margin-bottom: 40px;
}
.faqs-group-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--c-brand, #b71c1c);
    display: inline-block;
}

/* Acordeón */
.faqs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.15s, border-color 0.15s;
    overflow: hidden;
}
.faq-item:hover { border-color: #d1d5db; }
.faq-item[open] {
    border-color: var(--c-brand, #b71c1c);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.faq-item summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.12s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }
.faq-item summary:hover { background: #fafafa; }
.faq-question {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
}
.faq-arrow {
    flex-shrink: 0;
    color: #6b7280;
    transition: transform 0.2s;
    margin-top: 2px;
}
.faq-item[open] .faq-arrow {
    transform: rotate(180deg);
    color: var(--c-brand, #b71c1c);
}
.faq-answer {
    padding: 18px 22px 26px;
    margin: 0 22px;
    border-top: 1px solid #f0f0f0;
    color: #374151;
    line-height: 1.7;
    font-size: 15px;
    animation: faq-slide-down 0.2s ease-out;
}
.faq-answer p:first-child { margin-top: 0; }
.faq-answer p:last-child  { margin-bottom: 0; }
.faq-answer p + p { margin-top: 14px; }
.faq-answer a {
    color: var(--c-brand, #b71c1c);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.faq-answer ul, .faq-answer ol {
    padding-left: 22px;
    margin: 10px 0;
}
.faq-answer li { margin-bottom: 4px; }

@keyframes faq-slide-down {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Estado vacío de búsqueda */
.faqs-empty-search {
    text-align: center;
    color: #6b7280;
    padding: 40px 20px;
    font-size: 15px;
}

@media (max-width: 720px) {
    .faqs-page { padding-bottom: 60px; }
    .faq-item summary { padding: 15px 16px; }
    .faq-answer { padding: 14px 16px 20px; margin: 0 16px; font-size: 14px; }
    .faq-question { font-size: 15px; }
}
