/* ============================================
   NIDO — Real Estate Agency
   Mobile-First CSS
   ============================================ */

/* === CSS VARIABLES === */
:root {
  --cream: #FAF8F5;
  --dark: #1C1C1C;
  --terra: #C4704E;
  --terra-light: #E89B7A;
  --sage: #8CA89B;
  --mid: #6B6B6B;
  --light: #E8E4DF;
  --white: #FFFFFF;
  --card-bg: #FFFFFF;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body: 'DM Sans', system-ui, sans-serif;

  --nav-h: 64px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-card: 0 2px 20px rgba(28, 28, 28, 0.08);
  --shadow-hover: 0 12px 40px rgba(28, 28, 28, 0.14);

  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--ff-body);
  background: var(--cream);
  color: var(--dark);
  line-height: 1.52;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* === TYPOGRAPHY === */
.section-tag {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: italic;
  color: var(--terra);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--ff-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.75rem;
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--terra);
  color: var(--white);
}
.btn--primary:hover {
  background: #B05E3E;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 112, 78, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.6);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn--small {
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  background: var(--terra);
  color: var(--white);
  border-radius: 100px;
}
.btn--small:hover {
  background: #B05E3E;
  transform: translateY(-1px);
}

.btn--full { width: 100%; }

/* === REVEAL ANIMATION === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }
.reveal--delay-3 { transition-delay: 0.36s; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--light);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav__logo {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  transition: color 0.4s ease;
}
.nav.scrolled .nav__logo { color: var(--dark); }
.nav__logo span { color: var(--terra); }

.nav__links {
  display: none;
  gap: 2rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  position: relative;
  transition: color 0.3s;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--terra);
  transition: width 0.3s ease;
}
.nav__link:hover { color: var(--white); }
.nav__link:hover::after { width: 100%; }
.nav.scrolled .nav__link { color: var(--mid); }
.nav.scrolled .nav__link:hover { color: var(--dark); }

/* Burger */
.nav__burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.nav.scrolled .nav__burger span { background: var(--dark); }
.nav__burger.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav__burger.active span:nth-child(2) { opacity: 0; }
.nav__burger.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-nav__link {
  font-family: var(--ff-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--white);
  transition: color 0.3s;
}
.mobile-nav__link:hover { color: var(--terra); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 10s ease forwards;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(28, 28, 28, 0.72) 0%,
    rgba(28, 28, 28, 0.35) 60%,
    rgba(196, 112, 78, 0.15) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding-top: var(--nav-h);
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terra-light);
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero__title em {
  font-style: italic;
  color: var(--terra-light);
}

.hero__sub {
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  color: rgba(255,255,255,0.8);
  max-width: 460px;
  margin-bottom: 2rem;
  line-height: 1.58;
}

.br-desktop { display: none; }

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================================
   STRIP — stats bar con count-up
   ============================================ */
.strip {
  background: var(--dark);
  padding: 2.2rem 0;
}

.strip__stats {
  display: flex;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.strip__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem;
}

.strip__item strong {
  font-family: var(--ff-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--terra-light);
  line-height: 1;
}

.strip__item span {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

.strip__sep {
  flex-shrink: 0;
  color: var(--terra-light);
  font-size: 0.5rem;
  opacity: 0.35;
  padding: 0 0.5rem;
}

/* ============================================
   ABOUT — dark showcase section
   ============================================ */
.about {
  padding: 5rem 0 4rem;
  background: var(--dark);
}

.about__intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3.5rem;
}

.about__intro .section-title {
  color: var(--cream);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 1.25rem;
}

.about__intro .section-title em {
  color: var(--terra-light);
}

.about__lead {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  line-height: 1.65;
}

.about__showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

.about__showcase-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

@media (min-width: 480px) {
  .about__showcase { grid-template-columns: repeat(3, 1fr); }
}

.about__showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about__showcase-card:hover img {
  transform: scale(1.04);
}

.about__cta-wrap {
  text-align: center;
  margin-bottom: 4rem;
}

.about__cta-sub {
  color: rgba(255,255,255,0.35);
  font-size: 0.82rem;
  margin-top: 1rem;
  letter-spacing: 0.04em;
}

.about__features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 540px;
  margin: 0 auto;
}

.about__feature {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.about__feature:hover {
  transform: translateY(-3px);
}

.about__feature-icon {
  width: 2rem;
  height: 2rem;
  color: var(--terra);
}

.about__feature strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
}

.about__feature p {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.4;
  margin: 0;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery {
  padding: 5rem 0;
  background: var(--cream);
}

.gallery__head {
  margin-bottom: 3rem;
}

.gallery__head .section-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 0.75rem;
}

