/* ========================================
   VOCABOLARIO — STILI DEDICATI
   Usato da vocabolario.html e vocabolario-voce.html
   Non modifica index.css né altri CSS del sito.
   ======================================== */

/* ----------------------------------------
   BREADCRUMB — identico a faq.css
   ---------------------------------------- */
.voc-breadcrumb {
    width: 100%;
    max-width: 900px;
    margin: 30px auto 0 auto;
    padding: 0 20px;
    font-size: 0.88rem;
    color: #888;
}

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

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

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

/* ----------------------------------------
   MOTTO WRAPPER
   Replica .main-content senza min-height e flex
   che nella Home servono per l'upload box
   ma nel Vocabolario creerebbero spazio eccessivo.
   font, colori e padding-top identici a .main-content
   ---------------------------------------- */
.voc-motto-wrapper {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding-top: 40px;
    /* PARAMETRO MODIFICABILE: padding-top controlla
       la distanza dalla navbar. Default sito: 40px */
}

/* Sovrascrive margin-bottom: 60px del .title di index.css
   Nel Vocabolario il titolo di sezione viene subito dopo,
   quindi serve meno spazio rispetto alla Home */
.voc-motto-wrapper .title {
    margin-bottom: 24px;
    /* PARAMETRO MODIFICABILE: aumenta per più spazio
       tra motto e titolo sezione. Range consigliato: 16px–40px */
}

/* Titolo sezione vocabolario — sotto il motto */
.voc-page-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #555;
    margin: 0 0 20px 0;
    line-height: 1.4;
    /* PARAMETRO MODIFICABILE: margin-bottom controlla
       lo spazio tra titolo e barra ricerca. Range: 12px–32px */
}

/* ----------------------------------------
   BARRA DI RICERCA
   ---------------------------------------- */
.voc-search-wrapper {
    max-width: 960px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    /* PARAMETRO MODIFICABILE: max-width controlla
       la larghezza della search bar.
       960px = allineata alla griglia card
       1200px = larghezza massima del container sito */
}

.voc-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    padding: 12px 18px;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.voc-search-box:focus-within {
    border-color: #007bff;
    box-shadow: 0 2px 12px rgba(0,123,255,0.12);
}

.voc-search-icon {
    flex-shrink: 0;
    display: block;
    color: #888;
}

.voc-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.97rem;
    color: #333;
    background: transparent;
}

.voc-search-input::placeholder {
    color: #bbb;
}

.voc-search-clear {
    background: none;
    border: none;
    color: #bbb;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: none;
    transition: color 0.15s ease;
}

.voc-search-clear:hover {
    color: #666;
}

.voc-search-clear.visible {
    display: block;
}

/* Nessun risultato */
.voc-no-results {
    text-align: center;
    padding: 48px 20px;
    color: #888;
    font-size: 0.95rem;
    display: none;
}

/* ----------------------------------------
   GRIGLIA CARD
   ---------------------------------------- */
.voc-grid {
    max-width: 960px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card singola */
.voc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px 22px 56px 22px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    min-height: 140px;
}

.voc-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.voc-card-term {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px 0;
    line-height: 1.4;
    padding-right: 32px;
}

.voc-card-excerpt {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Freccia in basso a destra — più compatta e bold */
.voc-card-arrow {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ebebeb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.voc-card:hover .voc-card-arrow {
    background: #007bff;
    color: #fff;
}

/* ----------------------------------------
   PAGINA SINGOLA VOCE
   ---------------------------------------- */
.voc-voce-wrapper {
    max-width: 760px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
}

.voc-voce-term {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #111;
    margin: 36px 0 28px 0;
    line-height: 1.3;
}

/* Sezione definizione */
.voc-voce-section {
    margin-bottom: 32px;
}

.voc-voce-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 10px 0;
}

.voc-voce-section-body {
    font-size: 1rem;
    color: #333;
    line-height: 1.8;
    margin: 0;
}

/* Box esempio */
.voc-example-box {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    margin: 0;
}

/* Divisore sezione */
.voc-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 36px 0;
}

/* Voci correlate */
.voc-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.voc-related-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    display: block;
}

.voc-related-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #007bff;
    text-decoration: none;
    color: inherit;
}

.voc-related-term {
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 6px 0;
}

.voc-related-excerpt {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ----------------------------------------
   FEEDBACK THUMB UP/DOWN
   ---------------------------------------- */
.voc-feedback {
    text-align: center;
    padding: 32px 20px 0;
}

.voc-feedback-question {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 16px 0;
}

.voc-feedback-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.voc-feedback-btn {
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-family: inherit;
}

.voc-feedback-btn:hover {
    background: #f8f9fa;
    border-color: #aaa;
    transform: scale(1.05);
}

.voc-feedback-btn.active-up {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.voc-feedback-btn.active-down {
    background: #fde8e8;
    border-color: #e53935;
    color: #b71c1c;
}

.voc-feedback-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.voc-feedback-thanks {
    font-size: 0.88rem;
    color: #888;
    margin-top: 12px;
    min-height: 20px;
}

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

    .voc-page-header {
        margin: 28px auto 24px auto;
    }

    .voc-grid {
        grid-template-columns: 1fr;
    }

    .voc-related-grid {
        grid-template-columns: 1fr;
    }

    .voc-voce-term {
        margin-top: 24px;
    }
}

@media (max-width: 480px) {
    .voc-card {
        padding: 20px 18px 18px 18px;
    }

    .voc-feedback-btn {
        padding: 10px 16px;
    }
}

/* ----------------------------------------
   PAGINAZIONE
   ---------------------------------------- */
.voc-pagination {
    max-width: 960px;
    margin: 32px auto 60px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.voc-page-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #333;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    min-width: 38px;
    text-align: center;
    line-height: 1;
}

.voc-page-btn:hover:not(.disabled):not(.active) {
    background: #f0f4ff;
    border-color: #007bff;
    color: #007bff;
}

.voc-page-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    font-weight: 600;
    cursor: default;
}

.voc-page-btn.disabled {
    color: #ccc;
    border-color: #eee;
    cursor: default;
    background: #fafafa;
}

.voc-page-dots {
    font-size: 0.9rem;
    color: #999;
    padding: 0 4px;
    user-select: none;
}

/* Google Auth Button */
.btn-google {
    width: 100%;
    padding: 13px 15px;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #c6c6c6;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.btn-google:active {
    background: #f1f3f4;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #999;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

@media (max-width: 480px) {
    .voc-page-btn {
        padding: 7px 10px;
        font-size: 0.85rem;
        min-width: 32px;
    }
}
