/* ============================================================
   ALTHARA HOME CAPITAL — Component behaviour layer
   Design tokens live in theme.json. This file only carries what
   theme.json cannot express: interactive states, the mobile nav
   overlay, the sticky/shrinking header, the FAQ accordion icon,
   hover lifts, and the hero watermark. All values trace back to
   the design system (section 5–7 of the handoff).
   ============================================================ */

:root {
	--althara-ease: cubic-bezier(0.4, 0, 0.2, 1);
	--althara-focus-ring: 0 0 0 3px rgba(63, 131, 102, 0.32);
}

/* ---- Brand helper classes (used inside patterns) --------------------- */
.althara-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--2xs);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	margin: 0;
}

/* Display headings already inherit from theme.json; this softens tracking
   on the long hero claim so the extended caps read as in the mock. */
.althara-hero-title { letter-spacing: 0.04em; line-height: 1.05; }

/* ============================================================
   HEADER — sticky, shrinks on scroll (handoff §5 "Header")
   ============================================================ */
.wp-site-blocks > header.wp-block-template-part,
header.althara-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid var(--wp--preset--color--stone-200);
	transition: padding var(--althara-duration, 220ms) var(--althara-ease),
		box-shadow 220ms var(--althara-ease);
}
body.althara-scrolled header.wp-block-template-part,
body.althara-scrolled header.althara-header {
	box-shadow: var(--wp--preset--shadow--sm);
}
/* Shrink the vertical padding of the header group once scrolled. */
body.althara-scrolled .althara-header__bar {
	padding-top: var(--wp--preset--spacing--20) !important;
	padding-bottom: var(--wp--preset--spacing--20) !important;
}

/* Desktop nav links */
.althara-header .wp-block-navigation {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
}
.althara-header .wp-block-navigation a { color: var(--wp--preset--color--stone-800); }
.althara-header .wp-block-navigation a:hover { color: var(--wp--preset--color--green-800); }

/* ---- Mobile nav overlay (full-screen, deep green) ------------------- */
@media (max-width: 781px) {
	.althara-header .wp-block-navigation__responsive-container.is-menu-open {
		background: var(--wp--preset--color--green-900);
		padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--50);
	}
	.althara-header .wp-block-navigation__responsive-container.is-menu-open a {
		color: #fff;
		text-transform: uppercase;
		letter-spacing: 0.12em;
		font-size: var(--wp--preset--font-size--lg);
		font-weight: 600;
	}
	.althara-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-button a {
		text-transform: none;
		letter-spacing: 0;
	}
}

/* ============================================================
   HERO — deep green panel with symbol watermark (handoff §5)
   ============================================================ */
.althara-hero {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--preset--custom--radius--lg, 10px);
}
.althara-hero::after {
	content: "";
	position: absolute;
	right: -20px;
	bottom: -30px;
	width: min(46%, 420px);
	aspect-ratio: 1 / 1;
	background: var(--althara-hero-watermark) center / contain no-repeat;
	opacity: 0.06;
	pointer-events: none;
}

/* ============================================================
   CARDS — service / value cards lift on hover (handoff §5)
   ============================================================ */
.althara-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--stone-200);
	border-radius: var(--wp--preset--custom--radius--lg, 10px);
	box-shadow: var(--wp--preset--shadow--sm);
	transition: transform 220ms var(--althara-ease), box-shadow 220ms var(--althara-ease);
}
.althara-card:hover,
.althara-card:focus-within {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--lg);
}

/* Icon tile (46×46, green-50 background) */
.althara-icon-tile {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 10px;
	background: var(--wp--preset--color--green-50);
	color: var(--wp--preset--color--green-700);
}
.althara-icon-tile svg { width: 22px; height: 22px; stroke-width: 1.6; }

/* ============================================================
   BUTTONS — outline-on-dark variant + calm press (handoff §6)
   ============================================================ */
.wp-block-button.is-style-outline-on-dark .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.wp-block-button.is-style-outline-on-dark .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.7);
}
/* White button (text green) used on dark hero */
.wp-block-button.is-style-on-dark .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--green-900);
}
.wp-block-button.is-style-on-dark .wp-block-button__link:hover {
	background: var(--wp--preset--color--green-50);
	color: var(--wp--preset--color--green-900);
}
.wp-block-button .wp-block-button__link {
	transition: transform 140ms var(--althara-ease), background-color 140ms var(--althara-ease);
}
.wp-block-button .wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button .wp-block-button__link:active { transform: none; }

/* Text "Saber más →" link style */
.althara-textlink a,
a.althara-textlink {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--green-700);
}

/* ============================================================
   TRUST BAR — vertical dividers between figures (handoff §5)
   ============================================================ */
.althara-trust .wp-block-column + .wp-block-column {
	border-left: 1px solid rgba(255, 255, 255, 0.18);
}
@media (max-width: 781px) {
	.althara-trust .wp-block-column + .wp-block-column { border-left: 0; }
}

/* ============================================================
   FAQ — <details>/<summary> accordion, "+" rotates to "×"
   Implemented with core/details block. (handoff §5)
   ============================================================ */
.althara-faq .wp-block-details {
	border: 1px solid var(--wp--preset--color--stone-200);
	border-radius: 0;
	padding: 0;
	background: var(--wp--preset--color--white);
}
.althara-faq .wp-block-details + .wp-block-details { border-top: 0; }
.althara-faq .wp-block-details:first-child { border-radius: 10px 10px 0 0; }
.althara-faq .wp-block-details:last-child { border-radius: 0 0 10px 10px; }
.althara-faq summary {
	list-style: none;
	cursor: pointer;
	padding: 18px 22px;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	color: var(--wp--preset--color--green-900);
	position: relative;
	padding-right: 52px;
}
.althara-faq summary::-webkit-details-marker { display: none; }
.althara-faq summary::after {
	content: "+";
	position: absolute;
	right: 22px;
	top: 50%;
	transform: translateY(-50%) rotate(0deg);
	font-size: 20px;
	font-weight: 400;
	color: var(--wp--preset--color--green-600);
	transition: transform 220ms var(--althara-ease);
}
.althara-faq details[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
.althara-faq .wp-block-details > *:not(summary) {
	padding: 0 22px 18px;
	color: var(--wp--preset--color--stone-600);
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.7;
}

/* ============================================================
   FORMS — calm focus, brand-green active border (handoff §6)
   ============================================================ */
.althara-form input,
.althara-form textarea,
.althara-form select {
	width: 100%;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--stone-800);
	background: #fff;
	border: 1px solid var(--wp--preset--color--stone-300);
	border-radius: 6px;
	padding: 11px 14px;
	transition: border-color 140ms var(--althara-ease), box-shadow 140ms var(--althara-ease);
}
.althara-form input:focus,
.althara-form textarea:focus,
.althara-form select:focus {
	outline: none;
	border: 1.5px solid var(--wp--preset--color--green-600);
	box-shadow: var(--althara-focus-ring);
}
.althara-form label {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--green-900);
	margin-bottom: 6px;
}

/* ============================================================
   FOCUS — visible brand ring everywhere (handoff §6, A11y AA)
   ============================================================ */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
summary:focus-visible {
	outline: none;
	box-shadow: var(--althara-focus-ring);
	border-radius: 4px;
}

/* ============================================================
   MOTION — respect prefers-reduced-motion (handoff §6)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
