/* FAQ + ARTICOLI V2 - STRICTLY MATCHING TOURNAMENT V2 */

.main-content {
    position: relative;
    z-index: 10;
    padding-top: 120px;
    padding-bottom: 80px;
}

/* La navbar flottante cambia altezza al restringersi: 96px su desktop,
   114 intorno ai 1024, 132 sotto i 600 (logo + hamburger). */
@media (max-width: 1100px) { .main-content { padding-top: 140px; } }
@media (max-width: 600px)  { .main-content { padding-top: 155px; } }

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ============================================
   INTESTAZIONE
   ============================================ */
.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: white;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 640px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

/* ============================================
   FAQ
   ============================================ */
.faq-category { margin-bottom: 40px; }

.faq-category-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
.faq-item.open {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.faq-question .material-symbols-outlined {
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}
.faq-item.open .faq-question .material-symbols-outlined {
    transform: rotate(180deg);
    color: #8b5cf6;
}

.faq-answer {
    display: none;
    padding: 0 24px 22px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

.faq-answer p { margin-bottom: 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul, .faq-answer ol { margin: 0 0 12px 20px; }
.faq-answer li { margin-bottom: 6px; }
.faq-answer code {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 6px;
    padding: 2px 7px;
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    color: #c4b5fd;
}
.faq-answer strong { color: white; font-weight: 700; }
.faq-answer a { color: #8b5cf6; text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }

/* ============================================
   LISTA ARTICOLI
   ============================================ */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 28px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.article-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.article-date {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.article-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    line-height: 1.25;
}

.article-excerpt {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8b5cf6;
    font-weight: 600;
    font-size: 0.9rem;
}
.article-more .material-symbols-outlined { font-size: 1.1rem; transition: transform 0.3s ease; }
.article-card:hover .article-more .material-symbols-outlined { transform: translateX(4px); }

.article-cover {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   DETTAGLIO ARTICOLO
   ============================================ */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 0;
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-back:hover { color: white; transform: translateX(-3px); }

.article-detail-header {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.article-detail-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    color: white;
    margin-bottom: 16px;
}

/* Corpo dell'articolo: il contenuto e' HTML libero,
   qui sotto la sua tipografia */
.article-body {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
    line-height: 1.8;
}
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin-bottom: 20px; }
.article-body h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    margin: 36px 0 14px;
    letter-spacing: -0.5px;
}
.article-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 28px 0 12px;
}
.article-body ul, .article-body ol { margin: 0 0 20px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: #8b5cf6; text-decoration: none; }
.article-body a:hover { text-decoration: underline; }
.article-body strong { color: white; font-weight: 700; }
.article-body img {
    max-width: 100%;
    border-radius: 14px;
    margin: 12px 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.article-body code {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 6px;
    padding: 2px 7px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #c4b5fd;
}
.article-body blockquote {
    margin: 0 0 20px;
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #8b5cf6;
    border-radius: 0 12px 12px 0;
    color: rgba(255, 255, 255, 0.8);
}
.article-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 32px 0;
}

/* ============================================
   EVOLUZIONI (stessi pannelli e numeri del torneo)
   ============================================ */
.article-body .evo-tier-meta {
    margin: -6px 0 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

.evo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.evo-box, .evo-cost {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: all 0.3s ease;
}
.evo-box:hover, .evo-cost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.evo-box {
    display: flex;
    flex-direction: column;
    padding: 24px;
}
.evo-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}
.evo-pos {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}
.article-body .evo-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin: 12px 0 16px;
}

.article-body ol.evo-levels {
    list-style: none;
    counter-reset: lv;
    margin: 0 0 20px;
    flex: 1;
}
.article-body ol.evo-levels li {
    counter-increment: lv;
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 10px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.article-body ol.evo-levels li:last-child { border-bottom: none; }
.article-body ol.evo-levels li::before {
    content: counter(lv);
    flex-shrink: 0;
    width: 14px;
    font-weight: 900;
    color: #8b5cf6;
}

.evo-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}
.evo-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.evo-stat-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: #8b5cf6;
    line-height: 1.2;
}
.evo-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.evo-costs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 0 20px;
}
.evo-cost {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 22px;
}
.evo-cost-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
}
.evo-cost-unit { font-size: 0.9rem; color: rgba(255, 255, 255, 0.5); line-height: 1.2; }

/* ============================================
   STATI
   ============================================ */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
}
.empty-state .material-symbols-outlined {
    font-size: 3rem;
    color: rgba(139, 92, 246, 0.5);
    margin-bottom: 12px;
}
.empty-state h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

/* Utilities */
.admin-only { display: none; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .article-card { padding: 22px; }
    .article-card-title { font-size: 1.2rem; }
    .faq-question { padding: 16px 18px; font-size: 0.98rem; }
    .faq-answer { padding: 0 18px 18px; }
    .evo-grid { grid-template-columns: 1fr; }
    .evo-costs { gap: 10px; }
    .evo-cost { padding: 16px; }
    .evo-cost-value { font-size: 1.8rem; }
}
