/* RESET I BAZA */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root{ --color-primary:#123153; --color-accent:#1E88E5; --color-muted:#5a6b7b; --bg:#f4f6fa; }
html{ scroll-behavior:smooth; }
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background-color: var(--bg); color: #222; line-height: 1.7; font-size: 1.05rem; }
.container{ max-width:1160px; margin:0 auto; padding:0 20px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin-bottom: 1rem; }

/* Responsive media */
img, picture, video, canvas, svg{ display:block; max-width:100%; height:auto; }

/* ===== HERO ===== */
.hero-static {
  background-image: image-set(url('img/besys-hero.webp') type('image/webp'), url('img/besys-hero.jpg') type('image/jpeg'));
  background-position: center; background-size: cover; background-repeat: no-repeat;
  padding: 100px 20px; text-align: center; color: #fff; position: relative;
}
.hero-static::after { content: ""; position: absolute; inset:0; background: rgba(0, 0, 0, 0.4); z-index: 0; }
.hero-text { position: relative; z-index:1; max-width: 800px; margin: auto; }
.hero-text h1 { font-size: 3rem; margin-bottom: 20px; }
.hero-text p { font-size: 1.3rem; margin-bottom: 30px; }

/* ===== CTA ===== */
.cta-animated{ background:#004080; color:#fff; padding:60px 20px; text-align:center; }
.cta-animated h2{ font-size:2rem; margin-bottom:15px; }
.cta-animated p{ font-size:1.1rem; margin-bottom:25px; max-width:700px; margin-inline:auto; }

/* ===== Buttons ===== */
.btn{ display:inline-block; font-weight:600; border-radius:12px; padding:.85rem 1.15rem; text-decoration:none; border:1px solid #cfd8e3; cursor:pointer; line-height:1; }
.btn-primary{ background:var(--color-accent); color:#fff; border:none; }
.btn-primary:hover{ filter:brightness(.95); }
.btn.outline{ background:transparent; border:1px solid var(--color-accent); color:var(--color-primary); }
.btn.outline:hover{ background:rgba(30,136,229,.06); }
.btn:focus-visible{ outline:3px solid rgba(30,136,229,.6); outline-offset:2px; }

/* ===== Scroll-to-top (legacy class support) ===== */
.scroll-top, .scroll-to-top{ position:fixed; right:16px; bottom:16px; background:var(--color-accent); color:#fff; border:none; border-radius:999px; width:48px; height:48px; box-shadow:0 10px 30px rgba(30,136,229,.35); display:none; align-items:center; justify-content:center; z-index:999; }
.scroll-top.show, .scroll-to-top.show{ display:flex; }

/* ===== ABOUT ===== */
.about-section{ padding:80px 20px; background:#fff; text-align:center; }
.about-section h1{ font-size:2.5rem; margin-bottom:30px; color:#003366; }
.about-content{ max-width:1000px; margin:0 auto; font-size:1.35rem; line-height:2.2; text-align:justify; color:#333; }
.about-section p, .about-section li{ font-size:1.2rem; line-height:2; }
.about-section h2{ font-size:2rem; margin-top:1.5em; }

/* ===== SERVICES ===== */
/* CTA row (generic) */
.cta-row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.services-section{ padding:80px 20px; background:#f9f9f9; text-align:left; }
.services-section h1, .services-section h2{ color:#002244; text-align:center; }
.services-section h2{ border-bottom:3px solid #3399ff; display:inline-block; padding-bottom:5px; margin-bottom:30px; }
.services-list{ list-style:disc; max-width:900px; margin:0 auto; padding-left:20px; font-size:1.1rem; line-height:2; }
.services-list li{ margin-bottom:18px; color:#222; }
.service-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1.5rem; margin-top:2rem; }
.service-card{ background:#f7f7f7; padding:20px; border-radius:8px; box-shadow:0 2px 5px rgba(0,0,0,.1); text-align:center; transition:transform .2s ease; }
.service-card:hover{ transform:translateY(-4px); }
.service-card .icon{ font-size:2rem; margin-bottom:10px; }
.service-card h3{ margin-bottom:.5em; color:#002f5a; }

/* Service cards: equal layout + read-more link */
.service-card{ display:flex; flex-direction:column; }
.service-card p{ margin:.4rem 0; }
.service-card .more-link{ text-decoration:underline; font-weight:600; display:inline-block; margin-top:auto; }
.service-card .more-link:hover{ opacity:.85; }

/* Optional polish: hover effects and subtle borders */
.service-card:hover .icon{ transform: scale(1.05); transition:.2s transform; }
.service-card h3{ color:#0b2f55; }
.service-card{ border:1px solid #e9eef5; }

/* Anchor targets account for sticky header */
[id]{ scroll-margin-top: 80px; }

/* Keyboard accessibility for links/buttons */
:where(a, button):focus-visible{ outline:3px solid var(--color-accent); outline-offset:2px; }

/* ===== CONTACT ===== */
.kontakt-grid{ background:#f7faff; border-radius:12px; padding:3rem; }
.download-vcf{ display:inline-block; margin-top:1rem; padding:10px 20px; background:#007acc; color:#fff; border-radius:6px; font-weight:700; text-decoration:none; }
.download-vcf:hover{ background:#005fa3; }

/* ===== CAREERS ===== */
.career-form-container{ max-width:750px; margin:50px auto; padding:32px; background:#fff; border-radius:12px; border:1px solid #e5e7eb; box-shadow:0 12px 32px rgba(0,0,0,.08); animation:slideInUp .6s ease-out; transition:transform .2s, box-shadow .2s; }
.career-form-container:hover{ transform:translateY(-2px); box-shadow:0 18px 44px rgba(0,0,0,.12); }
@keyframes slideInUp{ from{ opacity:0; transform:translateY(40px);} to{ opacity:1; transform:translateY(0);} }
.career-form-container h2{ font-size:2rem; color:#003366; margin-bottom:20px; text-align:center; }
.career-form-container label{ display:block; margin-bottom:8px; font-weight:600; color:#333; }
.career-form-container input, .career-form-container textarea{ width:100%; padding:12px; margin-bottom:20px; border:1px solid #ccc; border-radius:6px; font-size:1rem; background:#fdfdfd; }
.career-form-container textarea{ resize:vertical; min-height:120px; }
.career-form-container input[type="checkbox"]{ width:auto; margin-right:8px; }
.career-form-container button{ background:#007bff; color:#fff; padding:12px 25px; font-size:1rem; border:none; border-radius:6px; cursor:pointer; width:100%; }
.career-form-container button:hover{ background:#0056b3; }
.career-note{ text-align:center; color:#555; margin-top:40px; font-size:1rem; }
.input-icon-group{ position:relative; }
.input-icon-group input, .input-icon-group textarea{ padding-left:2.5rem; }
.input-icon-group .input-icon{ position:absolute; top:50%; left:.75rem; transform:translateY(-50%); font-size:1.2rem; color:#888; }
/* Invalid/valid states */
input[aria-invalid="true"], textarea[aria-invalid="true"], input:invalid, textarea:invalid{ border-color:#dc2626; box-shadow:0 0 0 3px rgba(220,38,38,.08); }
.input-icon-group input:invalid ~ .input-icon,
.input-icon-group textarea:invalid ~ .input-icon{ color:#dc2626; }
input::placeholder, textarea::placeholder{ color:#94a3b8; }

/* ===== Header / Navigation ===== */
.site-header{ position:sticky; top:0; z-index:1000; background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.05); }
.nav-container{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 18px; }
.brand img{ height:40px; width:auto; display:block; }
.nav-menu{ list-style:none; display:flex; gap:18px; margin:0; padding:0; }
.nav-menu a{ text-decoration:none; font-weight:700; color:var(--color-primary); }
.nav-menu a:hover{ opacity:.85; }

/* Active link: desktop = underline; mobile = pill */
.nav-menu a.active{ border-bottom: 2px solid var(--color-accent); }

@media (max-width:900px){
  .nav-menu a.active{
    border-bottom: 0;
    background: rgba(30,136,229,.12);
    border-radius: 8px;
    padding: 6px 10px;
  }
}
.hamburger{ display:none; background:none; border:0; width:40px; height:40px; position:relative; }
.hamburger span{ position:absolute; left:8px; right:8px; height:2px; background:var(--color-primary); border-radius:2px; }
.hamburger span:nth-child(1){ top:12px } .hamburger span:nth-child(2){ top:19px } .hamburger span:nth-child(3){ top:26px }

@media (max-width:900px){
  .brand img{ height:32px; }
  .nav-container{ padding:8px 14px; }
  .hamburger{ display:block }
  .nav-menu{ position:absolute; top:58px; right:14px; background:#fff; border-radius:12px; box-shadow:0 12px 36px rgba(0,0,0,.14); padding:14px; flex-direction:column; gap:10px; display:none; }
  .nav-menu.active{ display:flex }
  .nav-menu a{ font-size:14px; padding:6px 2px; }
}

/* ===== FOOTER ===== */
.site-footer{ background: linear-gradient(180deg, var(--color-primary) 0%, #0e2a4b 100%); color:#fff; margin-top:48px; }
.footer-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; padding:32px 20px; }
.footer-grid h4{ margin:0 0 10px; font-size:1rem; }
.footer-grid a{ color:#DCE7F7; }
.footer-grid a:hover{ text-decoration:underline; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.12); padding:12px 20px; text-align:center; color:#DCE7F7 }
.muted{ opacity:.85 }
@media (max-width:900px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .footer-grid{ grid-template-columns:1fr; } }

/* —— UI polish pack —————————————————————————— */
:root{
  --radius: 14px;
  --shadow: 0 8px 30px rgba(2,31,63,.08);
  --shadow-soft: 0 6px 18px rgba(2,31,63,.06);
  --muted: #5b6b7c;
}
.section{padding: clamp(2.5rem, 4vw, 4rem) 0;}
.section.tight{padding-block: clamp(1.25rem,2.5vw,2rem);} 
.container-narrow{max-width: 920px;margin: 0 auto;}
.lead{font-size: clamp(1.1rem,1.5vw,1.25rem); line-height: 1.7; color: var(--muted);} 

.kicker{letter-spacing:.06em; text-transform:uppercase; font-weight:600; color:#2563eb; font-size:.9rem;}
.h1{font-size: clamp(2rem, 4vw, 3rem); line-height:1.15; margin:.3em 0 .5em;}
.h2{font-size: clamp(1.5rem, 2.5vw, 2rem); line-height:1.2; margin:.2em 0 .6em;}

.card{
  background:#fff;border-radius:var(--radius);box-shadow:var(--shadow-soft);
  padding: clamp(1.1rem,2.2vw,1.5rem); transition:.2s transform,.2s box-shadow;
}
.card:hover{transform:translateY(-2px); box-shadow:var(--shadow);} 

.list-clean{list-style:none; padding:0; margin:0;}
.list-clean li{display:flex; gap:.6rem; align-items:flex-start; margin:.55rem 0;}
.list-clean .dot{width:.55rem;height:.55rem;border-radius:50%; background:#2563eb; margin-top:.45rem; flex:0 0 .55rem;}

.muted{color:var(--muted)}

/* ===== Accessibility & motion preferences ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Reference grid */
.ref-grid{display:grid;gap:20px;grid-template-columns:1fr;max-width:1100px;margin:0 auto}
@media(min-width:840px){.ref-grid{grid-template-columns:repeat(3,1fr)}}
.ref-card h3{margin:0 0 8px}
.ref-card p{margin:0}

/* Ref guidelines & form */
.ref-form{display:grid;gap:12px;max-width:720px}
.ref-grid-2{display:grid;gap:8px;grid-template-columns:1fr}
@media(min-width:560px){.ref-grid-2{grid-template-columns:1fr 1fr}}
.ref-form input[type="text"], .ref-form input[type="email"], .ref-form textarea{
  padding:12px;border:1px solid #e2e8f0;border-radius:8px
}
.ref-consent{display:flex;align-items:flex-start;gap:8px;font-size:14px}
.ref-consent input{transform:translateY(2px)}

/* CTA button (base) to match ghost variant */
.cta-button{ display:inline-block; font-weight:700; border-radius:12px; padding:.75rem 1.1rem; background:var(--color-accent); color:#fff; border:0; box-shadow:0 6px 20px rgba(30,136,229,.25); }
.cta-button:hover{ filter:brightness(.96) }

/* Tech grid as semantic list */
.tech-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px }
@media(min-width:680px){ .tech-grid{ grid-template-columns:repeat(4,minmax(0,1fr)) } }
.tech-grid .tech-item{ background:#f6f9fc; border:1px solid #e6eef7; border-radius:10px; padding:.7rem 1rem; text-align:center; font-weight:600 }

/* Usluge: cjenik + proces */
.cjenik-preview{ padding-top:0 }
.cjenik-grid{ display:grid; gap:16px; grid-template-columns:1fr; max-width:1100px; margin:1rem auto 0 }
@media(min-width:720px){ .cjenik-grid{ grid-template-columns:repeat(2,1fr) } }
@media(min-width:1100px){ .cjenik-grid{ grid-template-columns:repeat(4,1fr) } }
.c-card h3{ margin:.2rem 0 .6rem }

.process-list{ max-width:900px; margin:0 auto 1.5rem auto; line-height:1.8; padding-left:1.2rem }
.process-list li{ margin:.35rem 0 }

/* Why BESYS cards inherit .card but add subtle hover */
.why-besys .why-card{ border-radius:var(--radius); box-shadow:var(--shadow-soft) }
.why-besys .why-card:hover{ box-shadow:var(--shadow) }

/* ===== Page section spacing (for o-nama, reference, etc.) ===== */
.page-section {
  margin: 0 auto;
  max-width: 1100px;
  padding: 60px 20px;
}

/* ===== Page wrappers for subpages (hero/background/layout) ===== */
.page-background.light{ position:fixed; inset:0; z-index:-1; background: linear-gradient(180deg,#f6f8fc 0%, #eef3f9 100%); }
.page-content{ position:relative; z-index:1; }

.hero{ padding: clamp(2.5rem,6vw,4rem) 0; }
.hero.compact{ padding: clamp(2rem,5vw,3rem) 0 0; }
.page-hero .container{ max-width:1100px; margin:0 auto; padding:0 20px; }

/* ===== Breadcrumbs ===== */
.breadcrumb{ padding: 12px 20px; }
.breadcrumb ol{ list-style:none; display:flex; flex-wrap:wrap; gap:8px; color: var(--muted); }
.breadcrumb a{ color: var(--color-primary); text-decoration: underline; }
.breadcrumb li+li::before{ content: "›"; color:#c0c9d4; margin: 0 6px 0 2px; }

/* ===== Feature grid & cards ===== */
.feature-grid{ display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.feature{ background:#fff; border:1px solid #e6eef7; border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 1rem 1.25rem; text-align:left; }
.feature .icon{ font-size:1.5rem; line-height:1; margin-bottom:.5rem; }

/* ===== Generic cards grid (use-cases) ===== */
.cards-grid{ display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.card h3{ color:#0b2f55; }

/* ===== Checklist (with ticks) ===== */
.checklist{ list-style:none; padding:0; margin: .25rem 0 1rem; }
.checklist li{ display:flex; gap:.6rem; align-items:flex-start; margin:.5rem 0; }
.checklist li::before{ content:"✔"; color:#1d9c5c; font-weight:700; margin-top:.1rem; }

/* ===== Buttons: ghost variant ===== */
.btn.btn-ghost{ background:transparent; border:1px solid #cfd8e3; }
.btn.btn-ghost:hover{ background: rgba(30,136,229,.06); }

/* ===== Section-specific minor tweaks ===== */
.cta{ text-align:center; }