/* =============================================================
   FAQ PAGE — coerente con contatti e design system del sito
   ============================================================= */

@keyframes faqFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Centered page column (allineata all'accordion) ─────── */
.faq-page .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.faq-page__column {
    width: 100%;
    max-width: 860px;
}

/* ─── Hero centrato ───────────────────────────────────────── */
.faq-page-hero .faq-page-hero__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.faq-page-hero .faq-page-hero__left {
    align-items: center;
}

.faq-page-hero .page-hero__label::before {
    display: none;
}

/* ─── Hero stats ──────────────────────────────────────────── */
.faq-hero-stats {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.faq-hero-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 20px;
    min-width: 100px;
    text-align: center;
}

.faq-hero-stat strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.faq-hero-stat span {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

/* ─── Page layout ─────────────────────────────────────────── */
.faq-page {
    background: var(--dark-2, #161a20);
    animation: faqFadeIn 0.6s ease-out;
}

/* ─── Toolbar ─────────────────────────────────────────────── */
.faq-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    width: 100%;
}

.faq-search {
    position: relative;
    width: 100%;
    max-width: 560px;
}

.faq-search__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.9rem;
    pointer-events: none;
}

.faq-search__input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s ease;
}

.faq-search__input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.faq-search__input:focus {
    outline: none;
    border-color: var(--primary, #e02020);
    background: rgba(224, 32, 32, 0.06);
    box-shadow: 0 0 0 3px rgba(224, 32, 32, 0.12);
}

.faq-search__clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.faq-search__clear:hover {
    background: rgba(224, 32, 32, 0.2);
    color: #fff;
}

/* ─── Category filters ────────────────────────────────────── */
.faq-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.faq-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.faq-filter i { font-size: 0.75rem; opacity: 0.7; }

.faq-filter:hover {
    border-color: rgba(224, 32, 32, 0.35);
    color: #fff;
    background: rgba(224, 32, 32, 0.08);
}

.faq-filter.is-active {
    background: var(--primary, #e02020);
    border-color: var(--primary, #e02020);
    color: #fff;
}

.faq-filter.is-active i { opacity: 1; }

/* ─── Results meta ────────────────────────────────────────── */
.faq-results-meta {
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    width: 100%;
}

/* ─── Accordion ───────────────────────────────────────────── */
.faq-accordion {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Scoped sotto .faq-page per sovrascrivere le regole legacy in style.css */
.faq-page .faq-card {
    background: linear-gradient(135deg, var(--dark-3, #1e2430) 0%, rgba(224, 32, 32, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: none;
}

.faq-page .faq-card:hover {
    border-color: rgba(224, 32, 32, 0.25);
}

.faq-page .faq-card[hidden] { display: none; }

.faq-page .faq-card details { overflow: hidden; }

.faq-page .faq-card summary {
    padding: 1.15rem 1.35rem;
    font-weight: 700;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
    transition: background 0.2s;
    justify-content: flex-start;
}

.faq-page .faq-card summary::-webkit-details-marker { display: none !important; }
.faq-page .faq-card summary::marker { display: none !important; content: ""; }

/* Disabilita il +/- legacy di style.css (causava simboli strani) */
.faq-page .faq-card summary::after {
    content: none !important;
    display: none !important;
}

.faq-card__icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(224, 32, 32, 0.15);
    border: 1px solid rgba(224, 32, 32, 0.25);
    border-radius: 10px;
    color: var(--primary, #e02020);
    font-size: 0.85rem;
    transition: all 0.25s;
}

.faq-card__question {
    flex: 1;
    line-height: 1.4;
}

.faq-card__toggle {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    position: relative;
    transition: all 0.25s;
}

.faq-card__toggle::before,
.faq-card__toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1px;
    transition: transform 0.25s;
}

.faq-card__toggle::before {
    width: 12px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.faq-card__toggle::after {
    width: 2px;
    height: 12px;
    transform: translate(-50%, -50%);
}

.faq-page .faq-card details[open] summary {
    background: rgba(224, 32, 32, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
}

.faq-page .faq-card details[open] summary::after {
    content: none !important;
    display: none !important;
}

.faq-page .faq-card details[open] .faq-card__icon {
    background: var(--primary, #e02020);
    border-color: var(--primary, #e02020);
    color: #fff;
}

.faq-page .faq-card details[open] .faq-card__toggle {
    background: rgba(224, 32, 32, 0.2);
}

.faq-page .faq-card details[open] .faq-card__toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq-page .faq-card details[open] .faq-card__toggle::before {
    background: var(--primary, #e02020);
}

/* ─── Content ─────────────────────────────────────────────── */
.faq-page .faq-content {
    padding: 1.25rem 1.35rem 1.35rem 4.6rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    font-size: 0.93rem;
    background: transparent;
}

.faq-page .faq-content p { margin: 0; }
.faq-page .faq-content p + p { margin-top: 0.75rem; }

.faq-page .faq-content ul {
    margin: 0.5rem 0 0.5rem 1.1rem;
    padding: 0;
    list-style-type: disc;
}

.faq-page .faq-content ul li {
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.75);
}

.faq-page .faq-content a {
    color: #fca5a5;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(224, 32, 32, 0.5);
    transition: border-color 0.2s, color 0.2s;
}

.faq-page .faq-content a:hover {
    border-bottom-style: solid;
    color: var(--primary, #e02020);
}

.faq-page .faq-content strong { color: rgba(255, 255, 255, 0.95); }

/* ─── Empty state ─────────────────────────────────────────── */
.faq-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.45);
    width: 100%;
}

.faq-empty > i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.faq-empty p { margin-bottom: 1.25rem; font-size: 0.95rem; }

.faq-empty__reset {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(224, 32, 32, 0.35);
    background: rgba(224, 32, 32, 0.12);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.faq-empty__reset:hover {
    background: var(--primary, #e02020);
    border-color: var(--primary, #e02020);
}

/* ─── CTA ─────────────────────────────────────────────────── */
.faq-cta {
    margin-top: 4rem;
    width: 100%;
}

.faq-cta__card {
    background: linear-gradient(135deg, var(--dark-3, #1e2430) 0%, rgba(224, 32, 32, 0.1) 100%);
    border: 1px solid rgba(224, 32, 32, 0.25);
    border-radius: 16px;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.faq-cta__text h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.faq-cta__text p {
    margin: 0 auto;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.55;
    max-width: 480px;
}

.faq-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.faq-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.faq-cta__btn--primary {
    background: var(--primary, #e02020);
    color: #fff !important;
    border: 1px solid var(--primary, #e02020);
}

.faq-cta__btn--primary:hover {
    background: var(--primary-hover, #c81a1a);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224, 32, 32, 0.35);
}

.faq-cta__btn--whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff !important;
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.faq-cta__btn--whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.faq-cta__btn--ghost {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.faq-cta__btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .faq-hero-stat  { min-width: 80px; }
    .faq-page .faq-content { padding-left: 1.35rem; }
    .faq-cta__card  { padding: 24px; }
    .faq-cta__actions { width: 100%; }
    .faq-cta__btn   { flex: 1; justify-content: center; min-width: 140px; }
}

@media (max-width: 480px) {
    .faq-card summary { padding: 1rem; gap: 10px; font-size: 0.92rem; }
    .faq-card__icon   { width: 32px; height: 32px; font-size: 0.75rem; }
    .faq-filter       { padding: 7px 12px; font-size: 0.78rem; }
    .faq-search__input { font-size: 0.88rem; padding: 12px 40px; }
}