/* =============================================================================
   HyperApp Theme — theme.css
   Complementa theme.json. No duplica variables ya generadas por WordPress.
   ============================================================================= */

/* ── Base Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

img, video { max-width: 100%; height: auto; }

/* ── Custom Properties (design tokens no gestionados por theme.json) ─────────── */
:root {
	--ha-shadow-ambient : 0 12px 40px rgba(25, 28, 30, 0.06);
	--ha-shadow-card    : 0 4px 20px rgba(25, 28, 30, 0.08);
	--ha-shadow-cyan    : 0 4px 20px rgba(0, 175, 239, 0.25);
	--ha-radius-card    : 1.25rem;
	--ha-radius-pill    : 9999px;
	--ha-header-h       : 4.5rem;
	--ha-transition     : 0.25s ease;
}

/* ── Site Header ─────────────────────────────────────────────────────────────── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(248, 249, 252, 0.88);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-bottom: 1px solid rgba(25, 28, 30, 0.06);
	transition: box-shadow var(--ha-transition);
}
.site-header.is-scrolled {
	box-shadow: 0 2px 20px rgba(25, 28, 30, 0.08);
}
.site-header__inner {
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: 2rem;
}

/* Navigation links */
.site-primary-nav .wp-block-navigation-item__content {
	color: #3e4850;
	font-weight: 600;
	font-size: 0.875rem;
	transition: color var(--ha-transition);
	text-decoration: none;
}
.site-primary-nav .wp-block-navigation-item__content:hover {
	color: #00658c;
}

/* ── Hero Section ────────────────────────────────────────────────────────────── */
.section-hero {
	background: #f8f9fc;
}
.hero-h1 em {
	font-style: normal;
	color: #00AFEF;
}
.hero-image-wrapper {
	border-radius: 2.5rem;
	overflow: hidden;
	position: relative;
}
.hero-stat-badge {
	position: absolute;
	bottom: 1.5rem;
	left: -1.5rem;
	background: #fff;
	border-radius: 1.25rem;
	padding: 1.25rem;
	box-shadow: var(--ha-shadow-card);
	max-width: 200px;
}
@media (max-width: 768px) {
	.hero-stat-badge { display: none; }
	.hero-image-col  { display: none; }
}

/* ── Overline Labels ─────────────────────────────────────────────────────────── */
.overline-label {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* ── Counters ────────────────────────────────────────────────────────────────── */
.section-counters {
	border-top: 1px solid #eceef1;
	border-bottom: 1px solid #eceef1;
}
.counters-grid .counter-item:last-child {
	border-right: none !important;
}
@media (max-width: 640px) {
	.counters-grid .counter-item {
		border-right: none !important;
		border-bottom: 1px solid #eceef1;
	}
}

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card,
.problem-card .wp-block-group,
.bento-card {
	transition: transform var(--ha-transition), box-shadow var(--ha-transition);
}
.card:hover,
.problem-card .wp-block-group:hover {
	transform: translateY(-3px);
	box-shadow: var(--ha-shadow-card);
}

/* ── Bento Grid ──────────────────────────────────────────────────────────────── */
.bento-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1.5rem;
}
.bento-card:nth-child(1) { grid-column: span 4; }
.bento-card:nth-child(2) { grid-column: span 2; }
.bento-card:nth-child(3),
.bento-card:nth-child(4),
.bento-card:nth-child(5) { grid-column: span 2; }

@media (max-width: 900px) {
	.bento-grid { grid-template-columns: 1fr 1fr; }
	.bento-card:nth-child(1) { grid-column: span 2; }
	.bento-card:nth-child(n) { grid-column: span 1; }
}
@media (max-width: 560px) {
	.bento-grid { grid-template-columns: 1fr; }
	.bento-card:nth-child(n) { grid-column: span 1; }
}

/* Bento featured card */
.bento-card--featured {
	min-height: 280px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	position: relative;
	overflow: hidden;
}
.bento-card--featured::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Methodology Section ─────────────────────────────────────────────────────── */
.section-methodology {
	background: #191c1e;
}
.methodology-steps .methodology-step {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}
.step-number {
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	background: rgba(0, 175, 239, 0.15);
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.methodology-image img {
	border-radius: 2.5rem;
	filter: grayscale(40%) contrast(1.1);
}

/* ── Partners ────────────────────────────────────────────────────────────────── */
.section-partners {
	border-top: 1px solid #eceef1;
}
.partners-logos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 3.5rem;
	opacity: 0.45;
}
.partner-logo img {
	max-height: 40px;
	width: auto;
	object-fit: contain;
	filter: grayscale(100%);
}

