/* ==========================================================================
   KARS d.o.o. — statična web stranica
   Rekonstrukcija naslovnice kars.hr
   ========================================================================== */

/* ---------- Fontovi ---------- */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans Pro";
  src: url("../fonts/SourceSansPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans Pro";
  src: url("../fonts/SourceSansPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #700e57;          /* naglasak / naslovi kartica */
  --heading: #161616;         /* tamni naslovi */
  --text: #333333;            /* osnovni tekst */
  --footer-bg: #333333;
  --footer-text: #aeaeae;
  --max: 1140px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ==========================================================================
   HEADER / NAVIGACIJA
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
  gap: 24px;
}
.nav-logo img { height: 64px; width: auto; }

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0 auto;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  letter-spacing: .3px;
  color: #222;
  padding: 8px 0;
  transition: color .2s;
  cursor: pointer;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a { color: var(--accent); }
.caret { font-size: 10px; margin-top: 2px; }

/* dropdown */
.dropdown-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #fff;
  min-width: 240px;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  border-radius: 4px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all .2s ease;
  z-index: 200;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: #444;
  white-space: nowrap;
}
.dropdown-menu li a:hover { background: #f6f0f4; color: var(--accent); }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-lang { font-size: 15px; font-weight: 700; color: #000; }
.nav-search {
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  display: inline-flex;
  padding: 4px;
}
.nav-search svg { width: 20px; height: 20px; fill: currentColor; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  background: #222;
  position: relative;
  transition: .3s;
}
.nav-toggle span::before { position: absolute; top: -8px; }
.nav-toggle span::after  { position: absolute; top: 8px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  height: 550px;
  background-image: url("../images/1_1.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ==========================================================================
   NASLOVI SEKCIJA
   ========================================================================== */
.section { padding: 70px 0; }
.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 40px;
  line-height: 1.2;
  color: var(--heading);
  text-transform: uppercase;
  margin-bottom: 40px;
}

/* ==========================================================================
   KARTICE SA SLIKAMA (image links)
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.card { text-align: center; }
.card-thumb {
  width: 100%;
  padding-top: 77%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 2px;
  transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover .card-thumb {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,.15);
}
.card-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 16px;
  color: var(--accent);
  margin-top: 18px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ==========================================================================
   REGISTRIRANE DJELATNOSTI (image with text)
   ========================================================================== */
.iwt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}
.iwt-text p {
  font-size: 15px;
  color: var(--heading);
  margin-bottom: 6px;
}
.iwt-image figure { margin: 0; }
.iwt-image img {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.iwt-image figcaption {
  margin-top: 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 16px;
  color: var(--accent);
  text-align: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 50px 0 30px;
  text-align: center;
}
.footer-social ul { list-style: none; display: flex; justify-content: center; gap: 16px; margin-bottom: 26px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid #555;
  border-radius: 50%;
  transition: all .25s;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); }
.footer-social svg { width: 18px; height: 18px; fill: var(--footer-text); }
.footer-social a:hover svg { fill: #fff; }

.footer-logo img { height: 70px; margin: 0 auto 26px; }
.footer-divider { border: none; border-top: 1px solid #4a4a4a; max-width: 480px; margin: 24px auto; }

.footer-company h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--footer-text);
  margin-bottom: 14px;
}
.footer-company ul { list-style: none; }
.footer-company li { font-size: 15px; margin-bottom: 4px; }
.footer-company a:hover { color: #fff; }
.footer-legal { margin-top: 26px; font-size: 13px; color: #8f8f8f; }

/* ==========================================================================
   COOKIE TRAKA
   ========================================================================== */
.cookiebar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(20,20,20,.94);
  color: #eee;
  padding: 16px 24px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}
.cookiebar p { font-size: 13px; max-width: 900px; }
.cookiebar a { color: azure; text-decoration: underline; }
.cookiebar button {
  background: #fff;
  color: #222;
  border: none;
  padding: 9px 22px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
}
.cookiebar button:hover { background: var(--accent); color: #fff; }
.cookiebar.hidden { display: none; }

/* ==========================================================================
   PODSTRANICE — HERO S NASLOVOM
   ========================================================================== */
.page-hero {
  position: relative;
  height: 420px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.55));
}
.page-hero h1 {
  position: relative;
  z-index: 2;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 40px;
  text-transform: uppercase;
  letter-spacing: .5px;
  max-width: 900px;
  padding: 0 24px;
  text-shadow: 0 2px 18px rgba(0,0,0,.4);
}

/* ---------- Traka sa značajkama (checkmark) ---------- */
.features {
  background: var(--accent);
  padding: 26px 0;
}
.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 34px;
}
.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 15px;
}
.feature img { width: 20px; height: 20px; filter: brightness(0) invert(1); }

/* ---------- Popis značajki (bullet s kvačicom) ---------- */
.checklist { list-style: none; margin: 18px 0 0; }
.checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--heading);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Intro (tekst + slika) — varijacije ---------- */
.iwt.reverse { direction: rtl; }
.iwt.reverse > * { direction: ltr; }
.iwt-heading {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 24px;
  color: var(--heading);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.iwt-text p { margin-bottom: 14px; line-height: 1.7; }

/* ---------- Galerija ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  padding-top: 75%;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
  background: #eee;
}
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.07); }

/* ---------- Certifikat ---------- */
.certificate { text-align: center; }
.certificate img {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid #eee;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: none;
  cursor: pointer;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  transition: background .2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.28); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: start;
}
.contact-info h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 26px;
  color: var(--heading);
  margin-bottom: 20px;
}
.contact-list { list-style: none; }
.contact-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 16px;
}
.contact-list .label { font-weight: 700; color: var(--accent); min-width: 90px; }
.contact-map iframe {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}

/* ==========================================================================
   RESPONZIVNOST
   ========================================================================== */
@media (max-width: 1000px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .section-title { font-size: 30px; }
  .cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .iwt { grid-template-columns: 1fr; gap: 34px; }
  .hero { height: 340px; }
  .page-hero { height: 300px; }
  .page-hero h1 { font-size: 28px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 12px 24px rgba(0,0,0,.1);
    padding: 10px 0;
    gap: 0;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { padding: 12px 24px; }
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    padding: 0 0 8px 24px;
    min-width: 0;
  }
  .nav-menu { min-width: 0; }
}