.gallery__head-sub {
  color: var(--mid);
  font-size: 0.95rem;
  max-width: 460px;
  margin-bottom: 0;
}

.gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.filter {
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  border: 1.5px solid var(--light);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--ff-body);
  color: var(--mid);
  background: var(--white);
  transition: var(--transition);
}
.filter:hover, .filter.active {
  background: var(--terra);
  color: var(--white);
  border-color: var(--terra);
}

.properties {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Property Card */
.property-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.property-card__img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.property-card__img {
  transition: transform 0.5s ease;
}
.property-card:hover .property-card__img {
  transform: scale(1.05);
}

.property-card__badge {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  background: var(--dark);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
}

.property-card__status {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  background: #4CAF50;
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
}
.property-card__status--sold { background: #999; }

.property-card__body {
  padding: 1.25rem;
}

.property-card__title {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.property-card__location {
  font-size: 0.8rem;
  color: var(--mid);
  margin-bottom: 0.875rem;
}

.property-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.property-card__details span {
  font-size: 0.78rem;
  color: var(--mid);
  background: var(--cream);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
}

.property-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-card__price {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--terra);
}

/* Hidden card */
.property-card.hidden {
  display: none;
}

.gallery__cta {
  text-align: center;
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--dark);
  border-radius: var(--radius-xl);
  color: var(--white);
}

.gallery__cta p {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.8);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 28, 0.7);
  backdrop-filter: blur(4px);
}

.modal__box {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 600px;
  max-height: 90svh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}
.modal.open .modal__box { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: 36px;
  height: 36px;
  background: var(--cream);
  border-radius: 50%;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal__close:hover { background: var(--light); }

.modal__img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.modal__content { padding: 1.5rem; }
.modal__title {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  margin: 0.5rem 0 0.25rem;
}
.modal__location { font-size: 0.85rem; color: var(--mid); margin-bottom: 0.875rem; }
.modal__desc { font-size: 0.9rem; color: var(--mid); margin-bottom: 1rem; line-height: 1.58; }

.modal__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.modal__details span {
  font-size: 0.8rem;
  color: var(--mid);
  background: var(--cream);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--light);
}

.modal__price {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--terra);
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials {
  padding: 3.5rem 0;
}

.testimonials__grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  position: relative;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  font-family: var(--ff-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--terra);
  opacity: 0.15;
}

.testimonial__text {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.testimonial__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial__author strong {
  display: block;
  font-size: 0.875rem;
}
.testimonial__author span {
  display: block;
  font-size: 0.75rem;
  color: var(--mid);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  padding: 3.5rem 0;
  background: var(--dark);
  color: var(--white);
}

.contact .section-tag { color: var(--terra-light); }
.contact .section-title { color: var(--white); }

.contact__grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact__sub {
  color: rgba(255,255,255,0.65);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.contact__info-icon { font-size: 1.25rem; }

.contact__info-item strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--terra-light);
  margin-bottom: 0.1rem;
}

.contact__info-item p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* Form */
.contact__form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}

.form__row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form__group label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.form__group input,
.form__group select,
.form__group textarea {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  color: var(--white);
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  outline: none;
  transition: border-color 0.25s;
  width: 100%;
}

.form__group input::placeholder,
.form__group textarea::placeholder { color: rgba(255,255,255,0.25); }

.form__group select option { background: var(--dark); }

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  border-color: var(--terra);
}

.form__group textarea { resize: vertical; min-height: 100px; }

.form__success {
  display: none;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--sage);
  padding: 0.875rem;
  background: rgba(140, 168, 155, 0.1);
  border-radius: var(--radius-md);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #131313;
  color: rgba(255,255,255,0.55);
  padding: 2.5rem 0 1.5rem;
}

.footer__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
}