/* ── CTA Consulta Pattern ────────────────────────────────────────────────────── */
.section-cta-consulta {
	background: linear-gradient(135deg, #00658c 0%, #00AFEF 100%);
}

/* CTA Form */
.ha-cta-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.ha-form-field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}
.ha-form-label {
	font-size: 0.75rem;
	font-weight: 600;
	color: #5c5f61;
	letter-spacing: 0.02em;
}
.ha-form-input {
	background: #f2f4f7;
	border: 2px solid transparent;
	border-radius: 10px;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	font-family: inherit;
	color: #191c1e;
	transition: border-color 0.15s ease, background 0.15s ease;
	outline: none;
	width: 100%;
}
.ha-form-input:focus {
	border-color: #00658c;
	background: #fff;
}
.ha-form-input::placeholder { color: #bdc8d1; }
.ha-form-select { cursor: pointer; appearance: none; }
.ha-form-submit {
	margin-top: 0.5rem;
	background: linear-gradient(135deg, #00658c 0%, #00AFEF 100%);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 0.9375rem 1.75rem;
	font-size: 0.9375rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	transition: filter var(--ha-transition), transform 0.15s ease;
	width: 100%;
}
.ha-form-submit:hover  { filter: brightness(1.08); }
.ha-form-submit:active { transform: scale(0.98); }
.ha-form-disclaimer {
	font-size: 0.75rem;
	color: #6e7881;
	text-align: center;
	line-height: 1.5;
	margin: 0;
}
.ha-form-disclaimer a {
	color: #00658c;
	text-decoration: underline;
}
.cta-benefits {
	list-style: none;
	padding-left: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.cta-benefits li {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

/* ── Blog / Archive ──────────────────────────────────────────────────────────── */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}
.post-card {
	background: #fff;
	border-radius: var(--ha-radius-card);
	overflow: hidden;
	box-shadow: var(--ha-shadow-ambient);
	transition: transform var(--ha-transition), box-shadow var(--ha-transition);
}
.post-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ha-shadow-card);
}

/* ── Single Post ─────────────────────────────────────────────────────────────── */
.single-post .post-hero {
	background: #f2f4f7;
}
.wp-block-post-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: #3e4850;
}
.wp-block-post-content h2 {
	font-size: 1.625rem;
	font-weight: 700;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}
.wp-block-post-content h3 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}
.wp-block-post-content p  { margin-bottom: 1.5rem; }
.wp-block-post-content ul,
.wp-block-post-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.wp-block-post-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.wp-block-post-content a  { color: #00658c; text-decoration: underline; text-underline-offset: 3px; }
.wp-block-post-content a:hover { color: #00AFEF; }
.wp-block-post-content blockquote {
	border-left: 4px solid #00AFEF;
	padding: 1rem 1.5rem;
	margin: 2rem 0;
	background: #f2f4f7;
	border-radius: 0 12px 12px 0;
	font-style: italic;
	color: #5c5f61;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
	background: #191c1e;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 3rem;
}
@media (max-width: 900px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.footer-grid { grid-template-columns: 1fr; }
}
.footer-divider {
	border: none;
	height: 1px;
	background: rgba(255,255,255,0.08);
	margin: 0;
}
.site-footer .wp-block-social-link a {
	background: rgba(255,255,255,0.1) !important;
	border-radius: 9999px;
	transition: background var(--ha-transition);
}
.site-footer .wp-block-social-link a:hover {
	background: rgba(0,175,239,0.25) !important;
}
.site-footer .wp-block-navigation-item__content {
	color: rgba(239,241,244,0.7);
	text-decoration: none;
	font-size: 0.875rem;
	transition: color var(--ha-transition);
}
.site-footer .wp-block-navigation-item__content:hover {
	color: #00AFEF;
}

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}

/* Skip to content */
.skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 9999;
	background: #00658c;
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: 0 0 8px 8px;
	font-weight: 700;
	text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Buttons (complemento al theme.json) ─────────────────────────────────────── */
.wp-element-button,
.wp-block-button__link {
	font-family: 'Manrope', sans-serif;
	letter-spacing: 0.01em;
	transition: filter var(--ha-transition), transform 0.15s ease, background var(--ha-transition);
}
.wp-element-button:hover  { filter: brightness(1.08); }
.wp-element-button:active { transform: scale(0.97); }

/* Primary button gradient override */
.btn-hero-primary .wp-block-button__link {
	background: linear-gradient(135deg, #00658c 0%, #00AFEF 100%) !important;
	box-shadow: 0 4px 20px rgba(0, 175, 239, 0.35);
}

/* ── Responsive breakpoints ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.section-hero,
	.section-problems,
	.section-capabilities,
	.section-methodology,
	.section-partners,
	.section-cta-consulta {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
	.hero-columns { flex-direction: column; }
	.section-methodology .wp-block-columns { flex-direction: column; }
}

@media (max-width: 480px) {
	.site-header__cta .wp-block-button__link {
		padding: 0.625rem 1rem;
		font-size: 0.75rem;
	}
}

/* ── Scroll reveal (clase añadida por JS) ─────────────────────────────────────── */
.ha-reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}
.ha-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}
