/*
Theme Name: Nikola Tesla Tema
Theme URI: https://nikola-tesla.hu
Author: Coding Partner
Description: Verzija 5.0 - Popravljena navigacija, čist kod.
Version: 5.0
Text Domain: nikolatesla
*/

/* =========================================================
   THEME STYLE SYSTEM (Step 5)
   1) Tokens (:root)
   2) Layout (container/section spacing)
   3) Components (header, nav, cards, tabs, forms)
   4) Utilities (small helper classes)
   5) Page Overrides (page-specific sections)
   NOTE: Keep bilingual text rendering safe (sr/hu characters).
   ========================================================= */

/* --- 1. OSNOVNO --- */
*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* =========================================================
   CORE TOKENS
   ========================================================= */
:root {
    /* Osnovno — srpska plava i crvena (srpska + mađarska zastava) */
    --primary-color: #003366;
    --primary-light: #004d99;
    --accent-color: #c0392b;
    --accent-color-dark: #a93226;

    /* Mađarska zelena — upis, potvrde, pozitivni elementi */
    --success-color: #4a7c59;
    --success-light: #d4edda;
    --lovra-color: #00796b;          /* teal — boja Lovre */
    --lovra-dark: #00695c;

    /* Školske tople boje — radost, toplina, deca */
    --warm-color: #f4c430;       /* žuta — obaveštenja, isticanje */
    --warm-dark: #d4a017;        /* tamnija žuta za hover */
    --kids-color: #e8894e;       /* narandžasta — obdanište, igrivost */
    --kids-dark: #cf6f35;
    --archive-color: #f57c00;    /* narandžasta — Gimnazijalac arhivska stranica */
    --archive-light: #ff9800;

    /* Sekundarna plava — info elementi, linkovi */
    --info-color: #5b9bd5;
    --info-light: #dbeafe;

    /* Neutralne */
    --light-bg: #ffffff;
    --text-color: #333;
    --gray-bg: #f4f7f6;
    --warm-bg: #faf8f5;          /* blagi krem — alternativa sivoj pozadini */
    /* Semantički alias tokeni (za konzistentniji dizajn sistem) */
    --color-brand-primary: var(--primary-color);
    --color-brand-accent: var(--accent-color);
    --color-surface: var(--light-bg);
    --color-surface-muted: var(--gray-bg);
    --color-text-primary: var(--text-color);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;
}

body { font-family: 'Roboto', 'Noto Sans', 'Segoe UI', sans-serif; line-height: 1.6; color: var(--text-color); background-color: var(--gray-bg); }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- 2. POMOĆNE KLASE --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 60px 0 40px;
    text-transform: uppercase;
    position: relative;
}
.section-title::after { 
    content: ''; 
    display: block; 
    width: 60px; 
    height: 3px; 
    background: var(--accent-color); 
    margin: 15px auto 0; 
}

.btn { display: inline-block; padding: 12px 30px; border-radius: 4px; font-weight: bold; text-transform: uppercase; cursor: pointer; border: none; transition: 0.3s; }
.btn-hero { background: white; color: var(--primary-color); }
.btn-hero:hover { background: #eee; transform: translateY(-2px); }
.btn-accent { background: var(--accent-color); color: white; }
.btn-accent:hover { background: var(--accent-color-dark); }

/* --- NOVE KLASE (Zamena za inline stilove) --- */
.page-container-404 { text-align: center; padding: 100px 20px; }
.btn-wrapper-404 { margin-top: 30px; }
.search-results-container, .archive-container { margin-top: 60px; }
.page-content-container { margin-top: 40px; }
.single-banner-margin { margin-top: 20px; }
.entry-content-body { margin-top: 30px; }
.pagination-wrapper { text-align: center; margin-bottom: 60px; }
.upis-section { text-align: center; margin-bottom: 60px; }
.upis-text { max-width: 800px; margin: 0 auto 30px; }

/* Generic page template (page.php) */
.page-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.page-shell {
    margin-top: 40px;
}

.page-title--default {
    margin-top: 0;
}

/* --- GLOBAL UTILITIES --- */
.u-max-1200 { max-width: 1200px; margin-left: auto; margin-right: auto; }
.u-text-center { text-align: center; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mt-0 { margin-top: 0 !important; }


/* =============================================
   3. HEADER I NAVIGACIJA
   ============================================= */

.top-bar { display: none !important; }

.site-header {
    background: #ffffff;
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
    border-top: 4px solid var(--primary-color); 
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo-wrapper .logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.header-logo {
    height: 70px;
    width: auto;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.text-red {
    color: var(--primary-color);
    text-transform: uppercase;
}

.org-name { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.5px; }
.org-desc { font-size: 0.85rem; font-weight: 500; }

.nav-wrapper { display: flex; align-items: center; gap: 30px; }

/* === GLAVNI MENI - DESKTOP === */
.main-navigation {
    position: relative;
}

.main-navigation ul.nav-menu { 
    display: flex; 
    gap: 25px; 
    margin: 0; 
    padding: 0; 
    list-style: none; 
}

.main-navigation li {
    position: relative;
}

.main-navigation > ul > li > a { 
    color: var(--primary-color); 
    font-weight: 700; 
    font-size: 1rem; 
    text-transform: uppercase;
    display: block;
    padding: 10px 0;
    transition: color 0.3s;
}

.main-navigation a:hover { 
    color: var(--accent-color); 
}

/* === DROPDOWN STRELICA - SAMO DESKTOP === */
@media (min-width: 993px) {
    .main-navigation .menu-item-has-children > a::after {
        content: '\f107';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        margin-left: 8px;
        font-size: 0.8rem;
        transition: transform 0.3s;
        display: inline-block;
    }

    .main-navigation .menu-item-has-children:hover > a::after {
        transform: rotate(180deg);
    }
}

/* === SUBMENU - DESKTOP (SAKRIVENO PO DEFAULTU) === */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-top: 3px solid var(--accent-color);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    
    /* KLJUČNO - Sakriveno po defaultu */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    
    z-index: 1000;
    display: block;
    flex-direction: column;
}

/* === SUBMENU - PRIKAZ NA HOVER (DESKTOP) === */
.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === SUBMENU ITEMS === */
.main-navigation ul ul li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.main-navigation ul ul li:last-child {
    border-bottom: none;
}

.main-navigation ul ul a {
    padding: 12px 20px;
    font-size: 0.9rem;
    text-transform: none;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    display: block;
}

.main-navigation ul ul a:hover {
    background: var(--gray-bg);
    color: var(--accent-color);
    padding-left: 25px;
}

/* === SUB-SUBMENU (3. nivo) - DESKTOP === */
.main-navigation ul ul ul {
    left: 100%;
    top: 0;
    margin-left: 0;
    border-top: none;
    border-left: 3px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
}

/* Strelica za 3. nivo */
.main-navigation ul ul .menu-item-has-children > a::after {
    content: '\f105';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
}

/* === JEZICI === */
.lang-flags ul { 
    display: flex; 
    gap: 12px; 
    margin: 0; 
    padding: 0; 
    list-style: none; 
    align-items: center; 
}


/* === HAMBURGER DUGME === */
.menu-toggle { 
    display: none; 
    background: var(--primary-color); 
    border: none; 
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: white; 
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.3);
}

.menu-toggle i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.menu-toggle:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* Kada je meni otvoren - X dugme */
.menu-toggle.menu-open {
    background: var(--accent-color);
}

.menu-toggle.menu-open i {
    transform: rotate(90deg);
}

/* =============================================
   RESPONSIVE - MOBILNI MENI (max-width: 992px)
   ============================================= */
@media (max-width: 992px) {
    .header-container { 
        height: auto; 
        flex-wrap: wrap; 
        padding: 15px 20px;
        gap: 10px;
    }
    
    /* Logo wrapper - zadrži tekst */
    .logo-wrapper {
        flex: 1;
        min-width: 0; /* Omogućava smanjenje */
    }
    
    .logo-wrapper .logo-link {
        gap: 10px;
    }
    
    .menu-toggle { 
        display: flex; 
        order: 3;
    }
    
    .nav-wrapper { 
        display: flex;
        align-items: center;
        gap: 15px;
        order: 2;
    }
    
    /* Glavni meni - sakriven po defaultu */
    .main-navigation { 
        display: none; 
        width: 100%; 
        margin-top: 15px; 
        border-top: 1px solid #eee;
        order: 4;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        border-radius: 0 0 15px 15px;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    /* Glavni meni - prikazan kada je toggled */
    .main-navigation.toggled { 
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Mobilni - vertikalni layout */
    .main-navigation ul.nav-menu,
    .main-navigation ul { 
        flex-direction: column; 
        gap: 0; 
    }
    
    .main-navigation li { 
        border-bottom: 1px solid #f0f0f0; 
        position: relative;
    }
    
    .main-navigation > ul > li > a { 
        display: block; 
        padding: 15px 0;
        padding-right: 50px;
    }
    
    /* === MOBILNI SUBMENU - SAKRIVENO PO DEFAULTU === */
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--accent-color);
        border-radius: 0;
        padding: 0;
        padding-left: 15px;
        margin: 0;
        min-width: 100%;
        background: #fafafa;
        border-top: none;
        
        /* KLJUČNO - Sakriveno */
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        transition: opacity 0.3s ease, max-height 0.4s ease, visibility 0.3s ease;
    }
    
    /* === MOBILNI SUBMENU - OTVOREN === */
    .main-navigation .menu-item-has-children.submenu-open > .sub-menu {
        opacity: 1;
        visibility: visible;
        max-height: 1000px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    /* Ukloni hover efekat na mobilnom */
    .main-navigation li:hover > ul {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }
    
    /* Ali zadrži otvoren ako ima klasu */
    .main-navigation .menu-item-has-children.submenu-open:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        max-height: 1000px;
    }
    
    .main-navigation ul ul li {
        border-bottom: 1px solid #eee;
    }
    
    .main-navigation ul ul a {
        padding: 12px 15px;
        padding-right: 50px;
    }
    
    .main-navigation ul ul a:hover {
        padding-left: 20px;
    }
    
    /* === SUB-SUBMENU (3. nivo) - MOBILNI === */
    .main-navigation ul ul ul {
        left: 0;
        border-left: 3px solid var(--primary-color);
        background: #f5f5f5;
    }
    
    /* === TOGGLE DUGME ZA SUBMENU === */
    .submenu-toggle {
        position: absolute;
        right: 0;
        top: 0;
        width: 50px;
        height: 48px;
        background: none;
        border: none;
        border-left: 1px solid #eee;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        font-size: 1rem;
        transition: background 0.3s;
        z-index: 5;
    }
    
    .submenu-toggle:hover {
        background: #f5f5f5;
    }
    
    .submenu-toggle i {
        transition: transform 0.3s ease;
    }
    
    /* Rotacija strelice kada je otvoren */
    .menu-item-has-children.submenu-open > .submenu-toggle i {
        transform: rotate(180deg);
    }
    
    /* Toggle u submeniju */
    .main-navigation ul ul .submenu-toggle {
        height: 44px;
    }
    
    /* Sakrij CSS strelicu na mobilnom */
    .main-navigation .menu-item-has-children > a::after {
        display: none !important;
    }
    
    /* === JEZICI NA MOBILNOM === */
    .lang-flags { 
        margin-right: 20px;
        order: 2;
    }
    
    /* === LOGO NA MOBILNOM === */
    .org-name { 
        font-size: 1rem; 
    }
    
    .org-desc { 
        font-size: 0.7rem; 
    }
    
    .header-logo { 
        height: 50px; 
    }
}

/* === DESKTOP RESET - SAKRIJ MOBILNE ELEMENTE === */
@media (min-width: 993px) {
    .submenu-toggle {
        display: none !important;
    }
}

/* === TABLET (768px - 992px) === */
@media (max-width: 992px) and (min-width: 577px) {
    .org-name { 
        font-size: 1rem; 
    }
    
    .org-desc { 
        font-size: 0.65rem; 
    }
    
    .header-logo { 
        height: 45px; 
    }
}

/* === MALI MOBILNI (telefoni) === */
@media (max-width: 576px) {
    .header-container {
        padding: 10px 15px;
    }
    
    /* Prikaži skraćeni tekst na mobilnom */
    .header-text {
        display: flex;
    }
    
    .org-name { 
        font-size: 0.85rem;
        letter-spacing: 0;
    }
    
    .org-desc {
        display: none;
    }
    
    .header-logo { 
        height: 40px; 
    }
    
    .logo-wrapper .logo-link {
        gap: 8px;
    }
    
    .menu-toggle {
        width: 40px;
        height: 40px;
    }
    
    .menu-toggle i {
        font-size: 1.1rem;
    }
    
    .lang-flags img {
        height: 22px;
    }
    
    .lang-flags {
        margin-right: 0;
    }
}

/* === EXTRA MALI MOBILNI (< 400px) === */
@media (max-width: 400px) {
    .header-container {
        padding: 8px 10px;
    }
    
    .org-desc {
        display: none; /* Sakrij opis, zadrži samo naziv */
    }
    
    .org-name {
        font-size: 0.75rem;
    }
    
    .header-logo {
        height: 35px;
    }
    
    .lang-flags img {
        height: 20px;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
    }
}


/* --- 4. HERO --- */
.hero {
    background: linear-gradient(rgba(0,20,40,0.35), rgba(0,20,40,0.45)), url('https://placehold.co/1920x1080/003366/FFF?text=Nikola+Tesla+Skola');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 140px 0 180px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero .container {
    text-align: center;
    width: 100%;
}

.hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 20px; 
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5); 
}

.hero p { 
    font-size: 1.4rem; 
    margin-bottom: 40px; 
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 5. KARTICE --- */
.quick-links { 
    margin-top: -40px; 
    position: relative; 
    z-index: 10; 
    padding-bottom: 60px; 
}

.quick-links .container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
}

.card { 
    background: white; 
    padding: 25px 20px; 
    border-radius: 15px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
    text-align: center; 
    border-bottom: 4px solid transparent; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start;
    height: 100%; 
    min-height: 280px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.card:hover { 
    transform: translateY(-7px); 
    border-bottom: 4px solid var(--accent-color); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.12); 
}

.card-icon { 
    font-size: 2.5rem;
    color: var(--primary-color); 
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card h3 { 
    margin-bottom: 10px;
    color: var(--primary-color); 
    font-size: 1.25rem; 
    font-weight: 700; 
}

.card p { 
    font-size: 0.9rem; 
    color: #666; 
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 90%; 
    flex-grow: 1;
}

.card-link { 
    color: var(--accent-color); 
    font-weight: bold; 
    font-size: 0.9rem; 
    margin-top: auto; 
    display: inline-block; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    padding-top: 10px;
}

.card-link:hover { 
    text-decoration: underline; 
    color: var(--accent-color-dark); 
}

/* Responsive za Hero i Cards */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .hero { padding: 100px 0 140px; }
    
    .card { min-height: 250px; }
    .card-icon { font-size: 2rem; width: 50px; height: 50px; }
}

/* --- 6. VESTI --- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-bottom: 60px; }
.news-item { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; transition: 0.3s; }
.news-item:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.news-img { height: 200px; background-size: cover; background-position: center; }
.news-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.news-date { font-size: 0.85rem; color: #888; margin-bottom: 10px; }
.news-content h3 { font-size: 1.25rem; margin-bottom: 15px; color: var(--primary-color); line-height: 1.4; }
.read-more-link { color: var(--accent-color); font-weight: bold; margin-top: auto; display: inline-block; }

/* === FOOTER === */
.site-footer { 
    position: relative; 
    background: linear-gradient(rgba(0, 20, 40, 0.3), rgba(0, 20, 40, 0.4)), url('zgrada-skole.jpg'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed;
    color: white; 
    padding: 70px 0;
    min-height: 420px;
    display: flex;
    align-items: center;
}

.footer-container-zindex { 
    position: relative; 
    z-index: 2; 
    width: 98%; 
    max-width: 1600px;
    margin: 0 auto;
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px;
    font-size: 0.8rem; 
}

.footer-col h4 { 
    color: white; 
    font-size: 0.85rem;
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.footer-col p { 
    margin-bottom: 10px;
    display: flex; 
    gap: 10px;
    align-items: flex-start; 
    color: #ffffff;
    line-height: 1.5;
    word-break: break-word;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.footer-col i { 
    color: #e74c3c; 
    margin-top: 3px; 
    font-size: 1rem;
    min-width: 18px;
}

.footer-col a { 
    color: #e8e8e8;
    text-decoration: none; 
    transition: 0.2s; 
}

.footer-col a:hover { 
    color: white; 
    text-decoration: underline; 
}

/* Partners section */
.partners-section { 
    background: white; 
    padding: 50px 0;
    text-align: center; 
    border-bottom: 1px solid #eee; 
}

.partners-flex { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 100px;
    flex-wrap: wrap; 
}

.partner-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 18px;
}

.partner-item img { 
    height: 90px;
    width: auto; 
    display: block; 
}

.partner-name { 
    font-size: 0.9rem; 
    color: var(--primary-color); 
    font-weight: bold; 
    text-transform: uppercase; 
    line-height: 1.2; 
}

.partner-name small { 
    font-size: 0.65rem; 
    color: #888; 
    font-weight: normal; 
}

/* Footer bottom */
.footer-bottom { 
    background: white; 
    padding: 25px 0;
    color: var(--primary-color); 
    font-size: 0.8rem;
    text-align: center; 
}

.footer-bottom p { 
    margin-bottom: 18px;
}

.social-icons-bottom { 
    display: flex; 
    justify-content: center; 
    gap: 25px;
}

.social-icons-bottom a { 
    color: var(--primary-color); 
    font-size: 1.3rem;
    transition: 0.3s; 
}

.social-icons-bottom a:hover { 
    color: var(--accent-color); 
    transform: scale(1.1);
}

/* RESPONSIVE FOOTER */
@media (max-width: 1200px) { 
    .footer-grid { 
        grid-template-columns: repeat(3, 1fr); 
        gap: 35px;
    }
    
    .site-footer {
        padding: 60px 0;
        min-height: 400px;
    }
}

@media (max-width: 768px) { 
    .footer-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 40px;
    } 
    
    .footer-col p { 
        justify-content: center; 
    } 
    
    .partners-flex { 
        gap: 50px; 
        flex-direction: column; 
    }
    
    .site-footer {
        padding: 60px 0 40px;
        min-height: auto;
        background-attachment: scroll;
    }
}

/* --- 9. ULEPŠAVANJE VESTI I GALERIJE --- */
.single .entry-content { margin-bottom: 80px; }
.gallery { display: flex; flex-wrap: wrap; gap: 15px; margin: 30px 0; justify-content: center; }
.gallery-item { display: inline-block; vertical-align: top; text-align: center; width: calc(33.333% - 15px); margin: 0 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: transform 0.2s; }
.gallery-item:hover { transform: scale(1.02); z-index: 5; }
.gallery-icon img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; }
@media (max-width: 768px) { .gallery-item { width: calc(50% - 10px); } }

/* === STRANICA O ŠKOLI === */
.page-hero h1 {
    animation: fadeInUp 0.8s ease-out;
}

.school-card {
    display: grid;
    grid-template-columns: 80px 1fr 400px;
    gap: 40px;
    align-items: start;
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.school-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.school-card-reverse {
    grid-template-columns: 400px 80px 1fr;
}

.school-card-reverse .school-card-image {
    order: -2;
}

.school-card-reverse .school-card-icon {
    order: -1;
}

.school-card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #004d7a);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
}

.school-card-icon i {
    font-size: 2.5rem;
    color: white;
}

.school-card-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.school-card-content > p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.7;
}

