.g-row.row1 {
  padding-inline-start: 0;
  padding-inline-end: 0;
}

/* Properties responsive fixes */
@media (max-width: 1024px) {
  .properties-feature {
    margin-left: 0;
    width: 100%;
    border-radius: 12px;
    /* Cambiar a layout de una sola columna sin imagen */
    grid-template-columns: 1fr;
    padding: clamp(20px, 4vw, 40px);
  }
  
  /* Sobrescribir altura fija original de .feature-media */
  .properties-feature .feature-media {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }
  
  /* Mostrar feature-media pero ocultar solo la imagen */
  .feature-media {
    display: block !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    /* Sobrescribir la altura fija original */
    height: auto !important;
  }
  
  /* Ocultar solo la imagen */
  .feature-media img {
    display: none !important;
  }
  
  /* Ajustar el aside para ocupar todo el espacio */
  .feature-aside {
    grid-column: 1 / -1;
    padding: clamp(20px, 4vw, 40px);
    max-width: 100%;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: auto;
    overflow: visible;
  }
  
  /* Mostrar el texto de la feature en tablet/móvil */
  .feature-text {
    display: block;
    padding: 0 20px;
    margin-bottom: 20px;
    text-align: center;
  }
  
  .feature-aside .specs {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    gap: clamp(20px, 4vw, 30px);
    margin: clamp(20px, 4vh, 40px) auto;
    align-items: center;
    overflow-x: visible;
    flex-wrap: nowrap;
    padding: 0 20px;
    box-sizing: border-box;
  }
  
  .feature-aside .spec {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #2d2d2f;
    font-weight: 600;
  }
  
  .feature-aside .spec svg {
    color: var(--color-accent) !important;
    display: block !important;
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
  }
  
  .feature-aside .specs-btn,
  .feature-aside .btn-secondary,
  .feature-aside .brochure-btn {
    display: block !important;
    margin: clamp(30px, 5vh, 50px) auto 0 auto;
    padding: 12px 20px;
    background: var(--color-accent);
    color: #fff;
    border: 2px solid var(--color-accent);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
    width: fit-content;
    max-width: min(280px, 80%);
    position: relative;
    left: 0;
    right: 0;
    transform: translateX(0);
  }
  
  .feature-aside .specs-btn:hover,
  .feature-aside .btn-secondary:hover,
  .feature-aside .brochure-btn:hover {
    background: #fff !important;
    color: var(--color-accent) !important;
  }
  
  /* Asegurar que todos los elementos sean visibles */
  .properties-feature .feature-media .feature-aside {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .properties-feature .feature-media .feature-aside .specs {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .properties-feature .feature-media .feature-aside .spec {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (max-width: 768px) {
  /* Eliminar cualquier altura fija en móvil */
  .feature-media {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  .feature-aside {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  .feature-aside .specs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 25px !important;
    margin: 30px auto !important;
    justify-content: center;
    align-items: center;
    max-width: 320px;
    padding: 0 20px;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }
  
  .feature-aside .spec {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    min-width: 100px;
    max-width: 120px;
    flex: 0 0 auto;
    text-align: center;
  }
  
  /* Los primeros dos elementos ocupan la primera fila */
  .feature-aside .spec:nth-child(1),
  .feature-aside .spec:nth-child(2) {
    flex-basis: calc(50% - 12.5px);
  }
  
  /* El tercer elemento se centra en la segunda fila */
  .feature-aside .spec:nth-child(3) {
    flex-basis: 100%;
    margin-top: 10px;
  }
  
  .feature-aside .spec svg {
    width: 48px !important;
    height: 48px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .feature-aside .spec span {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d2d2f;
  }
  
  /* Asegurar que todos los spec sean visibles individualmente */
  .feature-aside .spec:nth-child(1),
  .feature-aside .spec:nth-child(2),
  .feature-aside .spec:nth-child(3) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .feature-aside .specs-btn,
  .feature-aside .btn-secondary,
  .feature-aside .brochure-btn {
    width: fit-content !important;
    max-width: min(250px, 85%) !important;
    padding: 14px 24px !important;
    margin: 40px auto 0 auto !important;
    display: block !important;
    text-align: center !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    position: static !important;
  }
  
  /* Eliminar solo espacios laterales de galería en móvil, mantener verticales */
  .g-spacer {
    display: none !important;
  }
  
  /* También eliminar pseudo-elementos que crean espacios laterales */
  .g-row.row1::before,
  .g-row.row2::after {
    display: none !important;
  }
  
  /* Asegurar que la galería ocupe todo el ancho en móvil */
  .gallery .container {
    max-width: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .gallery .section-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Mantener el espaciado vertical entre filas */
  .g-row {
    margin: 8px 0 0 0 !important;
    padding-top: 20px !important;
    padding-bottom: 40px !important;
  }
}

/* Ocultar cursores personalizados en tablet y móvil */
@media (max-width: 1024px) {
  /* Ocultar cursor personalizado de galería */
  .gallery-pull,
  #gallery-cursor {
    display: none !important;
    opacity: 0 !important;
  }
  
  /* Ocultar cursor personalizado de hero */
  .hero-cursor,
  #hero-cursor {
    display: none !important;
    opacity: 0 !important;
  }
  
  /* Restaurar cursor normal en galería para tablet/móvil */
  .g-row {
    cursor: auto !important;
  }
  
  .g-row:hover {
    cursor: auto !important;
  }
  
  .g-row.dragging {
    cursor: auto !important;
  }
  
  .g-row.dragging * {
    cursor: auto !important;
  }
  
  /* Restaurar cursor normal en hero para tablet/móvil */
  .hero {
    cursor: auto !important;
  }
}

/* Reglas de tablet movidas arriba - solo mantenemos las de contact */
@media (max-width: 1024px) {
  /* Contact grid */
  .contact-layout {
    grid-template-columns: 1.5fr 1fr;
  }
  .contact-form {
    margin-top: 32px;
  }
}

/* Mobile tweaks beyond existing rules */
@media (max-width: 600px) {
  .feature-aside .specs {
    gap: 16px;
  }
  .feature-aside .spec svg {
    width: 40px;
    height: 40px;
  }
  .feature-aside .spec span {
    font-size: 13px;
  }
  .feature-aside .specs-btn {
    width: 88%;
    max-width: 320px;
  }

  .section-title {
    font-size: clamp(28px, 7vw, 40px);
  }
  .section-subtitle {
    margin-bottom: 36px;
  }

  .footer {
    padding: 36px 0;
    font-size: 13px;
  }
}

/* Map full-bleed */
.map .container {
  max-width: 100vw; /* Restaurar 100vw para desktop/tablet */
  padding: 0;
  margin: 0;
}
.map .map-container {
  width: 100%;
}
.map .map-container iframe {
  display: block;
  width: 100vw; /* Restaurar 100vw para desktop/tablet */
  height: clamp(320px, 50vh, 620px);
}

/* ---------------- Properties Section ---------------- */
.properties .section-title {
  margin-top: 6px; /* reduce extra space above title */
}

.properties-feature {
  display: grid;
  grid-template-columns: 1fr auto; /* text | media (custom width) */
  align-items: stretch;
  gap: clamp(16px, 3vw, 32px);
  /* visible shadow like the sketch */
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
  border-radius: 18px 0 0 18px; /* round ONLY the left corners */
  overflow: visible; /* do not clip the image corners */
  min-height: clamp(280px, 38vh, 520px); /* a bit smaller overall height */
  background: #fff;
  margin-left: min(10vw, 40px); /* limitar margen en móvil */
  width: calc(100% - min(10vw, 40px)); /* usar 100% en lugar de 100vw */
  max-width: 100%;
}

.feature-text {
  padding: clamp(16px, 3vw, 28px) clamp(16px, 3.5vw, 36px);
  display: flex;
  align-items: center;
}
.feature-text p {
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.7;
  color: #4a4a4d;
  margin: 0 0 clamp(18px, 2.4vw, 28px) 0; /* extra space after long text */
}

.feature-media {
  position: relative;
  display: grid;
  grid-template-columns: 50vw 30vw; /* left reserved area | right image */
  border-radius: 0; /* keep square corners on the media block */
  overflow: visible;
  width: 80vw; /* total width of media block */
  margin-right: 0; /* flush to right edge */
  margin-left: auto; /* push to the right */
  height: 45vh; /* reserved block height increased */
  justify-items: end; /* ensure image hugs the right */
}
.feature-media img {
  grid-column: 2 / 3; /* image on the right */
  width: 30vw;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0; /* ensure no margins */
}
.feature-aside {
  grid-column: 1 / 2; /* reserved area on the left */
  background: transparent; /* reserved for future content */
  display: grid;
  place-items: center; /* perfect centering in reserved area */
  padding: clamp(10px, 2vw, 18px);
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding-right: 10vw;
}
.feature-aside .specs {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  justify-content: space-between; /* evenly distribute */
  width: clamp(520px, 42vw, 680px); /* centered band inside the 50vw column */
  margin: clamp(18px, 4vh, 48px) auto 0; /* more top margin to lower icons */
}
.feature-aside .spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  color: #2d2d2f;
  font-weight: 600;
  flex: 0 0 auto; /* let gap manage spacing */
}
.feature-aside .spec svg {
  color: var(--color-accent);
  display: block;
  margin-bottom: 6px;
  width: 56px;
  height: 56px;
}
.feature-aside .spec span {
  text-align: center;
  white-space: nowrap;
  font-size: clamp(13px, 1.2vw, 15px);
}

/* Brochure button */
.feature-aside .specs-btn {
  margin-top: clamp(18px, 2vw, 28px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  align-self: center; /* ensure centered under specs */
  text-decoration: none; /* remove underline */
  font-weight: 700; /* bold label */
  margin-left: auto;
  margin-right: auto; /* hard center */
  position: relative;
  left: 5%;
  transform: translateX(-50%); /* absolute centering guard */
}
.feature-aside .specs-btn:hover {
  background: #fff;
  color: var(--color-accent);
  text-decoration: none;
}

/* Reglas de properties movidas arriba para mejor organización */

/* Make the properties section full-bleed to the right so the image can touch the viewport edge */
.properties .container {
  max-width: 100%;
  padding-right: 0;
  overflow-x: hidden;
}
.properties .section-content {
  padding-right: 0;
}

.gallery-pull,
#gallery-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 2000;
  opacity: 0;
  transition: opacity 200ms ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#gallery-cursor.show {
  opacity: 1;
}

/* Spacers to force visual gaps at row start/end */
.g-spacer {
  flex: 0 0 6vw;
  width: 6vw;
  min-width: 6vw;
  height: 1px;
  pointer-events: none;
  display: inline-block;
}
.g-spacer-start {
  order: -1;
}
.g-spacer-end {
  order: 9999;
}

/* Ensure strong start padding on both rows (override generic padding) */
.gallery .g-row.row1 {
  padding-left: 0 !important;
  background: transparent;
}
.gallery .g-row.row2 {
  padding-left: 0 !important;
  background: transparent;
}
.g-row.row2 {
  padding-inline-start: 0;
  padding-inline-end: 0;
}
.gallery .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
  overflow-x: hidden;
}

.gallery .section-content {
  padding-left: 0;
  padding-right: 0;
}
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@700;800;900&display=swap");

:root {
  --color-primary: #ffffff;
  --color-accent: #c17a5b;
  --color-text: #1d1d1f;
  --color-text-light: #86868b;
  --color-bg: #f5f5f7;
  --color-border: #d2d2d7;
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #c17a5b 0%, #a66849 100%);
}

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

/* Prevenir scroll horizontal en todos los elementos */
*, *::before, *::after {
  max-width: 100%;
}

/* Reglas específicas para prevenir overflow horizontal */
.container, .section, .section-content, main, div {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevenir scroll horizontal */
  overflow-y: auto; /* Permitir scroll vertical */
  max-width: 100vw; /* Limitar ancho máximo */
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-primary);
  overflow-x: hidden; /* Prevenir scroll horizontal */
  max-width: 100vw; /* Limitar ancho máximo */
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Full height sections */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  scroll-snap-align: start;
}

.section-content {
  width: 100%;
  padding: 100px 0 80px;
}

/* Scroll snap container */
main {
  scroll-snap-type: y proximity; /* softer snap */
  height: 100vh;
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

main::-webkit-scrollbar {
  display: none; /* WebKit */
}

/* Footer visibility fix */
.footer {
  scroll-snap-align: end;
  min-height: 10vh;
  display: flex;
  align-items: center;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto; /* brand | centered menu | lang */
  align-items: center;
  height: 70px;
  column-gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  height: 64px; /* keeps header height */
  width: auto;
  display: block;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  gap: 32px;
  list-style: none;
  justify-self: center; /* center the menu in header */
}

.nav-menu a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a:hover {
  color: var(--color-accent);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-switch button {
  background: none;
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  color: var(--color-text);
}

.lang-switch button:hover,
.lang-switch button.active {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 32px;
  background: var(--gradient-accent);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(193, 122, 91, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(193, 122, 91, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: white;
}

/* Hero specific button style: outline white, transparent bg */
.hero .btn {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
  box-shadow: none;
}

.hero .btn:hover {
  background: #ffffff;
  color: var(--color-accent);
  border-color: #ffffff;
}

/* Particles canvas sits above overlays but below content */
.particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Hero Section */
.hero {
  background: none; /* remove bluish gradient */
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: none; /* hide default cursor over hero */
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("/images/hero.jpg") center center / cover no-repeat;
  opacity: 0.9; /* make the base photo a bit more visible */
  z-index: 0;
}

/* Accent tint overlay using the button color */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0.7; /* stronger warm tint */
  mix-blend-mode: multiply; /* ensure warm earthy tone over the photo */
  z-index: 0;
}

.hero .section-content {
  position: relative;
  z-index: 2; /* above particles and overlays */
  text-align: center;
}

/* Custom cursor: circular, white stroke, glass blur */
.hero-cursor,
#hero-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1); /* slightly stronger for visibility */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 2000; /* above header and content */
  opacity: 0;
  transition: opacity 220ms ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  will-change: transform, opacity;
}

.hero-cursor span,
#hero-cursor span {
  user-select: none;
}

.hero-cursor.show,
#hero-cursor.show {
  opacity: 1;
}

/* Body-level cursor uses fixed coordinates */
#hero-cursor {
  position: fixed;
}

/* Subtle fade when switching language */
.lang-fade {
  animation: langFade 450ms ease;
}

@keyframes langFade {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}

.hero-title {
  font-family: "Fraunces", serif;
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.hero-subtitle {
  font-size: clamp(18px, 2.8vw, 22px);
  opacity: 0.95;
  margin-bottom: 44px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-long {
  font-size: clamp(14px, 2.2vw, 18px);
  line-height: 1.7;
  max-width: 940px;
  margin: 0 auto;
  opacity: 0.92;
}

/* Gallery Section */
.gallery {
  /* Full-bleed section with subtle gradient background */
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(193, 122, 91, 0.1), rgba(193, 122, 91, 0) 60%),
    radial-gradient(1200px 600px at 80% 90%, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0) 60%),
    var(--color-bg);
}

/* New draggable gallery rows */
.g-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden; /* prevent vertical scrollbar in rows */
  padding-left: 0;
  padding-right: 0;
  padding-top: 20px;
  padding-bottom: 40px;
  margin: 8px 0 0 0;
  scroll-snap-type: none; /* free-scroll, no snapping */
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  background: transparent;
}

