/* =============================================================================
   Bellomo Inmobiliaria — design system (Bootstrap 5.3 overrides)
   ============================================================================= */

:root {
  --brand-primary: #ffcc01;
  --brand-primary-dark: #e6b800;
  --brand-dark: #1b212f;
  --brand-dark-2: #2a3245;
  --text: #1b212f;
  --text-muted: #566070;      /* 6.6:1 on white */
  --surface: #ffffff;
  --surface-alt: #f5f6f8;
  --border: #e3e6ec;
  --radius: .75rem;
  --radius-sm: .5rem;
  --shadow-sm: 0 2px 8px rgba(27, 33, 47, .08);
  --shadow-md: 0 10px 28px rgba(27, 33, 47, .14);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --bs-body-font-family: var(--font);
  --bs-body-color: var(--text);
  --bs-link-color: var(--brand-dark);
  --bs-link-hover-color: #000;
  --bs-border-radius: var(--radius-sm);
}

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { font-family: var(--font); color: var(--text); background: var(--surface); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--brand-dark); }
a { text-underline-offset: .2em; }

/* Accessibility ------------------------------------------------------------- */
.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 2000;
  background: var(--brand-dark); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: .5rem; color: #fff; }
:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; }
.hero :focus-visible, .site-footer :focus-visible, .cta-band :focus-visible { outline-color: var(--brand-primary); }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; box-shadow: none; }

/* Buttons ------------------------------------------------------------------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; }
.btn-brand {
  --bs-btn-color: var(--brand-dark); --bs-btn-bg: var(--brand-primary); --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-color: var(--brand-dark); --bs-btn-hover-bg: var(--brand-primary-dark); --bs-btn-hover-border-color: var(--brand-primary-dark);
  --bs-btn-active-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-primary-dark); --bs-btn-active-border-color: var(--brand-primary-dark);
  --bs-btn-disabled-color: var(--brand-dark); --bs-btn-disabled-bg: var(--brand-primary); --bs-btn-disabled-border-color: var(--brand-primary);
}
.btn-dark-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand-dark); --bs-btn-border-color: var(--brand-dark);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-dark-2); --bs-btn-hover-border-color: var(--brand-dark-2);
}
.btn-outline-dark { --bs-btn-color: var(--brand-dark); --bs-btn-border-color: var(--brand-dark); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-color: #fff; }

/* Forms --------------------------------------------------------------------- */
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .25rem; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: #c5cad4; padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 .2rem rgba(255, 204, 1, .45); }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-state { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-weight: 500; }
.form-state--ok { background: #e7f6ec; color: #14532d; border: 1px solid #a7d8b8; }
.form-state--err { background: #fdecec; color: #7f1d1d; border: 1px solid #f0b4b4; }
.contact-form__title { margin-bottom: 1rem; }

/* Header / navbar ----------------------------------------------------------- */
.site-header { background: var(--surface); z-index: 1030; transition: box-shadow .2s ease; border-bottom: 1px solid var(--border); }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.navbar { padding-top: .5rem; padding-bottom: .5rem; }
.navbar .btn { white-space: nowrap; }
.navbar-brand img { height: 49px; width: auto; }
.navbar .nav-link { color: var(--brand-dark); font-weight: 500; padding: .6rem .9rem; border-radius: var(--radius-sm); }
.navbar .nav-link:hover { background: var(--surface-alt); }
.navbar .nav-link.active { font-weight: 600; box-shadow: inset 0 -3px 0 var(--brand-primary); border-radius: 0; }
.navbar-toggler { border-color: var(--brand-dark); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255, 204, 1, .6); }

/* Breadcrumb ---------------------------------------------------------------- */
.breadcrumb-wrap { background: var(--surface-alt); border-bottom: 1px solid var(--border); padding: .7rem 0; font-size: .875rem; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--text-muted); --bs-breadcrumb-item-active-color: var(--text-muted); }
.breadcrumb a { color: var(--brand-dark); }