.footer__brand p {
  font-size: 0.875rem;
  margin-top: 0.75rem;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.52;
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer__links h4 {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 0.5rem;
}

.footer__links a {
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  font-size: 0.78rem;
}

.footer__bottom a { color: var(--terra); }
.footer__bottom a:hover { text-decoration: underline; }

/* ============================================
   TABLET (>= 640px)
   ============================================ */
@media (min-width: 640px) {
  .properties { grid-template-columns: repeat(2, 1fr); }
  .br-desktop { display: inline; }
  .form__row { flex-direction: row; }
  .testimonials__grid { display: grid; grid-template-columns: 1fr 1fr; }
  .footer__top { flex-direction: row; flex-wrap: wrap; }
}

/* ============================================
   DESKTOP (>= 1024px)
   ============================================ */
@media (min-width: 1024px) {
  :root { --nav-h: 72px; }

  .nav__links { display: flex; }
  .nav__burger { display: none; }

  .about__showcase-card { aspect-ratio: 3/4; }
  .about__features {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    gap: 1.25rem;
  }
  .about__feature-icon { width: 1.75rem; height: 1.75rem; }
  .about__feature strong { font-size: 0.92rem; }
  .about__feature p { font-size: 0.78rem; }

  .properties { grid-template-columns: repeat(3, 1fr); }

  .testimonials__grid { grid-template-columns: repeat(3, 1fr); }

  .gallery__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }
  .gallery__filters { margin-top: 0; }

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

  .modal {
    align-items: center;
  }
  .modal__box {
    border-radius: var(--radius-xl);
    max-height: 85svh;
  }

  .footer__top { flex-wrap: nowrap; gap: 4rem; }
  .footer__brand { flex: 1; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ============================================
   GALLERY SIDEBAR FILTER SYSTEM
   ============================================ */
.gallery__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery__filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  background: var(--white);
  border: 1.5px solid var(--light);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--ff-body);
  color: var(--dark);
  transition: var(--transition);
  cursor: pointer;
}
.gallery__filter-btn:hover {
  border-color: var(--terra);
  color: var(--terra);
}

.filter-badge {
  background: var(--terra);
  color: var(--white);
  border-radius: 100px;
  min-width: 18px;
  height: 18px;
  font-size: 0.6rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.gallery__layout {
  display: block;
}

/* --- Sidebar --- */
.filter-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  width: 252px;
  flex-shrink: 0;
}

.filter-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light);
}

.filter-sidebar__title {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.filter-sidebar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-sidebar__reset {
  font-family: var(--ff-body);
  font-size: 0.72rem;
  color: var(--terra);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
}

.filter-sidebar__close {
  width: 28px;
  height: 28px;
  background: var(--cream);
  border-radius: 50%;
  font-size: 0.75rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-family: var(--ff-body);
  display: none;
  transition: background 0.2s;
}
.filter-sidebar__close:hover { background: var(--light); }

.filter-groups { display: flex; flex-direction: column; }

.filter-group {
  padding: 1rem 0;
  border-bottom: 1px solid var(--light);
}
.filter-group:first-child { padding-top: 0; }
.filter-group:last-child { border-bottom: none; padding-bottom: 0; }

.filter-group__title {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.7rem;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.28rem 0;
  cursor: pointer;
  font-size: 0.855rem;
  color: var(--dark);
  transition: color 0.2s;
}
.filter-check:hover { color: var(--terra); }

.filter-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--terra);
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Results area --- */
.gallery__results { flex: 1; min-width: 0; }

.gallery__results-bar {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  min-height: 28px;
}

.results-count {
  font-size: 0.82rem;
  color: var(--mid);
  white-space: nowrap;
  padding-top: 2px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(196, 112, 78, 0.08);
  color: var(--terra);
  border: 1px solid rgba(196, 112, 78, 0.22);
  border-radius: 100px;
  padding: 0.2rem 0.45rem 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
}

.active-filter-chip__remove {
  width: 14px;
  height: 14px;
  background: var(--terra);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  line-height: 1;
  flex-shrink: 0;
}

/* --- No results state --- */
.gallery__no-results {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}
.no-results__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.no-results__title {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.no-results__sub {
  font-size: 0.875rem;
  color: var(--mid);
  margin-bottom: 1.5rem;
}

/* --- Filter overlay (mobile backdrop) --- */
.filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 28, 0.5);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.filter-overlay.open { display: block; }

/* Mobile: sidebar as full-height drawer */
@media (max-width: 1023px) {
  .gallery__filter-btn { display: inline-flex; }

  .filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    border-radius: 0;
    z-index: 160;
    max-height: 100dvh;
    overflow-y: auto;
    padding-top: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 32px rgba(28,28,28,0.18);
  }
  .filter-sidebar.open { transform: translateX(0); }
  .filter-sidebar__close { display: flex; }
}

/* Desktop: sidebar always visible, inline */
@media (min-width: 1024px) {
  .gallery__filter-btn { display: none; }
  .gallery__head { display: flex; margin-bottom: 2rem; }
  .gallery__layout {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
  }
  .filter-sidebar {
    position: sticky;
    top: calc(var(--nav-h) + 1rem);
    max-height: calc(100vh - var(--nav-h) - 2rem);
    overflow-y: auto;
  }
  .properties { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
  .properties { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   INQUIRY FORM (dopo gallery)
   ============================================ */
.inquiry-wrap {
  margin-top: 2.5rem;
}

.inquiry-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--light);
}

.inquiry-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light);
}

.inquiry-card__title {
  font-family: var(--ff-display);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--dark);
  margin: 0.4rem 0 0.5rem;
  line-height: 1.25;
}
.inquiry-card__title em { font-style: italic; color: var(--terra); }

