:root {
  --red: #e10600;
  --red-dark: #c10500;
  --text: #1d1d1f;
  --sub: #86868b;
  --bg: #f5f5f7;
  --white: #ffffff;
  --gray-light: #f5f5f7;
  --gray-medium: #d2d2d7;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

/* Header y Navegación */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.856);
  backdrop-filter: saturate(10) blur(15px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 0.5rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.logo span {
  color: var(--text);
  margin-left: 0.2rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

nav a {
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

nav a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.3s ease;
}

nav a:hover:after {
  width: 100%;
}

nav a:hover {
  color: var(--red);
}

.cta-button {
  background: var(--red);
  color: white;
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 24px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.cta-button:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 5% 80%, rgba(255, 8, 0, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(225, 191, 0, 0.100) 0%, transparent 50%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.hero p {
  color: var(--sub);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Propiedades Section */
.section-title {
  text-align: center;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

section#propiedades {
  scroll-margin-top: 3rem;
}

section#servicios {
  scroll-margin-top: 3rem;
}

section#contacto {
  scroll-margin-top: 3rem;
}

.section-subtitle {
  text-align: center;
  color: var(--sub);
  font-size: 1.2rem;
  margin-bottom: 4rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.property-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.property-image {
  height: 560px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.property-info {
  padding: 1.8rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.property-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.property-price {
  color: var(--red);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.property-location {
  color: var(--sub);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.property-features {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}

.feature i {
  color: var(--red);
}

.property-actions {
  margin-top: auto;
  display: flex;
  gap: 1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--gray-medium);
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
  text-align: center;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--gray-light);
  border-color: var(--text);
}

/* Servicios Section */
.services {
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--gray-light);
  padding: 3rem 2.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.service-icon {
  font-size: 3rem;
  color: var(--red);
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.service-description {
  color: var(--sub);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Contacto Section */
.contact {
  text-align: center;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 4rem;
}

.contact-item {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.contact-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
}

.contact-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.contact-link:hover .contact-icon {
  transform: scale(1.1);
}

/* Email hover effects (Yellow) */
.contact-link[href^="mailto:"]:hover {
  background: linear-gradient(135deg, #fff3cd 0%, #fef9c7 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.3), 0 0 20px rgba(245, 158, 11, 0.2);
}

.contact-link[href^="mailto:"]:hover .contact-icon {
  color: #f59e0b;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

/* Phone hover effects (Blue) */
.contact-link[href^="tel:"]:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 2px solid #3b82f6;
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
}

.contact-link[href^="tel:"]:hover .contact-icon {
  color: #3b82f6;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

/* WhatsApp hover effects (Green) */
.contact-link[href^="https://wa.me/"]:hover {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #10b981;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3), 0 0 20px rgba(16, 185, 129, 0.2);
}

.contact-link[href^="https://wa.me/"]:hover .contact-icon {
  color: #10b981;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

/* Maps hover effects (red) */
.contact-link[href^="https://maps.google.com/"]:hover {
  background: linear-gradient(135deg, #ffe8e8 0%, #ffd5d5 100%);
  border: 2px solid #ea3333;
  box-shadow: 0 12px 32px rgba(234, 51, 51, 0.3), 0 0 20px rgba(234, 51, 51, 0.2);
}

.contact-link[href^="https://maps.google.com/"]:hover .contact-icon {
  color: #ea3333;
  filter: drop-shadow(0 0 8px rgba(234, 51, 51, 0.6));
}

.contact-icon {
  font-size: 2.5rem;
  color: var(--red);
  margin-bottom: 1rem;
}

.contact-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.contact-detail {
  color: var(--sub);
  font-size: 1rem;
}

.map-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
footer {
  background: var(--text);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 1rem;
}

.footer-description {
  color: var(--gray-medium);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--gray-medium);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--red);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-medium);
  font-size: 0.9rem;
}

/* ===== MODALES – SIN UNIDADES VH ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.3s ease-out;
}

.modal.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 1400px;
  /* Altura máxima relativa al contenedor padre (modal con height: 100%) */
  max-height: 98%;
  margin: 0.5rem auto;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from { 
    transform: translateY(50px); 
    opacity: 0; 
  }
  to { 
    transform: translateY(0); 
    opacity: 1; 
  }
}

.modal-header {
  padding: 1.8rem 2rem;
  background: var(--red);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-body {
  padding: 3.5rem 3rem;
  overflow-y: auto;
  flex-grow: 1;
  /* Altura automática, el scroll lo controla el padre */
  min-height: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--gray-medium);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

.submit-btn:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

/* ===== MODAL DE PROPIEDAD (CARRUSEL) – SIN VH ===== */
#propertyModal .modal-content {
  max-width: 1800px;
  width: 99%;
  max-height: 98%;
  height: auto;
  margin: 0.25rem auto;
  display: flex;
  flex-direction: column;
}

#propertyModal .modal-header {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  padding: 1.5rem 2rem;
}

#propertyModal .modal-body {
  padding: 3rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  height: 100%;
  max-height: 900px;
}

/* Layout side-by-side: features a la izquierda, carrusel a la derecha */
#propertyModal .property-details {
  flex: 0 0 35%; /* Ancho fijo para features */
  padding-top: 0;
}

.property-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: 700px;
  height: webkit-fill-available;
}

#propertyModal .carousel-container {
  flex: 1; /* Carrusel ocupa el resto del espacio */
  width: 65%;
  margin-bottom: 0;
}

/* Carrusel principal con aspect ratio */
.carousel-main {
  position: relative;
  width: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--gray-light);
  aspect-ratio: 16 / 9; /* Mantiene proporción sin altura fija */
  max-height: 70vh; /* Opcional: límite en pantallas muy grandes */
}

.carousel-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#carouselImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(187, 187, 187, 0.233);
  backdrop-filter: blur(20px);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
  font-size: 1.2rem;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.322);
  backdrop-filter: blur(20px);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

.fullscreen-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.281);
  backdrop-filter: blur(20px);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
  font-size: 1rem;
}

