/* style.css */
:root {
    --main-blue: #0056b3;
    --dark-blue: #003d82;
    --accent-red: #e74c3c;
    --light-bg: #f4f7f6;
    --text-color: #2d3436;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; background: var(--light-bg); color: var(--text-color); line-height: 1.6; }
main { width: 100%; overflow: visible; box-sizing: border-box; }

/* Branding Header */
.main-header { background: white; box-shadow: 0 2px 15px rgba(0,0,0,0.05); }
.top-branding { display: flex; align-items: center; justify-content: center; padding: 40px 20px; gap: 35px; }
.main-logo { height: 120px; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); }
.company-info h1 { font-weight: 900; font-size: 3rem; color: var(--main-blue); letter-spacing: -2px; }
.company-info p { font-size: 1.1rem; color: #636e72; margin-top: 5px; }

/* Sticky Navigation */
.sticky-nav {
    position: sticky; top: 0; background: white; padding: 15px 0;
    display: flex; justify-content: center; border-top: 1px solid #eee;
    z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.sticky-nav ul { list-style: none; display: flex; gap: 40px; }
.sticky-nav a { text-decoration: none; color: var(--text-color); font-weight: 700; transition: 0.3s; font-size: 1.1rem; }
.sticky-nav a:hover { color: var(--main-blue); }

.hitno-nav { background: var(--accent-red); color: white !important; padding: 10px 25px !important; border-radius: 50px; }
.hitno-nav:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4); }

/* Mobile Menu Toggle - Hidden by default */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--main-blue);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}


