/*
Theme Name: MS Inmobiliaria
Theme URI: https://v0-ms-inmobiliaria.vercel.app/
Author: Codex
Description: Theme one-page para Marilina Suarez Operaciones Inmobiliarias, con catálogo editable de ventas y alquileres.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: ms-inmobiliaria
*/

:root {
  --ink: #434344;
  --cream: #f6f5f1;
  --sun: #fbef79;
  --line: #d9d7d0;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); line-height: 1.55; }
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { max-width: 1200px; margin: auto; padding-left: 5vw; padding-right: 5vw; }

.site-header { height: 84px; padding: 10px 5vw; display: flex; align-items: center; justify-content: space-between; background: rgba(246,245,241,.94); backdrop-filter: blur(12px); position: sticky; z-index: 20; top: 0; border-bottom: 1px solid transparent; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 174px; height: 62px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 27px; }
.nav a { font-size: .85rem; color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.nav-cta, .button { background: var(--ink) !important; color: white !important; padding: 11px 18px !important; border-radius: 0; }
.menu-button { display: none; border: 0; background: none; color: var(--ink); font-size: 1.4rem; cursor: pointer; }

.hero { position: relative; display: block; min-height: 640px; background-color: #555; background-position: center; background-size: cover; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(25,25,25,.82) 0%, rgba(25,25,25,.58) 46%, rgba(25,25,25,.1) 100%), linear-gradient(0deg, rgba(0,0,0,.27), transparent 48%); }
.hero-copy { position: relative; z-index: 1; color: white; max-width: 750px; padding: 12vh 5vw 8vh; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: .7rem; font-weight: 700; margin: 0 0 20px; color: #71716e; }
.hero .eyebrow, .services .eyebrow { color: var(--sun); }
.hero h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.07; margin: 0; }
.hero h1 { font-size: clamp(3rem, 6vw, 6.2rem); letter-spacing: -.05em; }
.hero em, h2 em { font-style: italic; }
.intro { color: #f4f4f2; font-size: 1.1rem; max-width: 400px; margin: 28px 0 34px; }
.actions { display: flex; align-items: center; gap: 27px; }
.button { border: 0; font: 600 .85rem var(--sans); cursor: pointer; text-decoration: none; display: inline-flex; gap: 22px; align-items: center; }
.button:hover, .button:focus-visible { background: #2f2f30 !important; }
.button span { color: var(--sun); font-size: 1.2rem; }
.text-link { font-weight: 700; font-size: .85rem; color: var(--ink); text-decoration: none; }
.hero .text-link { color: white; }
.text-link span { color: #a99700; margin-left: 8px; }

.about { padding-top: 135px; padding-bottom: 125px; }
.section-heading { display: grid; grid-template-columns: 1.1fr .9fr; gap: 9vw; }
.section-heading h2, .services h2, .office h2, .contact h2, .catalog h2, .map-inner h2 { font-size: clamp(2.25rem, 4.4vw, 4.3rem); letter-spacing: -.045em; }
.section-heading p { margin: 0 0 19px; }
.values { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,1fr); margin-top: 84px; }
.values div { padding: 26px 30px 0 0; }
.values div + div { border-left: 1px solid var(--line); padding-left: 30px; }
.values b, .service-grid span { color: #aa9b13; font-size: .75rem; }
.values h3, .service-grid h3 { font: 500 1.55rem var(--serif); margin: 22px 0 9px; }
.values p, .service-grid p { font-size: .9rem; margin: 0; }

.services { padding: 115px 0; background: var(--ink); color: #f7f6f3; }
.service-grid { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 65px; }
.service-grid article { border-top: 1px solid #747473; padding: 25px 32px 0 0; min-height: 180px; }
.service-grid article + article { border-left: 1px solid #747473; padding-left: 32px; }

.catalog { padding-top: 120px; padding-bottom: 120px; }
.catalog-header { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 45px; }
.catalog-header > p { max-width: 280px; margin: 0; font-size: .9rem; }
.property-list { display: grid; gap: 36px; }
.property-card { display: grid; grid-template-columns: 1.05fr .95fr; background: #ecebe6; }
.property-card:nth-child(even) .property-image { order: 2; }
.property-image { position: relative; min-height: 470px; overflow: hidden; }
.property-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.property-card:hover .property-image img { transform: scale(1.025); }
.property-image .property-badge { position: absolute; top: 20px; left: 20px; padding: 7px 12px; background: var(--sun); color: var(--ink); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.property-gallery-button { position: absolute; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 0; background: rgba(67,67,68,.94); color: #fff; font: 600 .78rem var(--sans); cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.2); }
.property-gallery-button:hover, .property-gallery-button:focus-visible { background: #29292a; }
.property-gallery-button b { display: grid; min-width: 23px; height: 23px; padding: 0 5px; place-items: center; background: var(--sun); color: var(--ink); font-size: .7rem; }
.property-copy { padding: 45px; }
.property-type { margin: 0; color: #8e7e00; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.property-copy h3 { margin: 12px 0; font: 500 clamp(1.7rem,2.6vw,2.65rem)/1.1 var(--serif); letter-spacing: -.035em; }
.property-location { font-size: .86rem; font-weight: 600; margin: 0; }
.property-description { font-size: .92rem; max-width: 470px; margin: 24px 0; }
.property-features { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; gap: 8px; }
.property-features span { display: grid; font-size: .68rem; color: #777; }
.property-features b { color: var(--ink); font-size: .94rem; }
.property-layout { margin: 20px 0; font-size: .82rem; }
.property-layout p { margin: 10px 0; }
.property-layout strong { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.property-bottom { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-top: 20px; border-top: 1px solid var(--line); }
.property-bottom > strong { font: 500 1.7rem var(--serif); }
.property-bottom .button { white-space: nowrap; }
.property-bottom small { font: .7rem var(--sans); color: #777; }
.rental-catalog { background: #e2e0d8; }
.empty-catalog { padding: 30px; border: 1px solid var(--line); }
.catalog-more { display: grid; justify-items: center; gap: 10px; margin-top: 42px; }
.catalog-more .button { min-width: 145px; justify-content: space-between; }
.catalog-more .button:disabled { opacity: .65; cursor: wait; }
.catalog-status { min-height: 1.4em; margin: 0; color: #777; font-size: .78rem; }

body.gallery-open { overflow: hidden; }
.property-gallery-modal[hidden] { display: none; }
.property-gallery-modal { position: fixed; z-index: 100000; inset: 0; display: grid; place-items: center; padding: 28px; }
.property-gallery-backdrop { position: absolute; inset: 0; background: rgba(20,20,20,.88); backdrop-filter: blur(5px); }
.property-gallery-dialog { position: relative; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; width: min(1120px, 100%); height: min(820px, calc(100vh - 56px)); padding: 22px; background: #202021; color: #fff; outline: 0; box-shadow: 0 24px 90px rgba(0,0,0,.45); }
.property-gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 15px; }
.property-gallery-header h2 { overflow: hidden; font: 500 clamp(1.2rem,2.6vw,2rem)/1.2 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.property-gallery-close { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid #666; background: transparent; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.property-gallery-stage { position: relative; display: grid; min-height: 0; place-items: center; background: #111; }
.property-gallery-main { display: block; width: 100%; height: 100%; object-fit: contain; }
.property-gallery-arrow { position: absolute; z-index: 2; top: 50%; width: 45px; height: 45px; border: 0; border-radius: 50%; background: rgba(246,245,241,.9); color: var(--ink); font-size: 1.25rem; cursor: pointer; transform: translateY(-50%); }
.property-gallery-prev { left: 15px; }
.property-gallery-next { right: 15px; }
.property-gallery-counter { min-height: 1.3em; margin: 10px 0 8px; color: #bbb; font-size: .75rem; text-align: center; }
.property-gallery-thumbs { display: flex; gap: 8px; min-height: 68px; overflow-x: auto; padding-bottom: 2px; }
.property-gallery-thumbs button { width: 84px; height: 62px; padding: 0; flex: 0 0 auto; border: 2px solid transparent; background: #111; cursor: pointer; opacity: .62; }
.property-gallery-thumbs button.is-active { border-color: var(--sun); opacity: 1; }
.property-gallery-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

.office { display: grid; grid-template-columns: 1.1fr .9fr; gap: 8vw; align-items: center; padding-top: 130px; padding-bottom: 130px; }
.office-video { background: var(--ink); padding: 12px; }
.office video { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.office-copy p:not(.eyebrow) { max-width: 410px; margin: 23px 0 28px; }

.contact { background: #e2e0d8; padding: 100px 0; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; }
.contact h2 { margin-bottom: 24px; }
.contact p:not(.eyebrow) { max-width: 290px; }
.contact-details { display: grid; gap: 13px; margin-top: 30px; font-size: .86rem; }
.contact-details a, .contact-details p { display: block; max-width: none !important; margin: 0 !important; color: var(--ink); text-decoration: none; }
.contact-details strong { display: block; margin-bottom: 2px; color: #777; font-size: .63rem; letter-spacing: .12em; text-transform: uppercase; }
.socials { display: flex; gap: 18px; margin-top: 6px; }
.socials a { font-size: .78rem; font-weight: 700; }
.contact-form { display: grid; gap: 16px; }
.contact-form label { font-size: .78rem; font-weight: 700; display: grid; gap: 6px; }
.contact-form input, .contact-form textarea { width: 100%; border: 0; border-bottom: 1px solid #989790; background: transparent; padding: 9px 0; font: 1rem var(--sans); color: var(--ink); resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 0; border-color: var(--ink); }
.contact-form .button { width: max-content; margin-top: 8px; }
.contact-form small { color: #777; font-size: .7rem; }

.map-section { padding: 105px 0; background: var(--cream); }
.map-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; align-items: center; }
.map-inner > div > p:not(.eyebrow) { margin: 20px 0 28px; }
.map-card { position: relative; display: grid; min-height: 250px; padding: 30px; align-content: end; overflow: hidden; background: var(--ink); color: white; text-decoration: none; }
.map-card::before { content: ""; position: absolute; width: 150%; height: 170%; top: -62%; right: -53%; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 48px rgba(255,255,255,.03),0 0 0 96px rgba(255,255,255,.025); }
.map-card span { position: absolute; top: 22px; right: 26px; color: var(--sun); font: 500 4rem var(--serif); }
.map-card strong, .map-card small, .map-card i { position: relative; }
.map-card strong { font: 500 1.7rem var(--serif); }
.map-card small { margin-top: 3px; color: #ddd; }
.map-card i { position: absolute; bottom: 30px; right: 30px; color: var(--sun); font-style: normal; font-size: 1.2rem; }

.site-footer { border-top: 1px solid var(--line); padding: 30px 5vw; display: flex; gap: 30px; align-items: center; justify-content: space-between; font-size: .75rem; }
.site-footer img { width: 115px; height: 42px; object-fit: contain; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 700; }
.credit { white-space: nowrap; }
.credit a { text-decoration: underline; text-underline-offset: 3px; }
.whatsapp-float { position: fixed; z-index: 30; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 9px; padding: 12px 17px; border-radius: 99px; background: #25d366; color: #102419; box-shadow: 0 8px 25px rgba(0,0,0,.2); font-size: .8rem; font-weight: 700; text-decoration: none; }
.whatsapp-float span { font-size: 1.1rem; }

@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
@media (max-width: 720px) {
  html { scroll-padding-top: 70px; }
  .site-header { height: 70px; }
  .brand img { width: 140px; height: 50px; }
  .menu-button { display: block; }
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; padding: 23px 5vw; background: var(--cream); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 17px; }
  .nav.open { display: flex; }
  .hero { min-height: 580px; background-position: 58% center; }
  .hero-copy { padding: 80px 7vw; }
  .hero h1 { font-size: 3.1rem; }
  .actions { gap: 18px; }
  .section-heading, .office, .contact-inner, .map-inner { grid-template-columns: 1fr; gap: 38px; }
  .about, .office { padding-top: 85px; padding-bottom: 85px; }
  .values, .service-grid { grid-template-columns: 1fr; margin-top: 48px; }
  .values div, .values div + div, .service-grid article, .service-grid article + article { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .service-grid article { border-color: #747473; }
  .services { padding: 80px 0; }
  .catalog { padding-top: 80px; padding-bottom: 80px; }
  .catalog-header, .property-card { display: grid; grid-template-columns: 1fr; }
  .catalog-header { gap: 20px; }
  .property-card:nth-child(even) .property-image { order: 0; }
  .property-image { min-height: 310px; }
  .property-gallery-button { right: 12px; bottom: 12px; }
  .property-copy { padding: 28px 24px; }
  .property-features { grid-template-columns: repeat(2,1fr); row-gap: 13px; }
  .property-bottom { align-items: flex-start; flex-direction: column; }
  .property-bottom .button { width: 100%; justify-content: space-between; }
  .office { gap: 42px; }
  .contact { padding: 75px 0; }
  .map-section { padding: 75px 0; }
  .map-card { min-height: 210px; }
  .site-footer { flex-wrap: wrap; gap: 12px; }
  .whatsapp-float { right: 15px; bottom: 15px; padding: 12px 15px; }
  .property-gallery-modal { padding: 0; }
  .property-gallery-dialog { width: 100%; height: 100%; padding: 15px; }
  .property-gallery-arrow { width: 40px; height: 40px; }
  .property-gallery-prev { left: 8px; }
  .property-gallery-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .property-image img { transition: none; }
}
