:root {
    --primary: #4F46E5; /* Indigo */
    --primary-dark: #4338ca;
    --accent: #F59E0B; /* Amber */
    --dark: #0f172a;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.9); /* Stakleni efekt */
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --font-main: 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    /* TVOJ ORIGINALNI GRADIENT */
    background-color: #f3f4f6;
    background-image: radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-attachment: fixed;
    background-size: cover;
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* POPRAVAK ZA MOBITEL - Slike ne smiju biti šire od ekrana */
img { max-width: 100%; height: auto; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; width: 100%; }
main { flex: 1; }

/* Header */
.site-header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 24px; font-weight: 800; color: var(--primary); text-decoration: none; letter-spacing: -1px; }
.logo span { color: var(--accent); }
.nav a { margin-left: 20px; text-decoration: none; color: var(--dark); font-weight: 500; transition: 0.3s; }
.nav a:hover { color: var(--primary); }

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); animation: fadeUp 0.8s ease-out; }
.hero p { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.9; animation: fadeUp 1s ease-out; }

/* Forms & Cards - STAKLENI EFEKT */
.card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
/* .card:hover { transform: translateY(-5px); }  <- Maknuto jer smeta na formama */

.search-box {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    animation: fadeUp 1.2s ease-out;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.form-group { position: relative; margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: #4b5563; }

input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
    background: #fff; /* Bijela pozadina inputa da se lakše čita */
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }

/* Autocomplete Custom Styling */
.autocomplete-results {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-radius: 12px; margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100; max-height: 250px; overflow-y: auto;
    display: none;
}
.autocomplete-item { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #f3f4f6; transition: 0.2s; font-size: 0.9rem; text-align: left; color: #333; }
.autocomplete-item:hover { background-color: #f9fafb; padding-left: 20px; color: var(--primary); }

/* Buttons */
.btn {
    display: inline-block; width: 100%;
    background: var(--primary); color: white;
    padding: 16px; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: 600; cursor: pointer;
    transition: 0.3s; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--primary-dark); transform: scale(1.02); box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4); }

/* Results Page */
.results-layout { display: grid; grid-template-columns: 350px 1fr; gap: 30px; margin-top: -50px; position: relative; z-index: 20; }

/* POPRAVAK MAPE (Ovo vraća mapu!) */
.map-container { 
    height: 400px; 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    position: sticky; top: 90px; 
}
#map { width: 100%; height: 100%; }
.leaflet-pane img, .leaflet-tile, .map-container img {
    max-width: none !important;
    height: auto !important;
    box-shadow: none !important;
}

.partner-list { display: flex; flex-direction: column; gap: 20px; }
.partner-card {
    display: flex; gap: 20px; align-items: center;
    background: white; padding: 25px; border-radius: var(--radius);
    box-shadow: var(--shadow); transition: 0.3s;
}
.partner-logo-circle { 
    width: 60px; height: 60px; 
    background: #e0e7ff; color: var(--primary); 
    display: flex; align-items: center; justify-content: center; 
    font-weight: bold; border-radius: 50%; font-size: 24px; 
    overflow: hidden; flex-shrink: 0;
}
.partner-info h3 { margin: 0 0 5px 0; color: var(--dark); }
.partner-price { margin-left: auto; text-align: right; min-width: 100px; }
.price-tag { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }

/* Dashboard specifično */
.dashboard-layout {
    display: grid; grid-template-columns: 1fr 350px; gap: 30px;
}

/* Footer */
footer { text-align: center; padding: 40px 0; color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: auto; }

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =======================================
   MOBILE & RESPONSIVE RULES (Popravljeno)
   =======================================
*/
@media (max-width: 900px) {
    .container { padding: 0 15px; }
    
    /* Forma na heroju */
    .form-grid { grid-template-columns: 1fr; gap: 10px; }
    
    /* Layout rezultata - jedna kolona */
    .results-layout { grid-template-columns: 1fr; margin-top: 0; display: flex; flex-direction: column; }
    
    .hero h1 { font-size: 2.5rem; }
    
    /* Kartice partnera - vertikalno */
    .partner-card { flex-direction: column; text-align: center; }
    .partner-logo-circle { margin: 0 auto 10px auto; }
    .partner-price { margin: 15px auto 0 auto; width: 100%; border-top: 1px solid #eee; padding-top: 15px; text-align: center; }
    
    /* Mapa na mobitelu */
    .map-container { order: -1; height: 250px; position: static; margin-bottom: 20px;}
    
    /* Dashboard Fix za mobitel */
    .dashboard-layout { 
        grid-template-columns: 1fr !important; 
        display: flex; flex-direction: column;
    }
    
    /* Navigacija */
    .header-inner { flex-direction: column; height: auto; padding: 15px 0; gap: 10px; }
}