:root {
    --kk-blue: #0033A0;
    --kk-dark: #0B1120;
    --kk-grey: #F4F6F9;
    --text-muted: #6c757d;
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--kk-grey);
    color: var(--kk-dark);
    overflow-x: hidden;
}


h1, h2, h3, h4, h5, .nav-link, .btn {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* NAVBAR */
.navbar {
    background-color: rgba(11, 17, 32, 0.95) !important;
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    font-size: 14px;
    margin: 0 5px;
    transition: all 0.3s;
}
.nav-link:hover, .nav-link.active {
    color: white !important;
}

/* HERO SEKCIJA */
.hero-wrapper {
    position: relative;
    height: 90vh;
    overflow: hidden;
}
.hero-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 51, 160, 0.9), rgba(11, 17, 32, 0.5));
    display: flex;
    align-items: center;
    z-index: 2;
    color: white;
}
#heroCarousel { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.carousel-item, .carousel-item img { height: 90vh; width: 100%; object-fit: cover; }
.hero-text-box { border-left: 5px solid white; padding-left: 30px; }

/* MATCH CENTER (Glavni rezultat) */
.match-center {
    background: white;
    margin-top: -60px;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    padding: 25px;
    border-bottom: 4px solid var(--kk-blue);
}

/* TABOVI */
.nav-pills .nav-link {
    border-radius: 0;
    background-color: var(--kk-dark);
    color: rgba(255,255,255,0.7);
    margin-right: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}
.nav-pills .nav-link:hover {
    color: white;
    background-color: #1a2537;
}
.nav-pills .nav-link.active {
    background-color: var(--kk-blue);
    color: white;
}

