/* ============================================================
   home.css — Estilos exclusivos da página inicial (index.php)
   Importar DEPOIS do style.css
   ============================================================ */

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px 0 10px;
    text-align: center;
}

.brand h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-light);
    margin: 0;
}

.brand-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 8px;
    font-weight: 400;
}

/* ── Barra de pesquisa hero ─────────────────────────────────── */
.hero-search-wrap {
    position: relative;
    width: 100%;
    max-width: 620px;
}

.hero-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 14px 18px;
    transition: border-color 0.2s, background 0.2s;
    cursor: text;
}

.hero-search-box:focus-within {
    border-color: var(--accent-yellow);
    background: rgba(0, 0, 0, 0.45);
}

.hero-search-icon {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: color 0.2s;
}

.hero-search-box:focus-within .hero-search-icon {
    color: var(--accent-yellow);
}

.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.hero-search-shortcut {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.hero-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--purple-800);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    z-index: 500;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    max-height: 320px;
    overflow-y: auto;
}

.hero-search-results.active {
    display: block;
}

.hero-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-result-item:last-child {
    border-bottom: none;
}

.hero-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hero-result-item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.hero-result-name {
    flex: 1;
}

.hero-result-type {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--accent-yellow);
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.hero-result-empty {
    padding: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* ── Estatísticas ───────────────────────────────────────────── */
.stats-section {
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s, background 0.2s;
}

.stat-card:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 238, 0, 0.3);
}

.stat-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-yellow);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ── Secções genéricas ──────────────────────────────────────── */
.home-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
}

.home-see-all {
    font-size: 13px;
    color: var(--accent-yellow);
    text-decoration: none;
    transition: opacity 0.2s;
}

.home-see-all:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* ── Grid de ligas populares ────────────────────────────────── */
.leagues-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.league-popular-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.league-popular-card:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 238, 0, 0.4);
    transform: translateY(-3px);
    color: var(--accent-yellow);
}

.league-popular-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.league-popular-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* ── Secção do mapa ─────────────────────────────────────────── */
.map-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 24px 16px;
}

.map-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

#fifa-world-map {
    width: 100%;
    height: 420px;
    border-radius: 8px;
    overflow: hidden;
}

.confed-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
}

.confed-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}

.confed-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #fifa-world-map {
        height: 300px;
    }
    
    .brand h1 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .leagues-popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-search-input {
        font-size: 13px;
    }
    
    .hero-search-shortcut {
        display: none;
    }
    
    #fifa-world-map {
        height: 220px;
    }
    
    .map-section {
        padding: 16px;
    }
    
    .confed-legend {
        gap: 10px;
    }
}