/* ==========================================================
   AREA — POLISH FINAL (se carga al final de todas las hojas)
   Un solo eje horizontal para header, hero, secciones y footer.
   Corrige: padding doble en footer / listings / legales,
   selector de idioma sin centrar, bordes de continentes,
   titulares de páginas simples descentrados y alt visible
   en imágenes externas que aún no cargan.
   ========================================================== */

:root{
  --area-container:1380px;
  --area-gutter:clamp(22px,4vw,68px);
  /* margen lateral real = el mismo que usa el contenedor central */
  --area-edge:max(var(--area-gutter), calc((100% - var(--area-container)) / 2));
}
@media(max-width:900px){ :root{ --area-gutter:20px; } }

/* ---------- 1. Header y hero sobre el mismo eje que el contenido ---------- */
html body.pdf-site .site-header{
  padding-left:var(--area-edge);
  padding-right:var(--area-edge);
  box-sizing:border-box;
}
html body.pdf-site .hero-content{
  box-sizing:border-box;
  width:100%;
  max-width:none;
  padding-left:var(--area-edge);
  padding-right:var(--area-edge);
}
html body.pdf-site .hero-content > h1{ max-width:980px; }
html body.pdf-site .hero-content > p{ max-width:760px; }

/* ---------- 2. Eliminar el segundo margen (72 px) heredado ---------- */
html body.pdf-site footer.footer,
html body.pdf-site .listing-filter-shell,
html body.pdf-site .listing-results,
html body.pdf-site main.legal-page{
  padding-left:0;
  padding-right:0;
}
html body.pdf-site main.legal-page > *{
  max-width:min(var(--area-container), calc(100% - (2 * var(--area-gutter))));
  margin-left:auto;
  margin-right:auto;
}

/* Bandas oscuras (¿Buscas algo específico? / ¿También buscas comprar?) */
html body.pdf-site .listing-inquiry-band,
html body.pdf-site .sell-buy-banner{
  padding-left:var(--area-edge);
  padding-right:var(--area-edge);
  box-sizing:border-box;
}
html body.pdf-site .sell-buy-banner{ align-items:center; }

/* Páginas simples (Vende tu propiedad / Vacantes): mismo eje y sin línea suelta */
html body.pdf-site .pdf-simple{ border-top:0; }
html body.pdf-site .pdf-simple::before,
html body.pdf-site .pdf-simple::after{ content:none; display:none; }
html body.pdf-site .pdf-simple > h1,
html body.pdf-site .pdf-simple > p,
html body.pdf-site .pdf-simple > img{
  width:min(var(--area-container), calc(100% - (2 * var(--area-gutter)))) !important;
  max-width:var(--area-container) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* ---------- 3. Selector de idioma: texto centrado, caja alineada ---------- */
html body.pdf-site .lang-select{
  -webkit-appearance:none; appearance:none;
  display:inline-block;
  box-sizing:border-box;
  height:44px;
  min-width:64px;
  padding:0 14px !important;
  line-height:42px;
  text-align:center;
  text-align-last:center;
  text-indent:0;
  vertical-align:middle;
}
html body.pdf-site .header-tools{ display:flex; align-items:center; }
@media(max-width:900px){
  html body.pdf-site .lang-select{ height:40px; min-width:56px; line-height:38px; }
}

/* Chevron de submenú perfectamente centrado respecto al texto */
html body.pdf-site .nav-group{ display:flex; align-items:center; gap:0; }
html body.pdf-site .submenu-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:44px; padding:0; margin:0; justify-content:flex-end;
}
html body.pdf-site .submenu-toggle svg{
  width:14px; height:14px; display:block; flex:0 0 auto;
  fill:none; stroke:currentColor; stroke-width:1.6;
}