.school-card-content ul {
    list-style: none;
    margin-bottom: 25px;
}

.school-card-content ul li {
    padding: 10px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #444;
    line-height: 1.6;
    font-size: 0.95rem;
}

.school-card-content ul li i {
    color: var(--accent-color);
    margin-top: 3px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.school-card-link {
    display: inline-block;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.3s;
}

.school-card-link:hover {
    color: var(--accent-color-dark);
    text-decoration: underline;
}

.school-card-image {
    width: 400px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.school-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.school-card:hover .school-card-image img {
    transform: scale(1.05);
}

.cta-section h2 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.cta-section .btn:hover {
    background: #f0f0f0 !important;
    transform: translateY(-2px);
}

@media (max-width: 1200px) {
    .school-card,
    .school-card-reverse {
        grid-template-columns: 70px 1fr 350px;
        gap: 30px;
        padding: 40px;
    }
    
    .school-card-reverse {
        grid-template-columns: 350px 70px 1fr;
    }
    
    .school-card-image {
        width: 350px;
        height: 260px;
    }
    
    .school-card-icon {
        width: 70px;
        height: 70px;
    }
    
    .school-card-icon i {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .school-card,
    .school-card-reverse {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 35px;
    }
    
    .school-card-reverse .school-card-image {
        order: 0;
    }
    
    .school-card-reverse .school-card-icon {
        order: 0;
    }
    
    .school-card-icon {
        margin: 0 auto;
    }
    
    .school-card-image {
        width: 100%;
        height: 300px;
        margin: 0 auto;
    }
    
    .school-card-content {
        text-align: center;
    }
    
    .school-card-content ul li {
        justify-content: center;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .page-hero p {
        font-size: 1rem;
    }
    
    .school-card {
        padding: 25px;
    }
    
    .school-card-content h2 {
        font-size: 1.5rem;
    }
    
    .school-card-image {
        height: 250px;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === STRANICA ISTORIJAT === */
.istorijat-intro {
    position: relative;
}

.istorijat-intro::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
}

.timeline-wrapper {
    display: grid;
    grid-template-columns: 1fr 140px 1fr;
    gap: 0;
    margin-bottom: 60px;
    position: relative;
    align-items: start;
}

.timeline-section {
    position: relative;
}

.timeline-section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 180px;
    bottom: 80px;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-center {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}

.timeline-dot {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), #004d7a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.4);
    position: relative;
    z-index: 2;
    border: 6px solid var(--gray-bg);
}

.timeline-dot i {
    font-size: 2.2rem;
    color: white;
}

.timeline-year-left {
    text-align: right;
    padding-right: 30px;
    padding-top: 25px;
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.15;
    line-height: 1;
}

.timeline-year-right {
    text-align: left;
    padding-left: 30px;
    padding-top: 25px;
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.15;
    line-height: 1;
}

.timeline-box-right {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-left: 20px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-box-right::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 35px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid white;
}

.timeline-box-left {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-right: 20px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-box-left::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 35px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid white;
}

.timeline-box-right:hover,
.timeline-box-left:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.timeline-box-right h3,
.timeline-box-left h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.timeline-box-right p,
.timeline-box-left p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
    text-align: justify;
}

.timeline-box-right p:last-of-type,
.timeline-box-left p:last-of-type {
    margin-bottom: 0;
}

.timeline-box-right strong,
.timeline-box-left strong {
    color: var(--accent-color);
}

.timeline-image {
    margin-top: 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timeline-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.timeline-box-right:hover .timeline-image img,
.timeline-box-left:hover .timeline-image img {
    transform: scale(1.05);
}

/* === TABLET LANDSCAPE — manje kolone, ista 3-kolona logika === */
@media (max-width: 1200px) {
    .timeline-wrapper {
        grid-template-columns: minmax(0, 0.8fr) 110px minmax(0, 1fr);
    }
    .timeline-reverse {
        grid-template-columns: minmax(0, 1fr) 110px minmax(0, 0.8fr);
    }
    .timeline-year-left,
    .timeline-year-right {
        font-size: 3rem;
    }
    .timeline-dot {
        width: 80px;
        height: 80px;
    }
    .timeline-dot i {
        font-size: 2rem;
    }
    .timeline-box-right,
    .timeline-box-left {
        padding: 30px;
    }
}

/* === TABLET PORTRAIT ≤992px — block layout, dot i year apsolutno === */
@media (max-width: 992px) {
    .timeline-section::before { display: none; }
    .timeline-section > div  { padding: 0 15px !important; }

    .timeline-wrapper,
    .timeline-reverse {
        display: block;
        position: relative;
        padding-top: 10px;
        margin-bottom: 30px;
    }

    /* Vertikalna linija od dna dota do sledeceg dota */
    .timeline-wrapper::after,
    .timeline-reverse::after {
        content: '';
        position: absolute;
        left: 27px;    /* centar 54px dota */
        top: 64px;     /* 10px padding + 54px dot */
        bottom: -30px;
        width: 2px;
        background: var(--primary-color);
        opacity: 0.18;
        z-index: 0;
    }
    .timeline-wrapper:last-of-type::after,
    .timeline-reverse:last-of-type::after { display: none; }

    /* Dot — apsolutno levo */
    .timeline-center {
        position: absolute !important;
        left: 0;
        top: 10px;
        padding-top: 0;
        width: 54px;
        z-index: 1;
    }
    .timeline-dot { width: 54px; height: 54px; border-width: 4px; }
    .timeline-dot i { font-size: 1.3rem; }

    /* Year badge — apsolutno, iznad sadrzaja boxa, uz levu ivicu boxa */
    .timeline-year-left,
    .timeline-year-right {
        display: inline-block !important;
        position: absolute;
        left: 65px;
        top: 12px;
        font-size: 0.78rem;
        font-weight: 800;
        color: white;
        background: var(--primary-color);
        border-radius: 6px;
        padding: 3px 8px;
        line-height: 1.25;
        letter-spacing: 0.3px;
        z-index: 2;
        white-space: nowrap;
    }

    /* Box — puna sirina minus prostor za dot */
    .timeline-box-right,
    .timeline-box-left {
        display: block;
        margin-left: 65px !important;
        margin-right: 0   !important;
        padding: 32px 18px 20px; /* top prostor za year badge */
        border-radius: 12px;
        position: relative;
        z-index: 1;
    }
    .timeline-box-right::before,
    .timeline-box-left::before { display: none; }

    .timeline-box-right h3,
    .timeline-box-left h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    .timeline-box-right p,
    .timeline-box-left p {
        font-size: 0.93rem;
        line-height: 1.7;
        text-align: left;
    }
}

/* === MOBILE TIMELINE: icon and year above the full-width card === */
@media (max-width: 768px) {
    .timeline-section > div { padding: 0 16px !important; }
    .timeline-wrapper,
    .timeline-reverse {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 14px;
        align-items: center;
        padding-top: 0;
        margin-bottom: 28px;
    }
    .timeline-wrapper::after,
    .timeline-reverse::after {
        left: 32px;
        top: 64px;
        bottom: -28px;
    }
    .timeline-center {
        grid-column: 1;
        grid-row: 1;
        position: static !important;
        width: 64px;
        padding: 0;
    }
    .timeline-dot { width: 64px; height: 64px; border-width: 4px; }
    .timeline-dot i { font-size: 1.6rem; }
    .timeline-year-left,
    .timeline-year-right {
        grid-column: 2;
        grid-row: 1;
        position: static;
        min-width: 0;
        padding: 0;
        font-size: clamp(1.5rem, 6vw, 2rem);
        line-height: 1.2;
        text-align: left;
        color: var(--primary-color);
        background: transparent;
        opacity: 1;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .timeline-box-right,
    .timeline-box-left {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
        margin: 0 !important;
        padding: 22px 20px;
        border-radius: 12px;
        overflow-wrap: anywhere;
    }
    .timeline-box-right h3,
    .timeline-box-left h3 { font-size: 1.25rem; margin-bottom: 12px; }
    .timeline-box-right p,
    .timeline-box-left p { font-size: 1rem; line-height: 1.7; }
    .istorijat-hero h1 { font-size: 2rem !important; }
    .istorijat-hero p { font-size: 1rem !important; }
    .page-hero h1 { font-size: 2rem; }
    .page-hero p { font-size: 1rem; }
}

@media (max-width: 480px) {
    .istorijat-hero h1 { font-size: 1.6rem !important; }
    .istorijat-hero p { font-size: 0.9rem !important; }
}

/* === STRANICA UPIS === */
.tabs-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-button {
    background: white;
    border: 3px solid #e0e0e0;
    padding: 20px 35px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.tab-button i {
    font-size: 2.5rem;
    color: #999;
    transition: 0.3s;
}

.tab-button span {
    font-size: 1rem;
    font-weight: 700;
    color: #555;
    transition: 0.3s;
    text-align: center;
}

.tab-button:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.tab-button:hover i {
    color: var(--primary-color);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary-color), #004d7a);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0,51,102,0.3);
}

.tab-button.active i,
.tab-button.active span {
    color: white;
}

.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-header {
    display: flex;
    align-items: center;
    gap: 25px;
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.tab-icon {
    width: 90px;
    height: 90px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tab-icon i {
    font-size: 3rem;
    color: white;
}

.tab-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.tab-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

.tab-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-box {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    border-left: 5px solid var(--primary-color);
}

.info-box-primary {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left-color: var(--info-color);
}

.info-box-highlight {
    background: #fff9e6;
    border-left-color: var(--warm-color);
}

.info-box h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-box h3 i {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.info-box h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.info-box p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.styled-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.styled-list li {
    padding: 12px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.styled-list li i {
    color: var(--accent-color);
    margin-top: 3px;
    font-size: 1rem;
    flex-shrink: 0;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 18px 25px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.download-btn:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.download-btn i {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.download-btn span {
    font-size: 0.95rem;
    line-height: 1.4;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

@media (max-width: 992px) {
    .tab-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 25px;
    }
    
    .tab-icon {
        width: 80px;
        height: 80px;
    }
    
    .tab-icon i {
        font-size: 2.5rem;
    }
    
    .tab-header h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .tabs-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .tab-button {
        min-width: 100%;
        flex-direction: row;
        justify-content: center;
        padding: 15px 25px;
    }
    
    .tab-button i {
        font-size: 2rem;
    }
    
    .tab-button span {
        font-size: 0.95rem;
    }
    
    .info-box {
        padding: 25px 20px;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .download-btn {
        padding: 15px 20px;
    }
}

/* === STRANICA KONTAKT === */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.contact-card-main {
    grid-column: span 1;
}

@media (min-width: 1200px) {
    .contact-card-main {
        grid-column: span 2;
    }
}

.contact-card-header {
    padding: 30px;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.contact-card-header i {
    font-size: 3rem;
    opacity: 0.9;
}

.contact-card-header h3 {
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.4;
    font-weight: 700;
}

.contact-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    line-height: 1.6;
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 3px;
    flex-shrink: 0;
    width: 20px;
}

.contact-item span,
.contact-item a {
    font-size: 0.95rem;
    color: #555;
    text-decoration: none;
    transition: 0.3s;
}

.contact-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact-map-section {
    position: relative;
    scroll-margin-top: 90px; /* ispod sticky headera pri skrolu na mapu */
}

.contact-map-wrapper {
    width: 100%;
    height: 500px;
    position: relative;
}

.contact-map-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.map-info-box {
    /* Desno, da ne prekriva Google-ovu karticu mesta (gore levo u iframe-u) */
    position: absolute;
    top: 30px;
    right: 30px;
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    max-width: 400px;
    z-index: 10;
}

.map-info-box h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-info-box h3 i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.map-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.map-info-box ul li {
    border-bottom: 1px solid #f0f0f0;
}

.map-info-box ul li a {
    padding: 10px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

.map-info-box ul li a:hover,
.map-info-box ul li a.is-active {
    color: var(--primary-color);
}

.map-info-box ul li a.is-active {
    font-weight: 600;
}

.map-info-box ul li:last-child {
    border-bottom: none;
}

.map-info-box ul li i {
    color: var(--accent-color);
    margin-top: 3px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.cta-section .btn {
    font-size: 1.1rem;
    padding: 15px 40px;
}

.cta-section .btn:hover {
    background: #f0f0f0 !important;
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .contact-card-main {
        grid-column: span 1;
    }
    
    .map-info-box {
        position: static;
        max-width: 100%;
        margin: 20px;
        border-radius: 0;
    }
    
    .contact-map-wrapper {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-card-header {
        padding: 25px 20px;
    }
    
    .contact-card-header i {
        font-size: 2.5rem;
    }
    
    .contact-card-header h3 {
        font-size: 1.2rem;
    }
    
    .contact-card-body {
        padding: 25px 20px;
        gap: 18px;
    }
    
    .map-info-box {
        padding: 20px;
        margin: 15px;
    }
    
    .map-info-box h3 {
        font-size: 1.1rem;
    }
    
    .map-info-box ul li a {
        font-size: 0.9rem;
    }
    
    .contact-map-wrapper {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .contact-item {
        gap: 12px;
    }
    
    .contact-item span,
    .contact-item a {
        font-size: 0.9rem;
    }
}

/* === STRANICA DOKUMENTI === */
.doc-section {
    margin-bottom: 60px;
}

.doc-section-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 35px;
}

.doc-section-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.doc-section-icon i {
    font-size: 2rem;
    color: white;
}

.doc-section-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.doc-item {
    background: white;
    padding: 20px 25px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.doc-item:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.doc-item > i:first-child {
    font-size: 2rem;
    color: #e74c3c;
    flex-shrink: 0;
    transition: 0.3s;
}

.doc-item:hover > i:first-child {
    color: white;
}

.doc-item span {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1;
}

.doc-download-icon {
    font-size: 1.2rem;
    color: #999;
    opacity: 0;
    transition: 0.3s;
}

.doc-item:hover .doc-download-icon {
    opacity: 1;
    color: white;
}

.doc-item-current {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f1f8f4, #e8f5e9);
}

.doc-item-current:hover {
    background: #4caf50;
}

.doc-badge {
    background: #4caf50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-item-current:hover .doc-badge {
    background: white;
    color: #4caf50;
}

.doc-archive-wrapper {
    grid-column: 1 / -1;
    margin-top: 20px;
}

.doc-page-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.doc-page-nav a { padding: 10px 18px; border: 1px solid var(--primary-color); border-radius: 8px; color: var(--primary-color); background: white; }
.doc-page-nav a:hover, .doc-page-nav a:focus-visible { color: white; background: var(--primary-color); }
.doc-history > p { line-height: 1.8; margin-bottom: 16px; }
.doc-history-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 30px; }
.doc-history-category { min-width: 0; }
.doc-history-category h3 { color: var(--primary-color); margin-bottom: 20px; font-size: 1.25rem; }
.doc-history-year { margin-bottom: 12px; border: 1px solid #dce3eb; border-radius: 8px; background: white; overflow: hidden; }
.doc-history-year summary { padding: 16px 20px; color: var(--primary-color); font-weight: 700; cursor: pointer; }
.doc-history-year summary:focus-visible { outline: 3px solid var(--accent-color); outline-offset: -3px; }
.doc-history-year[open] summary { background: var(--gray-bg); border-bottom: 1px solid #dce3eb; }
.doc-archive-list { list-style: none; padding: 0; margin: 0; }
.doc-archive-list li + li { border-top: 1px solid #edf0f4; }
.doc-archive-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; color: var(--primary-color); line-height: 1.6; overflow-wrap: anywhere; }
.doc-archive-list a:hover, .doc-archive-list a:focus-visible { background: var(--gray-bg); text-decoration: underline; }
.doc-file-type { flex-shrink: 0; font-size: .75rem; font-weight: 700; color: var(--accent-color); }
.doc-item-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.doc-item-copy small { font-size: .85rem; font-weight: 400; line-height: 1.6; color: var(--text-color); }
.doc-item-copy .doc-program-format { font-weight: 700; color: var(--primary-color); }
.institution-vision { padding: 56px 0; background: white; border-top: 1px solid #e1e7ee; }
.institution-vision .container { max-width: 1100px; }
.institution-vision-eyebrow { margin: 0 0 12px; color: var(--accent-color); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.institution-vision h2 { margin: 0 0 20px; color: var(--primary-color); font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.35; }
.institution-vision-text { max-width: 900px; line-height: 1.85; color: var(--text-color); }
.institution-vision-text p { margin: 0 0 20px; }
.institution-vision-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; margin: 32px 0; }
.institution-vision-topics h3 { margin: 0 0 12px; color: var(--primary-color); font-size: 1.15rem; line-height: 1.5; }
.institution-vision-topics p { margin: 0; color: var(--text-color); line-height: 1.8; }
.institution-vision-link { display: inline-block; color: var(--primary-color); font-weight: 700; line-height: 1.6; text-underline-offset: 4px; }
.institution-vision-link:hover, .institution-vision-link:focus-visible { text-decoration: underline; }
@media (max-width: 640px) { .institution-vision { padding: 40px 0; } .institution-vision-topics { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.doc-history-files > p { margin: 12px 20px; line-height: 1.7; }
@media (max-width: 768px) { .doc-history-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.doc-archive-toggle {
    width: 100%;
    background: white;
    border: 2px solid #e0e0e0;
    padding: 18px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: 0.3s;
}

.doc-archive-toggle:hover {
    border-color: var(--primary-color);
    background: #f5f5f5;
}

.doc-archive-toggle i:first-child {
    color: var(--accent-color);
    font-size: 1.3rem;
}

.doc-archive-toggle i:last-child {
    transition: 0.3s;
}

.doc-archive-toggle.active i:last-child {
    transform: rotate(180deg);
}

.doc-archive-content {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
}

.doc-archive-content.active {
    display: grid;
}

.doc-item-small {
    padding: 15px 20px;
    font-size: 0.9rem;
}

.doc-item-small > i:first-child {
    font-size: 1.5rem;
}

.doc-info-section i.fa-info-circle {
    display: block;
}

@media (max-width: 768px) {
    .doc-section-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .doc-section-icon {
        width: 60px;
        height: 60px;
    }
    
    .doc-section-icon i {
        font-size: 1.8rem;
    }
    
    .doc-section-header h2 {
        font-size: 1.6rem;
    }
    
    .doc-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-archive-content {
        grid-template-columns: 1fr;
    }
    
    .doc-item {
        padding: 18px 20px;
    }
    
    .doc-item span {
        font-size: 0.9rem;
    }
}

/* === VESTI / ARCHIVE PAGE === */
.page-hero-vesti {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004d7a 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
}

.page-hero-vesti h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-hero-vesti p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.news-archive-section {
    padding: 80px 0;
    background: var(--gray-bg);
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.featured-post-image {
    position: relative;
    overflow: hidden;
    height: 400px;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post:hover .featured-post-image img {
    transform: scale(1.05);
}

.featured-post-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-content h2 {
    font-size: 2rem;
    margin: 15px 0 20px;
    line-height: 1.3;
}

.featured-post-content h2 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-post-content h2 a:hover {
    color: var(--accent-color);
}

.featured-excerpt {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.news-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f0f0f0;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.news-date i {
    margin-right: 5px;
}

.news-card-content h3 {
    font-size: 1.3rem;
    margin: 0 0 15px;
    line-height: 1.4;
}

.news-card-content h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card-content h3 a:hover {
    color: var(--accent-color);
}

.news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.read-more-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.read-more-link:hover {
    color: var(--accent-color);
}

.no-posts {
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 15px;
}

.no-posts h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.no-posts p {
    color: #777;
    font-size: 1.1rem;
}

.pagination-wrapper {
    margin-top: 60px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 12px 20px;
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pagination .page-numbers:hover {
    background: var(--primary-color);
    color: white;
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .prev,
.pagination .next {
    background: var(--accent-color);
    color: white;
}

.pagination .prev:hover,
.pagination .next:hover {
    background: #c0392b;
}

@media (max-width: 968px) {
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-post-image {
        height: 300px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 600px) {
    .page-hero-vesti h1 {
        font-size: 2rem;
    }

    .featured-post-content {
        padding: 25px;
    }

    .featured-post-content h2 {
        font-size: 1.5rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-card-image {
        height: 200px;
    }
}

/* === FIX - Razmak od ivice za mobilni meni === */
@media (max-width: 992px) {
    .main-navigation > ul > li > a {
        padding-left: 20px;
    }
    
    .main-navigation ul ul a {
        padding-left: 35px;
    }
    
    .main-navigation ul ul ul a {
        padding-left: 50px;
    }
}
/* =============================================
   AUTO-HIDE HEADER - Sve rezolucije
   ============================================= */

/* Sakriven header (skrolovanje dole) */
.site-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none !important;
}

/* === LANDSCAPE MODE NA MOBILNIM UREĐAJIMA === */
@media screen and (max-width: 992px) and (orientation: landscape) and (max-height: 500px) {

    .site-header {
        padding: 5px 0;
    }

    .site-header .header-container {
        height: 55px;
        padding: 5px 15px;
    }

    .site-header .header-logo {
        height: 40px;
    }

    .site-header .org-name {
        font-size: 0.85rem;
    }

    .site-header .org-desc {
        display: none;
    }

    .site-header .menu-toggle {
        width: 38px;
        height: 38px;
    }

    .site-header .lang-flags img {
        height: 24px !important;
    }

    .main-navigation.toggled {
        max-height: 60vh;
        overflow-y: auto;
    }

    .main-navigation > ul > li > a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .main-navigation ul ul a {
        padding: 8px 35px;
        font-size: 0.85rem;
    }

    .hero,
    .hero-slideshow {
        min-height: 300px;
        padding: 60px 0 80px;
    }

    .hero h1,
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero p,
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .page-hero,
    .istorijat-hero {
        min-height: 250px;
        padding: 50px 0;
    }

    .page-hero h1 {
        font-size: 1.8rem;
    }

    .quick-links .container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .card {
        min-height: 200px;
        padding: 15px;
    }

    .card-icon {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .card h3 {
        font-size: 1rem;
    }

    .card p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
}

/* === SMOOTH SCROLL PADDING === */
html {
    scroll-padding-top: 100px;
}

@media screen and (max-width: 992px) and (orientation: landscape) and (max-height: 500px) {
    html {
        scroll-padding-top: 60px;
    }
}

/* =============================================
   FOOTER FIXES - Landscape & Mobile
   ============================================= */

/* Footer ostaje u svom području */
.site-footer {
    position: relative;
    overflow: hidden; /* Sprečava izlazak sadržaja */
    background-attachment: scroll; /* Bolje za mobilne */
}

/* Footer grid - responsive */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        text-align: center;
    }
    
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-col p {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Peti element (ako postoji) - centriraj */
    .footer-col:nth-child(5) {
        grid-column: 1 / -1;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-col:nth-child(5) {
        max-width: 100%;
    }
}

/* Landscape mode footer */
@media screen and (max-width: 992px) and (orientation: landscape) {
    .site-footer {
        padding: 40px 0;
        min-height: auto;
        background-attachment: scroll;
    }
    
    .footer-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
        font-size: 0.7rem;
    }
    
    .footer-col h4 {
        font-size: 0.75rem;
        margin-bottom: 15px;
    }
    
    .footer-col p {
        font-size: 0.7rem;
        margin-bottom: 6px;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .footer-col i {
        font-size: 0.85rem;
        min-width: 14px;
    }
    
    /* Svi footer stubovi centrirani */
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Telefon landscape - footer u 2 ili 3 reda */
@media screen and (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .site-footer {
        padding: 30px 0;
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* Četvrti i peti element u drugom redu - CENTRIRANI */
    .footer-col:nth-child(4),
    .footer-col:nth-child(5) {
        grid-column: auto;
    }
    
    /* Ako ima 5 elemenata, poslednja dva centrirana */
    .footer-grid {
        justify-items: center;
    }
    
    .footer-col h4 {
        font-size: 0.7rem;
        margin-bottom: 10px;
    }
    
    .footer-col p {
        font-size: 0.65rem;
    }
}

/* Extra mali telefon landscape */
@media screen and (max-width: 600px) and (orientation: landscape) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-col:nth-child(5) {
        grid-column: 1 / -1;
    }
}
/* =============================================
   JEDINSTVENI STILOVI ZA ZASTAVICE
   ============================================= */

/* Osnovni stil za zastavice */
.lang-flags img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: height 0.2s ease;
}

/* Desktop */
@media (min-width: 993px) {
    .lang-flags img {
        height: 38px;
    }
}

/* Tablet (768px - 992px) */
@media (min-width: 577px) and (max-width: 992px) {
    .lang-flags img {
        height: 34px;
    }
}

/* Mali mobilni (do 576px) */
@media (max-width: 576px) {
    .lang-flags img {
        height: 30px;
    }
}

/* Ekstra mali mobilni (do 400px) */
@media (max-width: 400px) {
    .lang-flags img {
        height: 26px;
    }
}

/* Landscape mod na mobilnim */
@media screen and (max-width: 992px) and (orientation: landscape) and (max-height: 500px) {
    .lang-flags img {
        height: 28px;
    }
}
/* ══════════════════════════════════════════════════════════════════
   VESTI SISTEM — Magazinski Grid + Single Vest
   Dodaj na kraj style.css teme
   ══════════════════════════════════════════════════════════════════ */

/* ── PROMENLJIVE ── */
/* =========================================================
   COMPONENT TOKENS: NEWS SYSTEM (Vesti)
   ========================================================= */
:root {
    --vest-primary: #1a3a5c;
    --vest-accent:  #c9963b;
    --vest-light:   #f4f6f9;
    --vest-border:  #dde1e7;
    --vest-radius:  10px;
    --vest-shadow:  0 4px 20px rgba(0,0,0,0.08);
}

/* ══════════════════════════════════════════════════════════════════
   PAGE-VESTI: Magazinski grid
   ══════════════════════════════════════════════════════════════════ */

/* Hero header stranice */
.ntmm-vesti-hero {
    background: linear-gradient(135deg, var(--vest-primary) 0%, #0d2440 100%);
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.ntmm-vesti-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.ntmm-vesti-hero-inner { position: relative; z-index: 1; }

.ntmm-vesti-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.ntmm-vesti-hero p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin: 0;
}

/* Container */
.ntmm-vesti-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ── Kategorije filter ── */
.ntmm-vesti-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--vest-border);
}

.ntmm-kat-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--vest-border);
    background: #fff;
    color: var(--vest-primary) !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.ntmm-kat-btn:hover,
.ntmm-kat-btn.ntmm-kat-active {
    background: var(--vest-primary) !important;
    color: #fff !important;
    border-color: var(--vest-primary) !important;
}

/* ── Magazinski grid ── */
.ntmm-vesti-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

/* Featured karta zauzima 2 kolone */
.ntmm-vest-card.ntmm-vest-featured {
    grid-column: span 2;
}

/* Karta */
.ntmm-vest-card {
    background: #fff;
    border-radius: var(--vest-radius);
    overflow: hidden;
    box-shadow: var(--vest-shadow);
    border: 1px solid var(--vest-border);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.ntmm-vest-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.12);
}

/* Slika */
.ntmm-vest-img-wrap {
    display: block;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    background: var(--vest-light);
    flex-shrink: 0;
}

.ntmm-vest-featured .ntmm-vest-img-wrap {
    aspect-ratio: 16/8;
}

.ntmm-vest-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.ntmm-vest-card:hover .ntmm-vest-img-wrap img {
    transform: scale(1.04);
}

.ntmm-vest-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, #e8eef5, #d0dae6);
}

/* Badge */
.ntmm-vest-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    z-index: 1;
}

.ntmm-badge-video   { background: #e74c3c; color: #fff; }
.ntmm-badge-galerija { background: var(--vest-accent); color: #fff; }

/* Body */
.ntmm-vest-body {
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.ntmm-vest-kats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ntmm-vest-kat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--vest-accent) !important;
    text-decoration: none !important;
    border: 1px solid var(--vest-accent);
    padding: 2px 8px;
    border-radius: 3px;
    transition: all 0.15s;
}

.ntmm-vest-kat:hover {
    background: var(--vest-accent) !important;
    color: #fff !important;
}

.ntmm-vest-naslov {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--vest-primary);
}

.ntmm-vest-featured .ntmm-vest-naslov {
    font-size: 1.25rem;
}

.ntmm-vest-naslov a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.ntmm-vest-naslov a:hover { color: var(--vest-accent) !important; }

.ntmm-vest-opis {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.ntmm-vest-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--vest-border);
}

.ntmm-vest-datum {
    font-size: 12px;
    color: #999;
}

.ntmm-vest-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--vest-accent) !important;
    text-decoration: none !important;
    transition: letter-spacing 0.2s;
}

.ntmm-vest-link:hover { letter-spacing: 0.5px; }

/* Empty state */
.ntmm-vesti-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}
.ntmm-vesti-empty span { font-size: 4rem; display: block; margin-bottom: 16px; }

/* Paginacija */
.ntmm-vesti-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.ntmm-vesti-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1.5px solid var(--vest-border);
    color: var(--vest-primary) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.ntmm-vesti-pagination .page-numbers.current,
.ntmm-vesti-pagination .page-numbers:hover {
    background: var(--vest-primary) !important;
    color: #fff !important;
    border-color: var(--vest-primary) !important;
}

/* ══════════════════════════════════════════════════════════════════
   SINGLE-VEST: Pojedinačna vest
   ══════════════════════════════════════════════════════════════════ */

.ntmm-single-vest { background: var(--vest-light); min-height: 100vh; }

/* Hero */
.ntmm-single-hero {
    position: relative;
    min-height: 380px;
    background-color: var(--vest-primary);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.ntmm-single-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,20,40,0.92) 0%, rgba(10,20,40,0.4) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    width: 100%;
}

.ntmm-single-hero-content {
    padding: 40px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    color: #fff;
}

.ntmm-single-kats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ntmm-single-kat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--vest-accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
}

.ntmm-single-hero-content h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 16px;
}

.ntmm-single-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    opacity: 0.8;
    flex-wrap: wrap;
}

/* Container */
.ntmm-single-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.ntmm-single-body {
    background: #fff;
    border-radius: var(--vest-radius);
    box-shadow: var(--vest-shadow);
    padding: 40px;
}

/* Povratak link */
.ntmm-single-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vest-accent) !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 28px;
    transition: gap 0.2s;
}

.ntmm-single-back:hover { gap: 10px; }
.ntmm-single-back-bottom { margin-top: 36px; margin-bottom: 0; }

/* Sadržaj vesti */
.ntmm-single-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.ntmm-single-content h2,
.ntmm-single-content h3 {
    color: var(--vest-primary);
    margin-top: 1.8em;
}

.ntmm-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

.ntmm-single-content p { margin: 0 0 1.2em; }

/* ── Prilog: YouTube ── */
.ntmm-prilog {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--vest-border);
}

.ntmm-prilog-naslov {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vest-primary);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Video wrapper — responsive 16:9 */
.ntmm-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--vest-radius);
    background: #000;
    box-shadow: var(--vest-shadow);
}

.ntmm-video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Prilog: Galerija ── */
.ntmm-galerija-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.ntmm-gal-item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 1/1;
    background: var(--vest-light);
    cursor: zoom-in;
    transition: transform 0.2s;
}

.ntmm-gal-item:hover { transform: scale(1.03); }

.ntmm-gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.ntmm-gal-item:hover img { transform: scale(1.08); }

/* ── Lightbox ── */
.ntmm-lb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99998;
}

.ntmm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ntmm-lb-img-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ntmm-lb-img-wrap img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.ntmm-lb-close,
.ntmm-lb-prev,
.ntmm-lb-next {
    position: fixed;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 100000;
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

.ntmm-lb-close:hover,
.ntmm-lb-prev:hover,
.ntmm-lb-next:hover { background: rgba(255,255,255,0.3); }

.ntmm-lb-close { top: 20px; right: 20px; }
.ntmm-lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.ntmm-lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .ntmm-vesti-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ntmm-vest-card.ntmm-vest-featured {
        grid-column: span 2;
    }
    .ntmm-single-body { padding: 24px; }
}

@media (max-width: 600px) {
    .ntmm-vesti-grid {
        grid-template-columns: 1fr;
    }
    .ntmm-vest-card.ntmm-vest-featured {
        grid-column: span 1;
    }
    .ntmm-single-hero-content { padding: 24px; }
    .ntmm-galerija-grid { grid-template-columns: repeat(3, 1fr); }
    .ntmm-lb-prev { left: 8px; }
    .ntmm-lb-next { right: 8px; }
}

/* ══════════════════════════════════════════════════════════════════
   USTANOVE KARTICE — lokacijske stranice (budimpesta, deska, lovra…)
   ══════════════════════════════════════════════════════════════════ */

.ustanove-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.card-img {
    position: relative;
    height: 220px;
}

.card-img-media {
    height: 100%;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.card-badge--primary { background: var(--primary-color); }
.card-badge--accent  { background: var(--accent-color); }

.card-icon-badge {
    position: absolute;
    bottom: -25px;
    left: 25px;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 3px solid var(--gray-bg);
}

.card-icon-badge i { font-size: 1.8em; }

.card-body { padding: 40px 25px 25px; }

/* Utility: ikona sa desnim marginom */
.icon-mr { margin-right: 10px; }

/* Bijele info kartice (aktivnosti, tradicija, CTA blokovi) */
.info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    padding: 35px;
}
/* Kartica koja je ceo link (<a class="... block-link">) — ne mešati sa .card-link (tekstualni link u karticama) */
a.block-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
a.block-link:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}
a.info-card { transition: transform 0.3s, box-shadow 0.3s; }
a.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}
.info-card--center { text-align: center; }
.info-card--cta    { padding: 50px 40px; }

/* Nasa-skola kartice */
.nasa-skola-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.nasa-skola-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}
.nasa-skola-card-header {
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}
.nasa-skola-card-header i {
    font-size: 4em;
    margin-bottom: 15px;
    opacity: 0.9;
}
.nasa-skola-card-header h3 {
    color: white;
    font-size: 1.6em;
    margin: 0;
}
.nasa-skola-card-body {
    padding: 30px;
}
.nasa-skola-card-body p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}
.nasa-skola-card-link {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: bold;
}
.nasa-skola-card-link i {
    margin-left: 10px;
}

/* Boje kartica: --ns-from / --ns-to = gradijent zaglavlja, --ns-link = boja linka */
.nasa-skola-card--blue   { --ns-from: var(--primary-color); --ns-to: #004080; --ns-link: var(--primary-color); }
.nasa-skola-card--green  { --ns-from: #27ae60; --ns-to: #229954; --ns-link: #27ae60; }
.nasa-skola-card--orange { --ns-from: #e67e22; --ns-to: #d35400; --ns-link: #e67e22; }
.nasa-skola-card--purple { --ns-from: #9b59b6; --ns-to: #8e44ad; --ns-link: #9b59b6; }
.nasa-skola-card--sky    { --ns-from: #3498db; --ns-to: #2980b9; --ns-link: #3498db; }
.nasa-skola-card--warm   { --ns-from: var(--kids-color); --ns-to: var(--kids-dark); --ns-link: var(--kids-dark); }
.nasa-skola-card .nasa-skola-card-header {
    background: linear-gradient(135deg, var(--ns-from, var(--primary-color)), var(--ns-to, #004080));
}
.nasa-skola-card .nasa-skola-card-link { color: var(--ns-link, var(--primary-color)); }

/* Stranica „Наша школа" (page-nasa-skola.php) */
.hero.ns-hero {
    background: linear-gradient(135deg, var(--primary-color), #004080);
    padding: 100px 0 80px;
}
.hero.ns-hero h1 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.8em;
}
.hero.ns-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto;
}
.container.ns-main { padding: 40px 20px 80px; }
.ns-inner { max-width: 1200px; margin: 0 auto; }
.ns-intro { text-align: center; margin-bottom: 60px; }
.ns-intro .post-content { max-width: 800px; margin: 0 auto; }
.ns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Grupe po situacijama: naslov levo, kartice desno; na telefonu jedno ispod drugog */
.ns-groups { margin-bottom: 60px; }
.ns-group {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 30px 40px;
    align-items: start;
    padding: 40px 0;
    border-top: 1px solid #e3e8ef;
}
.ns-group:first-child { border-top: 0; padding-top: 0; }
.ns-group-intro h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin: 0 0 10px;
    text-align: left;
}
.ns-group-intro p {
    color: #666;
    line-height: 1.7;
    margin: 0;
}
.ns-group-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}
.ns-group .nasa-skola-card-header { height: auto; min-height: 120px; padding: 18px 15px; }
.ns-group .nasa-skola-card-header i { font-size: 2.6em; margin-bottom: 10px; }
.ns-group .nasa-skola-card-header h3 { font-size: 1.3em; padding: 0 15px; }
.ns-group .nasa-skola-card-body { padding: 22px 24px; }
.ns-group .nasa-skola-card-body p { margin-bottom: 14px; }
@media (max-width: 860px) {
    .ns-group { grid-template-columns: 1fr; gap: 18px; padding: 30px 0; }
}
.ns-help {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
}
.ns-help h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}
.ns-help h3 i { margin-right: 10px; }
.ns-help p {
    color: #666;
    line-height: 1.8;
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto 30px;
}
.ns-help-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.ns-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
}
.ns-btn--primary { background: var(--primary-color); }
.ns-btn--accent  { background: var(--accent-color); }

/* Uputstvo za urednika (vidljivo samo ulogovanima) */
.editor-hint {
    background: #e8f4f8;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px;
    border-radius: 8px;
}
.editor-hint h4 { color: var(--primary-color); margin-bottom: 10px; }
.editor-hint p  { color: #555; line-height: 1.6; }

/* Izdanje kartica (Гимназијалац arhiva) */
.izdanje-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.izdanje-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2) !important;
}
.izdanje-card:hover img {
    transform: scale(1.05);
}
.izdanje-card:hover .overlay {
    opacity: 1 !important;
}

/* Bela kartice sa sadržajem (tekst blokovi, liste) */
.content-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 3px 20px rgba(0,0,0,0.08);
}

/* Nastava po razredima: shared layout for Budapest, Deska and Lovra. */
.grade-section {
    background: var(--primary-color);
    color: white;
    padding: 50px 40px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 8px 25px rgba(0,51,102,0.2);
}
.grade-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}
.grade-card {
    min-width: 0;
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 8px;
    overflow-wrap: anywhere;
}
.school-content-grid > * { min-width: 0; }

@media (max-width: 768px) {
    .grade-section { padding: 30px 20px; }
    .grade-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .grade-card { padding: 20px; }
    .school-content-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Galerija slika */
.gallery-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.gallery-img img {
    width: 100%;
    object-fit: cover;
    display: block;
}

/* USTANOVE CARD — hover i animacije */
.ustanove-card {
    transition: all 0.3s ease;
}
.ustanove-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
}
.ustanove-card img {
    transition: transform 0.4s ease;
}
.ustanove-card:hover img {
    transform: scale(1.05);
}

@keyframes subtle-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}
.floating-icon {
    animation: subtle-float 4s ease-in-out infinite;
}

@media (max-width: 768px) {
    .grid-ustanove {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════════════
   TAB KOMPONENTA (.tab-btn / .tab-content) — zaposleni stranice
   ══════════════════════════════════════════════════════════════════ */

/* =========================================================
   COMPONENT: TABS (zaposleni stranice)
   ========================================================= */
.tab-btn {
    padding: 15px 25px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s, color 0.2s;
}
.tab-btn.active {
    background: var(--accent-color);
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Zaposleni kartice (shared employee-card template part) */
.employee-card {
    padding: 20px;
    border-radius: 8px;
}

.employee-card--primary {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.employee-card--secondary {
    background: var(--gray-bg);
}

.employee-card__inner {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.employee-card__avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.employee-card__content {
    flex: 1;
}

.employee-card__name {
    margin-bottom: 5px;
    font-size: 1em;
}

.employee-card__role {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .employee-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .employee-grid { grid-template-columns: 1fr; }
}

/* --- WARN BOX (žuta info kutija) --- */
.warn-box {
    background: #fff3cd;
    border-left: 4px solid var(--warm-color);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}
.warn-box h4 {
    color: var(--warm-dark);
    margin-bottom: 15px;
    font-size: 1.3em;
}
.warn-box p {
    color: var(--warm-dark);
    line-height: 1.8;
    font-size: 1.05em;
}
.warn-box i { color: var(--warm-dark); }

/* --- OBDANIŠTE — citat kartica i hero --- */
.kids-intro-card {
    background: linear-gradient(135deg, var(--primary-color), var(--kids-color));
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 8px 25px rgba(0,51,102,0.2);
    text-align: center;
}
.kids-intro-card p { color: white; }

/* Hero obdanišnih stranica — topli gradijent plava→narandžasta */
.hero-kids {
    background-image: linear-gradient(rgba(0,51,102,0.72), rgba(232,137,78,0.55)), var(--hero-img, none);
}

/* --- KARTICE USTANOVA (lokacijske stranice) --- */
.ustanove-card { transition: all 0.3s ease; }
.ustanove-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important; }
.ustanove-card img { transition: transform 0.4s ease; }
.ustanove-card:hover img { transform: scale(1.05); }

@keyframes subtle-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.floating-icon { animation: subtle-float 4s ease-in-out infinite; }

@media (max-width: 768px) {
    .grid-ustanove { grid-template-columns: 1fr !important; }
    .grid-info { grid-template-columns: 1fr !important; }
}

/* --- HERO SLIDESHOW (front-page) --- */
.hero-slideshow {
    position: relative;
    min-height: 600px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: none;
}

.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,20,40,0.25) 0%, rgba(0,20,40,0.45) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-content .btn-hero {
    animation: fadeInUp 1s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 12px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot:hover,
.hero-dot.active {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .hero-slideshow {
        min-height: 500px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
}

/* --- SINGLE POST (single.php) --- */
.post-content p              { margin-bottom: 1.5em; }
.post-content h2             { color: var(--primary-color); margin-top: 2em; margin-bottom: 1em; font-size: 1.8em; }
.post-content h3             { color: var(--primary-color); margin-top: 1.5em; margin-bottom: 0.8em; font-size: 1.4em; }
.post-content img            { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; }
.post-content ul,
.post-content ol             { margin: 1.5em 0; padding-left: 2em; }
.post-content li             { margin-bottom: 0.5em; }
.post-content .post-image img { display: block; margin: 30px auto; border-radius: 10px; }
.post-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin: 40px 0; }
.post-gallery .gallery-thumb { margin: 0; border-radius: 0; }
.post-video { position: relative; aspect-ratio: 16/9; margin: 40px 0; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.post-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery-thumb-link { aspect-ratio: 1/1; display: block; overflow: hidden; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.gallery-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-gallery a:hover .gallery-thumb { transform: scale(1.05); }
.post-gallery a:hover .zoom-icon     { opacity: 1 !important; }
.post-back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-color); text-decoration: none; font-weight: 600; font-size: 1.1em; transition: opacity 0.3s; }
.post-back-link:hover { opacity: 0.7; }

/* GLightbox overrides */
.gclose, .gnext, .gprev {
    background: rgba(0,51,102,0.9) !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.gclose { top: 20px !important; right: 20px !important; }
.gnext  { right: 20px !important; }
.gprev  { left: 20px !important; }
.gclose:hover, .gnext:hover, .gprev:hover { background: var(--primary-color) !important; transform: scale(1.1); }
.gclose svg, .gnext svg, .gprev svg { fill: white !important; width: 24px !important; height: 24px !important; }

/* --- HOVER EFEKTI ZA KARTICE VESTI --- */
.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
}
.post-card:hover .post-thumb { transform: scale(1.05); }

/* =============================================
   GLOBALNA PAGINACIJA (UNIVERZALNI RESPONZIVNI STIL)
   ============================================= */
ul.page-numbers, .pagination {
    display: flex !important;
    flex-wrap: wrap !important; /* KLJUČNO ZA MOBILNI */
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 40px 0;
    gap: 6px;
}

ul.page-numbers li, .pagination li {
    display: inline-block;
    margin: 0;
}

ul.page-numbers li a, 
ul.page-numbers li span.page-numbers,
.pagination .page-numbers {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 36px; /* MANJI KVADRATI */
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Stil za trenutnu aktivnu stranicu */
ul.page-numbers li span.current,
.pagination .page-numbers.current {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(0,51,102,0.2);
}

/* Hover efekat */
ul.page-numbers li a:hover,
.pagination .page-numbers:hover {
    background: #f4f4f4 !important;
    border-color: #bbb !important;
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* Tri tačkice za preskakanje stranica */
ul.page-numbers .dots {
    border: none !important;
    background: transparent !important;
    color: #999 !important;
    box-shadow: none !important;
}

/* Za veoma male ekrane (poput starih telefona) */
@media (max-width: 480px) {
    ul.page-numbers li a,
    ul.page-numbers li span.page-numbers,
    .pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* --- FRONT-PAGE: UPIS SEKCIJA --- */
.front-upis-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 80px 0;
    color: white;
}

.front-upis-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.front-upis-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: white;
}

.front-upis-content > p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 35px;
    opacity: 0.9;
}

.front-upis-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 40px;
}

.front-upis-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.front-upis-feature i {
    font-size: 1.4rem;
    color: var(--warm-color);
    flex-shrink: 0;
}

.front-upis-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 30px;
}

@media (max-width: 900px) {
    .front-upis-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .front-upis-features {
        grid-template-columns: 1fr 1fr;
    }

    .front-upis-visual {
        padding-top: 40px;
    }
}

@media (max-width: 480px) {
    .front-upis-section {
        padding: 60px 0;
    }

    .front-upis-content h2 {
        font-size: 1.9rem;
    }

    .front-upis-features {
        grid-template-columns: 1fr;
    }
}

/* --- FRONT-PAGE: VESTI SEKCIJA --- */
.front-news-section {
    background: var(--gray-bg);
    padding: 80px 0;
}

.front-news-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.front-news-footer {
    text-align: center;
    margin-top: 50px;
}

@media (max-width: 768px) {
    .front-news-section {
        padding: 60px 0;
    }

    .front-news-header {
        justify-content: center;
        text-align: center;
    }
}

/* =============================================
   MODERAN DIZAJN V2 — Scroll efekti, animacije,
   statistike, back-to-top, poboljšane kartice
   ============================================= */

/* --- Smooth scroll za celu stranicu --- */
html {
    scroll-behavior: smooth;
}

/* =============================================
   MODERAN BELI HEADER — usklađen sa logom
   ============================================= */

/* Gradijentni border na vrhu (plava → crvena, kao srpska zastava + logo) */
.site-header {
    background: #ffffff;
    border-top: none !important;
    box-shadow: 0 2px 16px rgba(0, 30, 80, 0.09);
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
    will-change: transform;
}

/* Gradijentna linija na vrhu */
.site-header::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        var(--primary-light) 40%,
        var(--accent-color) 100%
    );
    z-index: 1;
}

/* Blaga senka pri scrollu — samo shadow, bez promene veličine */
.site-header.scrolled {
    box-shadow: 0 4px 28px rgba(0, 30, 80, 0.14);
}

/* Header kontejner (logika je u header-container) */
.header-container {
    position: relative;
}

/* Logo tekst boje — usklađene sa logom */
.org-name {
    color: var(--primary-color) !important;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.org-desc {
    color: var(--primary-color) !important;
    opacity: 0.72;
    font-size: 0.82rem;
}

/* =============================================
   HOVER UNDERLINE — klizeći efekat (::before)
   ::after ostaje slobodan za dropdown strelicu
   ============================================= */

@media (min-width: 993px) {
    .main-navigation > ul > li > a {
        color: var(--primary-color);
        font-weight: 700;
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        padding: 8px 0 10px;
        position: relative;
    }

    /* Klizeća crtica koristi ::before */
    .main-navigation > ul > li > a::before {
        content: '';
        position: absolute;
        bottom: 2px;
        left: 50%;
        right: 50%;
        height: 2px;
        background: var(--accent-color);
        border-radius: 2px;
        transition: left 0.3s ease, right 0.3s ease;
    }

    .main-navigation > ul > li > a:hover::before,
    .main-navigation > ul > li.current-menu-item > a::before,
    .main-navigation > ul > li.current-menu-ancestor > a::before {
        left: 0;
        right: 0;
    }

    /* Hover i aktivna boja linka */
    .main-navigation > ul > li > a:hover,
    .main-navigation > ul > li.current-menu-item > a,
    .main-navigation > ul > li.current-menu-ancestor > a {
        color: var(--accent-color);
    }
}

/* =============================================
   LOGO WRAPPER — poboljšan
   ============================================= */
.logo-wrapper .logo-link {
    gap: 14px;
    padding: 6px 0;
}

.header-logo {
    height: 68px;
    /* Logo nema providnu pozadinu — bez senke (ocrtavala bi pravougaonik),
       multiply stapa belu/skoro belu pozadinu slike sa headerom */
    mix-blend-mode: multiply;
    transition: transform 0.3s;
}

.logo-link:hover .header-logo {
    transform: scale(1.03);
}

.header-text {
    border-left: 2px solid rgba(0, 51, 102, 0.15);
    padding-left: 14px;
}

/* =============================================
   JEZIČKE ZASTAVICE — rafinirane
   ============================================= */
.lang-flags ul {
    gap: 8px;
}

.lang-flags li a {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.lang-flags li a:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


/* --- Hero poboljšanja --- */
.hero-slideshow {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(0, 20, 50, 0.72) 0%,
        rgba(0, 30, 70, 0.55) 50%,
        rgba(140, 20, 20, 0.3) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 140px 0 120px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    animation: heroFadeUp 1s ease-out 0.2s both;
}

.hero-content p {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.92);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
    animation: heroFadeUp 1s ease-out 0.45s both;
}

.hero-content .btn-hero {
    animation: heroFadeUp 1s ease-out 0.65s both;
    padding: 16px 44px;
    font-size: 1.05rem;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
    position: relative;
    overflow: hidden;
}

.hero-content .btn-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.hero-content .btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.hero-content .btn-hero:hover::before {
    opacity: 1;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-down strelica */
.hero-scroll-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    color: rgba(255,255,255,0.75);
    font-size: 1.8rem;
    animation: bounceArrow 2s ease-in-out infinite;
    cursor: pointer;
    transition: color 0.3s;
}

.hero-scroll-arrow:hover {
    color: white;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* Hero wave divider */
.hero-wave {
    position: relative;
    z-index: 3;
    margin-top: -2px;
    line-height: 0;
}

.hero-wave svg {
    display: block;
    width: 100%;
}

/* Slideshow dots - poboljšane */
.hero-indicators {
    position: absolute;
    bottom: 25px;
    right: 40px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    border: 2px solid rgba(255,255,255,0.6);
}

.hero-dot.active {
    background: white;
    transform: scale(1.3);
}

/* Hero controls remain usable with keyboard and touch. */
.hero-indicators { align-items: center; }
button.hero-dot {
    width: 28px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: grid;
    place-items: center;
}
button.hero-dot::before {
    content: '';
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
}
button.hero-dot.active { background: transparent; transform: none; }
button.hero-dot.active::before { background: white; }
.hero-pause {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    color: white;
    cursor: pointer;
}
.hero-dot:focus-visible, .hero-pause:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}
.front-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 30px;
}
.front-news-grid > * { min-width: 0; overflow-wrap: anywhere; }
.stats-source { text-align: center; color: white; margin-top: 24px; font-size: 0.85rem; }
.stats-source a { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide, .hero-content, .hero-content h1, .hero-content p,
    .hero-content .btn-hero, .hero-scroll-arrow, .js-reveal .reveal {
        animation: none !important;
        transition: none !important;
    }
    .js-reveal .reveal { opacity: 1; transform: none; }
}

/* --- Stats/Statistike sekcija --- */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004d99 60%, #003366 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.stats-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(192,57,43,0.12);
    border-radius: 50%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    color: white;
    padding: 20px 15px;
}

.stat-item + .stat-item {
    border-left: 1px solid rgba(255,255,255,0.15);
}

.stat-number {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
    color: white;
    letter-spacing: -1px;
}

.stat-count {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.stat-number .stat-suffix {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.stat-icon {
    font-size: 2rem;
    color: rgba(255,255,255,0.3);
    margin-bottom: 12px;
    display: block;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .stat-item + .stat-item {
        border-left: none;
    }
    .stat-number { font-size: 2.5rem; }
}

@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-number { font-size: 2rem; }
}

/* --- Poboljšane Quick-Links kartice --- */
.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-color), #004d99);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(0,51,102,0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 12px 30px rgba(0,51,102,0.35);
}

