﻿/* ============================================================
   Apartman Buba Lux — Subotica
   Palette: pine green + brass gold, from the Zsolnay ceramic
   roofs of Subotica's secession palaces. One red ladybug.
   Amarante display (Art Nouveau), Karla body.
   ============================================================ */

:root {
  --paper:      #F1F3EA;   /* pale sage paper */
  --tint:       #E3E9D6;   /* tinted sections */
  --moss:       #9FB69B;   /* muted moss accent */
  --gold:       #C9973B;   /* brass gold */
  --gold-dk:    #96731F;
  --pine:       #24513F;   /* deep zsolnay green — ink & dark bg */
  --pine-soft:  #33604E;   /* cards on pine */
  --ink-soft:   #52685C;   /* muted text */
  --brass:      #C9962F;
  --bug:        #B5382D;   /* the ladybug — only red on the site */
  --white:      #FDFEFA;

  --font-display: "Amarante", serif;
  --font-body: "Karla", sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --maxw: 1120px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--pine);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 0.5em; }
h3 { font-size: 1.35rem; }

a { color: var(--pine); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-dk); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: 0.9em;
}

.lead { max-width: 56ch; margin-bottom: 1em; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  border: 2px solid var(--pine);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-solid {
  background: var(--gold);
  border-color: var(--gold);
  color: #1E3A2D;
  box-shadow: 0 4px 0 rgba(30, 58, 45, 0.28);
}
.btn-solid:hover { background: #D9A84A; color: #1E3A2D; }

.btn-ghost { background: transparent; color: var(--pine); }
.btn-ghost:hover { background: var(--tint); color: var(--pine); }

.btn-whatsapp {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--tint);
  box-shadow: 0 4px 0 rgba(30, 58, 45, 0.28);
}
.btn-whatsapp:hover { background: var(--pine-soft); color: var(--tint); }
.btn-whatsapp svg { width: 1.05em; height: 1.05em; vertical-align: -0.16em; margin-right: 0.5em; fill: currentColor; }

.btn-small { padding: 0.55em 1.2em; font-size: 0.85rem; }

.contact-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tint);
}

.logo {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  text-decoration: none;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  color: var(--pine);
}
.ladybug { width: 20px; height: 23px; transform: rotate(14deg); }
.ladybug.big { width: 42px; height: 48px; }

.site-nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover { border-bottom-color: var(--gold); color: var(--pine); }

.header-right { display: flex; align-items: center; gap: 1rem; }
@media (max-width: 900px) {
  .header-right { margin-left: auto; }
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--moss);
  font-size: 0.9rem;
}
.lang-toggle button {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  background: none;
  border: none;
  color: var(--ink-soft);
  opacity: 0.55;
  cursor: pointer;
  padding: 0.2em 0.3em;
}
.lang-toggle button.active {
  opacity: 1;
  color: var(--pine);
  border-bottom: 2px solid var(--gold);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) clamp(1rem, 4vw, 2.5rem) 1rem;
  min-height: calc(92vh - 60px);
  gap: 1rem;
}

.hero-text .eyebrow { margin-bottom: 1.2em; }

.hero-mission {
  font-size: 1.15rem;
  max-width: 44ch;
  margin: 1.2em 0 1.6em;
  color: var(--ink-soft);
}

