/* ==========================================================================
   Ceiba Inmobiliaria — estilos principales
   ========================================================================== */

:root {
	--ink: #1e2a24;
	--forest: #23412f;
	--forest-2: #2d4f3a;
	--forest-text: #dce5d6;
	--ivory: #f7f2e8;
	--sand: #ede5d3;
	--sage: #c9d3c0;
	--line: #ddd5c4;
	--line-2: #c9c0ac;
	--clay: #a9481a;
	--clay-dark: #7e3411;
	--peach: #e7b98f;
	--muted: #4a5249;
	--muted-2: #5a6259;
	--white: #ffffff;
	--radius: 20px;
	--radius-lg: 28px;
	--font-display: 'Fraunces', Georgia, serif;
	--font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--gutter: 80px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--ivory);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--clay);
}

a:hover {
	color: var(--clay-dark);
}

h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: 500;
	color: var(--forest);
	line-height: 1.08;
	margin: 0;
}

h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(30px, 3.4vw, 48px); }
h3 { font-size: 24px; line-height: 1.2; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; }

.container {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	background: var(--forest);
	color: var(--ivory);
	padding: 10px 16px;
	border-radius: 8px;
	z-index: 100;
}

.skip-link:focus {
	left: 8px;
}

:focus-visible {
	outline: 3px solid var(--clay);
	outline-offset: 3px;
}

.hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

/* ---------- Botones ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 14px 28px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font: 600 16px/1.2 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn--accent { background: var(--clay); color: var(--white); }
.btn--accent:hover { background: var(--clay-dark); color: var(--white); }
.btn--dark { background: var(--forest); color: var(--ivory); }
.btn--dark:hover { background: var(--ink); color: var(--ivory); }
.btn--outline { border-color: var(--forest); color: var(--forest); background: transparent; }
.btn--outline:hover { background: var(--forest); color: var(--ivory); }
.btn--light { background: var(--white); color: var(--clay-dark); }
.btn--light:hover { background: var(--ivory); color: var(--clay-dark); }
.btn--sand { background: var(--peach); color: var(--ink); }
.btn--sand:hover { background: #f0c9a6; color: var(--ink); }
.btn--sm { min-height: 44px; padding: 12px 22px; font-size: 15px; }
.btn--block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Encabezado ---------- */
.site-header {
	background: var(--ivory);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 50;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 88px;
}

.brand {
	display: flex;
	align-items: baseline;
	gap: 12px;
	text-decoration: none;
	color: var(--forest);
}

.brand:hover { color: var(--forest); }

.brand__name {
	font-family: var(--font-display);
	font-size: 34px;
	font-weight: 600;
	line-height: 1;
}

.brand__logo { max-height: 56px; width: auto; }

.brand__tag {
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted-2);
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 36px;
}

.site-nav .menu {
	display: flex;
	align-items: center;
	gap: 36px;
	list-style: none;
}

.site-nav .menu a {
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}

.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current_page_item > a {
	color: var(--clay);
	border-bottom-color: var(--clay);
}

.nav-toggle {
	display: none;
	min-height: 44px;
	padding: 0 18px;
	border: 1.5px solid var(--forest);
	border-radius: 999px;
	background: transparent;
	color: var(--forest);
	font: 600 15px var(--font-body);
	cursor: pointer;
}

/* ---------- Secciones ---------- */
.section { padding: 88px 0; }
.section--tight-top { padding-top: 0; }
.section-tight { padding-top: 40px; padding-bottom: 40px; }
.section--forest { background: var(--forest); color: var(--ivory); }
.section--forest h2, .section--forest h3 { color: var(--ivory); }
.section--sand { background: var(--sand); }

.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin-bottom: 48px; }
.section-head--row { max-width: none; flex-direction: row; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; }
.section-head--row > div { display: flex; flex-direction: column; gap: 14px; }

.eyebrow {
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--clay);
	font-weight: 600;
}

.eyebrow--sand { color: var(--peach); }

.lead { font-size: 20px; line-height: 1.5; color: var(--muted); }

.link-strong { font-weight: 600; }

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 80px;
	align-items: center;
}

.split--top { align-items: start; }
.split__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.split__text .steps { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 80px; }

.hero__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 64px;
	align-items: stretch;
}

.hero__text { display: flex; flex-direction: column; gap: 28px; justify-content: center; }
.hero__text .lead { max-width: 520px; }

.hero__media {
	position: relative;
	min-height: 640px;
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--sage);
}

.hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__link {
	position: absolute;
	left: 24px;
	bottom: 24px;
	background: var(--ivory);
	color: var(--forest);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	padding: 14px 20px;
	border-radius: 14px;
}

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }

.field > span {
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
}

.field input,
.field select,
.field textarea {
	width: 100%;
	min-height: 48px;
	padding: 0 12px;
	border: 1px solid var(--line-2);
	border-radius: 10px;
	background: var(--white);
	color: var(--ink);
	font: 400 16px var(--font-body);
}

.field textarea { padding: 12px; resize: vertical; }

.search-card {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
	margin-top: 8px;
}

.search-card .btn { align-self: end; border-radius: 10px; }