/* --- Scroll-reveal animacije --- */
.js-reveal .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-reveal .reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Poboljšane vesti kartice --- */
.post-card {
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.post-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12) !important;
}

.post-card a:hover .post-thumb,
.post-card:hover .post-thumb {
    transform: scale(1.06) !important;
}

/* --- Sekcija upis — poboljšana --- */
.front-upis-section {
    position: relative;
    overflow: hidden;
}

.front-upis-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

/* Lagani hover efekat na feature chip-ovima (boja i border ostaju originalni) */
.front-upis-feature {
    transition: transform 0.3s, box-shadow 0.3s;
}

.front-upis-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* --- Back-to-top dugme --- */
.back-to-top {
    position: fixed;
    bottom: 35px;
    right: 35px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #004d99);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(0,51,102,0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--accent-color), #a93226);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(192,57,43,0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

/* --- Poboljšana section-title dekoracija --- */
.section-title {
    position: relative;
}

.section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 15px;
}

/* --- CTA pulse animacija na btn-hero --- */
@keyframes ctaPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70%  { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.btn-hero {
    animation: ctaPulse 2.5s ease-in-out 2s 3;
}

/* --- Poboljšan footer social --- */
.social-icons-bottom {
    flex-wrap: wrap;
}

.social-icons-bottom a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,51,102,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}

