/* ==========================================================================
   Juan de Dios Climatización — hoja de estilos principal
   Paleta: azul corporativo + detalles en rojo (teléfono y etiquetas puntuales)
   ========================================================================== */

/* ---------- Fuente (alojada en el propio servidor: sin llamadas a Google) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/bricolage-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/bricolage-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Variables ---------- */
:root {
  --blue: #1E5BB8;        /* azul corporativo (logo) */
  --blue-dark: #174A97;
  --navy: #0F2E5C;        /* texto y fondos oscuros */
  --sky: #9FD0FF;         /* acentos sobre azul */
  --ice: #EAF3FD;         /* fondos suaves */
  --ice-2: #DCEBFB;
  --muted: #3E5A80;       /* texto secundario */
  --line: #D3E2F3;
  --red: #D7262E;         /* solo detalles: teléfono, etiquetas */
  --red-dark: #B51D24;
  --yellow: #FFD34E;
  --white: #FFFFFF;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-s: 14px;
  --radius-m: 22px;
  --radius-l: 30px;
  --radius-xl: 40px;
  --shadow: 0 18px 40px rgba(15, 46, 92, .14);
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 24px);
  --section: clamp(64px, 9vw, 104px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--navy);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { margin: 0; line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.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-link { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--ice { background: var(--ice); }
.eyebrow { display: inline-block; font-weight: 800; font-size: 14px; letter-spacing: .07em; text-transform: uppercase; color: var(--blue); }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); }
.h-xl { font-size: clamp(44px, 7vw, 84px); line-height: .94; letter-spacing: -0.04em; }
.h-l  { font-size: clamp(36px, 5vw, 60px); }
.h-m  { font-size: clamp(28px, 3.4vw, 40px); }
.h-s  { font-size: 23px; letter-spacing: -0.015em; line-height: 1.15; }
.text-sky { color: var(--sky); }
.text-blue { color: var(--blue); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 40px; }
.section-head p { max-width: 440px; color: var(--muted); font-size: 19px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-size: 18px; font-weight: 800; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; }
.btn--white { background: #fff; color: var(--navy); }
.btn--white:hover { background: var(--ice); color: var(--navy); }
.btn--ghost-light { color: #fff; border-color: var(--sky); }
.btn--ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn--ghost { color: var(--navy); border-color: var(--line); background: #fff; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); color: #fff; }
.btn--yellow { background: var(--yellow); color: var(--navy); }
.btn--yellow:hover { background: #F5C52E; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(15,46,92,.10); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: 262px; height: 49px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav__item { position: relative; }
.nav__link, .nav__toggle {
  display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 12px;
  font: inherit; font-size: 17px; font-weight: 700; color: var(--navy); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav__link:hover, .nav__toggle:hover, .nav__item:focus-within > .nav__toggle { background: var(--ice); color: var(--navy); }
.nav__link[aria-current="page"], .nav__item.is-current > .nav__toggle { color: var(--blue); }
.nav__toggle svg { width: 14px; height: 14px; transition: transform .2s; }
.submenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; list-style: none;
  background: #fff; border-radius: 18px; padding: 10px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.submenu a { display: block; padding: 11px 14px; border-radius: 10px; font-weight: 600; color: var(--navy); text-decoration: none; font-size: 16px; }
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--ice); color: var(--blue); }
@media (hover: hover) and (min-width: 1101px) {
  .nav__item:hover > .submenu { opacity: 1; visibility: visible; transform: none; }
  .nav__item:hover > .nav__toggle svg { transform: rotate(180deg); }
}
.nav__item.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
.nav__item.is-open > .nav__toggle svg { transform: rotate(180deg); }
.header-phone { margin-left: 8px; }
.menu-btn { display: none; width: 52px; height: 52px; border-radius: 14px; border: 0; background: var(--ice); color: var(--navy); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 26px; height: 26px; }

@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .header-phone { display: none; }
  .nav {
    position: fixed; inset: 84px 0 0 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 16px var(--gutter) 32px; overflow-y: auto; display: none;
  }
  .nav.is-open { display: flex; animation: nav-in .2s ease-out; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link, .nav__toggle { width: 100%; justify-content: space-between; font-size: 20px; padding: 16px 12px; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 8px 12px; display: none; min-width: 0; }
  .nav__item.is-open > .submenu { display: block; }
  .nav .header-phone--mobile { display: flex; margin-top: 20px; }
}
@media (min-width: 1101px) { .header-phone--mobile { display: none; } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 420px) { .brand img { width: 200px; height: auto; } .header-inner { min-height: 72px; } .nav { inset-block-start: 72px; } }
body.nav-open { overflow: hidden; }

/* ---------- Hero de portada ---------- */
.hero { padding-inline: var(--gutter); }
.hero__box {
  max-width: 1392px; margin: 0 auto; background: var(--blue); border-radius: var(--radius-xl);
  display: flex; flex-wrap: wrap; align-items: stretch; overflow: hidden;
}
.hero__text { flex: 1 1 520px; padding: clamp(40px, 6vw, 72px) clamp(24px, 4.5vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 26px; color: #fff; }
.hero__text .lead { color: var(--ice-2); max-width: 540px; }
.chip { align-self: flex-start; background: #fff; color: var(--blue); font-weight: 800; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.hero__media { flex: 1 1 480px; min-height: clamp(360px, 48vw, 620px); position: relative; padding: 24px 24px 24px 0; }
.hero__img { position: absolute; inset: 24px 24px 24px 0; border-radius: 28px; overflow: hidden; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.sticker {
  position: absolute; left: -36px; bottom: 56px; width: 156px; height: 156px; border-radius: 50%;
  background: var(--yellow); color: var(--navy); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transform: rotate(-10deg); box-shadow: 0 12px 28px rgba(15,46,92,.3); z-index: 2;
}
.sticker strong { font-size: 30px; line-height: 1; letter-spacing: -0.03em; }
.sticker span { font-size: 15px; font-weight: 600; line-height: 1.15; }
@media (max-width: 1040px) {
  .hero__media { padding: 0 20px 20px; min-height: 340px; }
  .hero__img { inset: 0 20px 20px 20px; }
  .sticker { left: auto; right: 34px; bottom: auto; top: -46px; width: 128px; height: 128px; }
  .sticker strong { font-size: 25px; }
}

/* ---------- Cinta de servicios ---------- */
.ribbon-wrap { padding-top: 48px; overflow: hidden; }
.ribbon { background: var(--navy); color: #fff; transform: rotate(-1.2deg); margin: 0 -40px; padding: 20px 64px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; font-size: clamp(19px, 2.3vw, 26px); font-weight: 800; }
.ribbon span[aria-hidden] { color: var(--sky); }

/* ---------- Tarjetas de sector (foto + etiqueta) ---------- */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.sector-card { position: relative; display: block; height: 420px; border-radius: var(--radius-l); overflow: hidden; text-decoration: none; background: var(--ice); }
.sector-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.sector-card:hover img { transform: scale(1.04); }
.sector-card__label {
  position: absolute; left: 16px; right: 16px; bottom: 16px; background: #fff; border-radius: 20px; padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.sector-card__label strong { display: block; font-size: 23px; color: var(--navy); line-height: 1.15; }
.sector-card__label span { font-size: 15px; color: var(--muted); }
.arrow-dot { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.arrow-dot svg { width: 20px; height: 20px; }
.sector-card__label .arrow-dot { color: #fff; font-size: inherit; }
.sector-card:hover .arrow-dot { background: var(--navy); }

/* ---------- Tarjetas con icono ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.icon-card { background: #fff; border-radius: 26px; padding: 30px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--navy); border: 1px solid transparent; transition: border-color .15s, transform .15s; }
a.icon-card:hover { border-color: var(--sky); transform: translateY(-2px); color: var(--navy); }
.icon-card p { color: var(--muted); line-height: 1.5; }
.icon-badge { width: 56px; height: 56px; border-radius: 18px; background: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.icon-badge svg { width: 28px; height: 28px; stroke: #fff; }
.section--ice .icon-card { background: #fff; }
.section:not(.section--ice) .icon-card { background: var(--ice); }

/* ---------- Bloque oscuro (averías) ---------- */
.band { padding-inline: var(--gutter); }
.band__box { max-width: var(--container); margin: 0 auto; background: var(--navy); color: #fff; border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-wrap: wrap; }
.band__text { flex: 1 1 520px; padding: clamp(36px, 6vw, 60px); display: flex; flex-direction: column; gap: 20px; }
.band__text .lead { color: #CFE0F5; }
.band__media { flex: 1 1 400px; min-height: 340px; position: relative; background: #fff; }
.band__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.btn--ghost-dark { color: #fff; border-color: #4D6E9C; }
.btn--ghost-dark:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---------- Bloque "somos de aquí" ---------- */
.split { display: flex; flex-wrap: wrap; gap: clamp(40px, 6vw, 64px); align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.tilted { position: relative; max-width: 500px; }
.tilted img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-xl); transform: rotate(-2deg); box-shadow: 0 0 0 10px var(--ice); }
.tag-red { position: absolute; right: 10%; top: -18px; background: var(--red); color: #fff; font-weight: 800; padding: 10px 18px; border-radius: 999px; transform: rotate(4deg); font-size: 17px; }
.pill-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-links a { background: var(--ice); color: var(--navy); text-decoration: none; font-weight: 800; padding: 12px 18px; border-radius: 999px; }
.pill-links a:hover { background: var(--ice-2); }

/* ---------- Cifras ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.fact { background: var(--ice); border-radius: var(--radius-m); padding: 22px 24px; }
.fact strong { display: block; font-size: 40px; line-height: 1; letter-spacing: -0.03em; color: var(--blue); }
.fact span { color: var(--muted); font-size: 16px; }

/* ---------- Cabecera de páginas interiores ---------- */
.page-hero { padding-inline: var(--gutter); }
.page-hero__box { max-width: 1392px; margin: 0 auto; background: var(--blue); color: #fff; border-radius: var(--radius-xl); display: flex; flex-wrap: wrap; overflow: hidden; }
.page-hero__text { flex: 1 1 520px; padding: clamp(36px, 5.5vw, 64px) clamp(24px, 4.5vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.page-hero__text .lead { color: var(--ice-2); max-width: 600px; }
.page-hero__media { flex: 1 1 420px; min-height: 320px; position: relative; padding: 20px 20px 20px 0; }
.page-hero__media img { position: absolute; inset: 20px 20px 20px 0; width: calc(100% - 20px); height: calc(100% - 40px); object-fit: cover; border-radius: 26px; }
@media (max-width: 1000px) { .page-hero__media { padding: 0 16px 16px; min-height: 260px; } .page-hero__media img { inset: 0 16px 16px 16px; width: calc(100% - 32px); height: calc(100% - 16px); } }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: 15px; font-weight: 600; color: var(--ice-2); }
.breadcrumb a { color: #fff; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--sky); }

/* ---------- Contenido de texto ---------- */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 48px; }
.prose h3 { font-size: 24px; margin-top: 32px; letter-spacing: -0.02em; }
.prose p, .prose li { color: #24406A; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--navy); }
.prose--legal { font-size: 16px; }
.prose--legal h2 { font-size: 26px; }

.check-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.check-list li::before {
  content: ""; flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  background: var(--blue) 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 15px no-repeat;
}

/* ---------- Bloques de catálogo (doméstico / industria) ---------- */
.catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.catalog__card { background: var(--ice); border-radius: var(--radius-m); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.catalog__card h3 { font-size: 24px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; }
.catalog__card h3 .icon-badge { width: 44px; height: 44px; border-radius: 14px; }
.catalog__card h3 .icon-badge svg { width: 22px; height: 22px; }
.catalog__card ul { list-style: none; display: grid; gap: 8px; }
.catalog__card li { background: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 16px; }
.catalog__card li small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; }

/* ---------- Servicios (página larga) ---------- */
.service-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.service-nav a { background: #fff; border: 2px solid var(--line); color: var(--navy); text-decoration: none; font-weight: 700; padding: 10px 16px; border-radius: 999px; font-size: 16px; }
.service-nav a:hover { border-color: var(--blue); color: var(--blue); }
.service { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 56px); align-items: center; padding-block: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.service:first-of-type { border-top: 0; }
.service__text { flex: 1 1 460px; min-width: 0; }
.service__media { flex: 1 1 360px; min-width: 0; }
.service__media img { width: 100%; border-radius: var(--radius-l); background: var(--ice); }
.service__media img.contain { object-fit: contain; padding: 18px; background: #fff; border: 1px solid var(--line); }
.service:nth-of-type(even) .service__media { order: -1; }
@media (max-width: 860px) { .service:nth-of-type(even) .service__media { order: 0; } }

/* ---------- Referencias ---------- */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ref { background: var(--ice); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.ref span { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ref strong { font-size: 19px; line-height: 1.2; }
.ref__logo { background: #fff; border-radius: 12px; height: 112px; display: flex; align-items: center; justify-content: center; padding: 14px; margin-bottom: 10px; }
.ref__logo img { max-height: 84px; max-width: 100%; width: auto; object-fit: contain; }
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; list-style: none; }
.projects li { background: var(--navy); color: #fff; border-radius: 18px; padding: 22px; font-weight: 800; font-size: 21px; line-height: 1.2; }
.projects li small { display: block; color: var(--sky); font-size: 14px; font-weight: 600; margin-top: 4px; letter-spacing: .02em; }

/* ---------- Consejos ---------- */
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; counter-reset: tip; }
.tip { background: var(--ice); border-radius: var(--radius-m); padding: 28px; display: flex; flex-direction: column; gap: 10px; counter-increment: tip; }
.tip::before { content: counter(tip, decimal-leading-zero); font-weight: 800; font-size: 15px; color: var(--blue); background: #fff; align-self: flex-start; padding: 4px 10px; border-radius: 999px; }
.tip h3 { font-size: 23px; letter-spacing: -0.02em; line-height: 1.15; }
.tip p { color: var(--muted); }

.temp-tool { background: var(--navy); color: #fff; border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 52px); display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.temp-tool > div { flex: 1 1 360px; }
.temp-tool .lead { color: #CFE0F5; }
.temp-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.temp-options button { font: inherit; font-weight: 800; font-size: 17px; padding: 12px 18px; border-radius: 999px; border: 2px solid #4D6E9C; background: transparent; color: #fff; cursor: pointer; }
.temp-options button[aria-pressed="true"] { background: #fff; color: var(--navy); border-color: #fff; }
.temp-result { background: var(--blue); border-radius: var(--radius-l); padding: 28px; display: grid; gap: 14px; }
.temp-result__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 12px; }
.temp-result__row:last-child { border-bottom: 0; padding-bottom: 0; }
.temp-result__row strong { font-size: 40px; letter-spacing: -0.03em; line-height: 1; }
.temp-result__note { font-size: 15px; color: var(--ice-2); }

/* ---------- Noticias ---------- */
.news { display: grid; gap: 16px; }
.news-item { background: var(--ice); border-radius: var(--radius-m); overflow: hidden; }
.news-item summary { list-style: none; cursor: pointer; padding: 26px 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; align-items: center; }
.news-item summary::-webkit-details-marker { display: none; }
.news-item summary h3 { font-size: 23px; letter-spacing: -0.02em; line-height: 1.2; flex: 1 1 420px; }
.news-item summary time { font-size: 15px; font-weight: 700; color: var(--muted); }
.news-item summary .plus { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; transition: transform .2s; }
.news-item[open] summary .plus { transform: rotate(45deg); }
.news-item__body { padding: 0 28px 28px; display: flex; flex-wrap: wrap; gap: 28px; }
.news-item__body .prose { flex: 1 1 480px; font-size: 17px; }
.news-item__body img { flex: 0 1 320px; border-radius: 18px; align-self: flex-start; }

/* ---------- Formularios ---------- */
.form { background: #fff; border-radius: var(--radius-l); padding: clamp(24px, 4vw, 36px); display: grid; gap: 16px; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 17px; font-weight: 400; color: var(--navy); padding: 13px 15px; border: 2px solid var(--line); border-radius: 12px; background: #fff; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,91,184,.15); }
.field .hint { font-weight: 500; color: var(--muted); font-size: 14px; }
.field [aria-invalid="true"] { border-color: var(--red); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 500; color: var(--muted); line-height: 1.45; }
.consent input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; padding: 14px 16px; border-radius: 12px; font-weight: 700; }
.form-status.is-ok { display: block; background: #E3F5E8; color: #14532D; }
.form-status.is-error { display: block; background: #FDE7E8; color: #8A1219; }
.legal-small { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ---------- Contacto / mapa ---------- */
.contact-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.contact-grid > * { flex: 1 1 420px; min-width: 0; }
.contact-list { list-style: none; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon-badge { width: 46px; height: 46px; border-radius: 14px; }
.contact-list .icon-badge svg { width: 22px; height: 22px; }
.contact-list strong { display: block; font-size: 15px; color: var(--muted); font-weight: 700; }
.contact-list a, .contact-list p { font-size: 19px; font-weight: 700; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.contact-list li > span { min-width: 0; }
.contact-list a:hover { color: var(--blue); }
.map { position: relative; border-radius: var(--radius-l); overflow: hidden; background: var(--ice); min-height: 340px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__placeholder { display: flex; flex-direction: column; gap: 14px; align-items: center; max-width: 380px; }
.map__placeholder p { color: var(--muted); font-size: 15px; }

/* ---------- Pie ---------- */
.cta-final { background: var(--blue); color: #fff; }
.cta-final__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding-block: clamp(64px, 9vw, 96px) 52px; }
.cta-final__top h2 { font-size: clamp(44px, 7vw, 80px); line-height: .93; letter-spacing: -0.04em; max-width: 760px; }
.cta-final__phone { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.cta-final__phone .btn { font-size: 26px; padding: 18px 30px; }
.cta-final__phone a.mail { color: #fff; font-size: 17px; text-align: center; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-block: 40px; border-top: 1px solid #5B88C9; }
.footer-cols h3 { font-size: 15px; letter-spacing: .07em; text-transform: uppercase; color: var(--sky); margin-bottom: 14px; }
.footer-cols ul { list-style: none; display: grid; gap: 8px; }
.footer-cols a { color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; }
.footer-cols a:hover { color: var(--sky); text-decoration: underline; }
.footer-cols address { font-style: normal; color: var(--ice-2); font-size: 16px; line-height: 1.6; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; padding-block: 24px 32px; border-top: 1px solid #5B88C9; font-size: 14px; color: var(--ice-2); }
.footer-bottom a { color: var(--ice-2); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; }
.funding { background: #fff; }
.funding .container { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 40px; padding-block: 22px; }
.funding img { height: 54px; width: auto; }
.funding a { display: block; }
@media (max-width: 600px) { .funding img { height: auto; max-height: 52px; } }

/* ---------- Utilidades ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: 56px; }
.center { text-align: center; }
.max-640 { max-width: 640px; }
.media-rounded { border-radius: var(--radius-l); width: 100%; object-fit: cover; }
.doc-link { display: flex; align-items: center; gap: 14px; background: var(--ice); border-radius: 18px; padding: 18px 20px; text-decoration: none; color: var(--navy); font-weight: 800; }
.doc-link:hover { background: var(--ice-2); color: var(--navy); }
.doc-link small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; }
.doc-link svg { width: 28px; height: 28px; flex: none; stroke: var(--blue); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

/* Aparición suave al hacer scroll (solo si el usuario no pide menos movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ==========================================================================
   Portada: hero "termostato" (¿Cómo estás en casa?)
   ========================================================================== */
.hero--thermo .hero__text { gap: 22px; }
.hero--thermo .hero__media { min-height: clamp(520px, 50vw, 680px); }
.hero__slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity .8s ease, transform 7s ease-out;
}
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero--thermo .sticker { left: auto; right: 48px; bottom: auto; top: 48px; transform: rotate(8deg); width: 132px; height: 132px; }
.hero--thermo .sticker strong { font-size: 27px; }

/* Selector */
.mood { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.mood__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mood__q { font-weight: 800; font-size: 19px; color: #fff; }
.mood__pause {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); background: transparent; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.mood__pause:hover { background: rgba(255,255,255,.12); }
.mood__pause svg { width: 16px; height: 16px; }
.mood__pause .i-play { display: none; }
.mood__pause[aria-pressed="true"] .i-play { display: block; }
.mood__pause[aria-pressed="true"] .i-pause { display: none; }
.mood__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mood__tab {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px;
  min-height: 58px; padding: 14px 18px; border-radius: 18px; border: 2px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: 18px; font-weight: 800; text-align: left; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.mood__tab:hover { border-color: #fff; transform: translateY(-1px); }
.mood__tab svg { width: 22px; height: 22px; flex: none; color: var(--accent); transition: transform .3s; }
.mood__tab[aria-selected="true"] { background: #fff; border-color: #fff; color: var(--navy); }
.mood__tab[aria-selected="true"] svg { transform: scale(1.15) rotate(-8deg); color: var(--blue); }
.mood__tab[data-mood="calor"][aria-selected="true"] svg { color: #E8641B; }
.mood__tab[data-mood="aire"][aria-selected="true"] svg { color: #129A6A; }
.mood__tab[data-mood="roto"][aria-selected="true"] svg { color: #B8860B; }
.mood__bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--blue); }
.hero--thermo.is-playing .mood__tab[aria-selected="true"] .mood__bar { animation: mood-progress var(--slide-ms, 7000ms) linear forwards; }
@keyframes mood-progress { from { width: 0; } to { width: 100%; } }

/* Tarjeta con dial */
.thermo-panels { position: absolute; left: 0; right: 48px; bottom: 48px; z-index: 3; display: flex; }
.thermo-card {
  display: flex; align-items: center; gap: 22px; max-width: 560px;
  margin-left: -32px; background: var(--navy); color: #fff; border-radius: 28px; padding: 22px 26px 22px 22px;
  box-shadow: 0 24px 50px rgba(8, 24, 52, .35);
  animation: card-in .55s cubic-bezier(.2,.8,.2,1);
}
.thermo-card[hidden] { display: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.thermo-card__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.thermo-card__text strong { font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; }
.thermo-card__text p { color: #CFE0F5; font-size: 16px; line-height: 1.45; }
.thermo-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 6px; }
.thermo-card__actions .btn { min-height: 48px; padding: 12px 22px; font-size: 17px; }
.thermo-card__link { color: #fff; font-weight: 700; font-size: 15px; }
.thermo-card__link:hover { color: var(--sky); }

.dial { position: relative; width: 132px; height: 132px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(135deg); }
.dial circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.dial__track { stroke: rgba(255,255,255,.14); stroke-dasharray: 245 327; }
.dial__val { transition: stroke 1.4s ease; }
.dial__num { position: relative; font-size: 38px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dial__lbl { position: relative; font-size: 12px; font-weight: 700; color: #CFE0F5; max-width: 84px; line-height: 1.2; margin-top: 4px; }
.dial__sub { position: absolute; bottom: 4px; left: 0; right: 0; font-size: 12px; font-weight: 700; color: var(--sky); }
.dial--error .dial__num { color: var(--yellow); animation: dial-blink 1.1s steps(2, start) infinite; }
.dial--error .dial__val { stroke-dasharray: 18 14 !important; animation: dial-spin 6s linear infinite; transform-origin: 60px 60px; }
@keyframes dial-blink { to { opacity: .25; } }
@keyframes dial-spin { to { stroke-dashoffset: -320; } }

@media (max-width: 1040px) {
  .hero--thermo .hero__media { min-height: 0; padding: 0 16px 16px; display: flex; flex-direction: column; }
  .hero--thermo .hero__img { position: relative; inset: auto; height: clamp(260px, 60vw, 420px); }
  .hero--thermo .sticker { right: 30px; top: -34px; width: 112px; height: 112px; }
  .hero--thermo .sticker strong { font-size: 23px; }
  .hero--thermo .sticker span { font-size: 13px; }
  .thermo-panels { position: relative; left: auto; right: auto; bottom: auto; margin-top: -56px; padding: 0 10px; }
  .thermo-card { margin-left: 0; width: 100%; max-width: none; }
}
@media (max-width: 520px) {
  .mood__tab { font-size: 16px; padding: 12px 14px; min-height: 54px; gap: 8px; }
  .thermo-card { flex-direction: column; align-items: flex-start; padding: 20px; gap: 14px; }
  .dial { width: 112px; height: 112px; align-self: center; }
  .dial__num { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__slide, .dial__val { transition: none; }
  .thermo-card, .dial--error .dial__num, .dial--error .dial__val { animation: none; }
}

/* Todas las tarjetas ocupan la misma celda: el bloque no cambia de alto al pasar de una a otra */
.thermo-panels { display: grid; align-items: end; }
.thermo-card { grid-area: 1 / 1; }
.thermo-card[hidden] { display: flex; visibility: hidden; animation: none; }
.dial--pct .dial__num { font-size: 31px; letter-spacing: -0.05em; }
.dial--pct .dial__lbl { max-width: 70px; }
@media (max-width: 520px) {
  .dial--pct .dial__num { font-size: 26px; }
  .dial__lbl { font-size: 11px; max-width: 72px; }
}
.thermo-panels { align-items: stretch; }

/* Botón pausar / ver todos con texto */
.mood__pause { width: auto; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; gap: 6px; font: inherit; font-size: 14px; font-weight: 800; }
.mood__pause svg { width: 14px; height: 14px; }
.mood__pause[aria-pressed="true"] { background: #fff; color: var(--navy); border-color: #fff; }
.mood__pause[aria-pressed="true"]:hover { background: var(--ice); }

/* Menú móvil: el backdrop-filter de la cabecera convierte a la cabecera en el
   "marco" del menú fijo y lo recorta. En móvil se quita y la cabecera va en blanco sólido. */
@media (max-width: 1100px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav { z-index: 60; height: calc(100dvh - 84px); border-top: 1px solid var(--line); box-shadow: 0 20px 40px rgba(15,46,92,.12); }
  .nav__list { gap: 0; }
  .nav__list > .nav__item { border-bottom: 1px solid var(--line); }
  .nav__link, .nav__toggle { border-radius: 0; }
  .nav__link:hover, .nav__toggle:hover, .nav__item:focus-within > .nav__toggle { background: transparent; }
  .submenu a { font-size: 17px; padding: 12px 14px; }
  .menu-btn[aria-expanded="true"] { background: var(--navy); color: #fff; }
}
@media (max-width: 420px) {
  .nav { height: calc(100dvh - 72px); }
}
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-menu { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