.filters {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
	gap: 16px;
	align-items: end;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 24px;
}

.filters .btn { border-radius: 10px; }

.form-card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 40px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.form-card h2 { font-size: 30px; }
.form-card--side { padding: 32px; border-radius: 24px; }
.form-card--side h2 { font-size: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fineprint { font-size: 13px; color: var(--muted-2); }

.notice { padding: 14px 16px; border-radius: 12px; font-weight: 500; font-size: 15px; }
.notice--ok { background: #e3eedc; color: #1d3a26; border: 1px solid #b5cfa8; }
.notice--error { background: #f8e3d9; color: #6b2a0e; border: 1px solid #e3b59f; }

/* ---------- Servicios y tarjetas ---------- */
.service {
	background: var(--forest-2);
	border-radius: var(--radius);
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.service__num { font-family: var(--font-display); font-size: 40px; color: var(--peach); line-height: 1; }
.service h3 { font-size: 28px; }
.service p { font-size: 17px; color: var(--forest-text); }
.service a { color: var(--ivory); font-weight: 600; margin-top: 8px; }

.card {
	display: flex;
	flex-direction: column;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
	color: inherit;
	transform: translateY(-3px);
	box-shadow: 0 14px 30px rgba(30, 42, 36, 0.12);
}

.card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--sage);
	overflow: hidden;
}

.card__media img { width: 100%; height: 100%; object-fit: cover; }

.badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--ivory);
	color: var(--forest);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
}

.badge--status { left: auto; right: 16px; background: var(--clay); color: var(--white); }
.badge--inline { position: static; display: inline-block; margin-top: 12px; }

.card__body { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.card__place { font-size: 14px; color: var(--muted-2); }
.card__title { font-size: 24px; color: var(--forest); }
.card__specs { font-size: 15px; color: var(--muted); }
.card__price { font-size: 22px; font-weight: 600; color: var(--clay); margin-top: 6px; }

/* ---------- Pasos ---------- */
.steps { list-style: none; display: flex; flex-direction: column; }

.steps__item {
	display: flex;
	gap: 24px;
	padding: 22px 0;
	border-top: 1px solid var(--line-2);
}

.steps__n { font-family: var(--font-display); font-size: 32px; color: var(--clay); width: 48px; flex-shrink: 0; line-height: 1.1; }
.steps__item h3 { font-family: var(--font-body); font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.steps__item p { font-size: 16px; color: var(--muted); }

/* ---------- Zonas / sobre ---------- */
.zones-title { margin-bottom: 32px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li { border: 1.5px solid var(--forest); color: var(--forest); border-radius: 999px; padding: 12px 22px; font-size: 17px; font-weight: 500; }

.about { display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: 72px; align-items: center; }
.about__photo { background: var(--sage); border-radius: var(--radius-lg); height: 520px; overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__text { display: flex; flex-direction: column; gap: 20px; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.badges li { background: var(--sand); color: var(--forest); border-radius: 999px; padding: 10px 18px; font-size: 15px; }

/* ---------- Contacto y pie ---------- */
.cta { background: var(--clay); color: var(--white); padding: 72px 0; }
.cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.cta__text { display: flex; flex-direction: column; gap: 12px; max-width: 700px; }
.cta h2 { color: var(--white); }
.cta p { font-size: 19px; }
.cta__actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.cta__mail { color: var(--white); }
.cta .btn { font-size: 18px; padding: 18px 32px; }

.site-footer { background: var(--ink); color: var(--sage); padding: 64px 0 0; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.footer-brand { font-family: var(--font-display); font-size: 26px; color: var(--ivory); }
.footer-tag { margin: 0; font-size: 15px; line-height: 1.5; color: var(--sage); max-width: 30ch; }
.footer-social { display: flex; gap: 12px; margin-top: 4px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); color: var(--ivory); transition: background .15s ease, border-color .15s ease; }
.footer-social a:hover, .footer-social a:focus-visible { background: var(--clay); border-color: var(--clay); color: var(--white); }
.footer-heading { margin: 0; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--peach); font-weight: 600; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--sage); text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--ivory); }
.footer-links__plain { color: var(--sage); }
.footer-links--contact li { word-break: break-word; }
.footer-zones { margin: 0; font-size: 15px; line-height: 1.6; color: var(--sage); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; }
.footer-legal { color: var(--sage); }
.footer-credit { margin: 0; }
.footer-credit a { color: var(--ivory); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.footer-credit a:hover, .footer-credit a:focus-visible { color: var(--peach); }

/* ---------- Páginas internas ---------- */
.page-head { padding: 56px 0 32px; }
.page-head .container { display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: clamp(38px, 4.4vw, 60px); }

.empty { text-align: center; padding: 64px 24px; display: flex; flex-direction: column; gap: 16px; align-items: center; }

.banner {
	border-radius: var(--radius-lg);
	padding: 48px 56px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 48px;
}

.banner .btn { flex-shrink: 0; white-space: nowrap; }
.banner--dark { background: var(--forest); color: var(--ivory); }
.banner--dark h2 { color: var(--ivory); font-size: clamp(28px, 3vw, 40px); margin-bottom: 10px; }
.banner--dark p { color: var(--forest-text); font-size: 18px; }

.pagination { margin-top: 40px; }
.pagination .page-numbers { display: inline-block; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; margin: 0 4px 8px 0; text-decoration: none; color: var(--forest); font-weight: 600; }
.pagination .page-numbers.current { background: var(--forest); color: var(--ivory); border-color: var(--forest); }

.prose { font-size: 19px; line-height: 1.6; color: var(--muted); }
.prose p + p { margin-top: 1em; }
.prose--page { max-width: 820px; }
.posts { display: flex; flex-direction: column; gap: 32px; }

/* ---------- Ficha del inmueble ---------- */
.property__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 48px;
	padding-top: 40px;
	padding-bottom: 28px;
}

.crumbs { font-size: 15px; color: var(--muted-2); margin-bottom: 14px; }
.crumbs a { color: var(--muted-2); }
.property__head h1 { font-size: clamp(34px, 4vw, 56px); }
.property__price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.property__price-label { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.property__price-value { font-family: var(--font-display); font-size: clamp(30px, 3vw, 40px); color: var(--clay); font-weight: 500; }

.gallery { display: flex; flex-direction: column; gap: 16px; }

.gallery__main {
	position: relative;
	height: min(640px, 62vw);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--ink);
}

.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main img.is-portrait { object-fit: contain; }

.gallery__count {
	position: absolute;
	left: 24px;
	bottom: 24px;
	background: var(--ivory);
	color: var(--forest);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
}

.gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(247, 242, 232, 0.92);
	color: var(--forest);
	font-size: 22px;
	cursor: pointer;
}

.gallery__nav--prev { left: 16px; }
.gallery__nav--next { right: 16px; }

.gallery__thumbs { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }

.gallery__thumb {
	padding: 0;
	height: 96px;
	border: 3px solid transparent;
	border-radius: 14px;
	overflow: hidden;
	background: var(--ink);
	cursor: pointer;
	opacity: 0.75;
}

.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--clay); opacity: 1; }

