/*
Theme Name: Home Pro Group
Theme URI: https://homeprogroup.com
Author: Home Pro Group
Description: Tema a medida para Home Pro Group, inmobiliaria de propiedades de alto nivel. Portada con foto aérea a pantalla completa, catálogo de propiedades editable, formulario de contacto y WhatsApp.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: homepro
*/

/* ---------- Tokens ---------- */
:root {
	--hp-bg: #0a0a0a;
	--hp-bg-2: #111110;
	--hp-ink: #e9e4da;
	--hp-ink-strong: #f3efe6;
	--hp-muted: #a39d91;
	--hp-line: #2c2a25;
	--hp-line-2: #3a362e;
	--hp-gold: #c9ab78;
	--hp-font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
	--hp-display: "Cormorant Garamond", Georgia, serif;
	--hp-gutter: clamp(20px, 5vw, 64px);
	--hp-section: clamp(72px, 10vw, 120px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--hp-bg);
	color: var(--hp-ink);
	font-family: var(--hp-font);
	font-weight: 300;
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--hp-gold); }
h1, h2, h3, h4 { margin: 0; font-weight: 200; text-transform: uppercase; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--hp-gold); outline-offset: 3px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--hp-gold); color: #000; padding: 10px 16px; clip: auto; width: auto; height: auto; }

.hp-wrap { padding-left: var(--hp-gutter); padding-right: var(--hp-gutter); }
.hp-eyebrow { font-size: 12px; letter-spacing: .4em; text-transform: uppercase; color: var(--hp-gold); margin: 0; }

/* ---------- Botones ---------- */
.hp-btn {
	display: inline-block; padding: 16px 36px; font: inherit; font-size: 12px; letter-spacing: .3em;
	text-transform: uppercase; cursor: pointer; border: 1px solid var(--hp-gold); background: transparent; color: var(--hp-ink-strong);
	transition: background .2s, color .2s;
}
.hp-btn:hover { background: var(--hp-gold); color: #0a0a0a; }
.hp-btn--solid { background: var(--hp-gold); color: #0a0a0a; font-weight: 400; }
.hp-btn--solid:hover { background: var(--hp-ink-strong); border-color: var(--hp-ink-strong); color: #0a0a0a; }

/* ---------- Header ---------- */
.hp-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 50;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
	padding: 28px var(--hp-gutter);
	transition: background .3s, padding .3s, backdrop-filter .3s;
}
body:not(.hp-home) .hp-header,
.hp-header.is-scrolled { background: rgba(10, 10, 10, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hp-header.is-scrolled { padding-top: 16px; padding-bottom: 16px; }
.admin-bar .hp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .hp-header { top: 46px; } }

.hp-logo { display: flex; flex-direction: column; gap: 4px; color: var(--hp-ink-strong); line-height: 1.1; }
.hp-logo__name { font-size: clamp(18px, 2.2vw, 26px); letter-spacing: .28em; font-weight: 200; text-transform: uppercase; }
.hp-logo__sub { font-size: 11px; letter-spacing: .5em; text-transform: uppercase; }
.hp-logo img { max-height: 56px; width: auto; }

.hp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 36px; }
.hp-nav a { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--hp-ink-strong); }
.hp-nav a:hover { color: var(--hp-gold); }
.hp-nav-toggle { display: none; background: none; border: 1px solid var(--hp-line-2); color: var(--hp-ink-strong); padding: 10px 14px; font: inherit; font-size: 12px; letter-spacing: .25em; text-transform: uppercase; cursor: pointer; }
@media (max-width: 760px) {
	.hp-nav-toggle { display: block; }
	.hp-nav { display: none; width: 100%; }
	.hp-nav.is-open { display: block; }
	.hp-nav ul { flex-direction: column; gap: 14px; padding: 12px 0 8px; }
	.hp-header { background: rgba(10, 10, 10, .88); }
}

/* ---------- Hero con foto fija y efecto cortina ---------- */
.hp-hero {
	position: sticky; top: 0; z-index: 0;
	height: 100vh; height: 100svh; min-height: 560px;
	display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
	background: #1d261f;
}
.hp-hero__bg {
	position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat;
	background-image: linear-gradient(120deg, #26332b 0%, #4a5a4c 40%, #8d9a88 70%, #2a2f2b 100%);
	transform: scale(calc(1 + var(--hp-p, 0) * .14)); transform-origin: center; will-change: transform;
}
.hp-hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(10, 10, 10, .35) 0%, rgba(10, 10, 10, .05) 28%, rgba(10, 10, 10, .35) 70%, rgba(10, 10, 10, .85) 100%);
}
.hp-hero__content {
	position: relative; z-index: 2; max-width: 1100px;
	padding: 0 var(--hp-gutter) clamp(56px, 9vh, 96px);
	display: flex; flex-direction: column; gap: 32px;
	opacity: calc(1 - var(--hp-p, 0) * 1.4); transform: translateY(calc(var(--hp-p, 0) * -40px));
}
.hp-hero__title { font-size: clamp(30px, 5.2vw, 56px); line-height: 1.18; letter-spacing: .12em; color: var(--hp-ink-strong); }
.hp-hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }
.hp-hero__scroll {
	position: absolute; z-index: 2; right: var(--hp-gutter); bottom: clamp(32px, 6vh, 64px);
	width: 1px; height: 72px; background: linear-gradient(var(--hp-gold), transparent);
}

