/* EnérXico Solar — estilos del tema */

:root {
	--ex-radius: var(--wp--custom--radius, 14px);
	--ex-shadow: var(--wp--custom--shadow, 0 12px 32px -14px rgba(10, 58, 30, .35));
	--ex-wa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='black' d='M16 3a13 13 0 0 0-11.2 19.6L3 29l6.6-1.7A13 13 0 1 0 16 3Zm5.9 15.7c-.3-.2-1.9-1-2.2-1-.3-.2-.5-.2-.7.1l-1 1.3c-.2.2-.4.2-.7.1a8.8 8.8 0 0 1-4.4-3.8c-.3-.6.3-.5 1-1.7.1-.2 0-.4 0-.6l-1-2.4c-.3-.6-.5-.5-.7-.5h-.6c-.2 0-.6 0-.9.4-.3.3-1.1 1.1-1.1 2.7s1.2 3.2 1.3 3.4c.2.2 2.3 3.5 5.6 4.9 2.1.9 2.9 1 4 .8.6-.1 1.9-.8 2.2-1.5.3-.8.3-1.4.2-1.5l-.6-.4Z'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
.wp-site-blocks > * { margin-block-start: 0; }
[id] { scroll-margin-top: 110px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }

/* ---------- Encabezado ---------- */
.ex-sticky { position: sticky; top: 0; z-index: 50; }
.admin-bar .ex-sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar .ex-sticky { top: 0; } }
.ex-topbar p { margin: 0; letter-spacing: .01em; }
.ex-topbar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ex-header { border-bottom: 1px solid var(--wp--preset--color--border); background: rgba(255,255,255,.96) !important; backdrop-filter: saturate(1.4) blur(10px); }
.ex-logo { margin: 0; }
.ex-logo img { display: block; }
.ex-header .wp-block-navigation a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.ex-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }
@media (max-width: 960px) { .ex-header-cta { display: none; } }
@media (max-width: 600px) {
	.ex-logo img { width: 140px !important; }
	.ex-topbar p { font-size: .78rem !important; }
}

/* ---------- Utilidades ---------- */
.ex-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: .8rem !important;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rojo);
	margin-bottom: .4rem;
}
.ex-eyebrow--light { color: #fff; opacity: .92; }
.ex-section-head { margin-bottom: var(--wp--preset--spacing--50); }
.ex-section-head h2 { margin-top: 0; }
.ex-hl { color: var(--wp--preset--color--rojo); white-space: nowrap; }
.ex-tag {
	display: inline-block; align-self: flex-start;
	padding: .25rem .7rem; border-radius: 999px;
	background: rgba(14, 138, 43, .1);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 700; font-size: .75rem !important;
}
.ex-grid { gap: var(--wp--preset--spacing--40) !important; }
.ex-soft { color: #BFD6C6; }

/* ---------- Botones ---------- */
.wp-block-button__link { transition: background-color .2s, color .2s, transform .2s, box-shadow .2s; }
.wp-block-button__link:hover { transform: translateY(-2px); }
.ex-wa .wp-block-button__link {
	display: inline-flex; align-items: center; gap: .55rem;
	box-shadow: 0 10px 24px -10px rgba(227, 20, 27, .65);
}
.ex-wa .wp-block-button__link::before {
	content: ""; width: 1.2em; height: 1.2em; flex: none;
	background: currentColor;
	-webkit-mask: var(--ex-wa-icon) center / contain no-repeat;
	mask: var(--ex-wa-icon) center / contain no-repeat;
}
.ex-btn-lg .wp-block-button__link { font-size: 1.1rem; padding: 1.05rem 1.9rem; }
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-dark);
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--primary); color: #fff; }
.ex-btn-light.is-style-outline > .wp-block-button__link { border-color: rgba(255,255,255,.8); color: #fff; }
.ex-btn-light.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--primary-dark); }
.ex-btn-lg .wp-block-button__link, .ex-btn-light .wp-block-button__link { padding-top: 1.05rem; padding-bottom: 1.05rem; }