.property__body {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
	gap: 72px;
	align-items: start;
	padding-top: 64px;
	padding-bottom: 72px;
}

.property__main { display: flex; flex-direction: column; gap: 48px; }
.block { display: flex; flex-direction: column; gap: 18px; }
.block h2, .rent h2 { font-size: 36px; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.fact__label { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.fact__value { font-family: var(--font-display); font-size: 26px; color: var(--forest); }

.features { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.features li { padding: 16px 0; border-top: 1px solid var(--line-2); font-size: 17px; line-height: 1.45; }

.rent { background: var(--sand); border-radius: var(--radius-lg); padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.rent > p { font-size: 18px; color: var(--muted); }
.rent__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rent__box { background: var(--white); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.rent__value { font-family: var(--font-display); font-size: 28px; color: var(--clay); }
.rent__value--dark { color: var(--forest); }

.property__side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 112px; }
.side-cta { background: var(--forest); color: var(--ivory); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.side-cta h2 { color: var(--ivory); font-size: 28px; }
.side-cta p { color: var(--forest-text); font-size: 16px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	:root { --gutter: 40px; }
	.hero__grid, .split, .about { grid-template-columns: 1fr; gap: 48px; }
	.hero__media { min-height: 420px; }
	.about__photo { height: 420px; }
	.grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.property__body { grid-template-columns: 1fr; gap: 48px; }
	.property__side { position: static; }
	.filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gallery__thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.cta__inner, .banner { flex-direction: column; align-items: flex-start; }
	.cta__actions { align-items: flex-start; }
}

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; align-items: center; }

	.site-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 20px var(--gutter) 28px;
		background: var(--ivory);
		border-bottom: 1px solid var(--line);
	}

	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; align-items: flex-start; gap: 6px; }
	.site-nav .menu a { display: block; padding: 10px 0; font-size: 19px; }
	.header-inner { min-height: 72px; }
	.brand__tag { display: none; }
	.footer-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
	.footer-col--brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
	:root { --gutter: 20px; }
	body { font-size: 16px; }
	.lead { font-size: 18px; }
	.section { padding: 56px 0; }
	.hero { padding: 40px 0 48px; }
	.hero__media { min-height: 320px; }
	.grid--3, .form-grid, .search-card, .filters, .facts, .features, .rent__grid { grid-template-columns: 1fr; }
	.section-head--row { flex-direction: column; align-items: flex-start; }
	.form-card { padding: 24px; }
	.banner { padding: 32px 24px; }
	.rent { padding: 28px 22px; }
	.property__head { flex-direction: column; align-items: flex-start; gap: 20px; }
	.property__price { align-items: flex-start; text-align: left; }
	.gallery__main { height: 300px; border-radius: 20px; }
	.gallery__thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.gallery__thumb { height: 64px; }
	.cta { padding: 48px 0; }
	.cta .btn { width: 100%; font-size: 17px; }
	.footer-grid { grid-template-columns: 1fr; gap: 32px; }
	.footer-col--brand { grid-column: auto; }
	.footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
	.btn-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.card, .btn { transition: none; }
}
