/* A11Y Contrast Fix - Override text-light for better contrast */
:root {
  --text-light: #334155 !important; /* Darker gray for better contrast ratio */
}

/* === PROPIEDADES STYLE CARDS === */
.properties-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1280px) {
  .properties-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.property-card {
  border-radius: 12px;
  border: 1px solid #e1e1e1;
  overflow: hidden;
  transition: transform 0.3s ease;
  background: white;
}
.property-card:hover {
  transform: translateY(-4px);
}
.property-card.featured {
  border-color: #DA552F;
}

.property-card figure {
  margin: 0;
  aspect-ratio: 3/2;
  overflow: hidden;
  position: relative;
}
.property-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.property-card .content {
  padding: 16px;
}
.property-card .price {
  display: block;
  margin-top: 8px;
  font-weight: bold;
  color: #3d3d3d;
}

/* Badge "Destacada" */
.featured-badge::after {
  content: "Destacada";
  position: absolute;
  top: 12px;
  right: 12px;
  background: #DA552F;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* FIX: Aplicar estilo propiedades.com con máxima especificidad */
.services-grid .service-card img,
.container .services-grid .service-card img,
section .container .services-grid .service-card img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3/2 !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  display: block !important;
}

.services-grid .service-card figure img,
.container .services-grid .service-card figure img,
section .container .services-grid .service-card figure img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3/2 !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  display: block !important;
}

/* Forzar figure también */
.services-grid .service-card figure,
.container .services-grid .service-card figure {
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: 3/2 !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}

/* Grid responsive optimizado para services-grid */
.services-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

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

/* PROYECTOS CULIACÁN: Aplicar estilo propiedades.com a las cards SIN imágenes */
.service-card {
  border-radius: 12px !important;
  border: 1px solid #e1e1e1 !important;
  overflow: hidden !important;
  transition: transform 0.3s ease !important;
  background: white !important;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
  min-height: 300px !important;
  display: flex !important;
  flex-direction: column !important;
}

.service-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.service-card h3 {
  margin: 0 0 12px 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
}

.service-card h3 a {
  color: inherit !important;
  text-decoration: none !important;
}

.service-card p {
  margin: 0 0 auto 0 !important;
  color: #666 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  flex-grow: 1 !important;
}

/* Service card link styling */
.service-card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: block !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  height: 100% !important;
}

.service-card-link:hover {
  text-decoration: none !important;
  color: inherit !important;
}

.service-card-link .service-card {
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  height: 100% !important;
}

.service-card-link:hover .service-card {
  transform: translateY(-8px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15) !important;
  border-color: #E36414 !important;
}

.service-card-link:hover .service-card h3 {
  color: #E36414 !important;
}

/* Ensure all clickable areas have pointer cursor */
.service-card-link *,
.service-card-link h3,
.service-card-link p,
.service-card-link figure,
.service-card-link img {
  cursor: pointer !important;
  pointer-events: none !important; /* Let parent handle all clicks */
}

.service-card-link {
  pointer-events: auto !important;
}

.hero{
  position: relative;
  display: grid;
  place-items: center;              /* centra el bloque de texto */
  min-height: clamp(420px, 72vh, 820px); /* más alto en desktop, móvil queda igual */
  background-color: var(--bg-soft); /* fondo neutro */
  overflow: hidden;
}
/* Overlay removido - no necesario sin imagen de fondo */
.hero > *{
  position: relative;
  z-index: 1;                       /* el texto por encima del overlay */
}
/* Contenedor de texto dentro del hero; si existe .hero-content, usarlo;
   si no, aplicar a .hero .container para bootstrap-like */
.hero-content, .hero .container{
  max-width: 1100px;
  margin-inline: auto;
  padding: clamp(16px, 3vw, 48px);
  text-align: center;               /* o left si tu diseño lo pide */
}
.hero h1{
  margin: 0 0 .5em;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.15;
  word-break: normal;
}
.hero .lead, .hero p{
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.4;
}

/* Ajustes sólo para desktop grande si se necesita un poco más de altura */
@media (min-width: 1200px){
  .hero{ min-height: 78vh; }
}

/* START override-hero-overlay-blue (desktop preview) */
@media (min-width: 641px) {
  body .hero::after,
  html body .hero::after {
    display: none !important; /* oculta completamente */
    background: none !important; /* quita color/gradiente */
    background-image: none !important; /* elimina cualquier imagen */
    background-color: transparent !important; /* color transparente */
    opacity: 0 !important; /* invisible */
    /* No tocar position/z-index/content */
  }
}
/* END override-hero-overlay-blue */

/* START unify-hero-image - usar imagen móvil en todos los tamaños */
.hero {
  background-image: url('../img/optimized/hero-480.jpg') !important;
}
/* END unify-hero-image */

/* Hero responsive 21:9 con overlay solo en móvil */
.hero-figure {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: -1;
}

.hero-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* Overlay solo en móvil */
@media (max-width: 640px) {
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.6) 0%, rgba(30,41,59,0.5) 100%);
    z-index: 0;
  }
}

/* Overlay sutil desktop */
@media (min-width: 1024px) {
  .hero-figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.18) 100%);
  }
}

/* Centrado tipográfico en desktop */
@media (min-width: 1024px) {
  .hero .container { max-width: 72ch; margin: 0 auto; text-align: center; }
  .hero h1 { line-height: 1.1; margin-bottom: 16px; }
  .hero p  { margin-left: auto; margin-right: auto; }
}

/* Hero: blanco con halo naranja (desktop) */
@media (min-width: 1024px){
  .hero h1, .hero p{
    color:#fff;
    text-shadow:
      0 1px 2px rgba(218,85,47,.35),   /* naranja base (#DA552F) */
      0 8px 24px rgba(218,85,47,.55),  /* glow */
      0 0 2px rgba(218,85,47,.90);     /* brillo fino */
  }
}

/* Hero container por encima */
.hero .container {
  position: relative;
  z-index: 1;
}

/* Footer background change: blue to black */
footer {
  background: #000000 !important;
}
