/* ═══════════════════════════════════════════════════════════════════════════
   CRES LIVING — Luxury Real Estate Stylesheet
   Fonts: Playfair Display (headings) · Cormorant Garamond (body) · Montserrat (UI)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  /* Warm Mediterranean palette */
  --cream:       #F4EDE0;
  --warm-white:  #FDFAF5;
  --dark:        #1C1810;
  --charcoal:    #2E2820;
  --brown:       #4A3728;
  --stone:       #8C7A65;
  --terracotta:  #B8763F;
  --gold:        #C9A55A;
  --gold-light:  #E2C98A;
  --sage:        #6A7A54;
  --sand:        #D4C09E;
  --sea:         #3A7590;
  --red-sold:    #C0392B;

  /* Typography */
  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-elegant: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:    'Montserrat', system-ui, sans-serif;

  /* Spacing */
  --container: 1240px;
  --section-pad: 7rem 0;
  --nav-h: 72px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --t-fast: 0.25s var(--ease);
  --t-med:  0.45s var(--ease);
  --t-slow: 0.7s  var(--ease-out);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: var(--font-elegant);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; background: none; border: none; }
iframe { border: none; display: block; }

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-overline {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.9rem;
}
.section-overline.light { color: var(--gold-light); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--dark);
}
.section-title.light { color: var(--warm-white); }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4rem;
}
.section-header .section-title { margin-top: 0.4rem; }

/* ─── Scroll Reveal Animations ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.reveal-right {
  transform: translateX(40px);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  NAVIGATION                                                                  */
/* ─────────────────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  transition: background var(--t-med), box-shadow var(--t-med), backdrop-filter var(--t-med);
}

#navbar.scrolled {
  background: rgba(253, 250, 245, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* Logo */
.nav-logo { display: flex; align-items: center; }
.logo-main {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--warm-white);
  transition: color var(--t-fast);
}
#navbar.scrolled .logo-main { color: var(--dark); }

/* Nav links */
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color var(--t-fast);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--t-med);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

#navbar.scrolled .nav-links a          { color: var(--stone); }
#navbar.scrolled .nav-links a:hover    { color: var(--dark); }

/* Language switcher */
.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
.lang-switch  { display: flex; align-items: center; gap: 0.5rem; }
.lang-sep {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
}
#navbar.scrolled .lang-sep { color: var(--sand); }

.lang-btn {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.6);
  padding: 0.15rem 0;
  transition: color var(--t-fast);
}
.lang-btn:hover, .lang-btn.active { color: var(--gold); }
#navbar.scrolled .lang-btn         { color: var(--stone); }
#navbar.scrolled .lang-btn.active  { color: var(--terracotta); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--warm-white);
  transition: var(--t-med);
}
#navbar.scrolled .nav-toggle span { background: var(--dark); }

/* Mobile menu open state */
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─────────────────────────────────────────────────────────────────────────── */
/*  HERO                                                                        */
/* ─────────────────────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background — landing image */
.hero-bg {
  position: absolute;
  inset: -5% 0;          /* extra height for parallax movement */
  background:
    url('../img/lending_image.jpg') center center / cover no-repeat,
    linear-gradient(160deg, #1a3547 0%, #2d5f78 35%, #4a8fa8 60%, #1e3040 100%);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,rgba(0, 0, 0, 0.79) 0%, rgba(0, 0, 30, 0.73) 52%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--warm-white);
  padding: 0 1.5rem;
}

.hero-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.6rem;
  opacity: 0;
  animation: fadeInUp 1s 0.4s var(--ease-out) forwards;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
  line-height: 1;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeInUp 1.1s 0.7s var(--ease-out) forwards;
}
.hero-title-main {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 11vw, 9.5rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--warm-white);
  line-height: 1;
}
.hero-title-sub {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 3.5vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.65em;
  color: rgba(226, 201, 138, 0.9);
  text-transform: uppercase;
  padding-left: 0.65em; /* compensate last letter-spacing */
}

.hero-rule {
  width: 56px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 1.8rem;
  opacity: 0;
  animation: expandLine 0.9s 1.1s var(--ease-out) forwards;
}

