/* ========================================
   FAQ PAGE - STILI DEDICATI
   Questo file è usato SOLO da faq.html.
   Non modifica index.css né gli stili della Home.
   ======================================== */

/* ----------------------------------------
   BREADCRUMB
   Riga di navigazione "Home / FAQ" in cima
   ---------------------------------------- */
.faq-breadcrumb {
    width: 100%;
    max-width: 780px;
    margin: 30px auto 0 auto;
    padding: 0 20px;
    font-size: 0.88rem;
    color: #888;
}

.faq-breadcrumb a {
    color: #888;
    text-decoration: none;
}

.faq-breadcrumb a:hover {
    color: #007bff;
    text-decoration: underline;
}

.faq-breadcrumb span {
    margin: 0 6px;
}

/* ----------------------------------------
   HEADER TESTUALE CENTRATO
   Titolo principale + sottotitolo
   ---------------------------------------- */
.faq-page-header {
    text-align: center;
    margin: 40px auto 50px auto;
    max-width: 900px;
    padding: 0 20px;
}

.faq-page-title {
    font-size: clamp(1.15rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #222;
    margin: 0 0 12px 0;
    line-height: 1.3;
    white-space: nowrap;
}

.faq-page-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ----------------------------------------
   LISTA FAQ — layout libero, no box azzurro
   Centrata sulla pagina con larghezza contenuta
   ---------------------------------------- */
.faq-page-list {
    width: 100%;
    max-width: 780px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

/* Singolo item FAQ */
.faq-page-item {
    width: 100%;
}

/* Divisore orizzontale tra le FAQ */
.faq-page-divider {
    width: 100%;
    height: 1px;
    background-color: #ddd;
    margin: 0;
}

/* Bottone domanda */
.faq-page-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.faq-page-btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Testo domanda */
.faq-page-question {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111;
    flex: 1;
    padding-right: 24px;
    line-height: 1.5;
}

/* Freccia chevron */
.faq-page-chevron {
    font-size: 0.75rem;
    color: #007bff;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    /* Partiamo da freccia che punta verso destra (▶) ruotata di 90° = verso il basso (▼) */
    display: inline-block;
}

/* Rotazione chevron quando FAQ è aperta */
.faq-page-btn[aria-expanded="true"] .faq-page-chevron {
    transform: rotate(180deg);
}

/* ----------------------------------------
   RISPOSTA — transizione fluida di altezza
   ---------------------------------------- */
.faq-page-answer {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    padding: 0;
}

.faq-page-answer.is-open {
    max-height: 1000px;
    opacity: 1;
    padding: 0 0 24px 0;
}

.faq-page-answer p {
    margin: 0;
    color: #444;
    line-height: 1.8;
    font-size: 0.97rem;
    font-weight: 400;
}

/* ----------------------------------------
   RESPONSIVE — Tablet
   ---------------------------------------- */
@media (max-width: 768px) {
    .faq-breadcrumb {
        margin-top: 20px;
    }

    .faq-page-header {
        margin: 30px auto 36px auto;
    }

    .faq-page-subtitle {
        font-size: 0.95rem;
    }

    .faq-page-btn {
        padding: 18px 0;
    }

    .faq-page-question {
        font-size: 1rem;
        padding-right: 16px;
    }
}

/* ----------------------------------------
   RESPONSIVE — Mobile
   ---------------------------------------- */
@media (max-width: 480px) {
    .faq-page-title {
        font-size: 1.35rem;
        white-space: normal;
    }

    .faq-page-subtitle {
        font-size: 0.9rem;
    }

    .faq-page-question {
        font-size: 0.95rem;
    }

    .faq-page-answer p {
        font-size: 0.93rem;
    }
}

/* =============================================
   MOBILE NAV — AUTH SECTION
   (allineato a index.css / lettura-voci.css)
   ============================================= */

.mobile-nav-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

#mobileNavGuest {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav-auth .btn-login {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.mobile-nav-auth .btn-signup {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 8px;
}

/* Mobile — sezione utente autenticato */
.mobile-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.mobile-user-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #007bff;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-user-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 12px 4px;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    color: #333;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.mobile-user-action:hover {
    background: rgba(0, 123, 255, 0.08);
}

.mobile-user-action--disabled {
    color: #aaa;
    cursor: not-allowed;
}

.mobile-user-action--disabled:hover {
    background: none;
}

.mobile-user-badge {
    font-size: 0.7rem;
    background: #e0e0e0;
    color: #888;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Google button loading state */
.btn-google--loading {
    opacity: 0.7;
    cursor: not-allowed;
}