.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.322);
  backdrop-filter: blur(20px);
  transform: scale(1.1);
}

.carousel-thumbnails {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-medium) var(--gray-light);
}

.carousel-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.carousel-thumbnails::-webkit-scrollbar-track {
  background: var(--gray-light);
  border-radius: 3px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
  background: var(--gray-medium);
  border-radius: 3px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb:hover {
  background: var(--text);
}

.thumbnail {
  min-width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail.active {
  border-color: var(--red);
}

.thumbnail:hover {
  border-color: var(--red);
  transform: scale(1.05);
}

.property-features-modal {
  background: var(--gray-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  height: 100%;
}

.property-features-modal h4 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.property-features-modal h4 i {
  color: var(--red);
}

.features-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
}

.features-list li {
  background: var(--white);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--red);
  font-size: 0.95rem;
  color: var(--text);
  transition: var(--transition);
}

.features-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.basic-features {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.basic-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--gray-medium);
}

.basic-feature i {
  color: var(--red);
}

/* Fullscreen Modal (sin cambios, ya usa porcentajes) */
.fullscreen-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.801);
  backdrop-filter: blur(40px);
  z-index: 3000;
  cursor: pointer;
}

.fullscreen-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  cursor: default;
}

.fullscreen-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.5rem;
}

.fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.fullscreen-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.5rem;
}

.fullscreen-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.fullscreen-prev {
  left: 2rem;
}

.fullscreen-next {
  right: 2rem;
}