/* Section Container */
.section-container { 
    max-width: 1200px; 
    margin: 80px auto; 
    padding: 0 20px; 
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}
.section-title { text-align: center; margin-bottom: 50px; font-weight: 900; font-size: 2.5rem; color: #1e272e; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 5px; background: var(--main-blue); margin: 15px auto; border-radius: 5px; }

/* Service Cards */
.service-cards { 
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    overflow: visible;
}
.card { 
    background: white; 
    padding: 40px; 
    border-radius: 20px; 
    text-align: center; 
    transition: 0.4s; 
    border-bottom: 6px solid #dfe6e9;
    flex: 0 1 calc(33.333% - 20px);
    min-width: 280px;
    box-sizing: border-box;
    display: block;
}
.card:hover { transform: translateY(-10px); border-bottom-color: var(--main-blue); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.icon-box { font-size: 3rem; color: var(--main-blue); margin-bottom: 20px; }
.card h3 { margin-bottom: 15px; font-weight: 800; }

/* Map Wrapper */
.map-wrapper { border-radius: 25px; overflow: hidden; box-shadow: 0 15px 45px rgba(0,0,0,0.1); border: 1px solid #ddd; }
#map { height: 500px; width: 100%; z-index: 1; }

/* Modern Form */
.form-wrapper { background: white; padding: 50px; border-radius: 25px; box-shadow: 0 20px 60px rgba(0,0,0,0.05); max-width: 700px; margin: 0 auto; }
.input-group { display: flex; gap: 15px; }
input, select, textarea { 
    width: 100%; padding: 18px; margin-bottom: 20px; border: 2px solid #f1f2f6; 
    border-radius: 12px; font-family: inherit; font-weight: 600; font-size: 1rem; transition: 0.3s;
}
input:focus, select:focus, textarea:focus { border-color: var(--main-blue); outline: none; background: #f9fbff; }
#submit-btn { 
    width: 100%; padding: 20px; background: var(--main-blue); color: white; 
    border: none; border-radius: 12px; cursor: pointer; font-weight: 900; font-size: 1.2rem; 
    transition: 0.3s;
}
#submit-btn:hover { background: var(--dark-blue); box-shadow: 0 10px 25px rgba(0, 86, 179, 0.3); }

/* Footer */
.site-footer { background: #1e272e; color: #ced4da; text-align: center; padding: 50px 20px; margin-top: 100px; }
.footer-info p { margin-bottom: 10px; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* DESKTOP OPTIMIZATION */
@media (min-width: 1025px) {
    .section-container {
        padding: 0 40px;
    }
    .card {
        padding: 40px;
    }
}

/* TABLET OPTIMIZATION */
@media (max-width: 1024px) {
    .service-cards {
        flex-wrap: wrap;
        gap: 20px;
    }
    .card {
        flex: 0 1 calc(50% - 10px);
        min-width: 200px;
        padding: 25px;
        display: block;
    }
    .section-container {
        padding: 0 25px;
        margin: 50px auto;
    }
}

/* MOBILE OPTIMIZATION - Medium phones (600px-768px) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    body {
        line-height: 1.5;
    }
    
    /* Header */
    .top-branding {
        flex-direction: column;
        padding: 20px 15px;
        gap: 12px;
        margin: 0;
    }
    .main-logo {
        height: 70px;
        width: auto;
    }
    .company-info h1 {
        font-size: 1.6rem;
        letter-spacing: -0.5px;
        margin: 5px 0;
    }

    /* DODATO: Bolje centriranje headera na mobilnim uređajima */
    .main-header, .top-branding {
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }
    .top-branding {
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .company-info p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Navigation */
    .sticky-nav {
        padding: 8px 12px;
        top: auto;
        justify-content: space-between;
        align-items: center;
        flex-direction: column;
        position: sticky;
    }
    .mobile-menu-toggle {
        display: flex !important;
    }
    .sticky-nav .nav-menu {
        display: none;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 10px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }
    .sticky-nav .nav-menu.active {
        display: flex;
    }
    .sticky-nav .nav-menu li {
        border-bottom: 1px solid #f1f2f6;
    }
    .sticky-nav .nav-menu a {
        display: block;
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    /* Sections */
    .section-container {
        margin: 35px auto;
        padding: 0 15px;
        max-width: 100%;
    }
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    .section-title::after {
        width: 50px;
        height: 4px;
    }
    
    /* Service Cards */
    .service-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        justify-content: flex-start !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .card {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        padding: 18px !important;
        border-radius: 15px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        display: block !important;
    }
    .card p {
        font-size: 0.9rem;
    }
    .icon-box {
        font-size: 2.3rem;
        margin-bottom: 12px;
    }
    .card h3 {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }
    
    /* Map */
    .map-wrapper {
        border-radius: 15px;
    }
    #map {
        height: 300px;
    }
    
    /* Form */
    .form-wrapper {
        padding: 20px;
        border-radius: 15px;
        max-width: 100%;
    }
    .input-group {
        flex-direction: column;
        gap: 8px;
    }
    input, select, textarea {
        padding: 14px;
        margin-bottom: 12px;
        font-size: 16px;
        border-radius: 10px;
    }
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    input[type=number] {
        appearance: textfield;
        -moz-appearance: textfield;
    }
    select option {
        padding: 8px;
    }
    textarea {
        resize: vertical;
        min-height: 100px;
    }
    #submit-btn {
        padding: 16px;
        font-size: 1rem;
        min-height: 48px;
        border-radius: 10px;
    }
    
    /* Footer */
    .site-footer {
        padding: 25px 15px;
        margin-top: 50px;
    }
    .footer-info p {
        font-size: 0.8rem;
    }
        /* FINO PODEŠAVANJE KARTICA I SEKCIJA ZA MOBILNE UREĐAJE */
        .section-container {
            width: 100% !important;
            max-width: 100% !important;
            padding: 0 8px !important;
            box-sizing: border-box !important;
            margin: 0 auto 25px auto !important;
        }
        .service-cards {
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            gap: 10px !important;
        }
        .card-link {
            width: 100% !important;
            min-width: unset !important;
            margin: 0 !important;
            padding: 0 !important;
            display: flex !important;
        }
        .card {
            width: 100% !important;
            min-width: unset !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 15px 8px !important;
            box-sizing: border-box !important;
        }
}

/* MOBILE OPTIMIZATION - Small phones (480px-599px) */
@media (max-width: 599px) {
    html {
        font-size: 14px;
    }
    
    .top-branding {
        padding: 15px 10px;
        gap: 8px;
    }
    .main-logo {
        height: 60px;
    }
    .company-info h1 {
        font-size: 1.3rem;
    }
    .company-info p {
        font-size: 0.75rem;
    }
    
    .section-container {
        margin: 25px auto;
        padding: 0 12px;
        box-sizing: border-box;
        width: 100%;
    }
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }
    
    /* Service Cards */
    .service-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .card {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        display: block !important;
    }
    .icon-box {
        font-size: 2rem;
    }
    
    #map {
        height: 250px;
    }
    
    .form-wrapper {
        padding: 15px;
    }
    input, select, textarea {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .site-footer {
        padding: 20px 12px;
    }
}

/* EXTRA SMALL phones (< 480px) */
@media (max-width: 479px) {
    .top-branding {
        padding: 12px 8px;
    }
    .main-logo {
        height: 50px;
    }
    .company-info h1 {
        font-size: 1.1rem;
        letter-spacing: 0;
    }
    .company-info p {
        font-size: 0.7rem;
    }
    
    .section-container {
        padding: 0 10px;
        box-sizing: border-box;
        width: 100%;
        margin: 20px auto;
    }
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    /* Service Cards */
    .service-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .card {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        padding: 12px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        display: block !important;
    }
    .icon-box {
        font-size: 1.8rem;
    }
    .card p {
        font-size: 0.85rem;
    }
    
    #map {
        height: 200px;
    }
    
    .form-wrapper {
        padding: 12px;
    }
    input, select, textarea {
        padding: 10px;
        margin-bottom: 8px;
        font-size: 16px;
    }
    
    .site-footer {
        padding: 15px 8px;
    }
}