/* --- 1. OSNOVNE POSTAVKE --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f4f6f8;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Drži footer na dnu */
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

/* --- 2. NAVIGACIJA I LOGO --- */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
}

.green-text {
    color: #3f8f3f;
}

.nav nav a {
    margin-left: 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav nav a:hover {
    color: #3f8f3f;
}

/* --- 3. HERO SEKCIJA I MAPA (Fix za Leaflet) --- */
.hero {
    position: relative;
    height: 420px;
    width: 100%;
    overflow: hidden;
    background-color: #ddd;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    color: white;
    text-align: center;
    pointer-events: none; /* Da ne smeta klikanju na mapu */
}

/* --- 4. KARTICE I PROJEKTI --- */
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
}

.card {
    background: white;
    padding: 25px;
    width: 280px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.card:hover { 
    transform: translateY(-5px); 
}

.card-image {
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 8px 8px 0 0;
    margin: -25px -25px 15px -25px;
}

.cta-small {
    display: inline-block;
    padding: 8px 15px;
    background: #3f8f3f;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
}

/* --- 5. ZNANSTVENI RADOVI (Zajednički stilovi) --- */
.publications, .content {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1; 
}

.paper-item {
    background: white;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    border-left: 5px solid #3f8f3f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.paper-item:hover {
    transform: translateY(-3px);
}

/* --- 6. KONTAKT FORMA --- */
form { 
    display: flex; 
    flex-direction: column; 
}

form label { 
    margin-bottom: 15px; 
    font-weight: bold; 
}

form input, form textarea {
    width: 100%; 
    padding: 10px; 
    margin-top: 5px;
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box;
}

/* --- 7. FOOTER --- */
footer {
    padding: 20px 5%;
    background: transparent;
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-align: left;
}

/* --- 8. MOBILNA PRILAGODBA --- */
@media (max-width: 768px) {
    .nav { flex-direction: column; gap: 10px; text-align: center; }
    .nav nav a { margin: 5px 10px; font-size: 16px; }
    .card { width: 100%; max-width: 320px; }
    .hero { height: 300px; }
}
