/* Tema i boje - moderna bijelo-plava kombinacija */
:root {
    --primary-color: #1565c0; /* Tamno plava */
    --primary-dark: #003c8f;
    --primary-light: #5e92f3;
    --secondary-color: #ffffff; /* Bijela */
    --light-bg: #f8f9fa;
    --text-dark: #212121;
    --text-medium: #424242;
    --text-light: #ffffff;
    --accent-color: #29b6f6; /* Svijetlo plava za isticanje */
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);
    --transition-speed: 0.3s;
}

/* Reset i osnovni stilovi */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
    color: var(--text-medium);
    background-color: var(--secondary-color);
    line-height: 1.6;
    font-size: 16px;
}

/* Tipografija */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-speed);
}

a:hover {
    color: var(--primary-dark);
}

p {
    margin-bottom: 1rem;
}

/* Header stilovi - moderan i čist dizajn */
.main-header {
    background-color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-medium) !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 1rem 1.25rem;
    position: relative;
    transition: color var(--transition-speed);
    letter-spacing: 0.5px;
}

.navbar-light .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 10px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    width: 30px;
}

.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Dropdown stilovi - elegantni i odzivni */
.dropdown-menu {
    margin-top: 0;
    border: none;
    border-radius: 8px;
    background-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    min-width: 220px;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    transform: translateY(10px);
}

.dropdown:hover > .dropdown-menu,
.dropdown.show > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-item {
    color: var(--text-medium);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: all var(--transition-speed);
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-item.active {
    background-color: rgba(21, 101, 192, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer stilovi - elegantan i informativan */
footer {
    background-color: var(--primary-dark) !important;
    color: var(--text-light);
    padding: 3.5rem 0 1.5rem;
    margin-top: 4rem;
}

footer .footer-brand h5 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    color: white;
}

footer h5 {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.75rem;
    color: white;
}

footer h5::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

footer .social-icons {
    display: flex;
    gap: 0.75rem;
}

footer .social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed);
    color: white;
}

footer .social-icons a:hover {
    background-color: var(--primary-light);
    transform: translateY(-5px);
    color: white;
}

footer .footer-links li {
    margin-bottom: 0.65rem;
}

footer .footer-links a,
footer .footer-contact a {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

footer .footer-links a:hover,
footer .footer-contact a:hover {
    color: white !important;
    transform: translateX(3px);
}

footer .footer-links i {
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

footer .footer-contact .icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

footer .footer-contact span,
footer .footer-contact p {
    color: rgba(255, 255, 255, 0.75);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0 1rem;
}

/* Glavni sadržaj */
main {
    min-height: 70vh;
    padding: 2.5rem 0;
}

.section-title {
    color: var(--primary-color);
    position: relative;
    margin-bottom: 2.5rem;
    font-size: 2.25rem;
    padding-bottom: 1rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Button stilovi - moderan i atraktivan dizajn */
.btn {
    border-radius: 4px;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0)
    );
    transition: all 0.5s;
}

.btn:hover::after {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 3px 6px rgba(21, 101, 192, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(21, 101, 192, 0.4);
}

.btn-outline-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(21, 101, 192, 0.3);
}

/* Card stilovi - moderan dizajn s efektima */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.card-img-top {
    transition: all 0.5s;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Breadcrumb stilovi */
.breadcrumb {
    background-color: transparent;
    padding: 1rem 0;
    font-size: 0.95rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-medium);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-medium);
}

/* Back to top button - atraktivan dizajn */
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 25px;
    bottom: 25px;
    z-index: 99;
    background: var(--primary-color);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.back-to-top i {
    font-size: 24px;
    color: var(--text-light);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    visibility: visible;
    opacity: 1;
}

/* Responsive adjustments - poboljšanja za mobilne uređaje */
@media (max-width: 991.98px) {
    /* Reorganizacija dropdown elemenata za mobilne */
    .navbar-nav .dropdown {
        position: relative;
        display: flex;
        flex-wrap: wrap;
    }

    /* Glavni link zauzima većinu prostora */
    .navbar-nav .dropdown > .nav-link {
        flex: 1;
        padding-right: 0;
    }

    /* Dugme za mobilni dropdown */
    .dropdown-toggle-mobile {
        background: transparent;
        border: none;
        color: var(--text-medium);
        width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    /* Rotacija ikone kad je dropdown otvoren */
    .dropdown.show .dropdown-toggle-mobile i {
        transform: rotate(180deg);
    }

    /* Dropdown meni stilovi za mobilne */
    .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        box-shadow: none;
        border-radius: 6px;
        background-color: rgba(0, 0, 0, 0.02);
        transform: none;
        transition: max-height 0.3s, opacity 0.3s;
        max-height: 0;
        overflow: hidden;
        display: block;
        opacity: 0;
        visibility: visible;
        pointer-events: none;
    }

    /* Otvoreni dropdown na mobilnom */
    .navbar-nav .dropdown.show .dropdown-menu {
        max-height: 1000px;
        opacity: 1;
        pointer-events: auto;
    }

    /* Dropdown item stil za mobilni */
    .dropdown-item {
        padding: 0.75rem 1rem;
        border-radius: 4px;
        transform: none !important;
    }

    .dropdown-item:hover {
        transform: none !important;
    }

    /* Navbar collapse stil za mobilni */
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: var(--shadow-md);
        margin-top: 0.75rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Navbar toggler stil */
    .navbar-light .navbar-toggler {
        border: none;
        padding: 0.5rem;
        transition: all 0.3s;
    }

    .navbar-light .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }

    .navbar-light .navbar-toggler:hover {
        background-color: rgba(0, 0, 0, 0.05);
        border-radius: 4px;
    }

    /* Aktivna navigacija na mobilnom */
    .nav-item.show .nav-link,
    .navbar-light .navbar-nav .nav-link:hover,
    .navbar-light .navbar-nav .nav-link.active {
        background-color: rgba(21, 101, 192, 0.08);
        color: var(--primary-color) !important;
        border-radius: 4px;
    }

    /* Footer responzivnost */
    footer {
        padding-top: 2.5rem;
        text-align: center;
    }

    footer h5::after {
        left: 50%;
        transform: translateX(-50%);
    }

    footer .social-icons {
        justify-content: center;
    }

    footer .footer-contact .d-flex {
        flex-direction: column;
        align-items: center;
    }

    footer .footer-contact .icon-box {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    footer .row > div:not(:last-child) {
        margin-bottom: 2rem;
    }
}

@media (min-width: 992px) {
    /* Sakrij mobilno dugme na desktop verziji */
    .dropdown-toggle-mobile {
        display: none;
    }

    /* Dropdown efekt za desktop */
    .navbar-nav .dropdown {
        position: relative;
    }

    .navbar-nav .dropdown > .nav-link {
        position: relative;
        padding-right: 1.5rem;
    }

    /* Stiliziranje dropdown indikatora (bez strelica) */
    .navbar-nav .dropdown > .nav-link::before {
        content: "";
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: var(--primary-color);
        opacity: 0.5;
        transition: all 0.3s;
    }

    .navbar-nav .dropdown:hover > .nav-link::before {
        opacity: 1;
    }

    /* Popravak dropdowna za desktop navigaciju */
    .navbar-nav .dropdown .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: auto;
    }
}