/* VIJESTI */
.news-card {
    background: white; border: none; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: all 0.3s ease; height: 100%;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.news-img-wrapper { height: 220px; overflow: hidden; position: relative; }
.news-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-img-wrapper img { transform: scale(1.05); }
.news-date { position: absolute; top: 0; left: 0; background: var(--kk-blue); color: white; padding: 5px 10px; font-size: 12px; font-family: 'Oswald', sans-serif; }
.news-body { padding: 25px; }
.news-title { font-weight: 700; color: var(--kk-dark); line-height: 1.3; }

/* GALERIJA */
.gallery-item { position: relative; overflow: hidden; height: 250px; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay { 
    position: absolute; bottom: -50px; left: 0; width: 100%; 
    background: rgba(0, 51, 160, 0.9); color: white; padding: 10px; 
    text-align: center; transition: bottom 0.3s; font-family: 'Oswald', sans-serif; 
}
.gallery-item:hover .gallery-overlay { bottom: 0; }

/* TABELA */
.custom-table thead { background-color: var(--kk-dark); color: white; }
.custom-table th, .custom-table td { padding: 15px; border-color: #eee; }
.table-row-highlight { background-color: #eef2ff !important; font-weight: bold; border-left: 4px solid var(--kk-blue); }

/* FOOTER */
footer { background-color: var(--kk-dark); color: rgba(255,255,255,0.7); padding-top: 60px; padding-bottom: 30px; }
footer h5 { color: white; margin-bottom: 20px; }
footer a { color: rgba(255,255,255,0.7); text-decoration: none; transition: 0.3s; }
footer a:hover { color: white; }

.section-header {
    display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; border-bottom: 2px solid #ddd; padding-bottom: 10px;
}
.section-header h2 { color: var(--kk-dark); font-size: 2.5rem; margin: 0; }

/* MOBILNA VERZIJA */
@media (max-width: 768px) {
    .hero-wrapper, .carousel-item, .carousel-item img { height: 65vh !important; min-height: 450px; }
    .carousel-item img { object-position: top center !important; }
    .hero-text-box p { display: none !important; }
    .hero-text-box h1 { font-size: 2.2rem !important; }
}

/* --- KALENDAR I SIDEBAR DIZAJN --- */
.calendar-day {
    width: 14.28%;
    aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; border-radius: 50%; margin-bottom: 5px;
    cursor: default; transition: all 0.2s ease; color: var(--kk-dark);
}
.calendar-day:hover:not(.empty):not(.has-match) {
    background-color: #f8f9fa; color: var(--kk-blue); font-weight: bold; cursor: pointer;
}
.has-match {
    background: linear-gradient(145deg, var(--kk-blue) 0%, #002270 100%);
    color: white !important; font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 51, 160, 0.4); 
    cursor: pointer; position: relative; border: none;
}
.has-match:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 51, 160, 0.6); }
.has-match::after {
    content: ''; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
    width: 3px; height: 3px; background-color: rgba(255, 255, 255, 0.8); border-radius: 50%;
}
.today-date { border: 2px solid var(--kk-blue); color: var(--kk-blue); font-weight: bold; }
.empty { cursor: default; }

.bg-icon {
    position: absolute; top: -30px; right: -30px; 
    font-size: 180px; opacity: 0.08; transform: rotate(-15deg); pointer-events: none;
}

/* NOVO: STIL ZA KARTICU UTAKMICE (SIDEBAR) */
.match-teams-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 10px !important;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}
.team-name-box {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 0 5px;
}
.vs-box {
    flex: 0 0 40px;
    text-align: center;
    font-weight: 800;
    font-style: italic;
    opacity: 0.6;
    font-size: 1.2rem;
}

/* TEME BOJA */
.theme-seniori .next-match-card { background-color: var(--kk-blue); }
.theme-seniori .btn-details { color: var(--kk-blue); }
.theme-seniori .has-match { background: linear-gradient(135deg, var(--kk-blue) 0%, #001f5c 100%); }
.theme-seniori .today-date { border-color: var(--kk-blue); color: var(--kk-blue); }
.theme-seniori .match-dot-legend { background: var(--kk-blue); }
.theme-seniori .month-title { color: var(--kk-blue); }

.theme-kadeti .next-match-card { background-color: #B91C1C; } 
.theme-kadeti .btn-details { color: #B91C1C; }
.theme-kadeti .has-match { background: linear-gradient(135deg, #B91C1C 0%, #7f1d1d 100%); }
.theme-kadeti .today-date { border-color: #B91C1C; color: #B91C1C; }
.theme-kadeti .match-dot-legend { background: #B91C1C; }
.theme-kadeti .month-title { color: #B91C1C; }

.theme-pioniri .next-match-card { background-color: #15803D; } 
.theme-pioniri .btn-details { color: #15803D; }
.theme-pioniri .has-match { background: linear-gradient(135deg, #15803D 0%, #14532d 100%); }
.theme-pioniri .today-date { border-color: #15803D; color: #15803D; }
.theme-pioniri .match-dot-legend { background: #15803D; }
.theme-pioniri .month-title { color: #15803D; }

/* --- NOVI DIZAJN ZA REZULTAT (ISPOD IMENA) --- */
.final-score-box {
    background: rgba(255, 255, 255, 0.2); /* Prozirna bijela */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 10px 0;
    margin-bottom: 20px;
    text-align: center;
    display: none; /* Skriveno po defaultu */
    animation: fadeIn 0.5s ease-in-out;
}

.score-number {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem; /* Veliki brojevi */
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.score-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-top: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- DIZAJN ZA VERTIKALNI RASPORED (NAJAVA) - RESPONSIVE FIX --- */

/* Imena timova (Domaćin i Gost) */
.hero-team-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;       /* Desktop veličina */
    line-height: 1.1;
    font-weight: 800;
    word-wrap: break-word;   /* Prelomi dugačke riječi ako treba */
    white-space: normal;     /* Dozvoli novi red */
}

/* Srednji dio (VS) */
.vs-vertical-text {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    font-style: italic;
    color: rgba(0, 0, 0, 0.08); 
    line-height: 0.8;
    margin-top: 15px;
    margin-bottom: -10px;     
    user-select: none;       
}

.date-vertical {
    font-family: 'Oswald', sans-serif;
    color: var(--kk-blue);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;     
    text-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    position: relative; 
    z-index: 2;               
}

.time-vertical {
    background: white;        
    color: var(--kk-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    padding: 5px 20px;
    border-radius: 50px;      
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
    margin-top: 15px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(0,0,0,0.05); 
}

.league-vertical {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;      
    color: #888;
    border-top: 2px solid var(--kk-blue); 
    padding-top: 10px;
    margin-top: 5px;
    display: inline-block;
    opacity: 0.8;
}

/* --- MOBILNA PRILAGODBA (FIX ZA DATUM I LIGU) --- */
@media (max-width: 768px) {
    
    /* Timovi - Dovoljno mjesta */
    .hero-team-name {
        font-size: 0.85rem; 
        font-weight: 800;
        margin-bottom: 2px;
        line-height: 1.1;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Sredina - Datum mora biti manji da stane godina */
    .date-vertical {
        font-size: 0.75rem; /* Smanjeno da stane 00.00.2024 */
        font-weight: 800;
        margin-bottom: 2px;
        white-space: nowrap; /* Zabranjen novi red za datum */
    }
    
    /* Vrijeme */
    .time-vertical {
        font-size: 0.7rem;
        padding: 1px 5px;
        border-radius: 4px;
        margin-top: 2px;
        background: rgba(255,255,255,0.9);
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .time-vertical i { display: none; } /* Sakrij ikonicu sata */

    /* Liga - Na dnu, lijepo vidljiva */
    .league-vertical {
        display: block; /* Obavezno prikaži */
        font-size: 0.65rem;
        letter-spacing: 1px;
        padding-top: 8px;
        margin-top: 0;
        border-top: 1px solid rgba(0,0,0,0.1); /* Tanka linija iznad */
        width: 100%;
    }
}

/* --- STILOVI ZA MODAL STRELICE --- */
.modal-arrow {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0 20px;
}

.modal-arrow:hover {
    color: white;
    transform: translateY(-50%) scale(1.2); /* Malo se poveća na hover */
    cursor: pointer;
}

.arrow-left {
    left: -60px; /* Izvučeno lijevo van slike */
}

.arrow-right {
    right: -60px; /* Izvučeno desno van slike */
}

/* Na mobitelima strelice moraju biti unutra jer nema mjesta sa strane */
@media (max-width: 768px) {
    .arrow-left { left: 0; background: rgba(0,0,0,0.3); }
    .arrow-right { right: 0; background: rgba(0,0,0,0.3); }
    .modal-arrow { font-size: 2rem; padding: 10px; }
}

/* --- DIZAJN ZA ZAVRŠENU UTAKMICU (REZULTAT) --- */

.hero-score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.score-digit {
    color: var(--kk-dark);
}

.score-divider {
    margin: 0 10px;
    color: var(--kk-blue);
    transform: translateY(-2px); /* Malo podignuto da bude centrirano */
}

/* DESKTOP (Veliki ekrani) */
@media (min-width: 769px) {
    .hero-score-container {
        font-size: 3.5rem; /* Veliki rezultat */
    }
}

/* MOBITEL (Mali ekrani) */
@media (max-width: 768px) {
    .hero-score-container {
        font-size: 1.8rem; /* Dovoljno veliko da se vidi, dovoljno malo da stane */
    }
    
    .score-divider {
        margin: 0 2px; /* Smanji razmak između brojeva i dvotačke */
    }

    /* Prilagodba badge-a da ne bude prevelik */
    .badge {
        font-size: 0.7rem; 
        font-weight: 600;
        letter-spacing: 1px;
    }
}