.social-icons-bottom a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-4px) scale(1.1);
}

/* --- Partners section poboljšanja --- */
.partners-section {
    position: relative;
}

.partners-section::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.partner-item img {
    filter: grayscale(20%);
    transition: filter 0.3s, transform 0.3s;
}

.partner-item img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* --- Poboljšani quick-links responsive --- */
@media (max-width: 480px) {
    .quick-links .container {
        grid-template-columns: 1fr;
    }
}

/* --- Vesti badge hover efekat --- */
.front-news-section article a h3:hover {
    color: var(--accent-color);
}

/* --- Hero slideshow progress bar --- */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-color);
    width: 0%;
    z-index: 5;
    transition: width 5s linear;
}

.hero-progress.running {
    width: 100%;
}

/* --- Generalne hover poboljšanja za linkove --- */
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s, color 0.3s;
}

.card-link:hover {
    gap: 10px;
}

/* =============================================
   COOKIE CONSENT BANNER
   ============================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1a1a2e;
    color: #e8e8e8;
    padding: 18px 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cookie-banner.cookie-visible {
    transform: translateY(0);
}
.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.cookie-banner__body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 260px;
}
.cookie-banner__body > .fa-cookie-bite {
    font-size: 1.6em;
    color: var(--kids-color);
    margin-top: 2px;
    flex-shrink: 0;
}
.cookie-banner__text strong {
    display: block;
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}
.cookie-banner__text p {
    margin: 0 0 6px;
    font-size: 0.85em;
    line-height: 1.5;
    color: #b0b8c8;
}
.cookie-policy-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.25);
    transition: color 0.2s;
}
.cookie-policy-link:hover { color: rgba(255,255,255,0.85); }
.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.cookie-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}
.cookie-btn--accept {
    background: var(--primary-color);
    color: #fff;
}
.cookie-btn--accept:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}
.cookie-btn--decline {
    background: transparent;
    color: #8a9ab5;
    border: 1px solid #3a4060;
}
.cookie-btn--decline:hover {
    background: rgba(255,255,255,0.06);
    color: #c0cce0;
}
@media (max-width: 600px) {
    .cookie-banner__inner { gap: 14px; }
    .cookie-banner__actions { width: 100%; }
    .cookie-btn { flex: 1; text-align: center; }
}

/* ── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb-section { padding: 20px; }
.breadcrumb { font-size: 0.9em; color: #666; }
.breadcrumb a { color: var(--primary-color); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* =========================================================
   Stranica „Ђачки дом" (page-djacki-dom.php)
   ========================================================= */