.inquiry-card__sub {
  font-size: 0.875rem;
  color: var(--mid);
}

.inquiry-card__badge {
  flex-shrink: 0;
  background: var(--terra);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.1rem;
  text-align: center;
  color: var(--white);
  display: none;
}
.inquiry-card__badge-num {
  display: block;
  font-family: var(--ff-display);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}
.inquiry-card__badge-text {
  font-size: 0.68rem;
  opacity: 0.85;
  line-height: 1.4;
  margin-top: 0.2rem;
}

.inquiry {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}

.inquiry__label {
  display: block;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.6rem;
}

.inquiry__row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.inquiry__row--three { gap: 1.25rem; }

.inquiry__field--sm { flex-shrink: 0; }

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

.inquiry__grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.inquiry__divider {
  height: 1px;
  background: var(--light);
  margin: 0.25rem 0;
}

/* Pill toggle */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill { cursor: pointer; user-select: none; }

.pill input[type="checkbox"],
.pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pill span {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.95rem;
  border-radius: 100px;
  border: 1.5px solid var(--light);
  background: var(--cream);
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--mid);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.pill:hover span {
  border-color: var(--terra);
  color: var(--terra);
  background: rgba(196, 112, 78, 0.06);
}
.pill input:checked + span {
  background: var(--terra);
  border-color: var(--terra);
  color: var(--white);
}

/* Text inputs */
.inquiry__input,
.inquiry__select,
.inquiry__textarea {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  color: var(--dark);
  background: var(--cream);
  border: 1.5px solid var(--light);
  border-radius: var(--radius-md);
  padding: 0.78rem 1rem;
  outline: none;
  transition: border-color 0.25s, background 0.25s;
  width: 100%;
}
.inquiry__input:focus,
.inquiry__select:focus,
.inquiry__textarea:focus {
  border-color: var(--terra);
  background: var(--white);
}
.inquiry__input::placeholder,
.inquiry__textarea::placeholder { color: rgba(28,28,28,0.28); }
.inquiry__textarea { resize: vertical; min-height: 88px; }

/* Footer row */
.inquiry__footer {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: flex-start;
  margin-top: 0.25rem;
}

.inquiry__privacy {
  font-size: 0.75rem;
  color: var(--mid);
  line-height: 1.6;
}
.inquiry__privacy a { color: var(--terra); text-decoration: underline; }

.inquiry__submit { align-self: stretch; }

.inquiry__success {
  display: none;
  text-align: center;
  font-size: 0.9rem;
  color: var(--sage);
  padding: 0.875rem;
  background: rgba(140, 168, 155, 0.1);
  border-radius: var(--radius-md);
}

@media (min-width: 640px) {
  .inquiry-card { padding: 2.5rem; }
  .inquiry-card__badge { display: block; }
  .inquiry__row { flex-direction: row; align-items: flex-start; }
  .inquiry__row .inquiry__field { flex: 1; }
  .inquiry__row--three { flex-direction: column; }
  .inquiry__grid-3 { grid-template-columns: repeat(3, 1fr); }
  .inquiry__footer { flex-direction: row; align-items: center; justify-content: space-between; }
  .inquiry__submit { align-self: auto; white-space: nowrap; }
}

@media (min-width: 1024px) {
  .inquiry__grid-4 { grid-template-columns: repeat(4, 1fr); }
  .inquiry__row--three { flex-direction: row; }
  .inquiry__row--three .inquiry__field { flex: 1; }
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 95;
  width: 46px;
  height: 46px;
  background: var(--terra);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(196, 112, 78, 0.38);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.25s;
  cursor: pointer;
  border: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.back-to-top:hover {
  background: #B05E3E;
  transform: translateY(-3px) scale(1);
  box-shadow: 0 8px 28px rgba(196, 112, 78, 0.45);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 639px) {
  .back-to-top {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 0.875rem);
    right: 1rem;
    width: 42px;
    height: 42px;
  }
}

/* ============================================
   BOTTOM BAR
   ============================================ */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--light);
  display: flex;
  height: 62px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--mid);
  font-family: var(--ff-body);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
  padding: 0.4rem 0.25rem;
}
.bottom-bar__item:hover,
.bottom-bar__item.active { color: var(--terra); }

.bottom-bar__item--cta {
  background: var(--terra);
  color: var(--white) !important;
  border-radius: 12px;
  margin: 7px 5px;
  flex: 1.1;
  transition: background var(--transition);
}
.bottom-bar__item--cta:hover { background: #B05E3E; }

.bottom-bar__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .bottom-bar { display: none; }
}

@media (max-width: 639px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
}
