/* ==========================================================================
   KONEKT AI — tamna korporativna tema (navy, bez neona)
   ========================================================================== */

:root {
    --primary-color: #3d7ec4;
    --primary-hover: #5a96d4;
    --primary-deep: #0b2e59;
    --secondary-color: #94a3b8;
    --dark-color: #e8eef6;
    --light-color: #0c1624;
    --font-family-base: 'Inter', sans-serif;
    --font-family-mono: 'Inter', ui-monospace, monospace;

    --bg: #071018;
    --bg-alt: #0a1522;
    --surface: #101c2c;
    --surface-hover: #152338;
    --line: rgba(148, 163, 184, 0.14);
    --text: #e8eef6;
    --text-lead: #c5d0de;
    --muted: #94a3b8;

    --bs-primary: #3d7ec4;
    --bs-primary-rgb: 61, 126, 196;
    --bs-body-color: #c5d0de;
    --bs-body-bg: #071018;

    --ai-primary: #3d7ec4;
    --ai-text-white: #e8eef6;
    --ai-text-lead: #c5d0de;
    --ai-text-muted: #94a3b8;
    --ai-border: rgba(148, 163, 184, 0.14);
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

html {
    overflow-x: clip;
}

body {
    overflow-x: hidden;
}

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

body.lang-sr .en { display: none !important; }
body.lang-en .sr { display: none !important; }

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

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

.text-gradient-cyan,
.text-gradient-green,
.text-gradient-purple {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    color: #8bb8e8;
}

.hero-ai .text-gradient-cyan,
.hero-ai .text-gradient-green,
.hero-ai .text-gradient-purple {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

.mono { font-family: var(--font-family-mono); }

/* --- Navbar --- */
#mainNav {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
    background-color: transparent;
}

#mainNav .navbar-brand,
.konekt-logo,
.konekt-ai-logo {
    font-size: 1.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

.logo-ai,
.konekt-ai-logo .ai-badge {
    font-size: 0.72em;
    letter-spacing: 1px;
    font-weight: 700;
    color: inherit;
    background: none;
    padding: 0;
    border-radius: 0;
}

#mainNav .navbar-nav {
    flex-wrap: wrap;
    justify-content: center;
}

#mainNav .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04rem;
    margin: 0;
    padding: 0.4rem 0.45rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: #fff;
}

#mainNav .nav-link.active::after { display: none; }

#mainNav.navbar-shrink {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    background-color: rgba(7, 16, 24, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    border-bottom: 1px solid var(--line);
}

#mainNav.navbar-shrink .navbar-brand,
#mainNav.navbar-shrink .konekt-logo,
#mainNav.navbar-shrink .konekt-ai-logo {
    color: #ffffff !important;
    text-shadow: none;
}

#mainNav.navbar-shrink .nav-link {
    color: rgba(232, 238, 246, 0.88);
}

#mainNav.navbar-shrink .nav-link:hover,
#mainNav.navbar-shrink .nav-link.active {
    color: #fff;
}

#mainNav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45);
}

#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(255, 255, 255, 0.35);
}

#lang-toggle {
    cursor: pointer;
    font-weight: 800 !important;
    background: transparent !important;
    color: inherit !important;
}

#mainNav #lang-toggle,
#mainNav #lang-toggle.small,
#mainNav.navbar-shrink #lang-toggle {
    color: rgba(255, 255, 255, 0.9) !important;
}

#mainNav .text-info {
    color: inherit !important;
}

#mainNav .btn-cta-nav,
#mainNav .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff !important;
    font-weight: 600;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
}

#mainNav.navbar-shrink .btn-cta-nav,
#mainNav.navbar-shrink .btn-primary {
    background-color: var(--primary-color);
    color: #fff !important;
}

