/* --- FAQ PAGE STYLES (Horizontal Slider) --- */

.kb-main {
    /* FIX: Aumentato spazio per evitare che la navbar copra il titolo */
    padding-top: 180px; 
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* 1. HERO */
.kb-hero {
    text-align: center;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 1; /* Assicura che stia sopra allo sfondo */
}

.hero-glow {
    position: absolute; 
    top: -150px; /* Spostato più in alto per non coprire il testo */
    left: 50%; 
    transform: translateX(-50%);
    width: 600px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none; 
    z-index: -1;
}

.kb-hero h1 {
    font-size: 3.5rem; font-weight: 700; margin-bottom: 0.5rem;
    background: linear-gradient(180deg, #fff, #888);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    position: relative;
}
.kb-hero p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2.5rem; position: relative; }

/* Search Bar */
.search-wrapper {
    max-width: 500px; margin: 0 auto;
    position: relative; display: flex; align-items: center;
}
.search-icon { position: absolute; left: 16px; color: #666; }
#faq-search {
    width: 100%; background: #0e0e10; border: 1px solid var(--border);
    padding: 16px 16px 16px 48px; border-radius: 14px;
    color: #fff; font-family: 'Inter', sans-serif; font-size: 1rem; transition: 0.3s;
}
#faq-search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }


/* 2. SLIDER SECTION */
.kb-slider-section {
    max-width: 1300px; margin: 0 auto 6rem; padding: 0 2rem; position: relative;
}
.slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.slider-header h3 { font-size: 1.2rem; color: #fff; font-weight: 600; }
.slider-nav { display: flex; gap: 10px; }
.nav-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
.nav-btn:hover { background: #fff; color: #000; }

/* Track */
.cards-track {
    display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth;
    scroll-snap-type: x mandatory; padding-bottom: 20px;
    -ms-overflow-style: none; scrollbar-width: none;
}
.cards-track::-webkit-scrollbar { display: none; }

/* KB Card */
.kb-card {
    min-width: 350px; width: 350px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 2rem;
    display: flex; flex-direction: column;
    scroll-snap-align: start;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); /* Animazione Apple */
    cursor: pointer; position: relative;
}

.kb-card:hover {
    background: #141416; transform: translateY(-5px); border-color: rgba(255,255,255,0.2);
}

/* Expanded State */
.kb-card.expanded {
    background: #1a1a1c; border-color: var(--accent);
    min-width: 500px; /* Si allarga */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem; font-weight: bold;
}
.ico-general { background: #e0e7ff; color: #4338ca; }
.ico-tech { background: #dcfce7; color: #15803d; }
.ico-loc { background: #ffedd5; color: #c2410c; }
.ico-sec { background: #fee2e2; color: #b91c1c; }
.ico-bill { background: #f3e8ff; color: #7e22ce; }

.kb-card h4 { font-size: 1.3rem; color: #fff; margin-bottom: 0.5rem; }
.short-desc { color: #888; font-size: 0.95rem; line-height: 1.5; }

/* ANIMAZIONE WOW (Grid Expansion) */
.answer-wrapper {
    display: grid;
    grid-template-rows: 0fr; /* Chiuso */
    transition: grid-template-rows 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.kb-card.expanded .answer-wrapper {
    grid-template-rows: 1fr; /* Aperto */
}

.full-answer { overflow: hidden; }
.full-answer hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.full-answer p { color: #ccc; line-height: 1.6; font-size: 0.95rem; opacity: 0; transform: translateY(10px); transition: all 0.4s ease; }

.kb-card.expanded .full-answer p { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }

.read-more {
    margin-top: auto; padding-top: 1.5rem;
    color: var(--accent); font-size: 0.85rem; font-weight: 600;
    display: block; transition: opacity 0.2s;
}
.kb-card.expanded .read-more { opacity: 0; pointer-events: none; }


/* 3. TICKET SECTION */
.ticket-section { max-width: 900px; margin: 2rem auto 6rem; padding: 0 2rem; }
.ticket-wrapper { display: flex; background: #0e0e10; border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.ticket-stub { width: 250px; background: #131315; border-right: 2px dashed #333; padding: 3rem 2rem; display: flex; flex-direction: column; justify-content: center; position: relative; }
.ticket-punch { position: absolute; right: -10px; top: 50%; width: 20px; height: 20px; background: var(--bg); border-radius: 50%; border: 1px solid var(--border); transform: translateY(-50%); }
.ticket-stub h3 { font-size: 1.8rem; margin-bottom: 0.5rem; color: #fff; }
.ticket-stub p { color: #666; font-size: 0.9rem; margin-bottom: 2rem; }
.ticket-meta span { display: block; font-size: 0.7rem; color: #555; letter-spacing: 1px; }
.ticket-meta strong { display: block; font-size: 1.2rem; color: var(--green); }

.ticket-body { flex: 1; padding: 3rem; }
.ticket-form { display: flex; flex-direction: column; gap: 1.2rem; }
.t-row { display: flex; gap: 1.2rem; }
.t-group { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.t-group label { font-size: 0.75rem; color: #888; font-weight: 600; text-transform: uppercase; margin-left: 4px; }

.t-input {
    width: 100%; background: #050507; border: 1px solid var(--border);
    padding: 12px 16px; border-radius: 10px; color: #fff;
    font-family: 'Inter', sans-serif; font-size: 0.95rem; outline: none;
    transition: 0.3s;
}
.t-input:focus { border-color: var(--accent); background: #08080a; }

.select-wrap { position: relative; }
select.t-input { appearance: none; -webkit-appearance: none; cursor: pointer; }
/* Opzioni nere per il menu */
select.t-input option { background: #111; color: #fff; padding: 10px; }

.select-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #888; pointer-events: none; }
.t-area { min-height: 100px; resize: none; }

.t-submit {
    align-self: flex-start;
    padding: 12px 32px; background: #fff; color: #000;
    border: none; border-radius: 8px; font-weight: 700;
    cursor: pointer; transition: 0.2s; margin-top: 10px;
}
.t-submit:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255,255,255,0.2); }

/* RESPONSIVE */
@media (max-width: 900px) {
    .ticket-wrapper { flex-direction: column; }
    .ticket-stub { width: 100%; border-right: none; border-bottom: 2px dashed #333; text-align: center; padding: 2rem; }
    .ticket-punch { display: none; }
    .t-row { flex-direction: column; gap: 1rem; }
    
    .kb-card { min-width: 85vw; width: 85vw; }
    .kb-card.expanded { min-width: 85vw; }
}

/* 4. HELP CARDS SECTION */
.help-cards-section {
    max-width: 1200px;
    margin: 3rem auto 6rem;
    padding: 0 2rem;
}

.help-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.help-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.help-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.03), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.help-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.2);
    background: #141416;
}

.help-card:hover::before {
    opacity: 1;
}

.help-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.wiki-card .help-card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.discord-card .help-card-icon {
    background: linear-gradient(135deg, #5865f2 0%, #3b49df 100%);
    color: white;
}

.help-card:hover .help-card-icon {
    transform: scale(1.1);
}

.help-card h3 {
    font-size: 1.3rem;
    color: #fff;
    margin: 0;
    font-weight: 600;
}

.help-card p {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.help-card-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    align-self: flex-start;
    background: var(--surface-highlight);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.help-card-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .help-cards-grid {
        grid-template-columns: 1fr;
    }
}