/* ---------- 4. Footer: todos los enlaces con la misma tipografía ---------- */
html body.pdf-site .footer-contact .cookie-settings-link{
  font-family:inherit; font-size:20px; line-height:inherit;
  letter-spacing:inherit; text-transform:none; color:inherit;
  display:inline-block; text-align:left;
}
html body.pdf-site .footer-bottom{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
@media(max-width:900px){
  html body.pdf-site .footer-bottom{
    flex-direction:column; align-items:flex-start; gap:8px;
  }
}

/* ---------- 5. Experiencia internacional: divisores limpios (2×2 / 1) ---------- */
html body.pdf-site .continent-cards{ border-top:1px solid rgba(39,39,39,.28); border-bottom:1px solid rgba(39,39,39,.28); }
html body.pdf-site .continent-card{ border:0; border-bottom:1px solid rgba(39,39,39,.18); }
html body.pdf-site .continent-card:nth-child(odd){ border-right:1px solid rgba(39,39,39,.18); }
html body.pdf-site .continent-card:nth-last-child(-n+2){ border-bottom:0; }
@media(max-width:560px){
  html body.pdf-site .continent-card{ border-right:0 !important; border-bottom:1px solid rgba(39,39,39,.18) !important; }
  html body.pdf-site .continent-card:last-child{ border-bottom:0 !important; }
}

/* ---------- 6. Imágenes: sin texto alt asomando mientras cargan / si fallan ---------- */
html body.pdf-site .listing-card img,
html body.pdf-site .carousel img,
html body.pdf-site .property-gallery img{
  color:transparent;
  font-size:0;
  background:#ddd9d0;
}

/* ---------- 7. Seguridad de maquetación ---------- */
img, video{ max-width:100%; }

/* ---------- 8. Sección de página simple: ancho completo (el contenido ya se centra) ---------- */
html body.pdf-site section.pdf-simple{
  max-width:none !important;
  width:100% !important;
  margin-left:0 !important;
  margin-right:0 !important;
  box-shadow:none;
}

/* ---------- 9. Filtros de listings: ocupan todo el eje (sin padding propio) ---------- */
html body.pdf-site .listing-filter-bar,
html body.pdf-site .listing-results-head{
  padding-left:0 !important;
  padding-right:0 !important;
}
html body.pdf-site .listing-filter-bar{
  grid-template-columns:minmax(240px,1.6fr) repeat(4,minmax(140px,.8fr)) auto;
}
@media(max-width:1100px){
  html body.pdf-site .listing-filter-bar{ grid-template-columns:1.4fr repeat(2,1fr); }
}
@media(max-width:700px){
  html body.pdf-site .listing-filter-bar{ grid-template-columns:1fr 1fr; }
}
@media(max-width:560px){
  html body.pdf-site .listing-filter-bar{ grid-template-columns:1fr; }
}

/* ---------- 10. Páginas legales: respiro bajo el header ---------- */
html body.pdf-site main.legal-page{ padding-top:calc(82px + clamp(40px,5vw,80px)); padding-bottom:clamp(56px,7vw,110px); }
@media(max-width:900px){
  html body.pdf-site main.legal-page{ padding-top:calc(72px + 40px); }
}

/* ---------- 11. Icono de menú móvil alineado al margen derecho ---------- */
@media(max-width:900px){
  html body.pdf-site .menu{ margin-right:-11px; }
}

/* ========== v2 (20-nov) ========== */
/* A. Títulos de hero: máximo 2 líneas en cualquier ancho / idioma */
html body.pdf-site .hero-content > h1,
html body.pdf-site .hero h1,
html body.pdf-site .restored-hero h1,
html body.pdf-site .landing-hero h1,
html body.pdf-site .listing-masthead h1{
  font-size:clamp(32px,4.4vw,66px);
  line-height:1;
  width:100%;
  max-width:min(100%,1100px);
  text-wrap:balance;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  padding-bottom:.08em;
}
@media(min-width:1100px){ html body.pdf-site .hero-content, html body.pdf-site .restored-hero .hero-content{ max-width:none !important; } }
@media(max-width:560px){ html body.pdf-site .hero-content > h1, html body.pdf-site .hero h1, html body.pdf-site .listing-masthead h1{ font-size:clamp(30px,9vw,42px); max-width:100%; } }

/* B. Contacto y formularios alineados a la izquierda con el resto */
html body.pdf-site .lead-inner{
  width:min(var(--area-container), calc(100% - (2 * var(--area-gutter)))) !important;
  max-width:var(--area-container) !important;
  margin-left:auto !important; margin-right:auto !important;
}
html body.pdf-site .lead-copy{ text-align:left !important; margin:0 0 28px !important; }
html body.pdf-site .lead-copy h1,
html body.pdf-site .lead-copy h2{ text-align:left !important; margin-left:0 !important; margin-right:0 !important; max-width:none !important; }
html body.pdf-site .lead-form,
html body.pdf-site .lead-form.ghl-form-embed{
  max-width:820px !important; width:100% !important; margin:0 !important;
}
html body.pdf-site .property-inquiry{ text-align:left; }

/* C. Fotos completas (sin recortes) pero con tamaño controlado */
html body.pdf-site section.pdf-simple > img{
  object-fit:contain !important;
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:min(76vh,720px) !important;
  margin-left:var(--area-edge) !important;
  margin-right:0 !important;
  display:block;
}
@media(max-width:900px){ html body.pdf-site section.pdf-simple > img{ margin-left:var(--area-gutter) !important; max-width:calc(100% - (2 * var(--area-gutter))) !important; } }
html body.pdf-site .timeline img{ aspect-ratio:auto !important; height:auto !important; object-fit:contain !important; }
html body.pdf-site .listing-card-media{ background:#e6e2d9; }
html body.pdf-site .listing-card-media img{ object-fit:contain !important; }
html body.pdf-site .listing-card:hover .listing-card-media img{ transform:none; }
