:root {
  --brown-900: #3d2a1e;
  --brown-700: #4b2e2e;
  --brown-200: #c9a47d;
  --white: #ffffff;
  --sand: #f4efe9;
  --text: #2b2b2b;
  --muted: #7a6f69;
}

/* Reset / base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: var(--sand);
}

/* Containers */
.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}
.container.narrow { width: min(800px, 92vw); }
.section { padding: 64px 0; }

/* Nav / hero */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px min(1100px, 4vw);
  background: rgba(61, 42, 30, 0.6);
  backdrop-filter: saturate(180%) blur(8px);
}
.logo img { height: 40px; width: auto; display: block; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
  display: none;
  width: 44px; height: 40px;
  background: transparent; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 3px; margin: 6px; background: var(--white);
}

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("afrika.jpeg") center/cover no-repeat;
  z-index: -2;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(75, 46, 46, 0.55),
    rgba(61, 42, 30, 0.7)
  );
  z-index: -1;
}
.hero-content {
  margin-top: 80px;
  color: var(--white);
}
.hero h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3.25rem);
  letter-spacing: 1px;
}
.hero p { color: #f8f6f4; margin: 8px 0 20px; }
.btn {
  display: inline-block;
  background: var(--white);
  color: var(--brown-900);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn:hover { background: #f0e7dc; }

/* Sections */
h2 {
  color: var(--brown-900);
  font-size: clamp(1.5rem, 1.4vw + 1rem, 2rem);
  margin: 0 0 16px;
}
p { line-height: 1.6; color: var(--text); }

/* Gallery grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  cursor: zoom-in;
}
.card img {
  width: 100%; height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.card:hover img { transform: scale(1.03); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1000px);
  max-height: 86vh;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 24px; right: 24px;
  font-size: 32px; line-height: 1;
  color: var(--white); background: transparent; border: 0; cursor: pointer;
}

/* Video frame */
.video-frame {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  background: var(--white);
}
.video-frame::before {
  content: "";
  display: block;
  /* 16:9 aspect ratio */
  padding-bottom: 56.25%;
}
.video-frame > video,
.video-frame > iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Menu */
.menu {
  display: grid;
  gap: 24px;
}
.menu-group {
  background: var(--white);
  border: 1px solid #eadfd3;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.menu-group h3 {
  color: var(--brown-700);
  margin: 0 0 12px;
}
.menu-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px;
}
.menu-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fcfaf7;
}
.menu-list li:nth-child(odd) { background: #f7f2ec; }
.menu-list .price {
  font-weight: 700; color: var(--brown-900);
}

/* Map */
.map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.map iframe {
  width: 100%; height: 380px; border: 0;
}

/* Contact */
.contact-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px;
}
.contact-list a { color: var(--brown-700); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* Footer */
.footer {
  background: var(--brown-900);
  color: var(--white);
  padding: 24px 0;
  margin-top: 24px;
}
.footer p { margin: 0; text-align: center; }

/* Responsive */
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute; top: 60px; right: 12px;
    background: rgba(61, 42, 30, 0.92);
    flex-direction: column;
    padding: 10px;
    border-radius: 12px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .grid { grid-template-columns: 1fr; }
  .hero { min-height: 64vh; }
}

/* Accordion */
.accordion-item {
  border: 1px solid #eadfd3;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #fcfaf7;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.accordion-header {
  width: 100%;
  text-align: left;
  background: var(--brown-700);
  color: var(--white);
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.accordion-header:hover {
  background: var(--brown-900);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #fff;
}

.accordion-content ul {
  margin: 0;
  padding: 12px 16px;
  list-style: none;
}

.accordion-content li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}
.accordion-content li:last-child {
  border-bottom: none;
}

.accordion-item.active .accordion-content {
  max-height: 500px; /* dovoljno da stane lista */
}


.mute-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(75, 46, 46, 0.8);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.mute-btn:hover {
  background: rgba(61, 42, 30, 0.9);
}
.video-frame {
  position: relative;
}

const video = document.getElementById('promoVideo');
const muteBtn = document.getElementById('muteToggle');

// Video autoplay tek kad uđe u viewport
const observer = new IntersectionObserver(entries => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      video.play(); // pokreće video
    } else {
      video.pause(); // pauzira kad izađe iz viewporta
    }
  });
}, { threshold: 0.5 }); // 50% videa mora biti vidljivo

observer.observe(video);

// Dugme za mute/unmute
muteBtn.addEventListener('click', () => {
  video.muted = !video.muted;
  muteBtn.textContent = video.muted ? "🔇 Uključi zvuk" : "🔊 Isključi zvuk";
});

// Po defaultu video je mutiran (da bi autoplay radio u browserima)
video.muted = true;

/* Meni grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.menu-card {
  background: #fcfaf7;
  border: 1px solid #eadfd3;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.menu-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  color: var(--brown-700);
}

.menu-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-card li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.menu-card li:last-child {
  border-bottom: none;
}
/* Navigacija */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--brown-700);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  background: var(--brown-700);
  color: var(--white);
}

.main-nav a.active {
  background: var(--brown-900);
  color: var(--white);
}

.subpage-header {
  background: #fcfaf7;
  border-bottom: 1px solid #eadfd3;
  padding: 16px 0;
  margin-bottom: 24px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