/* Hide system cursor so only the custom PULL circle is visible */
.g-row:hover {
  cursor: none !important;
}
.g-row.dragging {
  cursor: none !important;
}
.g-row.dragging * {
  cursor: none !important;
}

/* Pseudo-element spacers for reliable 10vw gaps */
.g-row.row1::before {
  content: "";
  display: block;
  flex: 0 0 6vw;
  width: 6vw;
  min-width: 6vw;
}
.g-row.row2::after {
  content: "";
  display: block;
  flex: 0 0 6vw;
  width: 6vw;
  min-width: 6vw;
}

/* Layering: ensure row1 shadows overlap row2 */
.g-row.row1 {
  position: relative;
  z-index: 2;
}
.g-row.row2 {
  position: relative;
  z-index: 1;
}

.g-row.dragging {
  cursor: grabbing;
}
.g-row.dragging,
.g-row.dragging * {
  user-select: none;
  -webkit-user-select: none;
}

.g-row::-webkit-scrollbar {
  display: none;
}

.g-item {
  flex: 0 0 auto;
  width: min(480px, 85vw);
  /* Constrain height to avoid vertical overflow (consider header 70px + paddings) */
  height: clamp(220px, 36vh, 420px);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #fff;
  scroll-snap-align: none; /* no snap per item */
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.g-item.g-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(16px, 2.5vw, 32px);
  background: #ffffff;
  /* 25% wider than base cards and same height as others */
  width: min(600px, 90vw);
  height: clamp(220px, 36vh, 420px);
}
.g-text h3 {
  display: none;
}
.g-text p {
  color: #555;
  text-align: left;
  font-size: clamp(12px, 1.5vw, 15px);
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
}

