/* ======================================================================
   TEMPLATE STANDARD - ULTIMATE THEME (V5.0 - FINAL)
====================================================================== */

:root {
    /* --- COLORI --- */
    --primary: #0f3460;
    --primary-dark: #0a2545;
    --accent: #e94560;
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #2d3436;
    
    /* --- MISURE HEADER --- */
    --nav-h: 80px; 
}

/* =========================================
   1. RESET & BASE
========================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* RIMOSSO padding-top qui, lo gestiamo col divisore fisico nel file header */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    margin-top: 0;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Helper Class */
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }

/* =========================================
   2. HEADER SYSTEM
========================================= */

/* Nascondi elementi vecchi */
.promo-bar, .ticker-wrap { display: none !important; }

/* Navbar */
.navbar {
    height: var(--nav-h);
    background: rgba(15, 52, 96, 1); /* Opaco al 100% per coprire lo scroll */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar-brand {
    font-weight: 800;
    text-transform: uppercase;
    color: #fff !important;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo-icon-box {
    width: 42px; height: 42px;
    background: var(--accent);
    border-radius: 4px;
    display: grid; place-items: center;
    margin-right: 12px;
    color: #fff;
    font-size: 1.2rem;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 1.2rem !important;
    height: var(--nav-h);
    display: flex; align-items: center;
    text-transform: uppercase;
}

.nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.1); }

/* =========================================
   3. CARD & COMPONENTI
========================================= */
.card {
    border-radius: 8px;
    border: none;
    background: var(--bg-card);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    overflow: hidden;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.card-img-top { transition: transform 0.5s ease; }
.card:hover .card-img-top { transform: scale(1.05); }

/* Badge Categorie */
.badge { font-weight: 700; padding: 0.5em 0.8em; letter-spacing: 0.5px; }

/* =========================================
   4. FOOTER
========================================= */
footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.6);
    padding: 4rem 0 2rem;
    border-top: 4px solid var(--accent);
    margin-top: auto;
}

footer a:hover { color: #fff !important; text-decoration: underline !important; }

/* =========================================
   5. MOBILE
========================================= */
@media (max-width: 991px) {
    :root { --nav-h: 60px; }
    
    .navbar-collapse {
        background: var(--primary-dark);
        padding: 1rem;
        position: absolute;
        top: var(--nav-h);
        left: 0; width: 100%;
        z-index: 9999;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-link { height: 50px; border-bottom: 1px solid rgba(255,255,255,0.05); }
}