/* Hero ---------------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--brand-dark); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(27, 33, 47, .82) 0%, rgba(27, 33, 47, .72) 55%, rgba(27, 33, 47, .85) 100%); }
.hero__inner { padding: 4.5rem 0 4rem; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3.1rem); max-width: 18ch; }
.hero__lead { font-size: 1.125rem; max-width: 46ch; color: #fff; opacity: .95; }
.hero__eyebrow { display: inline-block; background: var(--brand-primary); color: var(--brand-dark); font-weight: 600; font-size: .8125rem; padding: .25rem .75rem; border-radius: 2rem; margin-bottom: 1rem; }
.page-hero { background: var(--brand-dark); color: #fff; padding: 2.5rem 0; }
.page-hero h1 { color: #fff; margin: 0; }

/* Search -------------------------------------------------------------------- */
.search-form { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-md); }
.search-form--hero { margin-top: 2rem; }
.search-form--bar { border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.search-form .form-label { color: var(--text); }

/* Sections ------------------------------------------------------------------ */
.section { padding: 4rem 0; }
.section--alt { background: var(--surface-alt); }
.section__head { margin-bottom: 2rem; }
.section__head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .35rem; }
.section__head h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--brand-primary); border-radius: 2px; margin-top: .6rem; }
.section__head--center { text-align: center; }
.section__head--center h2::after { margin-left: auto; margin-right: auto; }
.section__head p { color: var(--text-muted); margin-bottom: 0; }
.lead-muted { color: var(--text-muted); }

/* Property card ------------------------------------------------------------- */
.property-card { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease; }
.property-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.property-card__media { position: relative; }
.property-card__photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-alt); }
.property-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.property-card:hover .property-card__img { transform: scale(1.08); }
.property-card__placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 3rem; color: #9aa3b2; }
.property-card__badge { position: absolute; top: .75rem; left: .75rem; z-index: 2; background: var(--brand-dark); color: #fff; font-size: .75rem; font-weight: 600; padding: .3rem .7rem; border-radius: 2rem; }
.property-card__badge.is-rent { background: var(--brand-primary); color: var(--brand-dark); }
.property-card__badge--end { left: auto; right: .75rem; background: #fff; color: var(--brand-dark); }
.property-card__body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.1rem 1.1rem; }
.property-card__type { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 0 0 .25rem; }
.property-card__title { font-size: 1.0625rem; margin: 0 0 .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.property-card__title a { color: var(--brand-dark); text-decoration: none; }
.property-card__title a:hover { text-decoration: underline; }
.property-card__place { font-size: .875rem; color: var(--text-muted); margin: 0 0 .75rem; }
.property-card__features { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0 0 .9rem; padding: 0; font-size: .8125rem; color: var(--text-muted); }
.property-card__price { margin: auto 0 0; padding-top: .75rem; border-top: 1px solid var(--border); font-size: 1.25rem; font-weight: 700; color: var(--brand-dark); }

/* Quick links --------------------------------------------------------------- */
.quick-link { position: relative; display: flex; align-items: center; gap: 1rem; height: 100%; padding: 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--brand-dark); transition: box-shadow .2s ease, transform .2s ease; }
.quick-link:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--brand-dark); }
.quick-link__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3.25rem; height: 3.25rem; border-radius: var(--radius-sm); background: var(--brand-primary); color: var(--brand-dark); font-size: 1.5rem; }
.quick-link h3 { font-size: 1.125rem; margin: 0 0 .15rem; }
.quick-link p { margin: 0; font-size: .875rem; color: var(--text-muted); }

