/* Dzafic-IT-Solutions - "Premium Green" tema: svijetli header, tamnozeleni hero.
   Izdvojeno iz index.php da HTML/CSS/PHP logika ne budu u jednom fajlu. */

/* Fontovi se ucitavaju sa VLASTITOG servera (assets/fonts/) - bez Google Fonts, DSGVO-konformno.
   Ako fajl nedostaje, browser automatski koristi sistemski font (font-display: swap). */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('fonts/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/Outfit-VariableFont_wght.ttf') format('truetype');
}

:root {
    --bg: #F2F6F2;
    --surface: #124028;
    --surface-2: #185033;
    --border: #2E6B48;
    --border-soft: rgba(47, 161, 77, 0.28);
    --accent: #2FA14D;
    --accent-2: #7BE495;
    --accent-gradient: linear-gradient(135deg, #2FA14D, #6FDB8C);
    --text-heading: #F3FBF5;
    --text-body: #9DB8A6;
    --text-body-light: #D2E5D8;
    --ink: #0C2016;
    --brand: #1E9A47;
    --brand-dark: #14803A;
    --success-bg: rgba(34, 197, 94, 0.12);
    --success-text: #4ADE80;
    --error-bg: rgba(239, 68, 68, 0.12);
    --error-text: #F87171;
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    --font-head: 'Outfit', 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-body); }

