/* =========
   NoDig Serbia Template
   Dark/Light theme with BLUE accents
   ========= */

:root {
  --bg: #080b10;
  --bg2: #0c1118;
  --surface: #101820;
  --surface2: #141e2a;
  --text: #e8edf3;
  --muted: #9cabb8;
  --line: rgba(255,255,255,.07);
  --accent: #3b82f6;
  --accent2: #06b6d4;
  --shadow: 0 18px 50px rgba(0,0,0,.4);
  --radius: 16px;
  --max: 1120px;
  /* Catalog varijable */
  --card: var(--surface);
  --border: var(--line);
  --fg: var(--text);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f8fc;
  --bg2: #e8eef5;
  --surface: #ffffff;
  --surface2: #f0f5fa;
  --text: #0c1524;
  --muted: #4a5c6e;
  --line: rgba(12,21,36,.10);
  --shadow: 0 18px 50px rgba(8,20,40,.10);
  /* Catalog varijable */
  --card: var(--surface);
  --border: var(--line);
  --fg: var(--text);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .97; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 16px; top: 16px; width: auto; height: auto;
  background: var(--surface); color: var(--text);
  padding: 10px 12px; border-radius: 12px; z-index: 9999;
  outline: 2px solid var(--accent);
}

/* ========= HEADER ========= */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8,11,16,.6);
  border-bottom: 1px solid var(--line);
  transition: background .18s ease;
}
:root[data-theme="light"] .header { background: rgba(245,248,252,.75); }
.header.shrink { background: rgba(8,11,16,.88); }
:root[data-theme="light"] .header.shrink { background: rgba(245,248,252,.94); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 0;
  transition: padding .18s ease;
}
.header.shrink .nav { padding: 10px 0; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .2px; }
.brand-badge {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 28px rgba(59,130,246,.28);
}
.brand span { font-size: 17px; }
.brand small { display: block; font-weight: 650; opacity: .7; margin-top: -2px; font-size: 11px; }

.nav-links {
  display: flex; align-items: center; gap: 18px;
  font-weight: 700; color: var(--muted); font-size: 14px;
}
.nav-links a {
  padding: 10px 2px; position: relative; outline: none;
  white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transform: scaleX(.85);
  transition: opacity .18s ease, transform .18s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { opacity: 1; transform: scaleX(1); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { opacity: 1; transform: scaleX(1); }

/* Dropdown menu */
.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.dropdown-toggle::after {
  content: "▾"; font-size: 10px; opacity: .6;
  transition: transform .2s ease;
}
.dropdown:hover .dropdown-toggle::after { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 180px; padding: 8px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 100;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }
.dropdown-menu a {
  display: block; padding: 10px 16px;
  font-size: 13px; color: var(--muted);
}
.dropdown-menu a:hover { background: rgba(59,130,246,.12); color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}
:root[data-theme="light"] .pill {
  background: linear-gradient(180deg, rgba(12,21,36,.04), rgba(12,21,36,0));
}
.pill a { padding: 0 4px; font-weight: 800; }
.pill a:hover { color: var(--text); }
.pill a.active { color: var(--accent); }
.pill-sep { width: 1px; height: 14px; background: var(--line); }

.theme-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(59,130,246,.25);
  background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(6,182,212,.10));
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
}
.theme-btn .icon {
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  font-size: 12px;
}
.theme-btn:focus-visible { outline: 2px solid rgba(59,130,246,.55); outline-offset: 3px; }

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
}

/* ========= HERO WITH BACKGROUND IMAGE ========= */
.hero-bg {
  position: relative;
  background: 
    linear-gradient(180deg, rgba(8,11,16,.4) 0%, rgba(8,11,16,.75) 55%, var(--bg) 100%),
    url('/images/robot-pipe-2.webp') center center / cover no-repeat fixed;
}
:root[data-theme="light"] .hero-bg {
  background: 
    linear-gradient(180deg, rgba(245,248,252,.45) 0%, rgba(245,248,252,.88) 55%, var(--bg) 100%),
    url('/images/robot-pipe-2.webp') center center / cover no-repeat fixed;
}

.hero { padding: 85px 0 65px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -1px;
  background:
    linear-gradient(90deg, rgba(59,130,246,.12), transparent 35%, transparent 65%, rgba(6,182,212,.08)),
    radial-gradient(700px 300px at 50% 0%, rgba(255,255,255,.04), transparent 60%);
  opacity: .6;
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  pointer-events: none;
}

.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: center; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  width: fit-content;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  font-size: 13px;
}
:root[data-theme="light"] .kicker { background: rgba(255,255,255,.65); }
.dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 4px rgba(59,130,246,.16);
}

h1 { margin: 14px 0 12px; font-size: clamp(32px, 4vw, 50px); line-height: 1.1; }
.lead { color: var(--muted); font-size: 17px; max-width: 58ch; margin: 0 0 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, rgba(59,130,246,.95), rgba(6,182,212,.7));
  color: #fff;
  border-color: rgba(59,130,246,.3);
  box-shadow: 0 16px 40px rgba(59,130,246,.22);
}
.btn-primary:hover { filter: saturate(1.05) brightness(1.04); box-shadow: 0 20px 48px rgba(59,130,246,.28); }
.btn-ghost {
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  color: var(--text);
}
:root[data-theme="light"] .btn-ghost { background: rgba(255,255,255,.75); }
.btn-sm { padding: 8px 12px; font-size: 12px; }
.btn-white {
  background: #fff;
  color: #0c1524;
  border-color: rgba(255,255,255,.3);
}

