/* Celmi.lv — style C: dark warm background, cheese-yellow accents */

:root {
  --bg: #1f1b16;
  --bg-alt: #2a241d;
  --card: #2f2820;
  --text: #f6efe1;
  --muted: #cdbfa6;
  --yellow: #f2c14e;
  --yellow-dark: #d9a52f;
  --ink: #1f1b16;
  --radius: 12px;
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__img { transition: none; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--yellow); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

section[id] { scroll-margin-top: var(--header-h); }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(31, 27, 22, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #3a3128;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.logo { color: var(--yellow); font-weight: 800; font-size: 1.4rem; text-decoration: none; letter-spacing: -.01em; }

.menu { display: flex; align-items: center; gap: 4px; }
.menu a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.menu a:hover { background: #3a3128; }
.menu .menu__call { background: var(--yellow); color: var(--ink); font-weight: 700; margin-left: 8px; }
.menu .menu__call:hover { background: var(--yellow-dark); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid #4a3f33;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- Buttons, tags, bands ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0 0; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  background: var(--ink);
  color: var(--yellow);
  border: 2px solid var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: #000; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(0, 0, 0, .08); }
.btn--yellow { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn--yellow:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }
.btn--outline { background: transparent; color: var(--yellow); border-color: var(--yellow); }
.btn--outline:hover { background: rgba(242, 193, 78, .1); }

.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: #3a3128;
  color: var(--yellow);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tag--dark { background: var(--ink); }

.band { background: var(--yellow); color: var(--ink); }
.band a:not(.btn) { color: var(--ink); font-weight: 700; }

/* ---------- Hero ---------- */

.hero__slides { position: relative; height: 340px; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero__img.is-active { opacity: 1; }
.hero .band { padding: 36px 0 40px; }
.hero .lead { font-size: 1.2rem; max-width: 40em; margin: 0; }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.intro { color: var(--muted); max-width: 52em; margin-bottom: 32px; }

/* Offer */
.offer {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--yellow);
}
.offer__img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.offer__body { padding: 28px 32px; }
.offer__body p { color: var(--muted); }

/* Cheese cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__body { padding: 18px 20px 20px; }
.card h3 { color: var(--yellow); margin-bottom: .2em; }
.card__tagline { color: var(--muted); margin-bottom: .8em; }
.card details { font-size: .95rem; }
.card summary {
  cursor: pointer;
  color: var(--yellow);
  font-weight: 700;
  list-style: none;
  display: inline-block;
  padding: 4px 0;
}
.card summary::-webkit-details-marker { display: none; }
.card summary::after { content: " ▾"; }
.card details[open] summary::after { content: " ▴"; }
.card details p { color: var(--muted); margin-top: .8em; }
.card ul { padding-left: 1.2em; margin: .6em 0 0; color: var(--text); }
.card li { margin-bottom: .2em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--card); }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .25s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.05); }

/* About */
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.rounded { border-radius: var(--radius); width: 100%; object-fit: cover; }
#par-mums p { color: var(--muted); }
.readmore { margin-top: 48px; max-width: 52em; }
.readmore h3 { color: var(--yellow); }
.readmore h4 { margin-top: .4em; }
.readmore.is-collapsed [data-readmore] { display: none; }

/* Contacts */
#kontakti .two-col { align-items: start; }
#kontakti address { font-style: normal; font-size: 1.1rem; line-height: 1.7; margin: 1em 0; }
.map { width: 100%; height: 360px; border: 0; border-radius: var(--radius); background: #e8d9a8; }

/* Footer */
.footer { padding: 28px 0; font-size: .9rem; color: var(--muted); border-top: 1px solid #3a3128; }
.footer a { color: var(--muted); }

/* Floating call button (phones only) */
.fab-call { display: none; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; text-align: center; }
/* Source photos are 240px wide: cap at 2x so they don't blur */
/* All gallery photos are 160px tall: 320px = exactly 2x, and always fits the screen */
.lightbox__img { height: min(320px, calc(100vh - 110px)); width: auto; max-width: 92vw; object-fit: contain; border-radius: 8px; }
.lightbox__count { color: var(--muted); margin-top: 10px; font-size: .9rem; }
.lightbox button {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 0;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lightbox__close { position: absolute; top: 16px; right: 16px; font-size: 1.3rem !important; }

body.no-scroll { overflow: hidden; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .offer { grid-template-columns: 1fr; }
  .offer__img { min-height: 0; height: 240px; }
}

@media (max-width: 767px) {
  :root { --header-h: 58px; }
  body { font-size: 16px; padding-bottom: 84px; }

  /* Without JS the menu stays visible as a wrapped row; with JS it folds behind ☰ */
  .topbar__inner { height: auto; min-height: var(--header-h); flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .menu { flex-wrap: wrap; justify-content: flex-end; }
  .js .topbar__inner { height: var(--header-h); flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
  .js .menu-toggle { display: block; }
  .js .menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid #3a3128;
    padding: 8px 12px 16px;
  }
  .js .menu.is-open { display: flex; }
  .js .menu a { padding: 12px 14px; font-size: 1.05rem; }
  .js .menu .menu__call { margin: 8px 0 0; text-align: center; }

  .hero__slides { height: 180px; }
  .hero .band { padding: 28px 0 32px; }
  .section { padding: 48px 0; }
  .offer__body { padding: 22px 20px; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .map { height: 280px; }

  .fab-call {
    display: block;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    padding: 14px 22px;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  }

  .lightbox { padding: 12px; gap: 6px; }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 24px; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
}