.hero-subtitle {
  font-family: var(--font-elegant);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.05em;
  color: rgba(253, 250, 245, 0.85);
  margin-bottom: 2.8rem;
  opacity: 0;
  animation: fadeInUp 1s 1.2s var(--ease-out) forwards;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.8rem;
  border: 1px solid rgba(201, 165, 90, 0.7);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--warm-white);
  transition: background var(--t-med), border-color var(--t-med), color var(--t-med);
  opacity: 0;
  animation: fadeInUp 1s 1.5s var(--ease-out) forwards;
}
.hero-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeIn 1s 2.2s forwards;
}
.scroll-text {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(253,250,245,0.55);
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(201,165,90,0.7), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  ABOUT                                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */
#about {
  padding: var(--section-pad);
  background: var(--warm-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.about-body {
  font-family: var(--font-elegant);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--brown);
  margin-top: 1.4rem;
}

.about-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2.8rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--sand);
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.stat-number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--terracotta);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  white-space: pre-line;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--sand);
  flex-shrink: 0;
}

/* About image */
.about-visual { display: flex; flex-direction: column; gap: 0.8rem; }
.about-img-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--sand);
}
.about-img-wrap::before {
  content: '';
  position: absolute;
  inset: 1.2rem 1.2rem auto auto;
  width: calc(100% - 1.2rem);
  height: calc(100% - 1.2rem);
  border: 1px solid var(--gold);
  z-index: 1;
  pointer-events: none;
}
.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.about-img-wrap:hover .about-img { transform: scale(1.04); }

/* Fallback gradient when no image */
.about-img-wrap.no-image .about-img { display: none; }
.about-img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3A7590 0%, #2d5f78 40%, #1a3547 100%);
}
.about-img-wrap:not(.no-image) .about-img-fallback { display: none; }
.about-img-fallback span {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(253,250,245,0.5);
}
.about-img-caption {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
  padding-left: 0.2rem;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  PROPERTIES                                                                   */
/* ─────────────────────────────────────────────────────────────────────────── */
#properties {
  padding: var(--section-pad);
  background: var(--cream);
}

.properties-grid {
  display: block;
}

/* ── Floor groups ─────────────────────────────────────────────────────────── */
.floor-group {
  margin-bottom: 4rem;
}
.floor-group:last-child {
  margin-bottom: 0;
}

.floor-group-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.floor-group-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.floor-group-title {
  font-family: var(--font-serif);
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--terracotta);
  white-space: nowrap;
}

.floor-group-cards {
  display: grid;
  gap: 2rem;
}
.floor-group-cards--2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 860px;
  margin: 0 auto;
}
.floor-group-cards--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ─── Property Card ───────────────────────────────────────────────────────── */
.property-card {
  position: relative;
  background: var(--warm-white);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-med), box-shadow var(--t-med);
  outline: 2px solid transparent;
  outline-offset: -2px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out),
              outline-color var(--t-fast),
              box-shadow var(--t-med);
}
.property-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.property-card:hover {
  z-index: 2;
  box-shadow: 0 20px 60px rgba(28,24,16,0.15);
}
.property-card:focus-visible {
  outline: 2px solid var(--gold);
}

/* SOLD state — red frame */
.property-card.is-sold {
  outline-color: var(--red-sold);
}
.property-card.is-sold .card-image { filter: grayscale(25%) brightness(0.9); }

/* Card image */
.card-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
  background: var(--sand);
}
.property-card:hover .card-image { transform: scale(1.06); }

/* Image fallback gradient per building */
.card-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.card-image-placeholder .card-placeholder-label {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(253,250,245,0.6);
}
.building-1 .card-image-placeholder {
  background: linear-gradient(135deg, #4a3728 0%, #7a5c3f 50%, #b8763f 100%);
}
.building-2 .card-image-placeholder {
  background: linear-gradient(135deg, #2d4a3a 0%, #4a7a5c 50%, #6a9a78 100%);
}

/* Sold badge */
.card-sold-badge {
  display: none;
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--red-sold);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  z-index: 3;
}
.property-card.is-sold .card-sold-badge { display: block; }

/* Building badge */
.card-building-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(28,24,16,0.65);
  backdrop-filter: blur(4px);
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  z-index: 2;
}

/* Hover overlay */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,24,16,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--t-med);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1.5rem;
  z-index: 2;
}
.property-card:hover .card-hover-overlay { opacity: 1; }
.card-hover-btn {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--warm-white);
  border: 1px solid rgba(253,250,245,0.6);
  padding: 0.6rem 1.4rem;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.card-hover-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}