.g-item.g-image img {
  width: 100%;
  height: 100%; /* fill the constrained card height */
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.g-item.g-image:hover img {
  transform: scale(1.06);
}

.g-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  color: #fff;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.g-item.g-image:hover .g-overlay {
  opacity: 1;
}
.g-overlay span {
  user-select: none;
  -webkit-user-select: none;
}

.g-row.reverse {
  direction: rtl;
}
.g-row.reverse > * {
  direction: ltr;
}

.gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image-wrapper img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 30px 20px 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.gallery-overlay p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
}

@media (max-width: 768px) {
  .gallery-apple {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .gallery-apple {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Gallery Modal */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.gallery-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.gallery-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
}

.gallery-modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-modal-content img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
}

.gallery-modal-info {
  padding: 30px;
  text-align: center;
}

.gallery-modal-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 15px 0;
}

.gallery-modal-info p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Properties Section */
.properties {
  background: white;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 60px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.property-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.property-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-card:hover img {
  transform: scale(1.05);
}

.property-card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-card h3 {
  font-size: 1.5rem;
  margin: 0 0 15px 0;
  color: #333;
  font-weight: 700;
}

.property-details {
  display: flex;
  gap: 20px;
  margin: 15px 0;
  font-size: 0.9rem;
  color: #666;
}

.property-details span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 0.9rem;
}