.hero-ratings { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.8em; }
.rating-chip {
  background: var(--white);
  border: 1px solid var(--tint);
  border-radius: 999px;
  padding: 0.35em 1em;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.rating-chip strong { color: var(--gold-dk); font-size: 1rem; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Desna kolona hero-a: uokvirena fotografija apartmana sa ključem
   koji visi ispred nje. Platno ne prima klikove — hvatanje ključa
   rešava JS po blizini, a fotografija/skrol ostaju netaknuti. */
.hero-media {
  position: relative;
  align-self: center;
  width: 100%;
}

.hero-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 6px solid var(--white);
  box-shadow:
    0 1px 0 rgba(36, 81, 63, 0.12),
    0 22px 44px rgba(36, 81, 63, 0.18);
  transform: rotate(-1.4deg);
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s var(--ease);
}
/* mala napomena vidljiva samo dok fotografija nije ubačena */
.hero-frame .frame-note {
  display: none;
  position: absolute;
  left: 0; right: 0;
  bottom: 18%;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* prazno stanje: isprekidani okvir + bubamara, dok se ne ubaci foto */
.hero-frame.empty {
  border: 2px dashed var(--moss);
  background:
    radial-gradient(circle at 50% 40%, rgba(201, 151, 59, 0.12), transparent 55%),
    var(--white);
}
.hero-frame.empty img { opacity: 0; }
.hero-frame.empty .frame-note { display: block; }
.hero-frame.empty::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 30%;
  margin: 0 auto;
  width: 40px;
  height: 47px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36'%3E%3Cellipse cx='16' cy='21' rx='11' ry='13' fill='%23B5382D'/%3E%3Ccircle cx='16' cy='7' r='5.5' fill='%23233B2F'/%3E%3Cline x1='16' y1='9' x2='16' y2='34' stroke='%23233B2F' stroke-width='2'/%3E%3Ccircle cx='10' cy='16' r='2.4' fill='%23233B2F'/%3E%3Ccircle cx='22' cy='16' r='2.4' fill='%23233B2F'/%3E%3Ccircle cx='9' cy='25' r='2.4' fill='%23233B2F'/%3E%3Ccircle cx='23' cy='25' r='2.4' fill='%23233B2F'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.75;
  transform: rotate(12deg);
}

/* sekcije se ne zavlače pod lepljivo zaglavlje pri skoku iz menija */
section[id] { scroll-margin-top: 76px; }

/* ---------- Ornament divider ---------- */

.orn { max-width: 640px; margin: 0.5rem auto 0; padding: 0 1rem; }
.orn svg { width: 100%; height: 40px; display: block; }

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

.section { padding: clamp(3.5rem, 9vh, 6rem) clamp(1rem, 4vw, 2.5rem); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }

.section-tint { background: var(--tint); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

/* ---------- Apartman ---------- */

.fact-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}
.fact-tags li {
  /* shaped like a little key tag */
  background: var(--white);
  border: 1.5px solid var(--pine);
  border-radius: 6px 999px 999px 6px;
  padding: 0.45em 1.2em 0.45em 1em;
  font-size: 0.92rem;
  position: relative;
}
.fact-tags li::before {
  content: "";
  position: absolute;
  left: 0.35em;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--gold-dk);
  border-radius: 50%;
  transform: translateY(-50%);
}
.fact-tags li { padding-left: 1.6em; }

.amenity-heading { margin-bottom: 0.8em; }
.amenity-list { list-style: none; }
.amenity-list li {
  padding: 0.55em 0 0.55em 1.7em;
  border-bottom: 1px solid var(--tint);
  position: relative;
  font-size: 0.98rem;
}
.amenity-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.amenity-list li:last-child { border-bottom: none; }

/* ---------- Galerija ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 2rem;
}

.ph {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  aspect-ratio: 4 / 3;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s var(--ease), transform 0.7s var(--ease);
}
/* nežni gradijent koji se pojavi preko slike */
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(36, 81, 63, 0.42), transparent 55%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.ph figcaption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  background: var(--pine);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease);
}

/* animacija na prelaz mišem (desktop), na fokus i na dodir (telefon) */
.ph:not(.empty):hover,
.ph:not(.empty):focus-within,
.ph:not(.empty).zoom {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(36, 81, 63, 0.2);
}
.ph:not(.empty):hover img,
.ph:not(.empty):focus-within img,
.ph:not(.empty).zoom img {
  transform: scale(1.07);
}
.ph:not(.empty):hover::after,
.ph:not(.empty):focus-within::after,
.ph:not(.empty).zoom::after {
  opacity: 1;
}
.ph:not(.empty):hover figcaption,
.ph:not(.empty):focus-within figcaption,
.ph:not(.empty).zoom figcaption {
  transform: translateY(-2px);
  background: var(--gold);
  color: #1E3A2D;
}
.ph:not(.empty):active { transform: translateY(-3px) scale(0.995); }

/* empty slot look (photo not yet added) */
.ph.empty {
  border: 2px dashed var(--moss);
  background:
    radial-gradient(circle at 50% 42%, rgba(201, 151, 59, 0.12), transparent 55%),
    var(--white);
}
.ph.empty img { opacity: 0; }
.ph.empty::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36'%3E%3Cellipse cx='16' cy='21' rx='11' ry='13' fill='%23B5382D'/%3E%3Ccircle cx='16' cy='7' r='5.5' fill='%23233B2F'/%3E%3Cline x1='16' y1='9' x2='16' y2='34' stroke='%23233B2F' stroke-width='2'/%3E%3Ccircle cx='10' cy='16' r='2.4' fill='%23233B2F'/%3E%3Ccircle cx='22' cy='16' r='2.4' fill='%23233B2F'/%3E%3Ccircle cx='9' cy='25' r='2.4' fill='%23233B2F'/%3E%3Ccircle cx='23' cy='25' r='2.4' fill='%23233B2F'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.8;
  transform: rotate(12deg) translateY(-12px);
}
.ph.empty figcaption {
  background: transparent;
  color: var(--ink-soft);
  left: 0;
  right: 0;
  bottom: 22%;
  text-align: center;
}