/* Card info */
.card-info {
  padding: 1.4rem 1.4rem 1.6rem;
  border-top: 1px solid var(--cream);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--dark);
}
.card-location {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}
.card-specs {
  display: flex;
  gap: 1.2rem;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--cream);
}
.card-spec {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--stone);
}
.card-spec strong {
  display: block;
  font-family: var(--font-elegant);
  font-size: 1rem;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0;
}
.card-price {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--terracotta);
  margin-top: 0.2rem;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  PROPERTY MODAL                                                               */
/* ─────────────────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal[hidden] { display: none; }
.modal.opening { display: flex; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18,14,10,0.85);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s forwards;
}

.modal-container {
  position: relative;
  z-index: 1;
  background: var(--warm-white);
  width: 100%;
  max-width: 1040px;
  max-height: calc(100vh - 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  animation: modalSlideIn 0.4s var(--ease-out) forwards;
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 10;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(253,250,245,0.9);
  border-radius: 50%;
  font-size: 0.85rem;
  color: var(--dark);
  transition: background var(--t-fast), transform var(--t-fast);
}
.modal-close:hover { background: var(--dark); color: var(--warm-white); transform: rotate(90deg); }

/* Gallery side */
.modal-gallery {
  display: flex;
  flex-direction: column;
  background: var(--dark);
  overflow: hidden;
}
.gallery-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #111;
  min-height: 280px;
}
.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s var(--ease);
}

/* Sold overlay in gallery */
.gallery-sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(192, 57, 43, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}
.gallery-sold-overlay.visible { opacity: 1; }
.gallery-sold-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: #fff;
  background: var(--red-sold);
  padding: 0.6rem 2rem;
}

/* Gallery arrows */
.gallery-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(253,250,245,0.15);
  color: var(--warm-white);
  font-size: 1.5rem;
  transition: background var(--t-fast);
  z-index: 2;
}
.gallery-arrow:hover   { background: rgba(253,250,245,0.3); }
.gallery-arrow.prev    { left: 0.8rem; }
.gallery-arrow.next    { right: 0.8rem; }
.gallery-arrow:disabled { opacity: 0.25; pointer-events: none; }

/* Gallery tabs */
.gallery-tabs {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.gtab {
  flex: 1;
  padding: 0.7rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(212,192,158,0.6);
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.gtab:hover  { color: var(--gold-light); }
.gtab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* Thumbnails */
.gallery-thumbs {
  display: flex;
  gap: 3px;
  padding: 0.5rem;
  background: rgba(0,0,0,0.3);
  overflow-x: auto;
  scrollbar-width: none;
  min-height: 58px;
  flex-shrink: 0;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 52px; height: 50px;
  flex-shrink: 0;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--t-fast);
  border: 1px solid transparent;
}
.gallery-thumb:hover   { opacity: 0.8; }
.gallery-thumb.active  { opacity: 1; border-color: var(--gold); }

/* Modal info side */
.modal-info {
  overflow-y: auto;
  padding: 2.2rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--sand) transparent;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal-info::-webkit-scrollbar       { width: 4px; }
.modal-info::-webkit-scrollbar-thumb { background: var(--sand); }

.modal-overline {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.2;
}
.modal-location {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}
.modal-desc {
  font-family: var(--font-elegant);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--brown);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cream);
}

/* Specs */
.modal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1.5rem;
}
.spec {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.spec-label {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}
.spec-value {
  font-family: var(--font-elegant);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--dark);
}

/* Price */
.modal-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--cream);
  border-bottom: 1px solid var(--cream);
}
.modal-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--terracotta);
}

/* Features */
.features-heading {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.5rem;
}
.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
}
.features-list li {
  font-family: var(--font-elegant);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--brown);
  padding-left: 1rem;
  position: relative;
}
.features-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.7rem;
}

/* CTA */
.modal-actions { margin-top: auto; padding-top: 0.5rem; }
.modal-cta-btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--dark);
  color: var(--warm-white);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: background var(--t-fast);
  width: 100%;
  text-align: center;
}
.modal-cta-btn:hover { background: var(--terracotta); }
.modal-cta-btn.disabled {
  background: var(--sand);
  color: var(--stone);
  pointer-events: none;
}
.modal-sold-notice {
  display: none;
  margin-top: 0.6rem;
  font-family: var(--font-elegant);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--red-sold);
  text-align: center;
}
.modal-sold-notice.visible { display: block; }

/* ─────────────────────────────────────────────────────────────────────────── */
/*  LOCATION                                                                     */
/* ─────────────────────────────────────────────────────────────────────────── */
#location {
  position: relative;
  padding: var(--section-pad);
  overflow: hidden;
}

