@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800;900&family=Outfit:wght@400;600;900&display=swap');

:root {
    --asi-blue: #1D4ED8;
    --asi-red: #EF4444;
    --asi-dark: #18181B;
    --asi-gray: #F4F4F5;
    --asi-border: #E4E4E7;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--asi-dark);
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.95;
}

.label-caps {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--asi-blue);
    display: block;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 2px solid var(--asi-blue);
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: 40px !important;
}

.brand-text-main {
    font-size: 0.65rem !important;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.brand-text-sub {
    font-size: 1.4rem !important;
    line-height: 1;
    color: var(--asi-blue);
    font-weight: 900;
}

/* Modern Nav Font & Dropdowns */
.nav-link {
    font-family: 'Outfit', sans-serif;
    font-size: 11px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 0.8rem !important;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--asi-dark) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link i {
    font-size: 14px;
    color: var(--asi-dark);
    opacity: 0.6;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--asi-blue) !important;
}

.nav-link:hover i {
    color: var(--asi-blue);
    opacity: 1;
    transform: translateY(-2px);
}

.dropdown-menu {
    border: none;
    border-radius: 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    background: #fff;
    padding: 1rem 0;
    border-top: 3px solid var(--asi-blue);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.7rem 1.5rem;
    color: var(--asi-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: var(--asi-gray);
    color: var(--asi-blue);
}

.dropdown-item i {
    color: var(--asi-blue);
    font-size: 8px;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

/* Association Detail Page */
.assoc-hero {
    height: 400px;
    background-color: var(--asi-dark);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.assoc-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.assoc-hero-title {
    position: relative;
    z-index: 10;
    color: white;
    text-align: center;
}

.tech-sheet {
    background: white;
    border: 1px solid var(--asi-border);
    padding: 3rem;
}

.tech-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--asi-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.tech-label {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--asi-blue);
}

.tech-value {
    font-weight: 700;
    color: var(--asi-dark);
    font-size: 14px;
}

.assoc-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
}

/* User Icon Fix - Remove Caret */

.btn-user-icon.dropdown-toggle::after {
    display: none !important;
}

.btn-user-icon {
    width: 38px;
    height: 38px;
    background: var(--asi-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s;
}

.btn-user-icon:hover {
    background: var(--asi-dark);
    transform: scale(1.1);
}

/* News Ticker Section */
#ticker-section {
    background: var(--asi-dark);
    height: 70px;
    border-bottom: 2px solid var(--asi-blue);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.ticker-wrap {
    display: flex;
    white-space: nowrap;
}

.ticker-move {
    display: flex;
    animation: tickerMove 40s linear infinite;
}

@keyframes tickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

a.ticker-item { text-decoration: none; transition: background .2s; }
a.ticker-item:hover { background: rgba(255,255,255,0.06); }
a.ticker-item:hover .ticker-score { background: var(--asi-red); }
#ticker-section:hover .ticker-move { animation-play-state: paused; }

.ticker-item {
    display: flex;
    align-items: center;
    padding: 0 40px;
    border-right: 1px solid rgba(255,255,255,0.1);
    height: 70px;
    gap: 15px;
}

.ticker-team {
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
}

.ticker-score {
    background: var(--asi-blue);
    color: #fff;
    padding: 4px 10px;
    font-weight: 950;
    font-size: 16px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
}

.ticker-status {
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 20px;
}

.status-terminata {
    background: rgba(255,255,255,0.1);
    color: #94a3b8;
}

.status-incorso {
    background: var(--asi-red);
    color: #fff;
    animation: blink 1s infinite;
}

.ticker-logo {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Live Event */
.live-card {
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--asi-border);
}

.live-badge {
    background: var(--asi-red);
    color: white;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Slider della home: l'altezza vale solo per lui (prima era su tutti i .swiper
   e la banda sponsor diventava alta 3/4 dello schermo, con un vuoto sotto) */
.swiper {
    width: 100%;
}
.mainSwiper {
    height: 75vh;
}

.slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0, 0.9), transparent);
}

.slide-content {
    position: relative;
    z-index: 10;
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
}

.slide-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
}

/* Sports Grid */
.sport-card {
    background: #fff;
    border: 1px solid var(--asi-border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
}

.sport-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--asi-blue);
}

.sport-card img {
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.sport-card-content {
    padding: 2.5rem;
}

/* News List */
.news-item {
    display: flex;
    gap: 2.5rem;
    padding-bottom: 3.5rem;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid var(--asi-border);
}

.news-item img {
    width: 35%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
    }
    .news-item img {
        width: 100%;
    }
}

/* Sponsors */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: var(--asi-border);
    border: 1px solid var(--asi-border);
}

.sponsor-box {
    background: white;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    filter: grayscale(1);
    opacity: 0.5;
    transition: all 0.3s;
}

.sponsor-box:hover {
    filter: grayscale(0);
    opacity: 1;
    background: var(--asi-gray);
}

.sponsor-box img {
    max-height: 100%;
    max-width: 100%;
}

/* Menu su una riga da 1200px (navbar-expand-xl). Le 9 voci piu' l'utente
   superano i 1320px del container: sopra i 1200 si stringono le spaziature,
   tra 1200 e 1400 si tolgono anche le icone accanto alle voci. */
@media (min-width: 1200px) {
    .nav-link { padding: 0.5rem 0.5rem !important; gap: 6px; letter-spacing: 0.06em; }
    .navbar .dropdown-user { margin-left: 0.5rem !important; padding-left: 0.75rem !important; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-nav > .nav-item > .nav-link > i { display: none; }
}