/* --- Hero --- */
.hero-ai,
header.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    padding-top: 11rem;
    padding-bottom: 6rem;
    overflow: hidden;
    background-image: linear-gradient(160deg, rgba(7, 16, 24, 0.88) 0%, rgba(11, 46, 89, 0.72) 100%), url('../images/hero-bg.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
}

.hero-ai.page-hero {
    min-height: 46vh;
    padding-top: 9.5rem;
    padding-bottom: 4.5rem;
}

.hero-ai h1,
.hero-ai .hero-ai-title,
.hero-ai .text-white {
    color: #ffffff !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.hero-ai-title {
    font-size: clamp(1.85rem, 4.2vw, 3.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.hero-ai-subtitle,
.hero-ai-subnote,
.hero-ai p.lead {
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ai-subtitle {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.hero-ai-subnote {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.92;
}

.hero-ai-badge {
    display: inline-block;
    padding: 0;
    margin-bottom: 1.25rem;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-ai-badge[style] {
    border-color: transparent !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

.status-dot-pulse { display: none; }

.polygons,
#polygons-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.28;
    z-index: 1;
}

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

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.25rem;
    margin-top: 2.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.trust-tag {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    letter-spacing: 0;
}

.trust-tag:hover {
    background: none;
    border: none;
    color: #fff;
    transform: none;
}

.trust-tag i { color: rgba(255, 255, 255, 0.7) !important; }

/* --- Dugmad --- */
.btn {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn-primary,
.btn-ai-primary,
.btn-ai-green,
.btn-cta-nav {
    background-color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    color: #fff !important;
    border-radius: 50rem;
    box-shadow: none !important;
    font-weight: 600;
}

.btn-primary:hover,
.btn-ai-primary:hover,
.btn-ai-green:hover,
.btn-cta-nav:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(11, 46, 89, 0.35) !important;
    color: #fff !important;
}

.btn-outline-primary,
.btn-ai-outline {
    background: transparent !important;
    color: #d7e6f5 !important;
    border: 2px solid rgba(139, 184, 232, 0.45) !important;
    border-radius: 50rem;
    font-weight: 600;
}

.hero-ai .btn-ai-outline,
.hero-ai .btn-outline-light {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
}

.hero-ai .btn-ai-outline:hover {
    background: #fff !important;
    color: var(--primary-deep) !important;
    border-color: #fff !important;
}

.btn-ai-outline:hover,
.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.btn-ai-primary,
.btn-ai-outline,
.btn-ai-green {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.75rem;
}

/* --- Sekcije --- */
.section-py,
main.py-5 {
    padding: 5rem 0;
    background: var(--bg);
}

.section-alt,
.section-py.section-alt {
    background-color: var(--bg-alt);
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-desc {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 760px;
    margin-bottom: 0;
}

.section-badge {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8bb8e8;
    margin-bottom: 0.6rem;
}

.section-badge.text-success { color: #8bb8e8 !important; }

.ai-card,
.service-card {
    background: var(--surface);
    border: 1px solid var(--line) !important;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ai-card:hover,
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
    background: var(--surface-hover);
    border-color: rgba(139, 184, 232, 0.22);
}

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

.hero-ai .text-white,
.hero-ai h1,
.hero-ai h2,
.hero-ai p,
.ai-footer .text-white,
.footer .text-white,
.terminal-body .text-white {
    color: #ffffff !important;
}

.ai-card h1, .ai-card h2, .ai-card h3, .ai-card h4, .ai-card h5, .ai-card h6,
.ai-card .h3, .ai-card .h4, .ai-card .h5, .ai-card .h6 {
    color: var(--text) !important;
}

.section-py .text-info,
.ai-card .text-info,
.ai-card .text-success,
.ai-card .text-warning,
.ai-card .text-primary,
.ai-card .text-danger,
.ai-card .text-purple,
.section-py h4.text-info,
.section-py h4.text-success,
.section-py h4.text-warning,
.section-py h4.text-danger,
.section-py h5.text-info,
.section-py h5.text-success,
.section-py h5.text-warning,
.section-py h5.text-primary,
.section-py h5.text-danger {
    color: #8bb8e8 !important;
}

.ai-card .text-muted,
.section-py .text-muted,
main .text-muted,
.text-muted {
    color: var(--muted) !important;
}

.ai-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background-color: rgba(61, 126, 196, 0.14);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #8bb8e8;
    margin-bottom: 1.25rem;
}

.ai-card-icon.green,
.ai-card-icon.purple,
.ai-card-icon.amber,
.ai-card-icon.red {
    background-color: rgba(61, 126, 196, 0.14);
    color: #8bb8e8;
}

.ai-card:hover .ai-card-icon {
    background-color: var(--primary-color);
    color: #fff;
}

.list-unstyled .fa-check,
.list-unstyled .fa-arrow-right {
    color: #8bb8e8 !important;
}

.diagram-container {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.diagram-container::before { display: none; }

.diagram-container img,
.diagram-container svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
}

img.rounded { border-radius: 16px !important; }

.table-ai {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.table-ai th {
    background: #122033;
    color: var(--text);
    padding: 1.1rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--line);
}

.table-ai td {
    padding: 1rem 1.5rem;
    color: var(--text-lead);
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}

.table-ai tr:last-child td { border-bottom: none; }
.table-ai tr:hover td { background: rgba(61, 126, 196, 0.08); }

.terminal-box {
    background: #0a1522;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.terminal-header {
    background: #122033;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-dot.red,
.terminal-dot.yellow,
.terminal-dot.green { background: #64748b; }

.terminal-title {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-left: 8px;
}

.terminal-body {
    padding: 1.25rem;
    font-size: 0.88rem;
    color: #e2e8f0;
    overflow-x: auto;
    line-height: 1.6;
}

.terminal-body .text-info { color: #93c5fd !important; }
.terminal-body .text-success { color: #86efac !important; }
.terminal-body .text-warning { color: #fde68a !important; }
.terminal-body .text-white { color: #f8fafc !important; }
.terminal-body .text-muted { color: #94a3b8 !important; }

.status-indicator { display: none; }

.badge.bg-dark,
.badge.bg-light {
    background: #152338 !important;
    color: #c5d0de !important;
    border: 1px solid var(--line) !important;
}

.badge.bg-primary,
.badge.bg-success,
.badge.bg-info {
    background-color: #1e4a7a !important;
    color: #e8eef6 !important;
}

.badge.bg-danger {
    background-color: #7f1d1d !important;
    color: #fecaca !important;
}

.badge.text-dark,
.badge.text-primary,
.badge.text-success,
.badge.text-info {
    color: #e8eef6 !important;
}

hr.border-secondary,
.border-secondary {
    border-color: var(--line) !important;
}

.border-info,
.border-primary,
.border-success {
    border-color: rgba(139, 184, 232, 0.28) !important;
}

code {
    font-family: var(--font-family-base);
    font-size: 0.9em;
    color: #c5d0de;
    background: #152338;
    padding: 0.1em 0.4em;
    border-radius: 6px;
}

.form-ai-control,
.form-control,
.form-select {
    border-radius: 12px;
    padding: 0.8rem 1.25rem;
    background-color: #0a1522 !important;
    border: 1px solid var(--line) !important;
    color: var(--text) !important;
    font-size: 0.95rem;
}

.form-ai-control:focus,
.form-control:focus,
.form-select:focus {
    background-color: #101c2c !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(61, 126, 196, 0.22) !important;
    color: var(--text) !important;
}

.form-ai-control::placeholder,
.form-control::placeholder {
    color: #64748b;
}

.form-ai-label,
.form-label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-check-input {
    background-color: #0a1522;
    border-color: #475569;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label { color: var(--text-lead); }

.alert-success {
    background: #12281c;
    border-color: #166534;
    color: #bbf7d0;
}

.ai-footer,
.footer {
    background-color: #050b12 !important;
    color: #fff;
    padding-top: 4rem;
    padding-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--line);
}

.ai-footer a,
.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.ai-footer a:hover,
.footer a:hover { color: #fff; }

.ai-footer .konekt-logo,
.ai-footer .konekt-ai-logo,
.ai-footer .text-white,
.footer .text-white {
    color: #ffffff !important;
}

.ai-footer .text-muted { color: rgba(255, 255, 255, 0.65) !important; }

#footer-polygons {
    pointer-events: none;
    opacity: 0.18;
}

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

.hover-primary:hover {
    color: #93c5fd !important;
}

.nav-link, .btn, .footer a, .ai-footer a, .dropdown-item {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

#navbarResponsive .navbar-nav .nav-link {
    display: flex;
}

img {
    max-width: 100%;
    height: auto;
}

pre, code {
    white-space: pre-wrap;
    word-break: break-word;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hero-ai .container,
.section-py .container,
main .container {
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ai-card,
    .btn,
    #mainNav {
        transition: none;
    }
    .polygons,
    #polygons-container,
    #footer-polygons { display: none; }
}

@media (max-width: 1199.98px) {
    #mainNav {
        background-color: rgba(7, 16, 24, 0.96);
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        border-bottom: 1px solid var(--line);
    }
    #mainNav .nav-link {
        color: #e8eef6 !important;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--line);
        text-transform: none;
        font-size: 0.95rem;
        white-space: normal;
        width: 100%;
    }
    #mainNav .navbar-collapse .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        padding: 0.75rem 0 1rem;
        gap: 0.75rem !important;
    }
    #mainNav .navbar-collapse .btn {
        width: 100%;
        justify-content: center;
    }
    #mainNav .navbar-brand,
    #mainNav .konekt-logo,
    #mainNav .konekt-ai-logo,
    #mainNav #lang-toggle {
        color: #ffffff !important;
        text-shadow: none;
    }
    #mainNav .navbar-toggler { border-color: rgba(255, 255, 255, 0.35); }
    #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");
    }
}

@media (max-width: 991.98px) {
    #mainNav .navbar-brand,
    #mainNav .konekt-logo {
        font-size: 1.35rem;
    }

    .hero-ai {
        padding-top: 7rem;
        padding-bottom: 3.5rem;
        min-height: auto;
    }
    .hero-ai.page-hero {
        min-height: auto;
        padding-top: 7rem;
        padding-bottom: 2.75rem;
    }
    .hero-ai-title { font-size: 1.75rem; line-height: 1.3; }
    .hero-ai-subtitle { font-size: 1rem; margin-bottom: 1rem; }
    .hero-ai-subnote { font-size: 0.92rem; margin-bottom: 1.5rem; }
    .section-py,
    main.py-5 { padding: 2.75rem 0; }
    .section-title { font-size: 1.45rem; }
    .diagram-container { padding: 0.75rem; border-radius: 12px; }
    .btn-ai-primary,
    .btn-ai-outline,
    .btn-ai-green,
    .hero-ai .btn-lg {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    .table-ai th,
    .table-ai td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 767.98px) {
    .hero-ai { padding-top: 6.25rem; padding-bottom: 2.75rem; }
    .hero-ai-title { font-size: 1.45rem; line-height: 1.3; }
    .hero-ai-subtitle { font-size: 0.95rem; }
    .hero-ai-subnote { display: none; }
    .ai-card { padding: 1.15rem; }
    .ai-card-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 1.2rem; margin-bottom: 0.85rem; }
    .section-badge { font-size: 0.72rem; }
}

@media (hover: none) and (pointer: coarse) {
    .ai-card:hover,
    .btn:hover { transform: none; }
    .ai-card:hover .ai-card-icon {
        background-color: rgba(61, 126, 196, 0.14);
        color: #8bb8e8;
    }
}
