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

body {
  font-family: Arial, Helvetica, sans-serif;
  /* Text color set to white site-wide */
  color: #fff;
  background-color: #0b0b0b;
  background-image: url("../images/background.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* For model pages, ensure background image is used and no solid black blocks it */
body.model-page {
  background-color: transparent; /* allow image visibility */
  background-image: url("../images/background.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Ensure model page content does not block the background image */
body.model-page, 
body.model-page .model-header,
body.model-page .model-gallery,
body.model-page .model-content,
body.model-page .model-preview,
body.model-page .model-info,
body.model-page .back-home {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Make sure HTML/body occupy full height so background fills */
html, body { height: 100%; }

/* Keep UI overlays (mobile menu, lightbox) as functional but non-blocking when closed */
.mobile-menu { background: rgba(0,0,0,0.95); }
.lightbox { background: rgba(0, 0, 0, 0.95); }


/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  height: 100vh;
}

/* VIDEO */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* CAPA SUPERIOR HERO */
.brand,
.hero-actions,
.scroll-indicator {
  position: relative;
  z-index: 5;
}

/* Brand */
.brand {
  position: absolute;
  top: 30px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.brand img {
  height: 102px; /* reducido a 0.8 (aprox) */
}

/* Botones */
.hero-actions {
  position: absolute;
  bottom: 80px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 7; /* aseguramos que estén por encima del video */
}

.hero-actions a {
  padding: 20px 50px; /* increased 1.4x from 14x36 */
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
  font-size: 1.4rem; /* ~1.4x default size */
  background: rgba(255,255,255,0.06); /* ligera capa translúcida */
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%); /* frosted glass */
  box-shadow: 0 8px 22px rgba(0,0,0,0.38);
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.hero-actions a:hover {
  background: rgba(255,255,255,0.92);
  color: #111; /* texto oscuro sobre fondo claro */
  transform: translateY(-4px);
}

/* Reduce intensity on small screens to avoid performance issues */
@media (max-width: 480px) {
  .hero-actions a {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255,255,255,0.10);
    padding: 14px 40px;
    font-size: 1rem;
  }
}

/* Availability buttons use same look as hero but are static */
.availability-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Description text beneath the lot image */
.availability-description {
  margin-top: 2rem;
  font-size: 1.8rem; /* even larger text */
  color: #333;
  max-width: 1200px; /* allow it to stretch wider */
  width: 100%;
  padding: 0 2rem; /* more horizontal space */
  box-sizing: border-box;
  text-align: center;
}

.availability-actions a {
  padding: 20px 50px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
  font-size: 1.4rem;
  background: #000; /* black background */
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 8px 22px rgba(0,0,0,0.38);
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.availability-actions a:hover {
  background: rgba(255,255,255,0.92);
  color: #111;
  transform: translateY(-4px);
}

/* TEXTO MINIMALISTA SOBRE EL HERO (centrado, en media altura) */
.hero-text {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  text-align: center;
  z-index: 8; /* por encima de los botones */
  color: rgba(255, 255, 255, 0.98);
  font-size: 3.2rem; /* tamaño duplicado */
  font-weight: 500;
  font-style: italic;
  padding: 0 20px;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-text p {
  display: inline-block;
  max-width: 1000px;
  line-height: 1.15;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .hero-text { font-size: 2.7rem; }
}

@media (max-width: 600px) {
  .hero-text { font-size: 1.95rem; }
  .hero-actions { bottom: 70px; }
}



/* SECCIONES */
section {
  padding: 100px 8%;
}

/* UBICACIÓN */
.location h2,
.contact h2 {
  margin-bottom: 40px;
  font-weight: 400;
}

/* TÍTULO UBICACIÓN: centrado y mayor jerarquía */
.location h2 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 500;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .location h2 { font-size: 2rem; }
}

@media (max-width: 600px) {
  .location h2 { font-size: 1.6rem; }
}

/* Layout para mapa y descripción */
.location-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.location-content .map {
  flex: 0 0 70%; /* mapa ampliado ~1.4x (antes 50%) */
}

.location-content .map img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.location-desc {
  flex: 1;
  max-width: 30%;
  color: #fff;
  font-size: calc(1rem + 2pt); /* aumentado 2pt */
  line-height: 1.6;
  font-weight: 300; /* texto más delgado */
}

.location-desc h3 {
  margin-top: 0;
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Responsive adjustments for the location title */
@media (max-width: 900px) {
  .location-desc h3 { font-size: 1.8rem; }
}
@media (max-width: 600px) {
  .location-desc h3 { font-size: 1.4rem; }
}

.location-desc p {
  margin-bottom: 12px;
  color: #fff;
}

@media (max-width: 900px) {
  .location-content {
    flex-direction: column;
  }
  .location-content .map,
  .location-desc { flex-basis: 100%; max-width: 100%; }
  .location-desc h3 { font-size: 1.4rem; }
}

.map img {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto 40px;
  display: block;
}

@media (max-width: 900px) {
  .map img { width: 100%; }
}

.location-gallery {
  margin-bottom: 40px;
}

.location-gallery h4 {
  color: #eee;
  margin-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

.location-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.location-gallery img,
.location-gallery .gallery-thumb {
  width: 100%;
  display: block;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.location-gallery .gallery-thumb:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.6);
}

/* Lightbox counter for both lightboxes */
.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.95);
  font-size: 14px;
  background: rgba(0,0,0,0.45);
  padding: 6px 10px;
  border-radius: 6px;
}


/* CONTACTO */
.contact {
  background: #111;
  color: #fff;
}
.contact .contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.contact .contact-info {
  flex: 1;
}
.contact .contact-logo img {
  height: 128px; /* duplicado */
  width: auto;
  object-fit: contain;
}
@media (max-width: 900px) {
  .contact .contact-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact .contact-logo {
    align-self: flex-end;
    margin-top: 12px;
  }
  .contact .contact-logo img { height: 96px; /* duplicado para móvil */ }
}
.contact p {
  margin-bottom: 10px;
} 

/* MODELOS */
.model-header {
  padding: 60px 8%;
}

.model-header h1 {
  font-weight: 600;
  margin-top: 80px;
  font-size: 3rem; /* aumentado */
  text-align: center; /* centrado */
  margin-bottom: 8px;
  color: #000; /* título en negro */
}

@media (max-width: 900px) {
  .model-header h1 { font-size: 2rem; }
}
@media (max-width: 600px) {
  .model-header h1 { font-size: 1.6rem; }
}

.back-link {
  text-decoration: none;
  color: #eee;
  opacity: 0.8;
}

.back-link:hover {
  opacity: 1;
}

.model-gallery {
  padding: 0 8%;
}

/* Back to home button — centered and styled like home hero buttons */
.back-home {
  text-align: center;
  margin: 40px 0 80px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.back-home a {
  display: inline-block;
  padding: 18px 56px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #000; /* texto en negro */
  text-decoration: none;
  letter-spacing: 1px;
  font-size: 1.2rem;
  background: rgba(255,255,255,0.06);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 8px 22px rgba(0,0,0,0.38);
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.back-home a:hover {
  background: rgba(255,255,255,0.92);
  color: #111;
  transform: translateY(-4px);
}

@media (max-width: 480px) {
  .back-home a {
    padding: 12px 34px;
    font-size: 1rem;
    border-radius: 10px;
  }
}

.model-gallery .full {
  width: 100%;
  margin-bottom: 80px;
}

/* New layout: gallery + side description */
.model-gallery .model-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between; /* asegurar que ocupen mitades */
  margin-bottom: 40px;
  flex-wrap: nowrap;
} 


/* Preview slideshow above the gallery — auto-advance on page before opening lightbox */
.model-preview {
  flex: 0 0 50%;
  max-width: 50%;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
}

.model-preview .preview-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

@media (max-width: 900px) {
  .model-preview { flex: 0 0 100%; max-width: 100%; margin: 0 0 20px; }
} 
/* Descriptive text on model pages should be black for better contrast */
body.model-page .model-gallery .model-info {
  flex: 0 0 50%;
  max-width: 50%;
  color: #000;
  font-size: calc(1rem + 2pt); /* aumentado 2 puntos */
  line-height: 1.6;
  padding-top: 6px;
}

@media (max-width: 900px) {
  .model-gallery .model-content { flex-direction: column; }
  body.model-page .model-gallery .model-info { flex: 0 0 100%; max-width: 100%; }
}

.model-gallery .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 80px;
}

.model-gallery .grid img {
  width: 100%;
}

/* HAMBURGUESA */
.hamburger {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

/* MENÚ */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 1001;
}

.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ACTIVO */
.mobile-menu.active {
  transform: translateX(0);
}

/* ANIMACIÓN HAMBURGUESA → X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(9px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-9px);
}

/* En páginas de modelo: hamburguesa negra por defecto, blanca cuando está activa (X) */
body.model-page .hamburger {
  /* no change to position/size here */
}

body.model-page .hamburger span {
  background: #111;
}

body.model-page .hamburger.active span {
  background: #fff;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2000;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  opacity: 0.9;
  background: transparent; /* quitar fondo por defecto */
  border: none;
  padding: 6px 10px;
  line-height: 1;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.lightbox-close:hover {
  opacity: 1;
  background: transparent;
}

/* Estilo visible y accesible para teclado */
.lightbox-close:focus {
  outline: 2px solid rgba(255,255,255,0.32);
  outline-offset: 3px;
  background: transparent;
}

/* Botones prev/next */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 48px;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2010;
}

.lightbox-nav.prev { left: 30px; }
.lightbox-nav.next { right: 30px; }

.lightbox-nav:hover { background: rgba(0,0,0,0.8); }

/* Counter */
.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.95);
  font-size: 16px;
  background: rgba(0,0,0,0.45);
  padding: 6px 12px;
  border-radius: 12px;
  z-index: 2010;
}

@media (max-width: 600px) {
  .lightbox-nav { width: 48px; height: 48px; font-size: 32px; }
  .lightbox-close { font-size: 30px; right: 20px; top: 20px; }
}


/* Hamburguesa oscura en páginas de modelo */
body.model-page .hamburger span {
  background: #111;
}

.site-footer {
  text-align: center;
  padding: 12px 20px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  background: #000; /* fondo negro para distinguir y mejorar legibilidad */
}

/* Styles for the generic lightbox implemented in js/model.js */
.sa-lightbox-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  padding: 28px;
  box-sizing: border-box;
}

.sa-lightbox-overlay.show {
  display: flex;
}

.sa-lightbox-overlay .sa-lb-content {
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

.sa-lb-image {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
}

.sa-lb-caption {
  color: #fff;
  margin-top: 12px;
  font-size: 1rem;
  opacity: 0.95;
}

.sa-lb-close {
  position: absolute;
  right: 18px;
  top: 14px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.sa-lb-prev,
.sa-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: none;
  color: #fff;
  font-size: 44px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 50%;
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
  transition: background 0.18s ease, transform 0.12s ease;
}

.sa-lb-prev { left: 12px; }
.sa-lb-next { right: 12px; }

.sa-lb-prev:hover, .sa-lb-next:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-50%) scale(1.03);
}

@media (max-width: 600px) {
  .sa-lb-prev, .sa-lb-next { font-size: 30px; padding: 8px; }
  .sa-lb-image { max-height: 70vh; }
  .sa-lb-close { font-size: 28px; }
}

/* Large mode for preview images (e.g. PLANTA 2H.jpg) */
.sa-lightbox-overlay.sa-lb--large .sa-lb-content {
  max-width: 1600px;
}
.sa-lightbox-overlay.sa-lb--large .sa-lb-image {
  max-width: 1600px;
  width: 100%;
  height: auto;
}