/* About / CTA --------------------------------------------------------------- */
.about-figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.about-figure img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.stat { font-size: 2.25rem; font-weight: 700; line-height: 1; color: var(--brand-dark); }
.cta-band { background: var(--brand-dark); color: #fff; padding: 3.5rem 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dfe3ea; }

/* Footer -------------------------------------------------------------------- */
.site-footer { background: var(--brand-dark); color: #d4d9e2; }
.footer-logo { background: #fff; padding: .35rem .6rem; border-radius: var(--radius-sm); height: 49px; width: auto; }
.footer-title { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.footer-title::after { content: ""; display: block; width: 32px; height: 3px; background: var(--brand-primary); margin-top: .5rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links i { color: var(--brand-primary); margin-right: .35rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--brand-primary); text-decoration: underline; }
.footer-bottom { padding-bottom: 3.5rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .8125rem; }

/* WhatsApp FAB -------------------------------------------------------------- */
.wa-fab { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 1040; width: 3.5rem; height: 3.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #0b7a6e; color: #fff; font-size: 1.8rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); text-decoration: none; transition: transform .15s ease; }
.wa-fab:hover { color: #fff; transform: scale(1.08); }
.site-footer .wa-fab:hover { text-decoration: none; }

/* Reveal animation: hidden state only when JS opted in (never without JS) ---- */
html.js-anim [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js-anim [data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 575.98px) {
  .section { padding: 2.75rem 0; }
  .hero__inner { padding: 3rem 0 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html.js-anim [data-reveal] { opacity: 1; transform: none; }
  .property-card:hover, .quick-link:hover { transform: none; }
  .property-card:hover .property-card__img { transform: none; }
}

/* === secondary pages === */
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.1rem; }
.contact-list > li > i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm); background: var(--brand-primary); color: var(--brand-dark); font-size: 1.15rem; }
.contact-list a { color: var(--brand-dark); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.5rem; }
.map-embed { position: relative; width: 100%; aspect-ratio: 16 / 7; min-height: 280px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--surface-alt); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* === end secondary pages === */

/* === listing & detail === */

/* Listing */
.listing-count { color: #dfe3ea; margin-top: .35rem; }
.listing-section .search-form--bar { margin-bottom: 1.25rem; }
.listing-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.5rem; }
.listing-chips__label { font-size: .875rem; color: var(--text-muted); }
.listing-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 2rem; background: var(--brand-primary); color: var(--brand-dark); font-size: .8125rem; font-weight: 600; text-decoration: none; }
.listing-chip:hover { background: var(--brand-primary-dark); color: var(--brand-dark); }
.listing-chip--clear { background: transparent; border: 1px solid var(--border); font-weight: 500; }
.listing-chip--clear:hover { background: var(--surface-alt); }
.listing-range { color: var(--text-muted); font-size: .875rem; margin-bottom: 1rem; }
.listing-empty { text-align: center; max-width: 42rem; margin: 2rem auto; padding: 2.5rem 1.25rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.listing-empty > i { font-size: 2.5rem; color: var(--text-muted); }
.listing-empty h2, .listing-empty h1 { margin: .75rem 0 .5rem; }
.listing-empty p { color: var(--text-muted); }
.listing-pagination { margin-top: 2.5rem; }
.listing-pagination .page-link { color: var(--brand-dark); min-width: 2.5rem; text-align: center; }
.listing-pagination .page-item.active .page-link { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.listing-pagination .page-link:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 2px; box-shadow: none; }

/* Detail header */
.detail { padding-top: 2rem; }
.detail-head { margin-bottom: 1.5rem; }
.detail-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.25rem); margin: .5rem 0 .4rem; }
.detail-head__badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.detail-badge { display: inline-block; background: var(--brand-dark); color: #fff; font-size: .75rem; font-weight: 600; padding: .3rem .8rem; border-radius: 2rem; }
.detail-badge.is-rent { background: var(--brand-primary); color: var(--brand-dark); }
.detail-badge--soft { background: var(--surface-alt); color: var(--brand-dark); border: 1px solid var(--border); }
.detail-head__place { color: var(--text-muted); margin: 0 0 .5rem; }
.detail-head__price { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin: 0; color: var(--brand-dark); }

/* Gallery */
.detail-gallery { margin-bottom: 2rem; }
.detail-gallery__main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--brand-dark); }
.detail-gallery__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 3 / 2; }
.detail-gallery__zoom img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-gallery__counter { position: absolute; right: .75rem; bottom: .75rem; z-index: 3; background: rgba(27, 33, 47, .8); color: #fff; font-size: .8125rem; font-weight: 600; padding: .25rem .7rem; border-radius: 2rem; pointer-events: none; }
.detail-gallery__hint { position: absolute; left: .75rem; bottom: .75rem; z-index: 3; background: rgba(27, 33, 47, .8); color: #fff; font-size: .8125rem; padding: .25rem .7rem; border-radius: 2rem; pointer-events: none; }
.detail-gallery .carousel-control-prev, .detail-gallery .carousel-control-next { width: 3.5rem; z-index: 3; }
.detail-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.detail-thumb { flex: 0 0 auto; width: 96px; height: 72px; padding: 0; border: 3px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-alt); opacity: .75; cursor: pointer; transition: opacity .15s ease, border-color .15s ease; }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-thumb:hover, .detail-thumb.is-active { opacity: 1; }
.detail-thumb.is-active { border-color: var(--brand-primary); }
.detail-nophoto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; aspect-ratio: 3 / 2; margin-bottom: 2rem; border-radius: var(--radius); background: var(--surface-alt); color: var(--text-muted); font-size: 1rem; }
.detail-nophoto i { font-size: 3rem; }

/* Lightbox */
.detail-lightbox .modal-content { background: rgba(10, 13, 20, .96); border: 0; border-radius: 0; justify-content: center; }
.detail-lightbox__close { position: absolute; top: 1rem; right: 1rem; z-index: 5; width: 1.5rem; height: 1.5rem; padding: .5rem; background-color: rgba(27, 33, 47, .8); border-radius: 50%; opacity: 1; }
.detail-lightbox__carousel { height: 100%; }
.detail-lightbox__carousel .carousel-inner, .detail-lightbox__carousel .carousel-item { height: 100%; }
.detail-lightbox__carousel .carousel-item img { width: 100%; height: 100vh; object-fit: contain; display: block; padding: 3rem 0; }
.detail-lightbox .carousel-control-prev, .detail-lightbox .carousel-control-next { width: 4rem; }

/* Detail blocks */
.detail-block { margin-bottom: 2.25rem; }
.detail-block__title { font-size: 1.375rem; margin-bottom: 1rem; }
.detail-block__title::after { content: ""; display: block; width: 44px; height: 4px; background: var(--brand-primary); border-radius: 2px; margin-top: .5rem; }
.detail-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; margin: 0; }
.detail-fact { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.detail-fact dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.detail-fact dt i { color: var(--brand-dark); margin-right: .25rem; }
.detail-fact dd { margin: .2rem 0 0; font-weight: 600; font-size: 1.0625rem; overflow-wrap: anywhere; }
.detail-description { line-height: 1.7; overflow-wrap: anywhere; }
.detail-description ul, .detail-description ol { padding-left: 1.25rem; }
.detail-embed { border-radius: var(--radius); overflow: hidden; background: var(--surface-alt); }
.detail-embed iframe { border: 0; }
.detail-address { margin-bottom: .75rem; }
.detail-maplink { display: inline-block; margin-top: .75rem; font-weight: 500; }
.detail-share { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Sidebar */
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; }
.detail-card__price { font-size: 1.75rem; font-weight: 700; margin: 0; }
.detail-card__ref { font-size: .8125rem; color: var(--text-muted); margin: 0 0 .75rem; }
.detail-card__agent { font-weight: 500; margin-bottom: 1rem; }
.detail-card__mail { display: block; text-align: center; overflow-wrap: anywhere; font-size: .9375rem; }
@media (min-width: 992px) {
  .detail-aside { position: sticky; top: 6rem; }
}

@media (max-width: 575.98px) {
  .detail { padding-top: 1.25rem; }
  .detail-thumb { width: 80px; height: 60px; }
  .detail-gallery__hint { display: none; }
  .listing-empty { padding: 2rem 1rem; }
}

/* Wide photo variant: keeps the natural aspect ratio (no crop). */
.about-figure--wide img { aspect-ratio: auto; height: auto; }