.hp-curtain { position: relative; z-index: 1; background: var(--hp-bg); box-shadow: 0 -30px 60px rgba(0, 0, 0, .45); }

/* ---------- Quiénes somos ---------- */
.hp-about { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: var(--hp-section); padding-bottom: var(--hp-section); }
.hp-about__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hp-about__title { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.25; letter-spacing: .1em; }
.hp-about__body { color: #bdb7ab; font-size: 17px; line-height: 1.9; letter-spacing: .03em; max-width: 560px; }
.hp-about__body p:last-child { margin-bottom: 0; }
.hp-about__media { flex: 1 1 420px; min-width: 0; display: flex; gap: 28px; }
.hp-about__line { width: 1px; background: #6b6454; flex: none; }
.hp-about__img {
	flex: 1; min-height: 440px; background: linear-gradient(160deg, #d9c9b0, #8f7a5c 55%, #3d3426) center / cover no-repeat;
}

/* ---------- Pilares ---------- */
.hp-pillars { padding-bottom: var(--hp-section); display: flex; flex-direction: column; gap: 56px; }
.hp-pillars__title { font-size: clamp(20px, 2.4vw, 30px); letter-spacing: .3em; text-align: center; color: #d8d2c6; }
.hp-pillars__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 48px; }
.hp-pillar { border-top: 1px solid var(--hp-line-2); padding-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.hp-pillar__n { font-family: var(--hp-display); font-size: 26px; color: var(--hp-gold); }
.hp-pillar__t { font-size: 18px; font-weight: 300; letter-spacing: .28em; }
.hp-pillar__p { color: var(--hp-muted); font-size: 16px; line-height: 1.8; margin: 0; }

/* ---------- Franja aérea con parallax ---------- */
.hp-band {
	height: clamp(320px, 62vh, 620px);
	background-color: #2b3a30;
	background-image: linear-gradient(rgba(10, 10, 10, .2), rgba(10, 10, 10, .2)), linear-gradient(135deg, #3b4a3c 0%, #7d8b76 45%, #2b3a30 100%);
	background-attachment: fixed; background-size: cover; background-position: center;
}
@media (hover: none), (max-width: 900px) { .hp-band { background-attachment: scroll; } }

/* ---------- Cifras ---------- */
.hp-stats {
	background: var(--hp-bg-2); padding-top: 80px; padding-bottom: 80px;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; text-align: center;
}
.hp-stat__v { display: block; font-family: var(--hp-display); font-weight: 300; font-size: clamp(44px, 6vw, 64px); line-height: 1; color: var(--hp-gold); }
.hp-stat__l { display: block; margin-top: 12px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--hp-muted); }

/* ---------- Propiedades ---------- */
.hp-props { padding-top: var(--hp-section); padding-bottom: var(--hp-section); display: flex; flex-direction: column; gap: 48px; }
.hp-props__head { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.hp-section-title { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: .2em; }
.hp-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.hp-filter {
	padding: 12px 24px; font: inherit; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; cursor: pointer;
	border: 1px solid var(--hp-line-2); background: transparent; color: var(--hp-ink); transition: background .2s, color .2s, border-color .2s;
}
.hp-filter:hover { border-color: var(--hp-gold); }
.hp-filter.is-active, .hp-filter[aria-pressed="true"] { background: var(--hp-gold); border-color: var(--hp-gold); color: #0a0a0a; }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 56px 36px; }
.hp-card[hidden] { display: none; }
.hp-card__link { display: flex; flex-direction: column; gap: 14px; color: inherit; }
.hp-card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(150deg, #4f5d4c, #1f261f); }
.hp-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.hp-card__link:hover .hp-card__media img { transform: scale(1.05); }
.hp-card__badge { position: absolute; top: 16px; left: 16px; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; background: rgba(10, 10, 10, .72); padding: 6px 10px; color: var(--hp-ink-strong); }
.hp-card__badge--warn { left: auto; right: 16px; background: var(--hp-gold); color: #0a0a0a; }
.hp-card__title { font-size: 21px; font-weight: 300; letter-spacing: .14em; }
.hp-card__zone { margin: 0; font-size: 14px; letter-spacing: .12em; color: var(--hp-muted); }
.hp-card__specs { margin: 0; font-size: 14px; letter-spacing: .08em; color: #d8d2c6; line-height: 1.7; }
.hp-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--hp-line); padding-top: 14px; }
.hp-card__price { font-family: var(--hp-display); font-size: 26px; color: var(--hp-gold); }
.hp-card__more { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; }
.hp-props__all { align-self: center; }

/* ---------- Contacto ---------- */
.hp-contact { background: var(--hp-bg-2); padding-top: var(--hp-section); padding-bottom: var(--hp-section); display: flex; flex-wrap: wrap; gap: 80px; }
.hp-contact__info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.hp-contact__title { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: .2em; }
.hp-contact__text { color: var(--hp-muted); line-height: 1.8; max-width: 460px; margin: 0; }
.hp-contact__lines { display: flex; flex-direction: column; gap: 8px; letter-spacing: .08em; }
.hp-contact__form { flex: 1 1 380px; min-width: 0; }

.hp-form { display: flex; flex-direction: column; gap: 10px; }
.hp-form label { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--hp-muted); margin-top: 12px; }
.hp-form input[type="text"], .hp-form input[type="email"], .hp-form input[type="tel"], .hp-form textarea {
	background: transparent; border: 0; border-bottom: 1px solid #4a4638; border-radius: 0; color: var(--hp-ink-strong);
	font: inherit; font-size: 17px; padding: 10px 0; width: 100%; resize: vertical;
}
.hp-form input:focus, .hp-form textarea:focus { outline: none; border-bottom-color: var(--hp-gold); }
.hp-form .hp-btn { align-self: flex-start; margin-top: 20px; }
.hp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hp-notice { padding: 14px 18px; margin: 0 0 24px; border: 1px solid var(--hp-line-2); font-size: 15px; }
.hp-notice--ok { border-color: var(--hp-gold); color: var(--hp-ink-strong); }
.hp-notice--error { border-color: #b4574b; color: #f0c9c3; }

/* ---------- Pie ---------- */
.hp-footer { padding: 48px var(--hp-gutter); display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #7f796d; background: var(--hp-bg); }
.hp-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }

/* ---------- WhatsApp flotante ---------- */
.hp-wa {
	position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 10px;
	background: #1f8f4e; color: #fff; padding: 14px 20px 14px 16px; border-radius: 999px;
	font-size: 13px; letter-spacing: .12em; box-shadow: 0 8px 28px rgba(0, 0, 0, .45); transition: transform .2s, background .2s;
}
.hp-wa:hover { background: #26a85c; color: #fff; transform: translateY(-2px); }
.hp-wa svg { width: 24px; height: 24px; flex: none; }
@media (max-width: 560px) { .hp-wa span { display: none; } .hp-wa { padding: 14px; } }

/* ---------- Páginas internas ---------- */
.hp-main { padding-top: 120px; }
.admin-bar .hp-main { padding-top: 152px; }
.hp-page-head { padding: 56px var(--hp-gutter) 24px; display: flex; flex-direction: column; gap: 18px; }
.hp-page-title { font-size: clamp(30px, 4.4vw, 52px); letter-spacing: .16em; }
.hp-prose { max-width: 760px; color: #cfc9bd; line-height: 1.9; }
.hp-prose h2, .hp-prose h3 { margin: 1.6em 0 .6em; letter-spacing: .12em; }
.hp-prose a { color: var(--hp-gold); border-bottom: 1px solid currentColor; }

/* ---------- Ficha de propiedad ---------- */
.hp-single-hero { position: relative; height: clamp(360px, 68vh, 720px); background: linear-gradient(150deg, #4f5d4c, #1f261f); overflow: hidden; }
.hp-single-hero img { width: 100%; height: 100%; object-fit: cover; }
.hp-single-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, .45), rgba(10, 10, 10, 0) 30%, rgba(10, 10, 10, .75)); }
.hp-single-top { display: flex; flex-wrap: wrap; gap: 24px 64px; justify-content: space-between; align-items: flex-end; padding: 56px var(--hp-gutter) 40px; }
.hp-single-top__main { display: flex; flex-direction: column; gap: 14px; }
.hp-single-price { font-family: var(--hp-display); font-size: clamp(32px, 4vw, 48px); color: var(--hp-gold); line-height: 1; }
.hp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0 var(--hp-gutter); border-top: 1px solid var(--hp-line-2); border-bottom: 1px solid var(--hp-line-2); }
.hp-fact { padding: 24px 8px; text-align: center; }
.hp-fact__v { display: block; font-family: var(--hp-display); font-size: 34px; color: var(--hp-ink-strong); line-height: 1.1; }
.hp-fact__l { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--hp-muted); }
.hp-single-body { display: flex; flex-wrap: wrap; gap: 64px; padding: var(--hp-section) var(--hp-gutter); }
.hp-single-body__main { flex: 2 1 480px; min-width: 0; }
.hp-single-body__side { flex: 1 1 320px; min-width: 0; }
.hp-extras { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0; }
.hp-extras li { padding: 14px 0; border-bottom: 1px solid var(--hp-line); color: #cfc9bd; }
.hp-extras li::before { content: ""; display: inline-block; width: 18px; height: 1px; background: var(--hp-gold); vertical-align: middle; margin-right: 14px; }
.hp-box { background: var(--hp-bg-2); padding: 32px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 110px; }
.hp-box__title { font-size: 18px; letter-spacing: .22em; }
.hp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; padding: 0 var(--hp-gutter) var(--hp-section); }
.hp-gallery a { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--hp-bg-2); }
.hp-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hp-gallery a:hover img { transform: scale(1.04); }
.hp-video { padding: 0 var(--hp-gutter) var(--hp-section); }
.hp-video__frame { position: relative; aspect-ratio: 16 / 9; }
.hp-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hp-related { padding: var(--hp-section) var(--hp-gutter); background: var(--hp-bg-2); display: flex; flex-direction: column; gap: 40px; }

/* ---------- Visor de fotos ---------- */
.hp-lb { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; }
.hp-lb img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.hp-lb button { position: absolute; background: none; border: 0; color: #fff; font-size: 36px; cursor: pointer; padding: 12px 18px; line-height: 1; }
.hp-lb__close { top: 12px; right: 12px; }
.hp-lb__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.hp-lb__next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Aparición suave al hacer scroll ---------- */
.hp-js .hp-reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.hp-js .hp-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hp-hero__bg { transform: none; }
	.hp-hero__content { opacity: 1; transform: none; }
	.hp-js .hp-reveal { opacity: 1; transform: none; transition: none; }
	.hp-card__media img, .hp-gallery img { transition: none; }
}

@media (max-width: 760px) {
	.hp-box { position: static; }
}