.property-details svg {
  color: #c17b5c;
  width: 16px;
  height: 16px;
}

.property-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #c17b5c;
  margin-top: auto;
  padding-top: 15px;
}

/* Contact Section */
.contact .section-content {
  max-width: min(1120px, 92vw);
  margin: 0 auto;
}
.contact .section-subtitle {
  max-width: clamp(720px, 70ch, 980px);
  margin-left: auto;
  margin-right: auto;
}
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr; /* form | aside */
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  margin-top: clamp(12px, 2.2vw, 24px);
}
.contact-main {
  background: #fff;
  border-radius: 16px;
  padding: clamp(16px, 2.5vw, 28px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}
.contact-aside {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: clamp(16px, 2.2vw, 24px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vw, 16px);
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #2d2d2f;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 10px;
  border-radius: 12px;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease;
  transform: translate(0, 0) !important;
}
.contact-link svg {
  color: var(--color-accent);
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.contact-link:hover {
  background: rgba(193, 122, 91, 0.08);
  color: #1f1f21;
}

.contact-form .form-group {
  margin-bottom: clamp(12px, 2.2vw, 18px);
}
.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2d2d2f;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(193, 122, 91, 0.15);
}
.contact-form .btn {
  background: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.contact-form .btn:hover {
  background: #fff;
  color: var(--color-accent);
}
.contact-form .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
}
.alert.success {
  background: #d4edda;
  color: #155724;
}
.alert.error {
  background: #f8d7da;
  color: #721c24;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-aside {
    order: -1;
  }
  .contact .section-subtitle {
    max-width: 100%;
  }
}
.contact {
  background: var(--color-bg);
}

