/*
Theme Name: Tamarindo Diria Real Estate
Template: twentytwentyfive
Description: Child theme for new.tamarindodiriarealestate.com – typography, buttons and hero matching the previous Luxury Presence site.
Version: 1.0.0
Text Domain: tdre
*/

/* ---------- Header overlaid on a full-bleed hero ---------- */
body.tdre-overlay-header .wp-site-blocks > header.wp-block-template-part:not(.x) {
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 20;
}
body.tdre-overlay-header .wp-site-blocks > header.wp-block-template-part > .wp-block-group {
	background: transparent !important;
	border-bottom-color: transparent !important;
	color: #fff;
}
body.tdre-overlay-header header .wp-block-site-logo img {
	filter: brightness(0) invert(1);
}
body.tdre-overlay-header header .wp-block-navigation:not(.has-modal-open) > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
body.tdre-overlay-header header .wp-block-navigation__responsive-container-open {
	color: #fff;
}
header .wp-block-navigation .wp-block-navigation__submenu-container {
	color: #000;
	background: #fff;
	border: 0;
	padding: 6px 0;
	font-size: 14px;
}
header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 8px 6px;
}

/* ---------- Buttons on dark backgrounds ---------- */
.wp-block-cover .wp-element-button,
footer .wp-element-button {
	color: #fff;
}
.wp-block-cover .wp-element-button:hover,
.wp-block-cover .wp-element-button:focus,
footer .wp-element-button:hover,
footer .wp-element-button:focus {
	background: #fff;
	color: #1a1a1a;
	border-color: #fff;
}

/* ---------- Home hero: full screen video, rotating headlines ---------- */
.tdre-hero.wp-block-cover {
	min-height: 100vh;
	min-height: 100svh;
	padding: 0 6vw 12vh;
}
.wp-block-cover.tdre-hero.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container {
	width: 100%;
	max-width: none;
}
.tdre-hero .wp-block-cover__inner-container > .tdre-slides {
	max-width: none;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.tdre-hero .tdre-slides {
	position: relative;
	width: 100%;
	min-height: 220px;
	margin: 0;
}
.tdre-hero .tdre-slide {
	position: absolute;
	left: 0;
	bottom: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	width: 100%;
	max-width: 1000px;
	animation: tdre-slide 18s infinite both;
}
.tdre-hero .tdre-slide:nth-child(2) { animation-delay: 6s; }
.tdre-hero .tdre-slide:nth-child(3) { animation-delay: 12s; }
.tdre-hero .tdre-slide h1 {
	margin: 0 0 28px;
	text-align: left;
}
/* one slide visible for 6s of an 18s cycle; slides in from the left like the original */
@keyframes tdre-slide {
	0%      { opacity: 0; visibility: visible; transform: translateX(-100px); }
	3.33%   { opacity: 1; visibility: visible; transform: translateX(0); }
	33.33%  { opacity: 1; visibility: visible; transform: translateX(0); }
	33.34%  { opacity: 0; visibility: hidden; transform: translateX(-100px); }
	100%    { opacity: 0; visibility: hidden; transform: translateX(-100px); }
}
@media (max-width: 781px) {
	.tdre-hero.wp-block-cover { padding: 0 24px 10vh; }
	.tdre-hero .tdre-slides { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
	.tdre-hero .tdre-slide { animation: none; }
	.tdre-hero .tdre-slide:first-child { opacity: 1; visibility: visible; }
}

/* ---------- Content ---------- */
.entry-content strong { font-weight: 600; }
.wp-block-media-text__content > .wp-block-heading:first-child { margin-top: 0; }

/* ---------- Image tiles (full-bleed, no gutters, heading over image) ---------- */
.tdre-tiles,
.tdre-tiles > .wp-block-columns {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	gap: 0 !important;
}
.tdre-tiles .wp-block-column { flex-basis: 0; flex-grow: 1; }
.tdre-tiles .wp-block-cover { height: 100%; padding: 24px; }
.tdre-tiles .wp-block-cover .wp-block-heading { font-size: clamp(18px, 1.8vw, 24px); margin: 0; }
.tdre-tiles .wp-block-cover .wp-block-heading a { text-decoration: none; }
.tdre-tiles .wp-block-cover__image-background { transition: transform .6s ease; }
.tdre-tiles .wp-block-cover:hover .wp-block-cover__image-background { transform: scale(1.04); }
.tdre-tiles + .tdre-tiles { margin-top: 0 !important; }

/* ---------- Header: hides on scroll down, comes back on scroll up ---------- */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	transition: transform .35s ease;
}
body.tdre-header-hidden .wp-site-blocks > header.wp-block-template-part {
	transform: translateY(-110%);
}
/* over a hero the header sits absolute; once pinned it becomes a fixed white bar */
body.tdre-overlay-header.tdre-header-pinned .wp-site-blocks > header.wp-block-template-part:not(.x) {
	position: fixed;
	animation: tdre-drop .35s ease;
}
body.tdre-overlay-header.tdre-header-pinned .wp-site-blocks > header.wp-block-template-part > .wp-block-group {
	background: #fff !important;
	color: #000;
	box-shadow: 0 1px 12px rgba(0,0,0,.08);
}
body.tdre-overlay-header.tdre-header-pinned header .wp-block-site-logo img { filter: none; }
body.tdre-overlay-header.tdre-header-pinned header .wp-block-navigation .wp-block-navigation-item__content,
body.tdre-overlay-header.tdre-header-pinned header .wp-block-navigation__responsive-container-open { color: #000; }
@keyframes tdre-drop { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* ---------- Footer (white, as on the previous site) ---------- */
.tdre-footer { color: #000; }
.tdre-footer h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 0 0 24px; }
.tdre-footer .wp-social-link {
	background: transparent !important;
	color: #000 !important;
	border: 1px solid #000;
	padding: 9px;
}
.tdre-footer .wp-social-link svg { width: 14px; height: 14px; }
.tdre-footer .wp-element-button { color: #1a1a1a; }
.tdre-footer .wp-element-button:hover { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.tdre-footer .tdre-badges img { height: 44px; width: auto; }
.tdre-footer-legal a { text-decoration: none; }
.tdre-newsletter { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.tdre-newsletter input[type=email] {
	font: inherit; width: 100%; border: 0; border-bottom: 1px solid #000; border-radius: 0;
	padding: 6px 2px; background: transparent; outline: none; font-size: 16px;
}
.tdre-newsletter__consent { display: flex; gap: 10px; font-size: 12px; line-height: 1.35; text-align: justify; letter-spacing: .5px; }
.tdre-newsletter__consent input { margin-top: 2px; flex: none; }
.tdre-newsletter__msg { margin: 0; font-size: 15px; }
.tdre-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
