/* Google Fonts – loaded via <link> in HTML is more reliable on shared hosts,
   but keeping @import here as fallback with system-font stack below */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

/* ── Tokens ── */
:root {
  --navy:    #211A5B;
  --navy2:   #2e2478;
  --accent:  #4f46c8;
  --bg:      #f4f4f8;
  --card:    #ffffff;
  --text:    #1a1a2e;
  --muted:   #6b6b8a;
  --border:  #dddde8;
  --radius:  10px;
  --shadow:  0 2px 12px rgba(33,26,91,.09);
  /* System-safe font stacks – fallback if Google Fonts blocked */
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); }
a:hover { color: var(--navy); }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  /* Solid fallback for hosts/browsers that block backdrop-filter */
  background: #f0f0f5;
  background: rgba(244,244,248,.96);
  /* backdrop-filter with vendor prefix + graceful degradation */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 72px;
  display: flex; align-items: center;
  /* overflow must NOT be hidden — mobile menu drops below */
  overflow: visible;
}
.navbar-inner {
  width: 100%; max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; /* anchor for absolute mobile dropdown */
}
.navbar-brand img { height: 48px; }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  font-weight: 600; font-size: 15px;
  color: var(--navy); text-decoration: none;
  padding: 8px 14px; border-radius: 6px;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { background: var(--navy); color: #fff; }

/* ── Hamburger ── */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  /* Ensure it sits on top of everything */
  position: relative; z-index: 110;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); margin: 5px 0;
  transition: transform .25s, opacity .25s;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-links {
    /* Hidden by default */
    display: none;
    flex-direction: column; gap: 0;
    /* Drop down from the fixed navbar */
    position: fixed;
    top: 72px; left: 0; right: 0;
    /* Solid bg — backdrop-filter unreliable on mobile */
    background: #f4f4f8;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    z-index: 99;
    /* Subtle shadow so menu floats above content */
    box-shadow: 0 4px 16px rgba(33,26,91,.12);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    border-radius: 0;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }
  .nav-links li:last-child a { border-bottom: none; }
}

/* ══════════════════════════════════════════
   PAGE HERO
══════════════════════════════════════════ */
.page-hero {
  margin-top: 72px;
  background: var(--navy);
  padding: 52px 24px 48px;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #fff; letter-spacing: -.01em;
}
.page-hero p {
  color: rgba(255,255,255,.65);
  margin-top: 10px; font-size: 15px;
}

/* ══════════════════════════════════════════
   MAIN CONTENT WRAPPER
══════════════════════════════════════════ */
.page-main {
  max-width: 860px; margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ══════════════════════════════════════════
   SECTION LABEL (divider heading)
══════════════════════════════════════════ */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 20px;
  text-decoration: none; border: none; cursor: pointer;
  transition: opacity .18s, transform .12s;
  white-space: nowrap;
}
.btn:hover { opacity: .82; transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-outline  { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }

/* ══════════════════════════════════════════
   INFO CARDS (contact tiles)
══════════════════════════════════════════ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px 24px;
  text-align: center;
}
.info-card svg {
  width: 36px; height: 36px;
  color: var(--navy); margin: 0 auto 12px;
}
.info-card h3 {
  font-family: var(--font-serif);
  font-size: .95rem; color: var(--navy); margin-bottom: 8px;
}
.info-card p {
  font-size: 14px; color: var(--muted); line-height: 1.7;
}

/* ══════════════════════════════════════════
   CONTACT FORM
══════════════════════════════════════════ */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  margin-top: 32px;
}
.contact-form h2 {
  font-family: var(--font-serif);
  color: var(--navy); font-size: 1.3rem; margin-bottom: 24px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%; padding: 10px 14px;
  font-family: var(--font-sans); font-size: 15px;
  border: 1.5px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,200,.12);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.btn-submit {
  width: 100%; padding: 13px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
  font-family: var(--font-sans); font-size: 16px; font-weight: 600;
  transition: opacity .2s, transform .12s;
  margin-top: 6px;
}
.btn-submit:hover { opacity: .88; transform: translateY(-1px); }