.container.dd-main { padding: 40px 20px 80px; }
.dd-inner { max-width: 1000px; margin: 0 auto; }
.dd-block { margin-bottom: 50px; }
.section-title.dd-title-first { margin-top: 0; }
.dd-intro p { margin-bottom: 1em; line-height: 1.8; color: #444; }
.dd-intro p:last-child { margin-bottom: 0; }

.dd-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.card-img.dd-card-img { height: 250px; }
.dd-card-body { padding: 30px; }
.dd-card-body h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}
.dd-card-body h3 i { margin-right: 10px; }
.dd-card-body > p { color: #666; line-height: 1.7; margin-bottom: 15px; }
.dd-card-body .dd-address {
    background: var(--gray-bg);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95em;
}
.dd-address i { color: var(--accent-color); margin-right: 8px; }

.dd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
}
.dd-btn--small   { padding: 10px 20px; font-size: 0.95em; }
.dd-btn--primary { background: var(--primary-color); }
.dd-btn--accent  { background: var(--accent-color); }
.dd-btn:hover    { opacity: 0.9; color: white; }

.dd-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.dd-feature > i { font-size: 2.5em; color: var(--accent-color); margin-bottom: 15px; }
.dd-feature h4 { color: var(--primary-color); margin-bottom: 12px; font-size: 1.2em; }
.dd-feature p  { color: #666; line-height: 1.6; }

.dd-card-heading {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5em;
}
.dd-card-heading i { margin-right: 10px; }

.dd-schedule { list-style: none; padding: 0; line-height: 1.7; }
.dd-schedule li {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.dd-schedule li:last-child { border-bottom: none; }
.dd-schedule strong { flex: 0 0 110px; color: var(--primary-color); }
.dd-note {
    margin-top: 20px;
    padding: 15px;
    background: var(--warm-bg);
    border-radius: 8px;
    color: #555;
    font-size: 0.95em;
}
.dd-note i { color: var(--accent-color); margin-right: 8px; }

.dd-activities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.dd-activity {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    line-height: 1.5;
    color: #444;
}
.dd-activity-icon {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(192,57,43,0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.dd-panel {
    color: white;
    padding: 50px 40px;
    border-radius: 12px;
    margin-bottom: 50px;
}
.dd-panel h3 { color: white; margin-bottom: 25px; font-size: 1.6em; }
.dd-panel h3 i { margin-right: 10px; }
.dd-panel p { line-height: 1.8; font-size: 1.05em; opacity: 0.95; margin-bottom: 20px; }
.dd-panel p:last-child { margin-bottom: 0; }
.dd-panel--blue {
    background: linear-gradient(135deg, var(--primary-color), #004080);
    box-shadow: 0 8px 25px rgba(0,51,102,0.2);
}
.dd-panel--red {
    background: linear-gradient(135deg, var(--accent-color), #d63447);
    box-shadow: 0 8px 25px rgba(192,57,43,0.2);
    text-align: center;
}
.dd-panel--red h3 { font-size: 1.8em; }
.dd-panel--red p  { font-size: 1.1em; }

.dd-rules {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}
.dd-rules summary {
    cursor: pointer;
    padding: 25px 40px;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
    list-style: none;
    position: relative;
}
.dd-rules summary::-webkit-details-marker { display: none; }
.dd-rules summary i { margin-right: 10px; }
.dd-rules summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
    font-size: 0.8em;
}
.dd-rules[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.dd-rules-body { padding: 0 40px 30px; }
.dd-rules-body h4 { color: var(--primary-color); margin: 15px 0 10px; }
.dd-rules-body ul { padding-left: 20px; color: #555; line-height: 1.7; }
.dd-rules-body li { margin-bottom: 8px; }

.dd-cta > i { font-size: 3em; color: var(--primary-color); margin-bottom: 20px; }
.dd-cta h3 { color: var(--primary-color); margin-bottom: 20px; font-size: 1.6em; }
.dd-cta p  { color: #666; line-height: 1.8; max-width: 600px; margin: 0 auto 30px; }
.dd-cta-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 900px) {
    .dd-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .dd-two-col,
    .dd-activities { grid-template-columns: 1fr; }
    .dd-panel { padding: 35px 25px; }
    .dd-rules summary { padding: 20px 50px 20px 25px; font-size: 1.15em; }
    .dd-rules summary::after { right: 25px; }
    .dd-rules-body { padding: 0 25px 25px; }
}
@media (max-width: 576px) {
    .dd-features { grid-template-columns: 1fr; }
    .dd-schedule li { flex-direction: column; gap: 2px; }
    .dd-schedule strong { flex-basis: auto; }
}

/* Visual redesign — step 1: homepage hero. Remove this block to revert. */
.home .hero-slideshow {
    min-height: clamp(540px, 72vh, 740px);
    isolation: isolate;
}

.home .hero-slideshow .hero-overlay {
    background: linear-gradient(90deg, rgba(0, 28, 58, .94) 0%, rgba(0, 28, 58, .82) 32%, rgba(0, 28, 58, .30) 65%, rgba(0, 28, 58, .10) 100%);
}

.home .hero-slideshow .hero-content {
    padding: 88px 0 112px;
    text-align: left;
}

.home .hero-slideshow .hero-content .container {
    text-align: left;
}

.home .hero-slideshow .hero-content h1 {
    max-width: 600px;
    margin: 0 0 24px;
    font-size: clamp(2.5rem, 4vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -.025em;
    text-shadow: none;
}

.home .hero-slideshow .hero-content h1 br { display: none; }
.home .hero-slideshow .hero-content h1 span {
    display: block;
    max-width: 520px;
    margin-top: 20px;
    line-height: 1.45;
}

.home .hero-slideshow .hero-content p {
    max-width: 460px;
    margin: 0 0 32px;
    font-size: 1.2rem;
    line-height: 1.65;
    text-shadow: none;
}

.home .hero-slideshow .btn-hero {
    animation: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

@media (max-width: 768px) {
    .home .hero-slideshow {
        display: block;
        min-height: 0;
        background: var(--primary-color);
    }
    .home .hero-slideshow .hero-slides {
        position: relative;
        height: clamp(220px, 56vw, 340px);
    }
    .home .hero-slideshow .hero-overlay { display: none; }
    .home .hero-slideshow .hero-content { padding: 32px 0 80px; }
    .home .hero-slideshow .hero-content h1 {
        font-size: clamp(2rem, 7vw, 2.6rem);
        margin-bottom: 20px;
    }
    .home .hero-slideshow .hero-content h1 span { margin-top: 12px; }
    .home .hero-slideshow .hero-content p { font-size: 1.05rem; margin-bottom: 24px; }
    .home .hero-slideshow .hero-indicators {
        top: calc(clamp(220px, 56vw, 340px) - 48px);
        bottom: auto;
        left: 24px;
        transform: none;
    }
    .home .hero-slideshow .hero-scroll-arrow { display: none; }
}

@media (max-width: 992px) and (orientation: landscape) and (max-height: 500px) {
    .home .hero-slideshow .hero-content { padding: 32px 0 72px; }
}

/* Visual redesign — step 2: enrollment invitation. */
.home .front-upis-section {
    background: var(--primary-color);
    padding: 88px 0;
}
.home .front-upis-section::before { display: none; }
.home .front-upis-wrapper {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
}
.home .front-upis-content h2 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 3vw, 2.6rem);
    letter-spacing: -.02em;
}
.home .front-upis-content > p {
    max-width: 520px;
    margin-bottom: 28px;
    line-height: 1.8;
    opacity: 1;
}
.home .front-upis-features { margin-bottom: 32px; }
.home .front-upis-feature {
    padding: 13px 14px;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .22);
    font-weight: 500;
}
.home .front-upis-feature i { color: inherit; font-size: 1.15rem; }
.home .front-upis-feature:hover { transform: none; box-shadow: none; }
.home .front-upis-button {
    padding: 16px 28px;
    font-size: 1rem;
}
.home .front-upis-visual { padding: 0; min-width: 0; }
.home .front-upis-photo {
    width: 100%;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--warm-bg);
}
.home .front-upis-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    object-position: center 38%;
}
.home .front-upis-photo figcaption {
    padding: 20px 24px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
}
@media (max-width: 900px) {
    .home .front-upis-section { padding: 56px 0; }
    .home .front-upis-wrapper { grid-template-columns: 1fr; gap: 36px; }
    .home .front-upis-photo img { aspect-ratio: 4 / 3; }
}
@media (max-width: 480px) {
    .home .front-upis-features { grid-template-columns: 1fr 1fr; gap: 10px; }
    .home .front-upis-feature { gap: 8px; padding: 12px 10px; font-size: .85rem; }
    .home .front-upis-photo figcaption { padding: 16px 20px; font-size: 1rem; }
}
@media (max-width: 360px) {
    .home .front-upis-features { grid-template-columns: 1fr; }
}

/* Visual redesign — step 3: light statistics band. */
.home .stats-section {
    background: var(--warm-bg);
    padding: 56px 0 40px;
}
.home .stats-section::before,
.home .stats-section::after { display: none; }
.home .stats-grid { gap: 0; }
.home .stat-item {
    color: var(--primary-color);
    padding: 12px 24px;
}
.home .stat-item + .stat-item {
    border-left: 1px solid rgba(0, 51, 102, .14);
}
.home .stat-icon {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 16px;
}
.home .stat-number {
    color: var(--primary-color);
    font-size: clamp(2.5rem, 4vw, 3.4rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 12px;
}
.home .stat-label {
    color: var(--text-color);
    font-size: .95rem;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.55;
    font-weight: 400;
    max-width: 200px;
    margin: 0 auto;
}
.home .stats-source {
    color: var(--text-color);
    margin-top: 28px;
    line-height: 1.6;
}
.home .stats-source a { color: inherit; }
.home .stats-source a:hover { color: var(--primary-color); }
.home .stats-source a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}
@media (max-width: 768px) {
    .home .stats-section { padding: 28px 0; }
    .home .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home .stat-item { padding: 20px 12px; }
    .home .stat-item + .stat-item { border-left: none; }
    .home .stat-item:nth-child(even) { border-left: 1px solid rgba(0, 51, 102, .14); }
    .home .stat-item:nth-child(n + 3) { border-top: 1px solid rgba(0, 51, 102, .14); }
    .home .stat-label { font-size: .875rem; }
    .home .stats-source { margin-top: 24px; }
}

/* Visual redesign — step 4: consistent homepage buttons and cards. */
.home .btn,
.home .hero-slideshow .hero-content .btn-hero,
.home .front-upis-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
    box-shadow: none;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.home .btn i { margin-left: 0 !important; }
.home .hero-slideshow .hero-content .btn-hero::before { display: none; }
.home .btn:hover,
.home .hero-slideshow .hero-content .btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
}
.home .btn:focus-visible,
.home .quick-links .card:focus-visible,
.home .front-news-grid .post-card a:focus-visible {
    outline: 3px solid var(--info-color);
    outline-offset: 4px;
}
.home .quick-links .card {
    border: 1px solid rgba(0, 51, 102, .10);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    min-height: 260px;
    box-shadow: 0 3px 12px rgba(0, 30, 60, .05);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.home .quick-links .card::before { display: none; }
.home .quick-links .card:hover {
    border-color: rgba(0, 51, 102, .24);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 30, 60, .08);
}
.home .quick-links .card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--info-light) !important; /* Override the existing inline gradients. */
    color: var(--primary-color);
    font-size: 1.5rem;
    box-shadow: none;
    transform: none;
    transition: none;
}
.home .quick-links .card-link { letter-spacing: 0; }
.home .front-news-grid .post-card {
    border: 1px solid rgba(0, 51, 102, .10);
    border-radius: var(--radius-lg) !important; /* Shared card currently has inline styles. */
    box-shadow: 0 3px 12px rgba(0, 30, 60, .05) !important;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
}
.home .front-news-grid .post-card:hover {
    border-color: rgba(0, 51, 102, .24);
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(0, 30, 60, .08) !important;
}
.home .front-news-grid .post-card .post-thumb { transform: none !important; }
.home .front-upis-photo { border-radius: var(--radius-lg); }
@media (max-width: 768px) {
    .home .quick-links .container { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .home .btn,
    .home .hero-slideshow .hero-content .btn-hero,
    .home .quick-links .card,
    .home .front-news-grid .post-card { transition: none !important; }
    .home .btn:hover,
    .home .hero-slideshow .hero-content .btn-hero:hover,
    .home .quick-links .card:hover,
    .home .front-news-grid .post-card:hover { transform: none !important; }
}

/* Parent access: weekend absence reporting alongside the electronic diary. */
.home .quick-links .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1200px) {
    .home .quick-links .container { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .home .quick-links .container { grid-template-columns: minmax(0, 1fr); }
}

/* Visual redesign — step 5: calmer homepage typography. */
.home { font-size: 1rem; line-height: 1.65; }
.home .hero-slideshow .hero-content h1 { font-weight: 700; }
.home .hero-slideshow .hero-content h1 span {
    font-size: clamp(1.15rem, 2vw, 1.6rem) !important;
    letter-spacing: 0 !important;
    line-height: 1.5;
}
.home .hero-slideshow .hero-content p { font-size: 1.125rem; line-height: 1.7; }
.home .section-title {
    text-transform: none;
    font-size: clamp(1.9rem, 3vw, 2.4rem) !important;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.25;
}
.home .front-upis-content h2 { font-weight: 700; line-height: 1.25; }
.home .quick-links .card h3 { font-size: 1.2rem; line-height: 1.4; margin-bottom: 12px; }
.home .quick-links .card p { font-size: 1rem; line-height: 1.7; max-width: 100%; }
.home .quick-links .card-link { text-transform: none; font-size: .95rem; line-height: 1.5; }
.home .btn,
.home .hero-slideshow .hero-content .btn-hero { text-transform: none; }
.home .front-news-grid .post-card h3 a {
    font-size: 1.2rem !important;
    line-height: 1.5 !important;
    font-weight: 700;
    letter-spacing: 0;
}
.home .front-news-grid .post-card p { font-size: 1rem; line-height: 1.7 !important; }
@media (max-width: 768px) {
    .home .hero-slideshow .hero-content p { font-size: 1.05rem; }
}

/* Visual redesign — step 6: balanced homepage news cards. */
.home .front-news-grid { align-items: stretch; }
.home .front-news-grid .post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.home .front-news-grid .post-card-image {
    flex-shrink: 0;
    height: auto !important;
    aspect-ratio: 3 / 2;
}
.home .front-news-grid .post-card-image .post-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.home .front-news-grid .post-card-placeholder { background: var(--primary-color) !important; }
.home .front-news-grid .post-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 24px !important;
}
.home .front-news-grid .post-card-meta {
    color: var(--text-color) !important;
    font-size: .85rem !important;
    line-height: 1.5;
}
.home .front-news-grid .post-card-excerpt { margin-bottom: 0 !important; }
.home .front-news-grid .post-card-read-more {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 24px;
    line-height: 1.5;
}
.home .front-news-grid .post-card-read-more:hover { text-decoration: underline !important; text-underline-offset: 4px; }
@media (max-width: 480px) {
    .home .front-news-grid .post-card-body { padding: 20px !important; }
}

/* Visual redesign — step 7: compact header and readable language choices. */
.site-header { padding: 4px 0; }
.site-header .header-container { height: 72px; gap: 20px; }
.site-header .logo-link { gap: 12px; padding: 0; }
.site-header .header-logo { height: 52px; flex-shrink: 0; }
.site-header .header-text { padding-left: 12px; }
.site-header .org-name { font-size: 1.1rem; letter-spacing: .2px; }
.site-header .org-desc { font-size: .75rem; margin-top: 3px; }
.site-header .nav-wrapper { gap: 22px; flex-shrink: 0; }
.site-header .lang-flags { margin-right: 0; }
.site-header .lang-flags ul { gap: 6px; }
.site-header .lang-flags li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 51, 102, .16);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: none;
    transition: background-color .2s, border-color .2s;
}
.site-header .lang-flags img {
    width: 18px !important;
    height: auto !important;
    border-radius: 0;
    box-shadow: none;
}
.site-header .lang-flags .current-lang a { background: #edf3f8; border-color: rgba(0, 51, 102, .3); }
.site-header .lang-flags li a:hover { background: #edf3f8; transform: none; box-shadow: none; }
.site-header .lang-flags li a:focus-visible,
.site-header .menu-toggle:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }
@media (min-width: 993px) {
    .site-header.scrolled .header-container { height: 60px; }
    .site-header.scrolled .header-logo { height: 44px; }
}
@media (max-width: 992px) {
    .site-header .header-container { height: 56px; flex-wrap: nowrap; gap: 12px; padding: 0 20px; }
    .site-header .header-logo { height: 42px; }
    .site-header .nav-wrapper { gap: 12px; }
    .site-header .lang-flags { order: 0; }
    .site-header .menu-toggle { order: 1; width: 40px; height: 40px; flex-shrink: 0; }
    .site-header .main-navigation { margin-top: 4px; }
}
@media (max-width: 576px) {
    .site-header .header-container { height: 52px; padding: 0 16px; gap: 10px; }
    .site-header .logo-link { gap: 8px; }
    .site-header .header-text { padding-left: 8px; }
    .site-header .header-logo { height: 38px; }
    .site-header .org-name { font-size: .85rem; white-space: nowrap; }
    .site-header .org-desc { display: none; }
    .site-header .nav-wrapper { gap: 8px; }
    .site-header .lang-flags ul { gap: 4px; }
    .site-header .lang-flags li a { min-height: 40px; padding: 8px 7px; gap: 4px; font-size: .75rem; }
    .site-header .lang-flags img { width: 16px !important; }
}
@media (max-width: 360px) {
    .site-header .header-container { padding: 0 10px; gap: 6px; }
    .site-header .header-logo { height: 34px; }
    .site-header .org-name { font-size: .75rem; }
    .site-header .logo-link { gap: 6px; }
    .site-header .header-text { padding-left: 6px; }
    .site-header .lang-flags li a { padding: 8px 6px; }
}
@media (max-width: 400px) {
    .site-header .lang-flags img { display: none; }
    .site-header .lang-flags li a { min-width: 36px; gap: 0; }
}

/* Visual redesign — footer: consistently centered contact information. */
.site-footer .footer-container-zindex { width: 100%; padding: 0 24px; }
.site-footer .footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
}
.site-footer .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 calc((100% - 128px) / 5);
    min-width: 0;
    max-width: none;
    margin: 0;
    text-align: center;
}
.site-footer .footer-col h4 {
    width: 100%;
    min-height: 2.6em;
    margin: 0 0 18px;
    line-height: 1.3;
    text-align: center;
}
.site-footer .footer-col p {
    width: 100%;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    font-size: .8rem;
    line-height: 1.6;
    text-align: center;
}
.site-footer .footer-col p i { flex: 0 0 18px; min-width: 18px; }
.site-footer .footer-col p span,
.site-footer .footer-col p a { min-width: 0; overflow-wrap: anywhere; }
.footer-bottom p { max-width: 960px; margin: 0 auto 18px; line-height: 1.7; text-align: center; }
.footer-bottom .footer-policy-link { color: var(--primary-color); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 769px) {
    .site-footer .footer-col p:first-of-type { min-height: 3.2em; }
}
@media (max-width: 1200px) {
    .site-footer .footer-col { flex-basis: calc((100% - 64px) / 3); }
}
@media (max-width: 992px) {
    .site-footer .footer-col { flex-basis: calc((100% - 32px) / 2); }
}
@media (max-width: 768px) {
    .site-footer .footer-col { flex-basis: 100%; max-width: 360px; }
    .site-footer .footer-col h4 { min-height: 0; margin-bottom: 16px; }
}