body { background: var(--bg); color: var(--ink); display: flex; flex-direction: column; min-height: 100vh; }
.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- Gornja traka: telefon, regija, jezik ---------- */
.util-bar { position: relative; z-index: 1200; background: #0C5A2B; color: #CDE9D6; font-size: 0.82rem; }
.util-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; }
.util-phone { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.util-phone svg { width: 16px; height: 16px; stroke: var(--accent-2); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.util-areas { letter-spacing: 0.02em; }
.top-bar-container { display: flex; align-items: center; }
.lang-dropdown { position: relative; }
.dropbtn { background: transparent; color: #fff; padding: 6px 12px; font-size: 0.82rem; font-weight: 600; border: 1px solid rgba(255,255,255,0.22); border-radius: 8px; cursor: pointer; transition: border-color 0.2s; }
.dropbtn:hover { border-color: var(--accent-2); }
.dropdown-content { display: block; max-height: 0; opacity: 0; visibility: hidden; border-width: 0; transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0s linear 0.3s; position: absolute; right: 0; left: auto; max-width: calc(100vw - 24px); background-color: var(--surface); min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--border); border-radius: 8px; z-index: 10; margin-top: 6px; overflow: hidden; }
.dropdown-content a { color: var(--text-body-light); padding: 10px 14px; text-decoration: none; display: block; font-size: 0.85rem; }
.dropdown-content a:hover { background-color: var(--surface-2); color: var(--text-heading); }
.dropdown-content.show { max-height: 340px; opacity: 1; visibility: visible; border-width: 1px; transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0s; }

/* ---------- Header: logo lijevo, usluge u sredini, kontakt desno ---------- */
.site-header { position: sticky; top: 0; z-index: 1100; background: #fff; border-bottom: 1px solid #DCE7DF; box-shadow: 0 6px 24px rgba(7, 35, 15, 0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 0; padding-bottom: 0; min-height: 118px; }
.brand { display: flex; flex: 0 1 auto; min-width: 0; align-self: stretch; padding: 6px 0; }
.brand img { height: 106px; width: auto; max-width: 100%; object-fit: contain; display: block; } /* logo popunjava cijelu visinu bijelog zaglavlja */

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
a.nav-item { text-decoration: none; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; color: var(--ink); text-align: left; transition: background 0.2s; }
.nav-item::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; background: var(--brand); transform: scaleX(0); transition: transform 0.25s; }
.nav-item:hover, .nav-item:focus-visible { background: #EAF4EC; }
.nav-item:hover::after, .nav-item:focus-visible::after { transform: scaleX(1); }
.nav-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); box-shadow: 0 6px 14px rgba(15, 95, 43, 0.28); }
.card-icon { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { font-family: var(--font-head); line-height: 1.25; max-width: 125px; }
.premium-badge { position: absolute; top: -8px; right: 2px; background: var(--accent-gradient); color: #062412; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 12px rgba(47, 161, 77, 0.4); }

.nav-flyout { position: absolute; top: calc(100% + 12px); left: 50%; transform: translate(-50%, 6px); width: 260px; padding: 16px 18px; background: var(--surface); color: var(--text-body-light); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 40px rgba(7, 35, 15, 0.35); font-family: var(--font-body); font-weight: 400; font-size: 0.82rem; line-height: 1.55; white-space: normal; opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0.2s; z-index: 5; }
.nav-item:hover .nav-flyout, .nav-item:focus-visible .nav-flyout { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

body.audience-b2b .nav-item { opacity: 0.55; }
body.audience-b2b .nav-item.card-network, body.audience-b2b .nav-item.card-pos { opacity: 1; background: #EAF4EC; }
body.audience-b2b .nav-item.card-network::after, body.audience-b2b .nav-item.card-pos::after { transform: scaleX(1); }

/* ---------- Kontakt dugme (desno) ---------- */
.header-contact-wrapper { position: relative; flex-shrink: 0; z-index: 1200; }
.contact-trigger { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border: none; border-radius: 10px; cursor: pointer; background: linear-gradient(135deg, #27B058, var(--brand-dark)); color: #fff; font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; box-shadow: 0 6px 16px rgba(15, 95, 43, 0.34); transition: transform 0.2s, box-shadow 0.2s; }
.contact-trigger:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 95, 43, 0.5); }
.contact-trigger svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-trigger .chev { font-size: 0.65rem; opacity: 0.8; }
.contact-popup-menu { display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 280px; background: var(--surface); border-radius: 12px; box-shadow: 0 18px 40px rgba(7, 35, 15, 0.4); overflow: hidden; border: 1px solid var(--border); z-index: 1300; animation: fadeIn 0.2s ease; text-align: left; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.contact-item { display: flex; align-items: center; padding: 12px 16px; text-decoration: none; color: var(--text-heading); border-bottom: 1px solid var(--border); transition: background 0.2s; }
.contact-item:last-child { border-bottom: none; }
.contact-item:hover { background: var(--surface-2); }
.contact-item .icon { font-size: 18px; margin-right: 12px; }
.contact-item div { display: flex; flex-direction: column; font-size: 0.8rem; }
.contact-item strong { color: var(--accent-2); font-size: 0.68rem; letter-spacing: 0.4px; }
.contact-item span:not(.icon) { color: var(--text-body-light); font-weight: 500; }

/* ---------- Hero ---------- */
.hero { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; min-height: 540px; color: #fff;
    background: radial-gradient(60% 85% at 82% 45%, rgba(200, 255, 220, 0.38), transparent 70%), linear-gradient(125deg, #0B6B31 0%, #12903F 50%, #26B359 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.8rem); line-height: 1.08; letter-spacing: -0.035em; color: #fff; text-align: left; max-width: 20ch; }
.hero-subtitle { margin-top: 24px; font-size: 1.15rem; line-height: 1.65; color: #E6F8EC; max-width: 52ch; }
.hero-visual { width: 100%; max-width: 470px; justify-self: center; filter: drop-shadow(0 0 40px rgba(220, 255, 230, 0.3)); }
@keyframes ring { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.8; } }
@media (prefers-reduced-motion: no-preference) { .hero-visual .ring { animation: ring 5s ease-in-out infinite; } }

.b2b-toggle { margin: 0 0 30px; display: inline-flex; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.32); border-radius: 999px; padding: 4px; gap: 2px; }
.toggle-btn { border: none; background: transparent; color: #EAF9EF; font-size: 0.85rem; font-weight: 600; padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: background 0.2s, color 0.2s; font-family: var(--font-body); }
.toggle-btn.active { background: #fff; color: #0B5A2B; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.toggle-btn:not(.active):hover { color: #fff; }

/* ---------- Footer ---------- */
footer { padding: 24px 20px; text-align: center; color: #CDE9D6; font-size: 0.85rem; width: 100%; background: #0C5A2B; }
.footer-links { margin-top: 4px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-links a { color: #CDE9D6; text-decoration: none; margin: 0 5px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-2); }

/* ---------- Modali (zajednicki booking modal + admin/klijent popupi) ---------- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(3, 14, 8, 0.7); backdrop-filter: blur(3px); z-index: 2000; justify-content: center; align-items: center; padding: 20px; }
.modal-box { background-color: var(--surface); border: 1px solid var(--border); border-radius: 14px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 32px; box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 0 1px var(--border-soft); position: relative; }
.modal-box h3 { font-family: var(--font-head); font-size: 1.3rem; color: var(--text-heading); margin-bottom: 15px; border-bottom: 2px solid var(--accent); padding-bottom: 10px; }
.modal-box p { font-size: 0.9rem; color: var(--text-body-light); line-height: 1.6; margin-bottom: 15px; }
.modal-form { margin-top: 15px; border-top: 1px solid var(--border); padding-top: 15px; }
.modal-form label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-body-light); margin-bottom: 5px; }
.client-type-group { display: flex; gap: 10px; margin-bottom: 16px; }
.client-type-group label { position: relative; flex: 1; margin: 0; cursor: pointer; }
.client-type-group input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.client-type-group span { display: block; text-align: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text-body-light); font-size: 0.92rem; font-weight: 600; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.client-type-group label:hover span { border-color: var(--accent); }
.client-type-group input:checked + span { background: var(--accent-gradient); color: #062412; border-color: transparent; }
.client-type-group input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.time-row { display: flex; gap: 10px; }
.time-row > div { flex: 1; }

.modal-form input[type="text"],
.modal-form input[type="email"],
.modal-form input[type="date"],
.modal-form input[type="time"],
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    outline: none;
    background-color: var(--surface-2);
    color: var(--text-heading);
    color-scheme: dark;
}
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus { border-color: var(--accent); }
.modal-form textarea { resize: vertical; height: 70px; }

.datenschutz-group { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 15px; font-size: 0.85rem; color: var(--text-body); }
.datenschutz-group input[type="checkbox"] { margin-top: 3px; cursor: pointer; width: 16px; height: 16px; accent-color: var(--accent); }
.datenschutz-group label { font-weight: normal; cursor: pointer; line-height: 1.4; display: inline; }
.datenschutz-group a { color: var(--accent-2); text-decoration: underline; }

.form-actions { display: flex; justify-content: space-between; align-items: center; }
.send-btn { background: var(--accent-gradient); color: #062412; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 0.9rem; transition: box-shadow 0.2s; }
.send-btn:hover { box-shadow: 0 6px 18px rgba(111, 219, 140, 0.35); }
.close-btn { background-color: var(--surface-2); color: var(--text-body-light); border: 1px solid var(--border); padding: 9px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }

.success-msg { background-color: var(--success-bg); color: var(--success-text); padding: 12px; border-radius: 6px; margin-bottom: 15px; font-size: 0.9rem; font-weight: 500; text-align: center; line-height: 1.4; border: 1px solid rgba(74, 222, 128, 0.25); }
.error-msg { background-color: var(--error-bg); color: var(--error-text); padding: 12px; border-radius: 6px; margin-bottom: 15px; font-size: 0.9rem; font-weight: 500; text-align: center; line-height: 1.4; border: 1px solid rgba(248, 113, 113, 0.25); }

/* Napomena o spam folderu: sitno slovo ispod dugmeta, ne upadljivo na vrhu */
.spam-note-fine { margin-top: 12px; font-size: 0.72rem; color: #64748B; line-height: 1.4; text-align: center; }

/* Admin/klijent popupi (accept/reject/reschedule linkovi iz mejla) i dalje koriste
   svijetlu kutiju (inline background:white) namjerno - to su zasebne stranice koje
   se otvaraju samo preko mejl linka, ne dio glavnog "premium" dizajna. */
.spam-alert { background-color: #fff3cd; color: #856404; padding: 10px 12px; border: 1px solid #ffeeba; border-radius: 6px; margin-bottom: 12px; font-size: 0.82rem; line-height: 1.4; }
.admin-action-box { max-width: 600px; margin: 20px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 25px; margin-bottom: 20px; text-align: center; color: var(--text-body-light); }
.admin-action-box h2 { margin-bottom: 10px; color: var(--text-heading); }

@media (max-width: 1280px) {
    .header-inner { flex-wrap: wrap; gap: 12px 16px; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
    .brand { align-self: auto; padding: 0; }
    .brand img { height: 84px; }
    .header-contact-wrapper { margin-left: auto; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; padding-top: 10px; padding-bottom: 6px; scrollbar-width: none; }
    .nav-item { flex-shrink: 0; }
    .nav-flyout { display: none; }
    /* "Premium Angebot" znacka je na desktopu apsolutno pozicionirana i namjerno
       "viri" iznad kartice - na mobilnom je prostor izmedju redova premalen za to
       (probijala je u red sa logom/Kontakt dugmetom). Ovdje postaje normalna
       inline znacka unutar dugmeta, bez izlaska van okvira. */
    .premium-badge { position: static; display: inline-block; top: auto; right: auto; margin-right: 2px; }
}
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; }
    .hero-visual { display: none; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .util-areas { display: none; }
    .util-inner { justify-content: flex-end; }
    .brand img { height: 60px; }
    .contact-trigger { padding: 11px 16px; }
    .hero-subtitle { font-size: 1.02rem; }
}

/* ---------- Pravne stranice (Datenschutz / Impressum) ---------- */
.legal { flex: 1; padding: 56px 0 80px; background: linear-gradient(180deg, #0B6B31 0, #1FA64F 200px, var(--bg) 200px); }
.legal-card { max-width: 880px; margin: 0 auto; background: #fff; border-radius: 20px; border-top: 5px solid var(--brand); padding: 48px 56px; box-shadow: 0 24px 60px rgba(7, 35, 15, 0.16); line-height: 1.7; }
.legal-card h1 { font-family: var(--font-head); font-size: 2.2rem; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid #DCE7DF; }
.legal-card h2 { font-family: var(--font-head); font-size: 1.2rem; margin: 32px 0 10px; color: #0F4023; }
.legal-card p, .legal-card ul { font-size: 0.97rem; color: #44574B; margin-bottom: 14px; }
.legal-card ul { padding-left: 22px; }
.legal-card li { margin-bottom: 6px; }
.legal-card a { color: var(--brand); }
.legal-card .back-link { display: inline-block; margin-top: 28px; font-weight: 700; text-decoration: none; }
.legal-card .back-link:hover { text-decoration: underline; }
@media (max-width: 640px) { .legal { padding: 32px 0 56px; } .legal-card { padding: 28px 22px; } .legal-card h1 { font-size: 1.6rem; } }

/* ---------- Booking "prozor": naslovna traka sa minimiziraj / povecaj / zatvori ---------- */
#booking-modal .modal-box { display: flex; flex-direction: column; padding: 0; max-width: 700px; max-height: 94vh; overflow: hidden; }
.win-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 28px; background: var(--surface-2); border-bottom: 2px solid var(--accent); flex-shrink: 0; }
#booking-modal .win-bar h3 { margin: 0; padding: 0; border: 0; font-size: 1.1rem; line-height: 1.3; }
.win-controls { display: flex; gap: 6px; flex-shrink: 0; }
.win-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text-heading); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.win-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.win-btn:hover { background: rgba(255,255,255,0.16); border-color: var(--accent-2); }
.win-close:hover { background: #E5484D; border-color: #E5484D; color: #fff; }
.win-body { overflow-y: auto; padding: 20px 28px 24px; }
#booking-modal .win-body > p { font-size: 0.88rem; line-height: 1.55; margin-bottom: 12px; }
.dt-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }

#booking-modal.minimized { background: transparent; backdrop-filter: none; pointer-events: none; justify-content: flex-end; align-items: flex-end; padding: 20px; }
#booking-modal.minimized .modal-box { pointer-events: auto; width: 360px; max-width: 100%; }
#booking-modal.minimized .win-body { display: none; }
#booking-modal.minimized .win-bar { border-bottom: 0; }
#booking-modal.minimized .win-bar h3 { cursor: pointer; }
#booking-modal.maxed { padding: 0; }
#booking-modal.maxed .modal-box { max-width: none; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; }
@media (max-width: 560px) {
    .dt-row { grid-template-columns: 1fr; gap: 0; }
    .win-bar { padding: 12px 12px 12px 18px; }
    .win-body { padding: 16px 18px 20px; }
}

/* Pravila bukiranja: poruke u formi */
.bk-msg { margin: 8px 0 4px; padding: 9px 12px; border-radius: 8px; font-size: 0.85rem; line-height: 1.45; background: rgba(229,72,77,0.12); border: 1px solid #E5484D; color: var(--text-heading); }
.bk-msg.bk-info { background: rgba(80,160,255,0.12); border-color: var(--accent-2); }
.bk-msg[hidden] { display: none; }
.bk-hint { font-size: 0.78rem; opacity: 0.75; margin: 4px 0 10px; }
.bk-suggest { margin-left: 4px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--accent-2); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.bk-suggest:hover { background: rgba(255,255,255,0.12); }
