/* =========================================
   OSNOVNE POSTAVKE I BOJE (TŠRB)
   ========================================= */
:root {
    --primary-orange: #FF6600; /* Glavna narančasta */
    --primary-grey: #4A4A4A;   /* Tamno siva za naglaske */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F5F5F5;       /* Svijetlo siva za pozadinu */
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   NAVIGACIJA (HEADER) I LOGO
   ========================================= */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px; 
}

.school-logo {
    height: 45px; 
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-grey);
}

.logo span {
    color: var(--primary-orange);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-orange);
}

/* =========================================
   SUSTAV ZA PRIJEVOD I GUMB ZA JEZIK
   ========================================= */
/* Po defaultu (hrvatski), sakrij engleski tekst */
body:not(.en) .lang-en {
    display: none !important;
}

/* Kad je na engleskom, sakrij hrvatski tekst */
body.en .lang-hr {
    display: none !important;
}

.btn-lang {
    background-color: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-lang:hover {
    background-color: var(--primary-orange);
    color: var(--white);
}

/* =========================================
   HERO SEKCIJA (POČETNA)
   ========================================= */
.hero {
    background: linear-gradient(rgba(74, 74, 74, 0.8), rgba(74, 74, 74, 0.8)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-orange);
    color: var(--white);
    padding: 12px 25px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #e65c00;
    transform: scale(1.05);
}

/* =========================================
   TEKSTUALNE SEKCIJE I PADAJUĆI IZBORNICI
   ========================================= */
.text-section {
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.text-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.bg-light-section {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.section-title {
    text-align: center;
    color: var(--primary-grey);
    margin: 40px 0 30px;
    font-size: 2.2rem;
}

.info-dropdown {
    background-color: var(--white);
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
}

.info-dropdown summary {
    background-color: var(--primary-grey);
    color: var(--white);
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.info-dropdown summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-orange);
}

.info-dropdown[open] summary::after {
    content: '-';
}

.info-dropdown summary:hover {
    background-color: #333;
}

.details-content {
    padding: 20px;
    background-color: #fafafa;
    border-top: 1px solid #ddd;
    color: var(--text-dark);
}

/* =========================================
   KARTICE ZA MOBILNOSTI
   ========================================= */
.cards-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--white);
}

.badge.france { background-color: #0055A4; }
.badge.slovenia { background-color: #009b77; }

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-grey);
}

.card p {
    color: var(--text-light);
    font-size: 1rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background-color: var(--primary-grey);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

/* =========================================
   RESPONZIVNOST (MOBITELI)
   ========================================= */
@media (max-width: 768px) {
    .header-container { 
        flex-direction: column; 
        gap: 15px; 
        padding: 15px 10px;
    }
    
    .logo { 
        flex-direction: column; 
        text-align: center; 
        gap: 8px; 
    }
    
    nav ul { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 12px 20px; 
    }
    
    nav a { 
        white-space: nowrap; 
        font-size: 0.95rem;
    }
    
    .btn-lang {
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 4px 12px;
    }

    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
}

/* =========================================
   PAMETNI LABORATORIJI (TABOVI)
   ========================================= */
.tabs-container {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.tabs-header {
    display: flex;
    background: #eaeaea;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    font-size: 1.1rem;
    border-top: 4px solid transparent;
}

.tab-btn:hover {
    background: #dfdfdf;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-orange);
    border-top: 4px solid var(--primary-orange);
}

.tab-content {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.senzor-kartica {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

.senzor-vrijednost {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-grey);
    margin: 10px 0;
}

.senzor-naziv {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: bold;
}

@media (max-width: 768px) {
    .tabs-header {
        flex-direction: column;
    }
    .tab-btn {
        border-top: none;
        border-left: 4px solid transparent;
        text-align: left;
    }
    .tab-btn.active {
        border-top: none;
        border-left: 4px solid var(--primary-orange);
    }
}



/* NAVBAR */
.navbar {
    width: 100%;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #ddd;
}

/* CONTAINER */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
}

/* LOGO FIX (KLJUČNO!) */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-logo h1 {
    font-size: 16px;
    margin: 0;
}

/* MENU */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 12px;
    align-items: center;
}

/* LINKS */
.nav-menu a {
    text-decoration: none;
    color: black;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
}

.nav-menu a:hover {
    background: rgba(0,0,0,0.08);
}

/* EU FLAG */
.eu-link {
    display: flex;
    align-items: center;
    gap: 5px;
}

.eu-link img {
    width: 20px;
}

/* DROPDOWN */
.dropdown {
    position: relative;
}

.dropbtn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 8px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.dropdown-content a {
    display: block;
    padding: 10px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* HAMBURGER */
.nav-toggle {
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
}

/* =========================
   RESPONSIVE FIX
========================= */
@media (max-width: 900px) {

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        width: 240px;
        background: white;
        border-left: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        padding: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    /* logo manji na mobitelu */
    .nav-logo img {
        height: 32px;
    }

    .nav-logo h1 {
        font-size: 14px;
    }

    /* dropdown fix */
    .dropdown-content {
        position: static;
        box-shadow: none;
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }
}

/* DROPDOWN LINKOVI = ISTI KAO NAV-MENU LINKOVI */
.dropdown-content a {
    text-decoration: none;
    color: black;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
    display: block; /* samo da zauzme cijeli red u dropdownu */
}

/* HOVER ISTI KAO OSTALI LINKOVI */
.dropdown-content a:hover {
    background: rgba(0,0,0,0.08);
}

/* DROPDOWN CONTAINER */
.dropdown-content {
    background: white;
    min-width: 160px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    padding: 6px;
}

.dropbtn {
    text-decoration: none;
    color: black;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
}

/* isti hover kao ostali linkovi */
.dropbtn:hover {
    background: rgba(0,0,0,0.08);
}