/* Homepage photo update: keep the introduction clear of every slideshow photo. */
.home .hero-slideshow {
    --hero-photo-height: clamp(340px, 40vw, 540px);
    display: block;
    min-height: 0;
    background: var(--primary-color);
}
.home .hero-slideshow .hero-slides { position: relative; height: var(--hero-photo-height); }
.home .hero-slideshow .hero-overlay { display: none; }
.home .hero-slideshow .hero-content { padding: 28px 0 32px; }
.home .hero-slideshow .hero-content .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 48px;
    row-gap: 12px;
    align-items: center;
}
.home .hero-slideshow .hero-content h1 { max-width: none; margin: 0; font-size: clamp(2rem, 3vw, 2.8rem); }
.home .hero-slideshow .hero-content h1 span { max-width: none; margin-top: 8px; font-size: 1.2rem !important; }
.home .hero-slideshow .hero-content p { max-width: none; margin: 0; grid-column: 1; font-size: 1rem; }
.home .hero-slideshow .hero-content .btn-hero { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.home .hero-slideshow .hero-indicators {
    top: calc(var(--hero-photo-height) - 60px);
    bottom: auto;
    left: 50%;
    right: auto;
    width: max-content;
    transform: translateX(-50%);
    padding: 8px 12px;
    border-radius: 30px;
    background: rgba(0, 28, 58, .7);
}
.home .hero-slideshow .hero-progress { top: calc(var(--hero-photo-height) - 3px); bottom: auto; }
.home .hero-slideshow .hero-scroll-arrow { display: none; }
@media (max-width: 768px) {
    .home .hero-slideshow { --hero-photo-height: clamp(220px, 56vw, 340px); }
    .home .hero-slideshow .hero-content { padding: 28px 0 32px; }
    .home .hero-slideshow .hero-content .container { display: block; }
    .home .hero-slideshow .hero-content h1 { font-size: clamp(2rem, 7vw, 2.6rem); }
    .home .hero-slideshow .hero-content p { margin: 16px 0 24px; }
}

/* Lovra i Deska: fotografija prati hero, bez prevelikog izreza pri skrolovanju. */
.hero.hero-location-photo {
    background-attachment: scroll;
    background-position: center 35%;
    min-height: clamp(320px, 34vw, 480px);
    padding: 80px 0;
}

.hero-location-photo p {
    margin-bottom: 0;
}

/* Budapest school library. */
.library-page { background: #f7f8fa; padding-bottom: 64px; }
.library-hero { padding: 64px 0; background: #eef3f8; color: var(--primary-color); }
.library-hero-inner { display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.library-eyebrow { margin: 0 0 16px; font-size: .9rem; font-weight: 700; }
.library-hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.15; margin: 0 0 18px; }
.library-subtitle { margin: 0; font-size: 1.25rem; line-height: 1.6; }
.library-hero-symbol { display: grid; place-items: center; flex: 0 0 180px; width: 180px; height: 180px; border-radius: 50%; background: white; font-size: 72px; }
.library-hero-image { width: 42%; max-height: 320px; object-fit: cover; border-radius: 14px; }
.library-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 24px; padding-bottom: 24px; font-size: .9rem; line-height: 1.6; }
.library-breadcrumb a { color: var(--primary-color); }
.library-content { display: grid; gap: 28px; }
.library-panel { padding: 32px; border: 1px solid #e1e7ee; border-radius: 14px; background: white; min-width: 0; }
.library-panel h2 { color: var(--primary-color); font-size: 1.6rem; line-height: 1.4; margin: 0 0 20px; text-transform: none; }
.library-panel h2 i { font-size: 1.2rem; margin-right: 8px; }
.library-panel p { line-height: 1.8; }
.library-panel p:last-child { margin-bottom: 0; }
.library-panel a { color: var(--primary-color); overflow-wrap: anywhere; }
.library-panel .post-content { max-width: 820px; }
.library-intro .post-content { max-width: none; display: flow-root; }
.library-intro-photo { float: right; width: 240px; max-width: 35%; margin: 0 0 24px 32px; }
.library-intro-photo img { display: block; width: 100%; height: auto; margin: 0; border-radius: 10px; }
@media (max-width: 640px) { .library-intro-photo { float: none; width: 280px; max-width: 100%; margin: 0 auto 24px; } }
.library-intro h3 { margin: 28px 0 14px; color: var(--primary-color); line-height: 1.4; }
.library-intro ul { padding-left: 24px; margin-bottom: 24px; line-height: 1.8; }
.library-intro table { width: 100%; border-collapse: collapse; margin: 20px 0; }
/* Keep the native table intact and contain wide columns in its editor wrapper. */
.library-intro .post-content div:has(> table),
.library-intro .wp-block-table {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}
.library-intro caption { text-align: left; padding-bottom: 12px; font-weight: 600; }
.library-intro th, .library-intro td { padding: 10px 12px; border: 1px solid #e1e7ee; text-align: left; line-height: 1.5; }
.library-intro thead { background: var(--gray-bg); }
.library-intro tbody th { font-weight: 400; }
.library-intro td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.library-gallery .post-content { max-width: none; }
.library-gallery .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; }
.library-gallery .gallery-item { width: auto !important; min-width: 0; box-shadow: none; }
.library-gallery .gallery-icon img { display: block; width: 100%; height: auto; border: 0; border-radius: 8px; }
.library-gallery .gallery-caption { margin-top: 10px; line-height: 1.6; }
.library-gallery img { max-width: 100%; height: auto; }
@media (max-width: 900px) { .library-gallery .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 576px) { .library-gallery .gallery { grid-template-columns: 1fr; } }
.library-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 768px) {
    .library-page { padding-bottom: 40px; }
    .library-hero { padding: 40px 0; }
    .library-hero-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
    .library-hero-symbol { display: none; }
    .library-hero-image { width: 100%; max-height: 260px; }
    .library-panel { padding: 24px; }
    .library-info-grid { grid-template-columns: 1fr; }
}

/* Upis: obaveštenje da će termini tek biti objavljeni */
.upis-notice {
    margin-bottom: 30px;
}

.upis-notice h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.upis-notice p {
    margin: 0;
    line-height: 1.7;
}

/* News archives retain the desktop grid while fitting narrow phone screens. */
.news-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: 30px;
}
.news-list-grid > .post-card {
    min-width: 0;
    overflow-wrap: anywhere;
}