/* ══════════════════════════════════════════
   DOC CARDS (dokumentacija)
══════════════════════════════════════════ */
.doc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.doc-card:hover { box-shadow: 0 4px 20px rgba(33,26,91,.13); }

.doc-header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  cursor: pointer; user-select: none;
}
.doc-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 8px;
  background: #ece9fc; display: grid; place-items: center;
}
.doc-icon svg { width: 20px; height: 20px; }
.doc-title {
  flex: 1; font-size: 15px; font-weight: 600;
  color: var(--navy); line-height: 1.35;
}
.doc-action { flex-shrink: 0; display: flex; gap: 8px; align-items: center; }
.chevron {
  width: 20px; height: 20px; flex-shrink: 0;
  transition: transform .25s; color: var(--muted);
}
.doc-card.open .chevron { transform: rotate(180deg); }
.doc-body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
  border-top: 0 solid var(--border);
}
.doc-card.open .doc-body { max-height: 1100px; border-top-width: 1px; }
.doc-body iframe { display: block; width: 100%; height: 900px; border: none; }

/* ══════════════════════════════════════════
   LIST CARDS (pravo na pristup)
══════════════════════════════════════════ */
.list-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.list-card-header {
  background: var(--navy); padding: 16px 22px;
}
.list-card-header h2 {
  font-family: var(--font-serif);
  color: #fff; font-size: 1.05rem; margin: 0;
}
.list-card ul { padding: 8px 0; }
.list-card li {
  padding: 13px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 15px; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 10px;
}
.list-card li:last-child { border-bottom: none; }
.list-card li svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.list-card li a { color: var(--accent); text-decoration: none; font-weight: 500; }
.list-card li a:hover { color: var(--navy); text-decoration: underline; }

/* ══════════════════════════════════════════
   MAP SECTION
══════════════════════════════════════════ */
.map-section { margin-top: 60px; }
.map-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem; color: var(--navy); margin-bottom: 16px;
}
.map-section iframe {
  width: 100%; height: 320px; border: none;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.map-section small {
  display: block; margin-top: 6px;
  font-size: 12px; color: var(--muted);
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.8);
  padding: 48px 24px 36px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 40px;
}
.footer-logo img { height: 44px; filter: brightness(0) invert(1); }
footer h2 { color: #fff; font-size: 1rem; font-family: var(--font-serif); margin-bottom: 10px; }
footer p, footer a { font-size: 14px; line-height: 1.9; color: rgba(255,255,255,.72); text-decoration: none; }
footer a:hover { color: #fff; }

@media (max-width: 680px) {
  .footer-inner { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 18px; }
}

/* ══════════════════════════════════════════
   INDEX – CAROUSEL
══════════════════════════════════════════ */
.carousel {
  margin-top: 72px;
  position: relative; overflow: hidden;
  background: #000;
}
.carousel-track {
  display: flex; transition: transform .5s ease;
}
.carousel-slide {
  min-width: 100%; position: relative;
}
.carousel-slide img {
  width: 100%; height: 520px; object-fit: cover; opacity: .9;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(33,26,91,.55); border: none; cursor: pointer;
  color: #fff; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  transition: background .2s;
  z-index: 5;
}
.carousel-btn:hover { background: var(--navy); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px;
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.45); border: none; cursor: pointer;
  transition: background .2s, transform .2s;
  padding: 0;
}
.carousel-dot.active { background: #fff; transform: scale(1.25); }

@media (max-width: 600px) {
  .carousel-slide img { height: 240px; }
}

/* ══════════════════════════════════════════
   INDEX – ABOUT + CONTACT TILES
══════════════════════════════════════════ */
.about-section {
  max-width: 860px; margin: 52px auto 0; padding: 0 24px;
  text-align: center;
}
.about-section h1 {
  font-family: var(--font-serif);
  color: var(--navy); font-size: clamp(1.4rem,3vw,2rem);
  margin-bottom: 18px;
}
.about-section p {
  font-size: 16px; line-height: 1.8; color: var(--muted);
  max-width: 700px; margin: 0 auto 48px;
}
