/* ========================================
   KDB Helios Sistem — Zajednički stilovi
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:     #F8F5F0;
  --white:     #FFFFFF;
  --navy:      #1A2744;
  --navy-mid:  #253460;
  --gold:      #B8922A;
  --gold-light:#D4AB48;
  --text:      #2C2C2C;
  --text-mid:  #555555;
  --text-light:#888888;
  --border:    #E2DDD6;
  --shadow:    0 4px 24px rgba(26,39,68,0.10);
  --shadow-lg: 0 12px 48px rgba(26,39,68,0.14);
  --radius:    6px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main { flex: 1; }

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.25;
}

p { color: var(--text-mid); }

ul { list-style: none; }

/* === LAYOUT === */
.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--white);
}

.section--dark {
  background: var(--navy);
  color: var(--white);
}

.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.75); }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(248,245,240,0.97);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
  overflow: visible;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(26,39,68,0.12);
}

.header-spacer {
  height: 84px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 84px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
}

/* === LOGO IMAGE === */
.logo--img {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Header logo */
.logo-img--header {
  height: 62px;
  width: auto;
  max-width: 340px;
  display: block;
  object-fit: contain;
}

/* Footer logo — invertujemo boje da bude belo na tamnoj pozadini */
.logo-img--footer {
  height: 56px;
  width: auto;
  max-width: 300px;
  display: block;
  object-fit: contain;
  filter: invert(1) brightness(1.1);
}

@media (max-width: 960px) {
  .logo-img--header { height: 50px; max-width: 270px; }
  .logo-img--footer { height: 44px; max-width: 240px; }
}

@media (max-width: 600px) {
  .logo-img--header { height: 40px; max-width: 210px; }
  .logo-img--footer { height: 36px; max-width: 190px; }
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-main {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Nav */
.main-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.nav-item.active > .nav-link,
.nav-link:hover {
  color: var(--navy);
  background: rgba(26,39,68,0.06);
}

.chevron {
  font-size: 1.1rem;
  line-height: 0;
  vertical-align: middle;
  display: inline-block;
  transition: transform var(--transition);
}

.has-dropdown.open .chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 100;
}

.has-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 9px 14px;
  font-size: 0.85rem;
  color: var(--text-mid);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.dropdown-item:hover {
  background: var(--cream);
  color: var(--navy);
}

/* CTA button in header */
.header-cta {
  flex-shrink: 0;
  padding: 10px 20px;
  background: var(--navy);
  color: var(--white) !important;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--gold);
  color: var(--white) !important;
  transform: translateY(-1px);
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* === FOOTER === */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding: 64px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo--footer .logo-main { color: var(--white); }
.footer-tagline {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col ul a:hover { color: var(--gold-light); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.fc-icon { font-size: 0.95rem; margin-top: 2px; flex-shrink: 0; }

.footer-bottom {
  padding: 20px max(24px, calc((100vw - 1180px) / 2));
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184,146,42,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-outline--white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline--white:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: var(--white);
}

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* === DIVIDER === */
.gold-divider {
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: 20px 0 32px;
  border-radius: 2px;
}

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  gap: 16px;
  user-select: none;
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gold);
  transition: transform var(--transition), border-color var(--transition);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  border-color: var(--gold);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer p {
  padding-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

/* ================================================
   RESPONSIVE — TABLET (max 960px)
   ================================================ */
@media (max-width: 960px) {
  .header-cta { display: none; }
  .mobile-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 84px; left: 0; right: 0;
    z-index: 999;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    max-height: calc(100vh - 84px);
    overflow-y: auto;
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform var(--transition), visibility var(--transition);
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 12px 8px; font-size: 1rem; }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--gold);
    border-radius: 0;
    padding: 4px 0 4px 16px;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: block;
  }

  .has-dropdown.open .dropdown-menu {
    max-height: 600px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 40px 24px;
  }

  .section { padding: 64px 0; }
}

/* ================================================
   RESPONSIVE — MOBILE (max 600px)
   ================================================ */
@media (max-width: 600px) {
  .container { width: 92vw; }

  .section { padding: 48px 0; }
  .section-sub { margin-bottom: 32px; }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 20px;
  }
  .footer-tagline { max-width: 100%; }
  .footer-bottom { padding: 16px 20px; text-align: center; }

  /* Buttons — full width on tiny screens */
  .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }

  /* FAQ font size */
  .faq-question { font-size: 0.95rem; padding: 16px 0; }

  /* Cards */
  .card { padding: 20px; }
}
