/* --- 1. VARIJABLE I RESET --- */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #333333;
    --border-color: #222222;
    --highlight: #ffffff;
    --highlight-text: #000000;

    --font-main: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --grid-spacing: 2rem;
    --max-width: 1400px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- 2. TIPOGRAFIJA --- */
h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: -0.02em;
}

.display-text {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

/* --- 3. POMOĆNE KLASE I IZGLED --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--text-color);
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--highlight);
    color: var(--highlight-text);
}

/* --- 4. NAVIGACIJA --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0.7;
}

.nav-links li a:hover {
    opacity: 1;
    text-decoration: underline;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- 5. HERO SEKCIJA --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 70px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: end;
}

.hero-specs {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
    color: #888;
}

.hero-specs p {
    margin-bottom: 0.5rem;
}

/* --- 6. SEKCIJE (OPĆENITO) --- */
section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* MREŽA STATISTIKE */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
}

.stat-card {
    background: var(--bg-color);
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
}

/* MREŽA USLUGA */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    background: var(--highlight);
    border-color: var(--highlight);
}

.service-card:hover h3,
.service-card:hover p,
.service-card:hover .service-icon {
    color: var(--highlight-text);
}

.service-icon {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #888;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.7;
}

/* PROCES */
.process-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.process-row:last-child {
    border-bottom: none;
}

.process-step {
    font-family: var(--font-mono);
    color: #666;
    margin-right: 2rem;
}

.process-title {
    font-weight: 600;
    flex-grow: 1;
}

/* KONTAKT SEKCIJA */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4rem;
}

/* PODNOŽJE */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-col h4 {
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: #888;
}

.footer-col ul li a:hover {
    color: #fff;
}

/* --- RESPONZIVNOST --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 140px;
        padding-bottom: 4rem;
        align-items: flex-start;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-specs {
        border-left: none;
        padding-left: 0;
        margin-top: 2rem;
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Izbornik za mobitele */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    font-size: 2rem;
    margin: 1rem 0;
    font-weight: 800;
}

/* --- 7. AI CHATBOT --- */
.chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--highlight);
    color: var(--highlight-text);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-bubble::after {
    content: "Pričaj s virtualnim asistentom";
    position: absolute;
    right: 70px;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
}

.chat-bubble:hover::after {
    opacity: 1;
    visibility: visible;
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 0 0;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 85%;
}

.message.user {
    background: var(--highlight);
    color: var(--highlight-text);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message.ai {
    background: var(--accent-color);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex-grow: 1;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    color: white;
    font-family: inherit;
    outline: none;
}

.chat-input:focus {
    border-color: var(--highlight);
}

.chat-send {
    background: var(--highlight);
    color: var(--highlight-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.captcha-notice {
    font-size: 0.7rem;
    color: #666;
    padding: 0.5rem 1rem;
    text-align: center;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
    }
}

/* Sakrivanje reCAPTCHA bedža */
.grecaptcha-badge {
    visibility: hidden;
}