.location-bg {
  position: absolute;
  inset: 0;
  background:
    url('../img/outside/outside_2.jpg') center center / cover no-repeat,
    linear-gradient(160deg, #1a3040 0%, #2d5a70 40%, #1e3a50 100%);
}
.location-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,16,12,0.75);
}

.location-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.location-body {
  font-family: var(--font-elegant);
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.85;
  color: rgba(253,250,245,0.8);
  margin-top: 1.2rem;
  margin-bottom: 1.8rem;
}
.location-features {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.location-feature-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,250,245,0.7);
}
.location-feature-item::before {
  content: '';
  display: block;
  width: 20px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

/* Map */
.location-map {
  aspect-ratio: 1;
  border: 1px solid rgba(201,165,90,0.3);
  overflow: hidden;
}
.location-map iframe { width: 100%; height: 100%; }

/* ─────────────────────────────────────────────────────────────────────────── */
/*  CONTACT                                                                      */
/* ─────────────────────────────────────────────────────────────────────────── */
#contact {
  padding: var(--section-pad);
  background: var(--warm-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  align-items: start;
}

/* Contact info */
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-icon {
  font-size: 1rem;
  color: var(--terracotta);
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: 1.2rem;
  text-align: center;
}
.contact-item-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.25rem;
}
.contact-item-value {
  font-family: var(--font-elegant);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--charcoal);
  transition: color var(--t-fast);
}
a.contact-item-value:hover { color: var(--terracotta); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--sand);
  padding: 0.6rem 0;
  font-family: var(--font-elegant);
  font-size: 1rem;
  font-weight: 300;
  color: var(--dark);
  outline: none;
  width: 100%;
  transition: border-color var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--terracotta);
}
.form-group input.input-error,
.form-group textarea.input-error {
  border-bottom-color: var(--red-sold);
  animation: inputShake 0.35s var(--ease);
}
@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  60%       { transform: translateX(5px); }
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group select {
  background: transparent;
  cursor: pointer;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.5rem;
}
.form-privacy {
  font-family: var(--font-elegant);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--stone);
  flex: 1;
}
.form-submit {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 2rem;
  background: var(--dark);
  color: var(--warm-white);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--t-fast);
}
.form-submit:hover { background: var(--terracotta); }
.submit-arrow { transition: transform var(--t-fast); }
.form-submit:hover .submit-arrow { transform: translateX(4px); }

.form-success {
  background: #f0f7f0;
  border-left: 3px solid var(--sage);
  padding: 1rem 1.2rem;
  font-family: var(--font-elegant);
  font-size: 1rem;
  font-style: italic;
  color: var(--sage);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  FOOTER                                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */
#footer {
  background: var(--dark);
  color: rgba(253,250,245,0.55);
  padding: 4rem 0 2rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--warm-white);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.footer-tagline {
  font-family: var(--font-elegant);
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(253,250,245,0.45);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
  text-align: center;
}
.footer-nav a {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253,250,245,0.5);
  transition: color var(--t-fast);
}
.footer-nav a:hover { color: var(--gold-light); }

.footer-contact {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-contact p {
  font-family: var(--font-elegant);
  font-size: 0.9rem;
  font-weight: 300;
}
.footer-contact a {
  color: rgba(253,250,245,0.5);
  transition: color var(--t-fast);
}
.footer-contact a:hover { color: var(--gold-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.1em;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  color: rgba(253,250,245,0.4);
  transition: color var(--t-fast);
}
.footer-links a:hover { color: rgba(253,250,245,0.7); }

/* ─────────────────────────────────────────────────────────────────────────── */
/*  BUILDING GALLERY STRIP                                                        */
/* ─────────────────────────────────────────────────────────────────────────── */
#gallery-strip {
  background: var(--dark);
  padding: 0;
  overflow: hidden;
}
.gs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.gs-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--charcoal);
}
.gs-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.4s;
  filter: brightness(0.88) saturate(0.85);
}
.gs-item:hover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  CARD — FLOOR PLAN MODE                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */
/* Property cards show floor plan images (architectural drawings) */
.card-image-wrap .card-image.fp-card {
  object-fit: contain;
  background: #f8f6f2;
  padding: 1rem;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  GALLERY — FLOOR PLAN TAB MODE                                                */
/* ─────────────────────────────────────────────────────────────────────────── */
.gallery-main-img.fp-mode {
  object-fit: contain;
  background: #fff;
  cursor: zoom-in;
}
.gallery-main-img:not(.fp-mode) { cursor: zoom-in; }

/* Zoom hint inside gallery stage */
.gallery-zoom-hint {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(28,24,16,0.6);
  color: rgba(212,192,158,0.85);
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  padding: 0.25rem 0.5rem;
  pointer-events: none;
  z-index: 3;
  transition: opacity var(--t-fast);
}
.gallery-stage:hover .gallery-zoom-hint { opacity: 0; }

/* ─────────────────────────────────────────────────────────────────────────── */
/*  IMAGE ZOOM OVERLAY                                                            */
/* ─────────────────────────────────────────────────────────────────────────── */
.image-zoom {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s forwards;
}
.image-zoom[hidden] { display: none; }

.iz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.97);
  cursor: zoom-out;
}