/* ===== RESPONSIVE – MEDIA QUERIES ===== */
@media (max-width: 992px) {
  .properties-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
  
  .section-title {
    font-size: 2.4rem;
  }
  
  .modal-body {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  nav ul {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
  }
  
  nav ul.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .hero {
    padding: 8rem 0 4rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .properties-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .contact-info {
    grid-template-columns: 1fr;
  }
  
  /* Modales en móviles */
  .modal {
    padding: 0.5rem;
  }
  
  .modal-content {
    margin: 1rem auto;
    max-width: 95%;
    max-height: 95%;
  }
  
  .modal-header {
    padding: 1.5rem 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem 1.5rem;
  }
  
  .form-control, .submit-btn {
    padding: 0.875rem;
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  .close-modal {
    width: 36px;
    height: 36px;
  }

  /* Ajustes carrusel */
  .carousel-main {
    aspect-ratio: 16 / 9;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-prev {
    left: 0.5rem;
  }
  
  .carousel-next {
    right: 0.5rem;
  }
  
  .fullscreen-btn {
    width: 35px;
    height: 35px;
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .thumbnail {
    min-width: 60px;
    height: 45px;
  }
  
  #propertyModal .modal-header {
    padding: 1.2rem 1.5rem;
  }
  
  #propertyModal .modal-body {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1.5rem;
  }
  
  section {
    padding: 3.5rem 0;
  }
  
  .property-actions {
    flex-direction: column;
  }
  
  .modal-content {
    margin: 0.5rem auto;
    border-radius: 12px 12px 0 0;
    max-width: 100%;
    max-height: 95%;
    height: auto;
  }
  
  .modal-header {
    padding: 1.2rem 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1.2rem;
  }
  
  .form-control {
    padding: 0.875rem;
  }
  
  textarea.form-control {
    min-height: 100px;
  }

  /* Carrusel en móvil pequeño */
  .carousel-main {
    aspect-ratio: 4 / 3; /* un poco más alto para móviles */
  }
  
  .fullscreen-nav {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .fullscreen-prev {
    left: 1rem;
  }
  
  .fullscreen-next {
    right: 1rem;
  }
  
  .fullscreen-close {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    top: 1rem;
    right: 1rem;
  }
  
  #propertyModal .modal-header {
    padding: 1rem 1.5rem;
  }
  
  #propertyModal .modal-body {
    padding: 1rem;
  }
}

/* Para dispositivos muy pequeños */
@media (max-width: 380px) {
  .modal-header h3 {
    font-size: 1.3rem;
  }
  
  .modal-body {
    padding: 1.2rem;
  }
  
  .form-control, .submit-btn {
    padding: 0.75rem;
  }
}

/* Soporte para navegadores antiguos */
@supports not (backdrop-filter: blur(20px)) {
  header {
    background: rgba(255, 255, 255, 0.98);
  }
}

/* Prevenir scroll horizontal en móviles */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== Premium interactions ===== */
.property-card {
  position: relative;
  cursor: pointer;
}

.property-image-wrapper {
  position: relative;
  overflow: hidden;
}

.property-image-wrapper img {
  transition: transform 0.6s ease;
}

.property-card:hover .property-image-wrapper img {
  transform: scale(1.05);
}

.property-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.1)
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: white;
}

.property-card:hover .property-overlay {
  opacity: 1;
}

.property-overlay span {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Property Contact Buttons */
.property-contact-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-medium);
  box-sizing: border-box;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.whatsapp-btn {
  background: #25D366;
  color: white;
}

.whatsapp-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: white;
}

.mail-btn {
  background: var(--red);
  color: white;
}

.mail-btn:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: white;
}

.contact-btn i {
  font-size: 1rem;
}

.contact-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive adjustments for contact buttons */
@media (max-width: 768px) {

  #propertyModal .modal-body {
    flex-direction: column;
    gap: 1.2rem;
  }

  #propertyModal .carousel-container,
  #propertyModal .property-details {
    width: 100%;
    flex: 0 0 auto;
  }

  .property-contact-buttons {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem 0;
  }

  .contact-btn {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }

}
