/* ==========================================================================
   KONEKT - Premium Custom CSS
   ========================================================================== */

/* --- Varijable i Osnovna Podesavanja --- */
:root {
    --primary-color: #0b2e59; /* Duboka korporativna plava sa BizFlow sajta */
    --primary-hover: #164b8a;
    --secondary-color: #64748b;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --font-family-base: 'Inter', sans-serif;

    /* Bootstrap 5 overrides */
    --bs-primary: #0b2e59;
    --bs-primary-rgb: 11, 46, 89;
    --bs-body-color: #334155;
    --bs-body-bg: #ffffff;
}

body {
    font-family: var(--font-family-base);
    color: var(--bs-body-color);
    line-height: 1.7;
    background-color: var(--bs-body-bg);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    letter-spacing: -0.02em;
}

/* --- Navigacija (Navbar) --- */

/* Logo: belo na hero, plavo kada se skroluje */
.konekt-logo {
    display: inline-block;
    color: #ffffff !important;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, text-shadow 0.3s ease, color 0.4s ease;
    transform-style: preserve-3d;
}

.konekt-logo:hover {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 25px rgba(255, 255, 255, 0.4);
}

#mainNav.navbar-shrink .konekt-logo {
    color: var(--primary-color) !important;
    -webkit-text-stroke: 0px transparent;
    text-shadow: none;
}

#mainNav.navbar-shrink .konekt-logo:hover {
    text-shadow: 0 0 15px rgba(11, 46, 89, 0.3);
}

#mainNav {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: transparent;
}

#mainNav .navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* Meni linkovi: belo na hero */
#mainNav .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
    transition: color 0.4s ease, text-shadow 0.3s ease;
    margin: 0 0.25rem;
}

#mainNav .nav-link:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Dropdown meni */
#mainNav .dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 0.5rem;
}

#mainNav .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--bs-body-color);
    transition: all 0.2s;
}

#mainNav .dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Meni nakon skrolovanja: bela pozadina, plav tekst */
#mainNav.navbar-shrink {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

#mainNav.navbar-shrink .nav-link {
    color: var(--primary-color);
}

#mainNav.navbar-shrink .nav-link:hover {
    color: var(--primary-hover);
    text-shadow: none;
}

/* Hamburger ikona: bela na hero, tamna na beloj pozadini */
#mainNav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

#mainNav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

#mainNav.navbar-shrink .navbar-toggler {
    border-color: rgba(11, 46, 89, 0.3);
}

#mainNav.navbar-shrink .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2811, 46, 89, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Hero Sekcija --- */
header.hero {
    position: relative;
    padding-top: 12rem;
    padding-bottom: 8rem;
    background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%), url('../images/hero-bg.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-size: cover;
    min-height: 100vh;
}

header.hero h1 {
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    color: #ffffff !important;
}

header.hero p.lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* --- Dugmići (Buttons) --- */
.btn {
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.02em;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 82, 204, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 82, 204, 0.2);
}

/* --- Slike i Sekcije --- */
img.rounded {
    border-radius: 16px !important;
}

.shadow {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* --- Sekcija Usluga (Cards) --- */
.service-card, .card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.03) !important;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04) !important;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    width: 80px;
    border-radius: 20px; /* Moderniji oblik od čistog kruga */
    background-color: rgba(0, 82, 204, 0.08);
    color: var(--primary-color);
    margin: 0 auto;
    transition: all 0.4s ease;
}

.service-card:hover .icon-box {
    background-color: var(--primary-color);
    color: #fff !important;
    transform: scale(1.1) rotate(5deg);
}

/* --- Ticker Klijenata (Animacija) --- */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    position: relative;
}

/* Gradient maske za ivice tickera */
.ticker-wrap::before, .ticker-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.ticker-wrap::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.ticker-wrap::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    /* Povećano vreme na 90s za sporije kretanje */
    animation: scroll 90s linear infinite;
}

.ticker-item {
    display: inline-block;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
    cursor: default;
    margin: 0 2.5rem;
    vertical-align: middle;
}

.ticker-item img {
    max-height: 45px;
    width: auto;
    filter: grayscale(100%);
    transition: all 0.4s ease;
}

.ticker-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

.ticker-item:hover img {
    filter: grayscale(0%);
}

@keyframes scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); } /* Promenjeno na -50% pošto su logotipi duplirani */
}

/* --- Polygonizr Canvas (Hero) --- */
#polygons-container {
    pointer-events: none;
    opacity: 0.45;
}

#polygons-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* --- Forme (Kontakt) --- */
.form-control {
    border-radius: 12px;
    padding: 0.8rem 1.25rem;
    background-color: var(--light-color) !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    background-color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.15) !important;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* --- Footer --- */
.footer .footer-logo {
    color: #ffffff !important;
    -webkit-text-stroke: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    animation: footerLogoGlow 3s ease-in-out infinite;
}

@keyframes footerLogoGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 255, 255, 0.2); }
    50% { text-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 50px rgba(11, 46, 89, 0.4); }
}

/* Footer Polygonizr */
#footer-polygons {
    pointer-events: none;
    opacity: 0.3;
}

#footer-polygons canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.footer {
    background-color: var(--dark-color) !important;
    border-top: none;
}

.footer ul li {
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.footer ul li:hover {
    transform: translateX(5px);
    color: #fff !important;
}

.hover-primary:hover {
    color: var(--primary-color) !important;
    transform: scale(1.1);
}
.transition-all {
    transition: all 0.3s ease;
}

/* --- Responzivnost --- */
@media (max-width: 991.98px) {
    #mainNav {
        background-color: rgba(255, 255, 255, 0.98);
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }
    #mainNav .nav-link {
        color: var(--primary-color) !important;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    #mainNav .nav-link:hover {
        text-shadow: none;
        color: var(--primary-hover) !important;
    }
    #mainNav .navbar-brand,
    #mainNav .konekt-logo {
        color: var(--primary-color) !important;
        -webkit-text-stroke: 0px transparent;
        text-shadow: none;
    }
    #mainNav .navbar-toggler {
        border-color: rgba(11, 46, 89, 0.3);
    }
    #mainNav .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2811, 46, 89, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}