/*
Theme Name: Nexo Inmobiliaria
Description: Catálogo inmobiliario claro, adaptable y preparado para compartir fichas de propiedades.
Version: 1.0.0
Author: Nexo Inmobiliaria
Text Domain: nexo-inmobiliaria
Requires at least: 6.0
Requires PHP: 7.4
*/

:root {
  --ink: #202722;
  --paper: #f4f3ee;
  --white: #fffefa;
  --muted: #6e756e;
  --line: rgba(32, 39, 34, .16);
  --green: #456558;
  --green-deep: #243a32;
  --clay: #bb6246;
  --sans: "DM Sans", sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
  --mono: "DM Mono", monospace;
  --gutter: clamp(20px, 5vw, 76px);
  --section-space: 104px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { color: inherit; font: inherit; }
h1, h2, h3, p { margin-top: 0; }
.wrap { width: min(100%, 1600px); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; transform: translateY(-160%); background: var(--white); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { display: block; margin-bottom: 16px; color: var(--muted); font: 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.button { min-height: 48px; padding: 13px 19px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; background: var(--green); color: var(--white); font-size: 12px; font-weight: 600; transition: background .2s, transform .2s; }
.button:hover { transform: translateY(-1px); background: var(--green-deep); }
.button--light { background: var(--white); color: var(--ink); }
.button--light:hover { background: #e9e8df; }
.text-link { display: inline-flex; align-items: center; gap: 12px; padding-bottom: 5px; border-bottom: 1px solid currentColor; font-size: 12px; }
.text-link span { color: var(--clay); font-size: 16px; }

.site-header { position: relative; z-index: 20; background: var(--paper); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.site-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.brand-mark { width: 24px; height: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; align-items: end; }
.brand-mark i { height: 100%; background: var(--green); }
.brand-mark i:nth-child(2) { height: 70%; }
.brand-mark i:nth-child(3) { height: 43%; }
.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav ul { margin: 0; padding: 0; display: flex; align-items: center; gap: 30px; list-style: none; }
.site-nav li, .site-nav a { font-size: 12px; }
.site-nav a:hover { color: var(--green); }
.header-cta { padding: 10px 14px; background: var(--green); color: var(--white); }
.header-cta:hover { color: var(--white) !important; background: var(--green-deep); }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line); background: transparent; }
.menu-toggle span { display: block; height: 1px; margin: 5px 0; background: currentColor; }

.hero { position: relative; min-height: 620px; display: flex; align-items: end; overflow: hidden; background: #66736a; color: var(--white); }
.hero::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(18, 28, 23, .48), rgba(18, 28, 23, .04) 74%), linear-gradient(0deg, rgba(18, 28, 23, .58), transparent 75%); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; animation: hero-enter 900ms cubic-bezier(.2,.7,.25,1) both; }
.hero-content { position: relative; z-index: 1; width: min(100%, 1600px); margin: 0 auto; padding: 125px var(--gutter) 64px; }
.hero .eyebrow { color: rgba(255,255,255,.8); }
.hero h1 { max-width: 780px; margin: 0 0 18px; font: 400 76px/.98 var(--serif); }
.hero-copy { max-width: 610px; color: rgba(255,255,255,.9); font-size: 15px; }
@keyframes hero-enter { from { transform: scale(1.03); opacity: .75; } to { transform: scale(1); opacity: 1; } }

.search-panel { position: relative; z-index: 2; width: min(1300px, calc(100% - (2 * var(--gutter)))); margin: -1px auto 0; padding: 22px 24px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; align-items: end; gap: 16px; background: var(--white); box-shadow: 0 14px 35px rgba(32,39,34,.08); }
.search-panel label { display: block; margin-bottom: 7px; color: var(--muted); font: 9px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.search-panel input, .search-panel select { width: 100%; min-height: 43px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 0; background: var(--white); font-size: 12px; }
.search-panel .button { min-height: 43px; white-space: nowrap; }

.section { padding-block: var(--section-space); }
.section-heading { margin-bottom: 30px; display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.section-heading h2 { margin: 0; font: 400 50px/1 var(--serif); }
.section-heading p { max-width: 300px; margin: 0; color: var(--muted); font-size: 12px; }
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; }
.property-card { min-width: 0; background: var(--white); }
.property-card__link { display: block; height: 100%; }
.property-card__media { position: relative; aspect-ratio: 1.32; overflow: hidden; background: #dce0d8; }
.property-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.25,1); }
.property-card:hover .property-card__media img { transform: scale(1.035); }
.property-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font: 10px var(--mono); }
.property-badge { position: absolute; top: 13px; left: 13px; padding: 6px 9px; background: var(--white); color: var(--ink); font: 9px var(--mono); text-transform: uppercase; }
.property-card__body { padding: 17px 18px 16px; }
.property-card__location { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.property-card__title { margin: 0 0 13px; font: 400 23px/1.18 var(--serif); }
.property-card__price { margin-bottom: 14px; color: var(--green); font-size: 16px; font-weight: 700; }
.property-card__facts { padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 15px; border-top: 1px solid var(--line); color: #505850; font: 9px var(--mono); }
.empty-state { padding: 64px 24px; border: 1px solid var(--line); text-align: center; }
.empty-state h3 { margin-bottom: 8px; font: 400 30px/1.1 var(--serif); }
.empty-state p { margin-bottom: 20px; color: var(--muted); font-size: 13px; }

.about-band { padding-block: 72px; background: #e4e7df; }
.about-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.about-inner h2 { max-width: 480px; margin: 0; font: 400 46px/1.05 var(--serif); }
.about-copy { max-width: 600px; color: #525a53; font-size: 14px; }
.about-copy p { margin-bottom: 18px; }
.site-footer { padding-block: 34px 24px; background: var(--green-deep); color: rgba(255,255,255,.82); }
.footer-main { padding-bottom: 28px; display: flex; align-items: start; justify-content: space-between; gap: 30px; }
.footer-brand { color: var(--white); font-size: 14px; font-weight: 700; }
.footer-main p { max-width: 280px; margin: 8px 0 0; color: rgba(255,255,255,.64); font-size: 11px; }
.footer-contact { font-size: 12px; text-align: right; }
.footer-bottom { padding-top: 16px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.58); font: 9px var(--mono); }

.archive-head { padding-block: 72px 35px; }
.archive-head h1 { margin: 0 0 12px; font: 400 58px/1 var(--serif); }
.archive-head p { max-width: 550px; margin: 0; color: var(--muted); font-size: 13px; }
.archive-filters { margin-bottom: 28px; padding: 16px; display: grid; grid-template-columns: 1.2fr repeat(4, 1fr) auto; align-items: end; gap: 12px; border: 1px solid var(--line); }
.archive-filters label { display: block; margin-bottom: 5px; color: var(--muted); font: 9px var(--mono); text-transform: uppercase; }
.archive-filters input, .archive-filters select { width: 100%; min-height: 41px; padding: 9px; border: 1px solid var(--line); background: var(--white); font-size: 11px; }
.result-count { margin-bottom: 18px; color: var(--muted); font: 10px var(--mono); }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; }
.pagination a, .pagination span { min-width: 38px; padding: 9px 12px; border: 1px solid var(--line); font-size: 11px; text-align: center; }
.pagination .current { background: var(--green); color: var(--white); }

.property-page { padding-block: 46px var(--section-space); }
.property-top { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.property-top h1 { max-width: 900px; margin: 0 0 7px; font: 400 48px/1.05 var(--serif); }
.property-location { color: var(--muted); font-size: 13px; }
.property-price { margin-top: 6px; color: var(--green); font-size: 23px; font-weight: 700; text-align: right; white-space: nowrap; }
.property-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.gallery-main, .gallery-thumb { position: relative; overflow: hidden; padding: 0; border: 0; background: #dce0d8; cursor: zoom-in; }
.gallery-main { width: 100%; aspect-ratio: 1.85; }
.gallery-main img, .gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 9px; }
.gallery-thumb { aspect-ratio: 1.5; cursor: pointer; }
.gallery-thumb:hover img { opacity: .84; }
.property-layout { margin-top: 42px; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: clamp(40px, 7vw, 100px); align-items: start; }
.property-details h2 { margin: 0 0 18px; font: 400 32px/1.1 var(--serif); }
.property-description { max-width: 760px; margin-bottom: 38px; color: #505850; font-size: 15px; line-height: 1.8; }
.spec-grid { margin: 0 0 38px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; border-top: 1px solid var(--line); }
.spec-grid li { min-height: 79px; padding: 16px 15px 12px 0; border-bottom: 1px solid var(--line); }
.spec-grid strong { display: block; font-size: 17px; font-weight: 600; }
.spec-grid span { color: var(--muted); font: 9px var(--mono); text-transform: uppercase; }
.property-sidebar { position: sticky; top: 24px; padding: 22px; border: 1px solid var(--line); background: var(--white); }
.property-sidebar h2 { margin-bottom: 7px; font: 400 27px/1.1 var(--serif); }
.property-sidebar > p { margin-bottom: 18px; color: var(--muted); font-size: 11px; }
.property-sidebar .button { width: 100%; margin-bottom: 9px; }
.share-actions { margin-top: 17px; padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.share-actions button { padding: 5px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 10px; cursor: pointer; }
.property-tour { margin-top: 52px; }
.tour-frame { position: relative; height: 0; padding-bottom: 56.25%; overflow: hidden; background: #dce0d8; }
.tour-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour-fallback { padding: 24px; border: 1px solid var(--line); }
.tour-fallback p { margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.map-link { margin-top: 18px; }
.gallery-dialog { width: min(92vw, 1200px); max-width: none; max-height: 92vh; padding: 0; border: 0; background: #101512; }
.gallery-dialog::backdrop { background: rgba(10,15,12,.88); }
.gallery-dialog img { width: 100%; max-height: 82vh; object-fit: contain; }
.gallery-dialog button { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.65); background: rgba(20,25,21,.6); color: var(--white); font-size: 20px; cursor: pointer; }
.page-content { min-height: 60vh; padding-block: 110px var(--section-space); }
.page-content h1 { font: 400 58px/1.05 var(--serif); }
.entry-content { max-width: 800px; }
.entry-content img { height: auto; }

@media (max-width: 1000px) {
  :root { --section-space: 80px; }
  .search-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-panel .button { width: 100%; }
  .archive-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
}

@media (max-width: 700px) {
  :root { --section-space: 64px; }
  .header-inner { min-height: 68px; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; top: 68px; left: 0; right: 0; padding: 24px var(--gutter) 28px; display: none; align-items: flex-start; flex-direction: column; gap: 22px; background: var(--paper); box-shadow: 0 12px 20px rgba(32,39,34,.1); }
  .site-nav.is-open { display: flex; }
  .site-nav ul { width: 100%; align-items: flex-start; flex-direction: column; gap: 18px; }
  .site-nav li, .site-nav a { font-size: 14px; }
  .hero { min-height: 570px; }
  .hero-image { object-position: 60% center; }
  .hero-content { padding-top: 120px; padding-bottom: 42px; }
  .hero h1 { font-size: 54px; }
  .hero-copy { max-width: 420px; font-size: 13px; }
  .search-panel { width: calc(100% - 28px); margin-top: -12px; padding: 15px; gap: 12px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-heading h2 { font-size: 42px; }
  .property-grid { grid-template-columns: 1fr; gap: 20px; }
  .property-card__media { aspect-ratio: 1.4; }
  .about-inner { grid-template-columns: 1fr; gap: 22px; }
  .about-inner h2 { font-size: 38px; }
  .footer-main, .footer-bottom { flex-direction: column; gap: 14px; }
  .footer-contact { text-align: left; }
  .archive-head { padding-top: 48px; }
  .archive-head h1 { font-size: 44px; }
  .archive-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .archive-filters .filter-location { grid-column: 1 / -1; }
  .property-page { padding-top: 32px; }
  .property-top { flex-direction: column; gap: 10px; }
  .property-top h1 { font-size: 38px; }
  .property-price { font-size: 20px; text-align: left; }
  .gallery-main { aspect-ratio: 1.25; }
  .gallery-strip { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 6px; }
  .property-layout { margin-top: 30px; grid-template-columns: 1fr; }
  .property-sidebar { position: static; grid-row: 1; }
  .property-details h2 { font-size: 28px; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding-top: 75px; }
  .page-content h1 { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}