.contact-form {
  max-width: 600px;
  margin: 60px auto 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(193, 122, 91, 0.1);
}

/* Map Section */
.map {
  background: white;
}

/* Remove default section bottom padding so the map sits flush */
section.map {
  padding-bottom: 0;
}

.map-container {
  margin-top: auto;
  margin-bottom: 0; /* stick to bottom */
  border-radius: 20px 20px 0 0; /* no bottom rounding */
  overflow: hidden;
  box-shadow: none; /* prevent shadow gap at bottom */
}

/* Section Titles */
.section-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: -1px;
  color: var(--color-text);
}

.section-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  text-align: center;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 60px;
}

/* Footer */
.footer {
  background: var(--color-text);
  color: white;
  text-align: center;
  padding: 60px 0;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .nav-menu {
    display: none;
  }

  .section-content {
    padding: 80px 0 60px;
  }

  .properties-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Scroll indicators */
.scroll-indicator {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.scroll-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  margin: 12px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  /* Asegurar que mantenga forma circular */
  flex-shrink: 0;
  display: block;
  box-sizing: border-box;
  /* Prevenir deformación */
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
}

.scroll-dot.active {
  background: var(--color-accent);
  /* Usar width/height en lugar de transform para mantener forma circular */
  width: 14px;
  height: 14px;
  /* Ajustar margen para compensar el tamaño mayor */
  margin: 11px 0;
  /* Asegurar dimensiones exactas para el estado activo */
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
}

/* ==================== REGLAS ANTI-OVERFLOW HORIZONTAL ==================== */
/* Prevenir scroll horizontal en móvil */
@media (max-width: 768px) {
  /* Forzar que html y body no permitan scroll horizontal */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
  }
  
  /* Asegurar que todos los contenedores respeten el ancho de pantalla */
  .container, .section, .section-content, main, div {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  /* Elementos específicos que pueden causar overflow */
  .properties-feature {
    margin-left: 20px !important;
    width: calc(100% - 20px) !important;
    max-width: calc(100vw - 40px) !important;
  }
  
  .feature-media {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .feature-media img {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .feature-aside {
    padding-right: 20px !important;
    max-width: 100% !important;
  }
  
  /* Gallery específico */
  .g-row {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .g-text {
    width: min(600px, calc(100vw - 40px)) !important;
    max-width: calc(100vw - 40px) !important;
  }
  
  /* Map container - solo limitar en móvil */
  .map .container {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .map .map-container iframe {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Cualquier elemento que use vw - excepto el mapa */
  [style*="vw"]:not(.map *):not(.map), [class*="vw"]:not(.map *):not(.map) {
    max-width: 100% !important;
  }
}

/* Reglas adicionales para tabletas */
@media (max-width: 1024px) {
  /* Prevenir overflow horizontal también en tabletas - excepto mapa */
  html, body {
    overflow-x: hidden !important;
  }
  
  .properties-feature {
    max-width: calc(100% - 40px) !important;
  }
  
  /* Asegurar que el mapa mantenga 100vw en tablet */
  .map .container {
    max-width: 100vw !important;
    overflow-x: visible !important;
  }
  
  .map .map-container iframe {
    width: 100vw !important;
    max-width: none !important;
  }
}

/* Reglas específicas para desktop - asegurar mapa full-width */
@media (min-width: 769px) {
  .map .container {
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: visible !important;
  }
  
  .map .map-container {
    width: 100% !important;
  }
  
  .map .map-container iframe {
    width: 100vw !important;
    max-width: none !important;
  }
}

.hero-sold-out-name {
  color: #ff0000 !important;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0;
}
.hero-sold-out-label {
  color: #ff0000 !important;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 900;
  opacity: 1;
  margin-bottom: 0;
}

.sold-out-doc {
  background: #f5f0eb;
  padding: 60px 20px;
  text-align: center;
}
.sold-out-doc img {
  width: 100%;
  max-width: 960px;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  display: block;
  margin: 0 auto;
}

/* SOLD OUT overrides - targets classes rendered by Astro island */
.hero-title {
  color: #ff0000 !important;
  font-family: Impact, "Arial Black", sans-serif !important;
  letter-spacing: 0 !important;
}
.hero-subtitle {
  color: #ff0000 !important;
  font-family: Impact, "Arial Black", sans-serif !important;
  font-size: clamp(80px, 15vw, 160px) !important;
  font-weight: 900 !important;
  opacity: 1 !important;
  margin-bottom: 0 !important;
}