/* ---------- Utisci ---------- */

.section-pine {
  background: var(--pine);
  color: var(--paper);
}
.section-pine .eyebrow { color: var(--gold); }
.section-pine h2 { color: var(--tint); }

.rev-sub { max-width: 52ch; color: var(--moss); margin-bottom: 2.2rem; }

.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.reviews blockquote {
  background: var(--pine-soft);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.3rem;
  position: relative;
  transition: transform 0.4s var(--ease);
}
.reviews blockquote:hover { transform: translateY(-4px); }
.reviews blockquote::before {
  content: "”";
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 0;
  color: var(--gold);
  position: absolute;
  top: 1.35rem;
  right: 1.1rem;
  opacity: 0.9;
}
.reviews p { font-size: 0.97rem; margin-bottom: 0.9em; padding-right: 1.6rem; }
.reviews cite {
  font-style: normal;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold);
}

/* ---------- Lokacija ---------- */

.dist-list { list-style: none; margin: 1.4rem 0 1.8rem; max-width: 34rem; }
.dist-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5em 0;
  font-size: 0.98rem;
}
.dist-list i {
  flex: 1;
  border-bottom: 2px dotted var(--moss);
  transform: translateY(-4px);
}
.dist-list strong { white-space: nowrap; }

.palic-card {
  background: var(--white);
  border: 1.5px solid var(--moss);
  border-radius: var(--radius);
  padding: 1.2rem 1.8rem 2rem;
  text-align: center;
}
.palic-card h3 { margin-bottom: 0.5em; }
.palic-card p { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 1.2em; }

/* pozornica 3D bubamare */
.bug-stage { position: relative; height: 230px; margin-bottom: 0.4rem; }
.bug-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
  cursor: pointer;
}
.bug-stage .ladybug.big { display: none; }
.bug-stage.no3d canvas { display: none; }
.bug-stage.no3d .ladybug.big { display: block; margin: 3rem auto 0; }
.palic-card p.bug-hint {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 0.9em;
  transition: opacity 0.6s ease;
}
.palic-card p.bug-hint.hidden { opacity: 0; }

/* ---------- Kućni red ---------- */

.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}
.rule {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  border-top: 4px solid var(--gold);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.rule:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(36, 81, 63, 0.12);
}
.rule-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5em;
}
.rule strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.35em;
}
.rule p { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Kontakt ---------- */

.contact-list { list-style: none; margin: 1.4rem 0 2rem; }
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0.55em 0;
  border-bottom: 1px solid var(--tint);
  font-size: 0.98rem;
}
.contact-list li > span:first-child {
  min-width: 9.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.15em;
}

form { display: flex; flex-direction: column; }

form label {
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.1em 0 0.35em;
}
form label:first-of-type { margin-top: 0; }

form input,
form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--pine);
  background: var(--white);
  border: 1.5px solid var(--moss);
  border-radius: 10px;
  padding: 0.7em 0.9em;
  transition: border-color 0.15s ease;
}
form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 151, 59, 0.28);
}
form textarea { resize: vertical; }

form .btn { margin-top: 1.4rem; align-self: flex-start; }

.botcheck { display: none; }

.form-status { margin-top: 0.9rem; font-size: 0.92rem; font-weight: 700; min-height: 1.4em; }
.form-status.ok { color: #2e7d4f; }
.form-status.err { color: #b3373c; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--pine);
  color: var(--tint);
  text-align: center;
  padding: 3.5rem 1.5rem 2.5rem;
}
.site-footer .ladybug { width: 26px; height: 30px; margin: 0 auto 1rem; transform: rotate(-8deg); }
.footer-mission {
  font-family: var(--font-display);
  font-size: 1.3rem;
  max-width: 34ch;
  margin: 0 auto 1.6rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.8rem;
  margin-bottom: 1.6rem;
}
.footer-links a {
  color: var(--paper);
  font-size: 0.92rem;
  text-decoration-color: var(--gold);
}
.footer-links a:hover { color: var(--gold); }
.footer-fine { font-size: 0.8rem; color: var(--moss); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

.site-header { transition: box-shadow 0.4s var(--ease); }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(36, 81, 63, 0.1); }

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

@media (max-width: 900px) {
  .site-nav { display: none; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 1rem;
  }
  .hero-text { order: 2; text-align: center; }
  .hero-text .lead, .hero-mission { margin-left: auto; margin-right: auto; }
  .hero-ratings, .hero-cta { justify-content: center; }
  .hero-media { order: 1; max-width: 340px; margin: 0 auto 0.5rem; }

  .split { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .contact-list li > span:first-child { min-width: 100%; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