.iz-stage {
  position: relative;
  z-index: 1;
  max-width: 96vw;
  max-height: 92vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.iz-stage img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: opacity 0.15s;
}

/* 100% native-size mode (toggle on image click) */
.image-zoom.zoom-100 {
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1.5rem;
}
.iz-stage.zoom-100 {
  max-width: none;
  width: auto;
}
.iz-stage.zoom-100 img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.iz-close {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28,24,16,0.8);
  color: var(--warm-white);
  font-size: 0.85rem;
  border-radius: 50%;
  z-index: 2;
  transition: background var(--t-fast), transform var(--t-fast);
}
.iz-close:hover { background: var(--red-sold); transform: rotate(90deg); }

.iz-hint {
  position: absolute;
  bottom: 0.6rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(100,80,60,0.6);
  white-space: nowrap;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  KEYFRAME ANIMATIONS                                                          */
/* ─────────────────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes expandLine {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/*  RESPONSIVE                                                                   */
/* ─────────────────────────────────────────────────────────────────────────── */

/* Tablet ≤ 1024px */
@media (max-width: 1024px) {
  :root { --section-pad: 5rem 0; }

  .about-grid  { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { max-width: 480px; margin: 0 auto; }

  .floor-group-cards--3 { grid-template-columns: repeat(2, 1fr); }

  .location-inner { grid-template-columns: 1fr; gap: 3rem; }
  .location-map   { aspect-ratio: 16/9; max-width: 600px; }

  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }

  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-contact { display: none; }

  .modal-container { grid-template-columns: 1fr; height: 90vh; grid-template-rows: auto 1fr; }
  .modal-gallery   { max-height: 50vh; }
  .modal-info      { min-height: 0; }
}

@media (max-width: 1024px) {
  .gs-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile ≤ 640px */
@media (max-width: 640px) {
  .gs-grid { grid-template-columns: 1fr; gap: 2px; }
  .gs-item { aspect-ratio: 16/9; }
  :root {
    --nav-h: 60px;
    --section-pad: 4rem 0;
  }

  .container { padding: 0 1.2rem; }

  /* Nav — mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(253,250,245,0.98);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    color: var(--stone);
    padding: 0.9rem 2rem;
    border-bottom: 1px solid var(--cream);
    display: block;
    width: 100%;
  }
  .nav-links a:hover { color: var(--dark); }

  .nav-toggle { display: flex; }
  #navbar { padding: 0 1.2rem; }

  .hero-title { font-size: clamp(3rem, 14vw, 6rem); letter-spacing: 0.12em; }

  .hero-bg { background-position: 60% center; }

  /* Na mobitelu reveal-right animira prema dolje, ne desno — bez horizontalnog overflowa */
  .reveal.reveal-right { transform: translateY(40px); }

  .floor-group-cards--2,
  .floor-group-cards--3 { grid-template-columns: 1fr; max-width: 100%; }

  .form-row { grid-template-columns: 1fr; }

  .footer-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 0.8rem; text-align: center; }

  .about-stats { gap: 0.6rem; }
  .stat-number { font-size: 1.55rem; }
  .stat-label  { font-size: 0.56rem; letter-spacing: 0.08em; }

  .modal-container { margin: 0; height: 100vh; height: 100dvh; border-radius: 0; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-gallery { max-height: 45vh; }
  .modal-specs { grid-template-columns: 1fr 1fr; }
  .features-list { grid-template-columns: 1fr; }

  .form-footer { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .form-submit { width: 100%; justify-content: center; }
}