/* ---------- Hero ---------- */
.ex-hero { padding-top: var(--wp--preset--spacing--60) !important; padding-bottom: var(--wp--preset--spacing--60) !important; }
.ex-hero .wp-block-cover__image-background { object-position: 60% 50%; }
.ex-hero::after, .ex-closing::after {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.ex-hero::after { background: linear-gradient(90deg, rgba(6, 34, 17, .92) 0%, rgba(6, 34, 17, .78) 45%, rgba(6, 34, 17, .2) 100%); }
.ex-closing::after { background: radial-gradient(ellipse at 50% 60%, rgba(6, 24, 12, .62), rgba(6, 24, 12, .25) 75%); }
.ex-closing h2, .ex-closing .ex-hero-sub { text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.ex-hero .wp-block-cover__inner-container, .ex-closing .wp-block-cover__inner-container { position: relative; z-index: 1; }
.ex-hero h1 { margin-top: .3rem; color: #fff; }
.ex-hero .ex-hl, .ex-closing .ex-hl { color: #FF4A4F; }
.ex-hero-sub { color: #E3EEE6; max-width: 36rem; }
.ex-closing .ex-hero-sub { margin-inline: auto; }
.ex-checks { list-style: none; padding: 0; margin-top: var(--wp--preset--spacing--40); display: grid; gap: .45rem; color: var(--wp--preset--color--muted); }
.ex-checks--light { color: #E3EEE6; }
.ex-checks li { position: relative; padding-left: 1.75rem; }
.ex-checks li::before {
	content: ""; position: absolute; left: 0; top: .2em;
	width: 1.15rem; height: 1.15rem; border-radius: 50%;
	background: var(--wp--preset--color--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.ex-checks--light li::before { background-color: #1DB04A; }
@media (max-width: 781px) {
	.ex-hero { min-height: 0 !important; }
	.ex-hero::after { background: linear-gradient(180deg, rgba(6, 34, 17, .78), rgba(6, 34, 17, .92)); }
	.ex-hero .wp-block-buttons .wp-block-button { width: 100%; }
	.ex-hero .wp-block-buttons .wp-block-button__link { width: 100%; justify-content: center; }
}

/* ---------- Franja de confianza ---------- */
.ex-trust .wp-block-columns { gap: var(--wp--preset--spacing--40); }
.ex-trust .wp-block-column { border-left: 3px solid var(--wp--preset--color--rojo); padding-left: 1rem; }
.ex-trust__title { font-family: var(--wp--preset--font-family--heading); font-weight: 800; margin: 0; font-size: 1.05rem; }
.ex-trust__sub { margin: .15rem 0 0; color: #BFD6C6; }
@media (max-width: 781px) { .ex-trust .wp-block-columns { display: grid !important; grid-template-columns: 1fr 1fr; } }

/* ---------- Problema / bloques de tarifa ---------- */
.ex-tiers { display: grid; gap: .8rem; }
.ex-tier {
	display: flex; align-items: center; gap: 1.2rem;
	background: #fff; border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--ex-radius); padding: 1.1rem 1.4rem;
}
.ex-tier p { margin: 0; }
.ex-tier__price { font: 800 2rem/1 var(--wp--preset--font-family--heading); color: var(--wp--preset--color--primary); min-width: 7.5rem; }
.ex-tier__price small { font-size: .85rem; font-weight: 600; color: var(--wp--preset--color--muted); }
.ex-tier__label { color: var(--wp--preset--color--muted); font-size: .95rem; line-height: 1.4; }
.ex-tier__label strong { color: var(--wp--preset--color--contrast); }
.ex-tier--3 { background: #FFF1F1; border-color: #FFC9CB; transform: scale(1.03); box-shadow: var(--ex-shadow); }
.ex-tier--3 .ex-tier__price { color: var(--wp--preset--color--rojo); font-size: 2.6rem; }
.ex-tier__note { color: var(--wp--preset--color--muted); margin: .3rem 0 0 !important; font-size: .75rem !important; }

/* ---------- Tarjetas de servicio ---------- */
.ex-card {
	position: relative;
	background: #fff; border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--ex-radius); padding: 1.6rem;
	display: flex !important; flex-direction: column; gap: .6rem;
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.ex-card:hover { transform: translateY(-4px); box-shadow: var(--ex-shadow); border-color: transparent; }
.ex-card h3, .ex-card p { margin: 0; }
.ex-card.is-featured { border: 2px solid var(--wp--preset--color--primary); }
.ex-card.is-featured::before {
	content: "Más pedido"; position: absolute; top: -12px; right: 16px;
	background: var(--wp--preset--color--rojo); color: #fff;
	font: 700 .72rem var(--wp--preset--font-family--heading); letter-spacing: .06em; text-transform: uppercase;
	padding: .3rem .7rem; border-radius: 999px;
}
.ex-card__cta { margin-top: auto !important; padding-top: .6rem; }
.ex-card__cta a { font-weight: 800; color: var(--wp--preset--color--rojo); text-decoration: none; font-family: var(--wp--preset--font-family--heading); }
.ex-card__cta a:hover { text-decoration: underline; }
.ex-icon {
	display: inline-grid; place-items: center;
	width: 3rem; height: 3rem; border-radius: 12px;
	background: var(--wp--preset--color--primary); color: #fff;
}

/* ---------- Calculadora ---------- */
.ex-calc {
	background: linear-gradient(160deg, var(--wp--preset--color--primary-dark), #0E5427);
	color: #fff; border-radius: 22px;
	padding: clamp(1.4rem, 4vw, 2.4rem);
	box-shadow: var(--ex-shadow);
}
.ex-calc__fields { display: grid; gap: 1.1rem; }
.ex-calc__field { display: grid; gap: .45rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.ex-calc__field > span, .ex-calc__field legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: .45rem; }
.ex-calc input[type="number"] {
	width: 100%; box-sizing: border-box;
	font: 700 1.5rem/1.2 var(--wp--preset--font-family--heading);
	padding: .85rem 1rem; border-radius: 12px;
	border: 2px solid transparent; background: #fff; color: var(--wp--preset--color--contrast);
}
.ex-calc input[type="number"]:focus { outline: none; border-color: #FF4A4F; }
.ex-calc input[aria-invalid="true"] { border-color: #FF4A4F; }
.ex-calc__tarifa { display: flex !important; flex-wrap: wrap; gap: .6rem; }
.ex-calc__tarifa legend { width: 100%; }
.ex-calc__tarifa label { flex: 1 1 9rem; cursor: pointer; }
.ex-calc__tarifa input { position: absolute; opacity: 0; pointer-events: none; }
.ex-calc__tarifa span { display: block; text-align: center; padding: .75rem 1rem; border-radius: 12px; border: 2px solid rgba(255,255,255,.25); font-weight: 600; transition: all .2s; }
.ex-calc__tarifa input:checked + span { background: #fff; border-color: #fff; color: var(--wp--preset--color--primary-dark); }
.ex-calc__tarifa input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.ex-calc__btn, .ex-calc__wa {
	display: flex; align-items: center; justify-content: center; gap: .55rem;
	width: 100%; box-sizing: border-box; text-align: center;
	font: 800 1.05rem var(--wp--preset--font-family--heading);
	padding: 1rem; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--wp--preset--color--rojo); color: #fff;
	text-decoration: none; transition: transform .2s, background-color .2s;
}
.ex-calc__btn:hover, .ex-calc__wa:hover { transform: translateY(-1px); background: var(--wp--preset--color--rojo-dark); color: #fff; }
.ex-calc__wa::before { content: ""; width: 1.25em; height: 1.25em; background: currentColor; -webkit-mask: var(--ex-wa-icon) center / contain no-repeat; mask: var(--ex-wa-icon) center / contain no-repeat; }
.ex-calc__wa { animation: ex-pulse 2.2s ease-out 1s 3; }
@keyframes ex-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 74, 79, .6); } 100% { box-shadow: 0 0 0 16px rgba(255, 74, 79, 0); } }
.ex-calc__result { margin-top: 1.6rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.18); }
.ex-calc__kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.ex-calc__kpi { background: rgba(255,255,255,.08); border-radius: 14px; padding: 1rem; }
.ex-calc__kpi--main { grid-column: 1 / -1; background: #fff; color: var(--wp--preset--color--primary-dark); }
.ex-calc__kpi small { display: block; color: #BFD6C6; font-size: .82rem; margin-bottom: .2rem; }
.ex-calc__kpi--main small { color: var(--wp--preset--color--muted); }
.ex-calc__kpi strong { font: 800 1.3rem/1.2 var(--wp--preset--font-family--heading); }
.ex-calc__kpi--main strong { font-size: clamp(2.1rem, 5vw, 2.8rem); color: var(--wp--preset--color--primary); }
.ex-calc__note { font-size: .78rem; color: #BFD6C6; margin: 1rem 0; line-height: 1.5; }

/* ---------- Proyectos ---------- */
.ex-split-head { margin-bottom: var(--wp--preset--spacing--50); gap: 1.5rem; }
.ex-split-head h2 { margin: 0; max-width: 34rem; }
.ex-gallery { gap: .8rem !important; }
.ex-gallery .wp-block-image { border-radius: var(--ex-radius); overflow: hidden; aspect-ratio: 4 / 5; }
.ex-gallery .wp-block-image img { width: 100%; height: 100% !important; object-fit: cover; transition: transform .5s; }
.ex-gallery .wp-block-image:hover img { transform: scale(1.05); }
@media (max-width: 600px) {
	.ex-gallery { display: grid !important; grid-template-columns: 1fr 1fr; }
	.ex-gallery .wp-block-image { width: auto !important; }
	.ex-gallery .wp-block-image:nth-child(9) { display: none; }
}

/* ---------- Proceso ---------- */
.ex-photo { margin: 0; }
.ex-photo img { border-radius: 22px; box-shadow: var(--ex-shadow); width: 100%; aspect-ratio: 9 / 11; object-fit: cover; }
.ex-steps { display: grid; gap: 1.1rem; margin: var(--wp--preset--spacing--40) 0; }
.ex-step { display: flex !important; gap: 1rem; align-items: flex-start; }
.ex-step h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.ex-step p { margin: 0; }
.ex-step__num {
	flex: none; display: grid !important; place-items: center;
	width: 2.4rem; height: 2.4rem; border-radius: 50%;
	background: var(--wp--preset--color--rojo); color: #fff;
	font: 800 1.05rem var(--wp--preset--font-family--heading);
	margin: 0 !important;
}

/* ---------- Por qué ---------- */
.ex-why__item { background: #fff; border-radius: var(--ex-radius); padding: 1.5rem; border-top: 4px solid var(--wp--preset--color--primary); }
.ex-why__item h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.ex-why__item p { margin: 0; }

/* ---------- Preguntas ---------- */
.ex-faq .wp-block-details summary {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700; font-size: 1.05rem; cursor: pointer;
	list-style: none; position: relative; padding-right: 2.2rem;
	color: var(--wp--preset--color--primary-dark);
}
.ex-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.ex-faq .wp-block-details summary::after {
	content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
	width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
	background: rgba(14,138,43,.1); color: var(--wp--preset--color--primary); font-weight: 700;
}
.ex-faq .wp-block-details[open] summary::after { content: "–"; }
.ex-faq .wp-block-details p { margin: .7rem 0 0; }
.ex-faq-cta { margin-top: var(--wp--preset--spacing--50); gap: 1rem; text-align: center; }
.ex-faq-cta p { margin: 0; font-weight: 600; }

/* ---------- Cierre ---------- */
.ex-closing h2 { color: #fff; }

/* ---------- Pie ---------- */
.ex-footer a { text-decoration: none; color: #fff; }
.ex-footer a:hover { text-decoration: underline; }
.ex-foot-title { color: #fff !important; font-size: .9rem !important; letter-spacing: .1em; text-transform: uppercase; }
.ex-footer-list { list-style: none; padding: 0; display: grid; gap: .5rem; color: #BFD6C6; }
.ex-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.ex-badges span { border: 1px solid #2D6A42; border-radius: 999px; padding: .2rem .7rem; font-size: .75rem; color: #E6F2EA; }
.ex-footer-bottom { border-top: 1px solid #1F5634; margin-top: var(--wp--preset--spacing--50); padding-top: var(--wp--preset--spacing--30); }
.ex-copy { font-size: .875rem; color: #BFD6C6; margin: 0; }

/* ---------- WhatsApp flotante / barra móvil ---------- */
.ex-wa-float {
	position: fixed; right: 20px; bottom: 20px; z-index: 99;
	display: inline-flex; align-items: center; gap: .55rem;
	background: #25D366; color: #fff !important; text-decoration: none;
	padding: .8rem 1.2rem .8rem .9rem; border-radius: 999px;
	font: 700 .95rem var(--wp--preset--font-family--heading);
	box-shadow: 0 12px 28px -8px rgba(0,0,0,.4);
	transition: transform .2s;
}
.ex-wa-float:hover { transform: translateY(-2px) scale(1.02); }
.ex-mobile-bar { display: none; }
@media (max-width: 781px) {
	.ex-wa-float { display: none; }
	.ex-mobile-bar {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99;
		gap: .5rem; padding: .6rem .7rem calc(.6rem + env(safe-area-inset-bottom));
		background: rgba(255,255,255,.97); box-shadow: 0 -6px 20px rgba(0,0,0,.12);
	}
	.ex-mobile-bar a {
		display: flex; align-items: center; justify-content: center; gap: .5rem;
		border-radius: 999px; text-decoration: none;
		font: 800 1rem var(--wp--preset--font-family--heading); padding: .85rem 1rem;
	}
	.ex-mobile-bar__wa { flex: 1; background: #25D366; color: #fff; }
	.ex-mobile-bar__tel { width: 3.2rem; flex: none; background: var(--wp--preset--color--primary-dark); color: #fff; padding: 0 !important; }
	body { padding-bottom: 76px; }
}
.ex-wa-inline { font-weight: 700; color: var(--wp--preset--color--rojo); }

/* ---------- Blog ---------- */
.wp-block-post-template .ex-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--primary-dark); }
.ex-cta { border-radius: 22px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}

/* Ajustes de encabezado en celular: la barra inferior ya tiene WhatsApp y llamada */
@media (max-width: 960px) { .ex-header .ex-header-cta { display: none !important; } }
@media (max-width: 781px) { .ex-topbar { display: none !important; } }