/* Hero card */
.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 18px;
}
:root[data-theme="light"] .hero-card { background: rgba(255,255,255,.78); }
.hero-card .stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  margin-top: 10px;
}
:root[data-theme="light"] .hero-card .stat { background: rgba(0,0,0,.03); }
.hero-card .stat b { font-size: 14px; }
.hero-card .stat span { color: var(--muted); font-weight: 700; font-size: 12px; }
.hero-card .stat .tag {
  font-weight: 900; font-size: 11px;
  background: linear-gradient(135deg, rgba(59,130,246,.28), rgba(6,182,212,.18));
  border: 1px solid rgba(59,130,246,.2);
  padding: 6px 10px;
  border-radius: 999px;
}

/* ========= SECTIONS ========= */
.section { padding: 55px 0; }
.section-title { display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; }
.section-title h2 { margin: 0; font-size: clamp(24px, 2.6vw, 34px); }
.section-title p { margin: 0; color: var(--muted); max-width: 70ch; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  padding: 22px;
  box-shadow: 0 12px 34px rgba(0,0,0,.2);
  transition: transform .2s ease, box-shadow .2s ease;
}
:root[data-theme="light"] .card { 
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.75));
  box-shadow: 0 12px 34px rgba(8,20,40,.07);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 48px rgba(0,0,0,.28); }
.card h3 { margin: 12px 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card-img {
  width: 100%; height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 8px;
}
.icon-badge {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(6,182,212,.15));
  border: 1px solid rgba(59,130,246,.2);
  display: grid; place-items: center;
  font-weight: 900; font-size: 14px;
}

/* Panel */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  box-shadow: var(--shadow);
}
:root[data-theme="light"] .panel {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.75));
}
.panel p { color: var(--muted); }
.list { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.list li { margin: 8px 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: start; }
form { display: grid; gap: 12px; }
input, textarea {
  width: 100%; padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
  font-size: 14px;
}
:root[data-theme="light"] input, :root[data-theme="light"] textarea { background: rgba(12,21,36,.03); }
input:focus, textarea:focus {
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,.14);
}
textarea { min-height: 120px; resize: vertical; }

/* Footer */
.footer {
  padding: 30px 0 50px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.footer .row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer small { opacity: .9; font-size: 13px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* Reveal animations */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: transform, opacity;
}
.reveal.in { opacity: 1; transform: none; }

/* Code */
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* ========= RESPONSIVE ========= */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { margin-top: 20px; }
  .contact { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 4px; padding: 12px 0;
    width: 100%;
  }
  .nav-links.open .dropdown-menu {
    position: static; transform: none;
    opacity: 1; visibility: visible;
    background: transparent;
    border: none; box-shadow: none;
    padding: 4px 0 4px 16px;
  }
  .nav { flex-wrap: wrap; }
  .nav-actions { width: 100%; justify-content: space-between; margin-top: 10px; }
  .nav-actions .btn { display: none; }
  h1 { font-size: clamp(28px, 6vw, 40px); }
  .hero-bg { background-attachment: scroll; }
}

@media (max-width: 600px) {
  .hero { padding: 50px 0 40px; }
  .pill { font-size: 11px; padding: 5px 8px; }
  .theme-btn span:not(.icon) { display: none; }
}

/* Print */
@media print {
  .header, .footer, .theme-btn, .mobile-toggle, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .hero-bg { background: none !important; }
}

/* =====================================================
   Brand Logo Styles
   ===================================================== */
.brand-logo {
  height: 40px;
  width: auto;
  margin-right: 0.75rem;
  object-fit: contain;
}

.brand {
  display: flex;
  align-items: center;
}

/* =====================================================
   Light Mode Hero Fix
   ===================================================== */
[data-theme="light"] .product-hero,
[data-theme="light"] .hero {
  color: #1f2937;
}

[data-theme="light"] .product-hero h1,
[data-theme="light"] .product-hero p,
[data-theme="light"] .product-hero li,
[data-theme="light"] .product-hero .product-tagline,
[data-theme="light"] .hero h1,
[data-theme="light"] .hero p {
  color: #1f2937 !important;
}

[data-theme="light"] .product-hero h1 span,
[data-theme="light"] .hero h1 span {
  color: #1f2937 !important;
}

[data-theme="light"] .product-hero .product-highlights li {
  color: #374151 !important;
}

/* White buttons stay white in light mode */
[data-theme="light"] .product-hero .btn-white {
  background: #1f2937;
  color: white;
}

[data-theme="light"] .product-hero .btn-ghost-white {
  border-color: #1f2937;
  color: #1f2937;
}

[data-theme="light"] .product-hero .btn-ghost-white:hover {
  background: rgba(31, 41, 55, 0.1);
}
