/* ==========================================================================
   Dadomatic - javna stranica
   Čist, minimalan dizajn (bez vanjskih font/CDN ovisnosti - GDPR-prijateljski)
   ========================================================================== */

:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --color-bg: #ffffff;
    --color-bg-muted: #f7f8fa;
    --color-bg-dark: #0f172a;
    --color-text: #16181d;
    --color-text-muted: #5b6270;
    --color-border: #e6e8ec;
    --color-accent: #2454ff;
    --color-accent-dark: #1a3fcc;
    --color-accent-light: #eef2ff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
    --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }

.skip-link {
    position: absolute; left: -999px; top: 0; background: #fff; padding: 10px 16px;
    border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(8px);
    z-index: 50;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--color-text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__logo { height: 36px; width: auto; }
.brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand__logo-fallback .icon { width: 28px; height: 28px; color: var(--color-accent); flex-shrink: 0; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--color-text); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--color-accent); text-decoration: none; }

/* Hamburger gumb - puni 44x44 dodirni cilj (preporučena min. veličina za mobitele) */
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    background: none; border: 0; cursor: pointer; padding: 0;
    width: 44px; height: 44px; flex-shrink: 0; margin-right: -10px;
    position: relative; z-index: 60;
}
.nav-toggle span {
    width: 22px; height: 2px; background: var(--color-text); border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}
/* Animacija hamburger -> X kad je izbornik otvoren */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop { display: none; }

@media (max-width: 780px) {
    .site-header__inner { height: 64px; }
    .brand__logo { height: 30px; }
    .nav-toggle { display: flex; }

    .site-nav {
        position: fixed; top: 64px; left: 0; right: 0; background: #fff;
        flex-direction: column; gap: 0; padding: 6px 0;
        border-bottom: 1px solid var(--color-border);
        max-height: calc(100vh - 64px); overflow-y: auto;
        box-shadow: 0 16px 32px rgba(16, 24, 40, .1);
        transform: translateY(-6px); opacity: 0; visibility: hidden;
        transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
    }
    .site-nav.open {
        transform: translateY(0); opacity: 1; visibility: visible;
        transition: transform .2s ease, opacity .2s ease;
    }
    /* Veći dodirni ciljevi za linkove na mobitelu */
    .site-nav a { padding: 15px 24px; font-size: 1.02rem; border-bottom: 1px solid var(--color-border); }
    .site-nav a:last-child { border-bottom: 0; }

    /* Zatamnjena pozadina iza otvorenog izbornika */
    .nav-backdrop {
        display: block; position: fixed; inset: 64px 0 0 0; background: rgba(15, 23, 42, .35);
        z-index: 45; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
    }
    .nav-backdrop.open { opacity: 1; visibility: visible; transition: opacity .2s ease; }
}

/* Spriječi scroll iza otvorenog mobilnog izbornika */
body.nav-open { overflow: hidden; }

/* ---------- Sections / layout helpers ---------- */
.section { padding: 72px 0; }
.section--muted { background: var(--color-bg-muted); }
.section--dark { background: var(--color-bg-dark); color: #fff; }
.section--dark p { color: #b7c0d8; }
.section__title { text-align: center; margin-bottom: .4em; }
.section__intro { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.prose :is(h2, h3) { margin-top: 1.4em; }
.prose a { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero__media {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    background-color: var(--color-bg-dark);
}
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(15,23,42,.92), rgba(15,23,42,.72));
}
.hero__content { position: relative; padding: 130px 0 110px; max-width: 680px; }
.hero__content h1 { color: #fff; }
.hero__subheading { color: #cbd5f5; font-size: 1.15rem; margin-bottom: 1.6em; }
@media (max-width: 780px) {
    /* Desktop-skalirani razmak (130px/110px) na malom ekranu ostavlja
       ogromnu praznu površinu i gura sadržaj daleko ispod pregiba - smanji ga. */
    .hero__content { padding: 56px 0 48px; }
    .hero__subheading { font-size: 1.02rem; line-height: 1.55; }
    .hero .btn { width: 100%; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: .95rem;
    border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: var(--color-accent-dark); }
.btn--light { background: #fff; color: var(--color-accent); }
.btn--light:hover { background: #eef2ff; }
.btn--block { width: 100%; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--services { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); text-align: center; }
.grid--contact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 2rem; }

.card {
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow);
}
.card__icon {
    width: 48px; height: 48px; border-radius: 10px; background: var(--color-accent-light);
    display: flex; align-items: center; justify-content: center; margin-bottom: 18px; overflow: hidden;
}
.card__icon img { width: 100%; height: 100%; object-fit: cover; }
.card__icon .icon { width: 24px; height: 24px; color: var(--color-accent); }

.feature { text-align: center; padding: 12px; }
.feature__icon {
    width: 52px; height: 52px; border-radius: 50%; background: var(--color-accent-light);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.feature__icon .icon { width: 24px; height: 24px; color: var(--color-accent); }

.stat__number { font-size: 2.25rem; font-weight: 700; color: var(--color-accent); }
.section--dark .stat__number { color: #fff; }
.stat__label { color: var(--color-text-muted); font-size: .95rem; }
.section--dark .stat__label { color: #9fb0d6; }

.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item .icon { width: 22px; height: 22px; color: var(--color-accent); flex-shrink: 0; margin-top: 3px; }
.contact-item__label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); }

/* ---------- Split (image+text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 780px) {
    .split { grid-template-columns: 1fr; }
    .split--reverse { direction: ltr; }
}

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gallery__item img { border-radius: var(--radius); }
.gallery__item figcaption { margin-top: 8px; font-size: .85rem; color: var(--color-text-muted); }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--color-accent); color: #fff; padding: 56px 0; }
.cta-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-banner h2 { color: #fff; margin-bottom: .2em; }
.cta-banner p { color: #dbe3ff; margin: 0; }

/* ---------- Forms ---------- */
.form__row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form label { font-weight: 600; font-size: .9rem; }
.form input, .form textarea, .form select {
    padding: 11px 14px; border: 1px solid var(--color-border); border-radius: 8px;
    font-family: inherit; font-size: .95rem; width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.form__honeypot { position: absolute; left: -9999px; opacity: 0; }
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 24px; font-size: .95rem; }
.alert--success { background: #ecfdf3; color: #087443; border: 1px solid #b8f0d1; }
.alert--error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-bg-dark); color: #b7c0d8; padding: 56px 0 24px; margin-top: 40px; }
.site-footer h3, .site-footer h4 { color: #fff; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer__grid p { color: #9fb0d6; margin: 0 0 6px; font-size: .92rem; }
.footer__grid a { color: #cbd5f5; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
