/* ========== CSS Base ========== */
:root {
  /* Neutral minimal palette */
  --color-bg: #f5f6f7;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #fafbfc;
  --color-text: #1f2328;
  --color-text-soft: #485057;
  --color-primary: #0f3d3e; /* deep desaturated teal */
  --color-accent: #ffb44d; /* warm accent for CTA */
  --color-accent-hover: #f3a234;
  --color-line: #e1e4e8;
  --color-focus: #264fce;
  --gradient-hero: linear-gradient(145deg,rgba(15,61,62,.78),rgba(15,61,62,.25));
  --max-width: 1180px;
  --radius-2: 2px;
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.07);
  --shadow-md: 0 6px 22px -6px rgba(0,0,0,0.18);
  --transition: .25s cubic-bezier(.4,.2,.2,1);
  --font-stack: 'Inter', system-ui,-apple-system,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',Arial,sans-serif;
  --tracking-tight: -0.5px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-stack);
  line-height: 1.55;
  color: var(--color-text);
  background: radial-gradient(circle at 70% 10%, #ffffff 0, #f5f6f7 70%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; height: auto; }

h1,h2,h3,h4 { font-family: var(--font-stack); line-height: 1.12; margin: 0 0 .65em; font-weight: 600; letter-spacing: var(--tracking-tight); }
p { margin: 0 0 1em; letter-spacing: -0.15px; }

/* Headings scale */
h1 { font-size: clamp(2.4rem,5.2vw,3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.55rem,3.1vw,2.15rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem,2.4vw,1.6rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* Utility */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container.narrow { max-width: 840px; }
.section { padding: clamp(3rem, 7vw, 2rem) 0; }
.lead { font-size: clamp(1.1rem, 2.1vw, 1.42rem); font-weight: 400; max-width: 50ch; color: var(--color-text-soft); }
.btn {
  --btn-bg: var(--color-accent);
  --btn-bg-hover: var(--color-accent-hover);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: var(--btn-bg);
  color: #1b1b1b;
  padding: .8rem 1.3rem .82rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .3px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,.08);
}
.btn:hover,.btn:focus { background: var(--btn-bg-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--color-primary); color: #fff; }
.btn.primary:hover { background: #174f51; }
/* subtle icon arrow */
.btn.primary:after { content: '›'; font-size: 1.1em; line-height: 1; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--color-line);
}
/* Offset anchor scrolling so content isn't hidden under fixed header */
#top, header.site-header { scroll-margin-top: 70px; }
section { scroll-margin-top: 80px; }
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; min-height: 62px; }
.logo { font-weight: 700; font-size: 1.05rem; color: var(--color-primary); text-decoration: none; letter-spacing: .5px; position: relative; display:inline-flex; align-items:center; gap:.55rem; line-height:1; }
.logo-svg { display:block; height:40px; width:auto; }
.logo-base { transition: var(--transition); }
.logo-roof {
  /* Make the roof line permanently drawn (previously animated on hover) */
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  /* Remove transition since no animation now */
}
.logo:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius:6px; }
.logo:hover .logo-base { filter: brightness(1.08); }
.brand-text {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size:1.35rem;
  font-weight:700;
  letter-spacing:.5px;
  color:var(--color-primary);
  line-height:1;
  margin-top:2px;
  display:inline-block;
  transform: translateY(1px);
  text-rendering:optimizeLegibility;
}
.logo:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; }
.site-nav { position: fixed; top:0; right:0; height:100dvh; /* dynamic viewport height to avoid mobile chrome collapse */ bottom:auto; left:auto; transform: translateX(100%); background: #fff; padding: 5rem 2rem 2.5rem; display: flex; flex-direction: column; gap: 1.1rem; width: min(80%,340px); max-width: 100%; transition: var(--transition); box-shadow: -2px 0 16px rgba(0,0,0,0.16); overflow:hidden; z-index:150; }
.site-nav.open { overflow-y:auto; }
.site-nav.open::-webkit-scrollbar { width: 0; height:0; }
.site-nav.open { transform: translateX(0); }
body.nav-open { overflow:hidden; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.site-nav a { text-decoration: none; color: var(--color-text-soft); font-weight: 500; padding:.65rem .25rem; position: relative; line-height:1.2; }
.site-nav a:before { content:""; position:absolute; left:0; bottom:0; width:0; height:2px; background: var(--color-primary); transition: var(--transition); border-radius: 2px; }
.site-nav a:hover,.site-nav a:focus { color: var(--color-primary); }
.site-nav a:hover:before,.site-nav a:focus:before { width:100%; }

.nav-toggle { background: none; border: none; cursor: pointer; padding: .5rem; display: flex; align-items: center; }
.burger { width: 26px; height: 2px; background: var(--color-text); position: relative; }
.burger:before,.burger:after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--color-text); transition: var(--transition); }
.burger:before { top: -7px; }
.burger:after { top: 7px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger:before { transform: rotate(45deg) translateY(7px); }
.nav-toggle[aria-expanded="true"] .burger:after { transform: rotate(-45deg) translateY(-7px); }

/* Hero */
.hero { min-height: 96dvh; position: relative; display: flex; align-items: center; text-align: left; color: #fff; }
.hero-bg { position: absolute; inset: 0; background:
  linear-gradient(rgba(8,25,26,.55),rgba(8,25,26,.32)),
  linear-gradient(rgba(0,0,0,.15),rgba(0,0,0,.25)),
  center/cover no-repeat url('../../images/kalafat-smestaj-02.jpg');
  filter: contrast(1.02) brightness(.95) saturate(1.04);
}
.hero-inner { padding-top: 4rem; }
.hero h1 { font-weight: 600; }
.hero .lead { backdrop-filter: blur(4px); background: rgba(10,28,29,.35); padding:.85rem 1.05rem .9rem; border-radius:14px; color:#ffffff; box-shadow:0 6px 26px -10px rgba(0,0,0,.55); }
.hero h1 { text-shadow: 0 4px 18px rgba(0,0,0,.45); }
.hero-inner { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.1rem,5vw,3.2rem); }
.scroll-down { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); font-size: 1.45rem; color: #fff; text-decoration: none; animation: float 3.8s ease-in-out infinite; opacity:.85; }
.scroll-down:hover { opacity:1; }
@keyframes float { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,-8px); } }

/* Capacity */
.amenities { columns: 2; column-gap: 2rem; list-style: none; padding: 0; margin: 1rem 0 2rem; }
.amenities li { break-inside: avoid; margin: 0 0 .6rem; position: relative; padding-left: 1.1rem; }
.amenities li:before { content: ''; position: absolute; left: 0; top: .55em; width:6px; height:6px; border-radius: 50%; background: var(--color-primary); opacity:.7; }
.note { font-size: .9rem; color: var(--color-muted); }

/* Gallery */
.gallery-grid { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); }
.gallery-grid figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-4); background: #dfe3e5; aspect-ratio: 4/3; cursor: zoom-in; transition: var(--transition); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; filter: brightness(.94); }
.gallery-grid figure:hover img { transform: scale(1.05); filter: brightness(1); }
.gallery-grid figcaption { position: absolute; inset: auto 0 0 0; background: linear-gradient(180deg,rgba(0,0,0,0) 0,rgba(0,0,0,.55) 100%); color: #fff; padding: .35rem .5rem .4rem; font-size: .65rem; letter-spacing: .5px; text-transform: uppercase; opacity: 0; transition: var(--transition); }
.gallery-grid figure:hover figcaption { opacity: 1; }

/* Map */
.map-wrapper { position: relative; border: 1px solid var(--color-line); border-radius: var(--radius-8); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--color-surface); }
.map-wrapper iframe { width: 100%; height: 380px; border: 0; display: block; }
.map-embed-wrapper { position: relative; }
.map-embed-wrapper iframe { display: block; }
.map-note { font-size: .75rem; margin: .25rem 0 0; text-align: right; }

/* Contact */
.contact-lines { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.contact-lines li { margin: 0 0 .5rem; }
.keyword-footprint { font-size: .75rem; color: var(--color-muted); }

/* Footer */
.site-footer { background: #0c2f30; color: #d7dee0; padding: 2.2rem 0; font-size: .85rem; }
.site-footer a { color: #f2f8f9; text-decoration: none; margin-right: 1rem; position: relative; }
.site-footer a:after { content:""; position:absolute; left:0; bottom:-3px; width:0; height:2px; background:#fff; transition: var(--transition); }
.site-footer a:hover:after { width:100%; }
.site-footer nav { margin-top: .75rem; }

/* Responsive */
@media (min-width: 760px) {
  .site-nav { position: static; transform: none; flex-direction: row; width: auto; padding: 0; box-shadow: none; background: transparent; height: auto; overflow: visible; }
  .site-nav ul { flex-direction: row; gap: 2rem; }
  .nav-toggle { display: none; }
  .hero { text-align: left; }
}

@media (min-width: 1000px) {
  .amenities { columns: 3; }
}

/* Fade-in animation classes (for JS intersection observer) */
.fade-in { opacity: 0; transform: translateY(18px) scale(.98); transition: .9s cubic-bezier(.4,.2,.1,1); }
.fade-in.visible { opacity: 1; transform: translateY(0) scale(1); }

/* Lightbox global styling additions (override inline minimal) */
#lightbox button { font-family: var(--font-stack); }
#lightbox button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
#lightbox img { background: #0d1718; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
