/* Refriclima Confort — estilos de la web */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --negro: #0F1317;
  --tinta: #15191E;
  --gris: #4A525C;
  --gris-claro: #D3D7DC;
  --linea: #E1E4E8;
  --fondo: #F4F5F6;
  --blanco: #FFFFFF;
  --rojo: #B3261E;
  --rojo-oscuro: #8E1D17;
  --cobre: #E9A27A;
  --azul: #6FA8DC;
  --loxone-verde: #8CFF70;
  --loxone-negro: #1C1610;
  --ancho: 1280px;
  --radio: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Barlow", system-ui, sans-serif; font-size: 18px; line-height: 1.6; color: var(--tinta); background: var(--fondo); }
img { max-width: 100%; display: block; }
a { color: var(--rojo); }
a:hover { color: var(--rojo-oscuro); }
h1, h2, h3 { line-height: 1.08; margin: 0 0 .5em; }
h1, h2 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cobre); outline-offset: 2px; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 24px; }
.seccion { padding: 88px 0; }
.antetitulo { margin: 0 0 8px; font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--rojo); }
.oscuro .antetitulo, .cabecera-hero .antetitulo { color: var(--cobre); }
.titulo-seccion { font-size: clamp(34px, 4.4vw, 48px); margin-bottom: 32px; }
.saltar { position: absolute; left: -9999px; top: 0; background: var(--blanco); padding: 8px 16px; z-index: 100; }
.saltar:focus { left: 8px; top: 8px; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border-radius: 6px; font-weight: 600; font-size: 18px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.boton-rojo { background: var(--rojo); color: var(--blanco); }
.boton-rojo:hover { background: var(--rojo-oscuro); color: var(--blanco); }
.boton-claro { background: rgba(255,255,255,.12); color: var(--blanco); border: 1px solid rgba(255,255,255,.6); }
.boton-claro:hover { background: rgba(255,255,255,.22); color: var(--blanco); }
.boton-oscuro { background: var(--tinta); color: var(--blanco); }
.boton-oscuro:hover { background: #000; color: var(--blanco); }
.botones { display: flex; flex-wrap: wrap; gap: 16px; }

/* Cabecera */
.cabecera { background: var(--negro); color: var(--blanco); position: sticky; top: 0; z-index: 20; }
.cabecera .contenedor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 62px; width: auto; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 22px; font-weight: 500; font-size: 16px; }
.menu a { color: var(--blanco); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--cobre); }
.cabecera .boton { min-height: 44px; padding: 10px 18px; font-size: 17px; }

/* Portada (inicio) */
.portada { background: var(--negro); color: var(--blanco); display: flex; flex-wrap: wrap; overflow: hidden; }
.portada-texto { position: relative; flex: 1 1 560px; min-width: 0; display: flex; align-items: center; overflow: hidden; }
.portada-texto .marca-agua { position: absolute; left: -8%; bottom: -6%; width: 120%; max-width: 1100px; opacity: .12; mix-blend-mode: screen; pointer-events: none; }
.portada-texto .interior { position: relative; width: 100%; max-width: 680px; margin-left: auto; padding: 88px 48px 80px 24px; }
.portada h1 { font-size: clamp(40px, 5.2vw, 60px); line-height: 1.02; margin-bottom: 20px; }
.portada .entradilla { font-size: 20px; line-height: 1.5; color: #E3E6E9; margin-bottom: 32px; }
.portada-foto { position: relative; flex: 1 1 420px; min-width: 0; min-height: 520px; }
.portada-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* Cabecera interior (nosotros, galería) */
.cabecera-hero { position: relative; overflow: hidden; background: var(--negro); color: var(--blanco); }
.cabecera-hero > img.fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cabecera-hero .velo { position: absolute; inset: 0; background: rgba(10,13,16,.65); }
.cabecera-hero .marca-agua { position: absolute; right: -6%; top: 50%; transform: translateY(-50%); width: 64%; max-width: 1000px; opacity: .18; mix-blend-mode: screen; pointer-events: none; }
.cabecera-hero .contenedor { position: relative; padding-top: 72px; padding-bottom: 56px; }
.cabecera-hero h1 { font-size: clamp(40px, 5vw, 56px); max-width: 820px; margin-bottom: 12px; }
.cabecera-hero p { font-size: 20px; line-height: 1.5; max-width: 680px; color: #E3E6E9; margin: 0; }

/* Franja de confianza */
.franja { background: var(--blanco); border-bottom: 1px solid var(--linea); }
.franja .contenedor { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; font-weight: 600; color: var(--gris); font-size: 17px; }

/* Servicios */
.rejilla-servicios { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.tarjeta img { width: 100%; height: 220px; object-fit: cover; }
.tarjeta div { padding: 24px; }
.tarjeta p { margin: 0; color: var(--gris); line-height: 1.5; }
.otros { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: 32px; margin-top: 24px; }
.otros p { color: var(--gris); }
.etiquetas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.etiquetas li { background: #EEF0F2; border-radius: 999px; padding: 6px 16px; font-weight: 500; font-size: 17px; }

/* Trabajos (inicio) */
.mosaico { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-rows: 260px; gap: 16px; }
.mosaico figure { margin: 0; position: relative; border-radius: var(--radio); overflow: hidden; }
.mosaico figure.ancha { grid-column: span 2; }
.mosaico img { width: 100%; height: 100%; object-fit: cover; }
.mosaico figcaption, .pie-foto { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; background: rgba(10,13,16,.75); color: var(--blanco); font-weight: 500; font-size: 17px; }

/* Loxone */
.loxone { background: #EDEDEB; border-top: 6px solid var(--loxone-verde); }
.loxone .contenedor { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.loxone .col { flex: 1 1 440px; min-width: 0; }
.loxone .maleta { border-radius: var(--radio); margin-bottom: 20px; width: 100%; height: auto; }
.loxone .sello { display: block; max-width: 360px; }
.loxone .aviso { font-size: 14px; color: #3A3A3A; margin: 12px 0 0; }
.loxone .antetitulo { color: var(--loxone-negro); }
.loxone ul { padding-left: 20px; margin: 0 0 20px; }
.boton-loxone { background: var(--loxone-negro); color: var(--loxone-verde); }
.boton-loxone:hover { background: #000; color: var(--loxone-verde); }

/* Clientes */
.clientes { background: var(--blanco); border-top: 1px solid var(--linea); }
.rejilla-clientes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.rejilla-clientes li { border: 1px solid var(--linea); border-radius: var(--radio); padding: 22px 24px; font-weight: 600; }
.clientes .nota { margin: 24px 0 0; color: var(--gris); }

/* Bloques oscuros */
.oscuro { background: var(--negro); color: var(--blanco); }
.oscuro p { color: var(--gris-claro); }
.dos-col { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.dos-col > * { flex: 1 1 420px; min-width: 0; }
.lema { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.lema div { flex: 1 1 200px; padding-top: 12px; border-top: 3px solid var(--cobre); }
.lema div + div { border-top-color: var(--azul); }
.lema strong { font-family: "Barlow Condensed", sans-serif; font-size: 28px; letter-spacing: 1px; }
.lema p { margin: 4px 0 0; }
.foto-redonda { border-radius: var(--radio); width: 100%; object-fit: cover; }

/* Contacto */
.contacto .dos-col { align-items: flex-start; }
.telefono-grande { font-size: 30px; font-weight: 600; text-decoration: none; }
.datos p { margin: 0 0 8px; }
.datos .gris { color: var(--gris); }
.formulario { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.formulario label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.formulario input, .formulario textarea { font: inherit; font-size: 17px; padding: 12px; border: 1px solid #8E969F; border-radius: 6px; background: var(--blanco); color: var(--tinta); }
.formulario .casilla { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 16px; line-height: 1.45; }
.formulario .casilla input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.formulario .trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulario .info-legal { font-size: 14px; color: var(--gris); margin: 0; line-height: 1.45; }

/* Nosotros */
.historia { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.historia li { border-top: 3px solid var(--azul); padding-top: 16px; }
.historia li:last-child { border-top-color: var(--rojo); }
.historia strong.anio { font-family: "Barlow Condensed", sans-serif; font-size: 36px; display: block; line-height: 1.1; }
.historia p { margin: 4px 0 0; color: var(--gris); line-height: 1.6; }
.texto-largo { max-width: 900px; }
.nave { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.nave img { flex: 0 1 300px; width: 300px; height: 420px; object-fit: cover; object-position: center 60%; border-radius: var(--radio); }
.nave > div { flex: 1 1 420px; min-width: 0; }

/* Galería */
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filtros button { font: inherit; font-weight: 600; font-size: 16px; min-height: 44px; padding: 8px 18px; border-radius: 999px; cursor: pointer; background: var(--blanco); color: var(--tinta); border: 1px solid #A9B0B8; }
.filtros button[aria-pressed="true"] { background: var(--tinta); color: var(--blanco); border-color: var(--tinta); }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.galeria figure { margin: 0; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.galeria figure[hidden] { display: none; }
.galeria a { display: block; background: var(--negro); cursor: zoom-in; }
.galeria img { width: 100%; height: 260px; object-fit: cover; }
.galeria figcaption { padding: 14px 16px; }
.galeria figcaption strong { display: block; font-size: 17px; line-height: 1.35; }
.galeria figcaption span { color: var(--gris); font-size: 15px; }
.visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visor::backdrop { background: rgba(10,13,16,.94); }
.visor .marco { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; }
.visor img { max-width: 100%; max-height: 76vh; object-fit: contain; border-radius: 6px; }
.visor p { color: var(--blanco); margin: 0; text-align: center; font-weight: 500; }
.visor .controles { display: flex; gap: 12px; }
.visor button { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 20px; border-radius: 6px; cursor: pointer; border: 1px solid var(--blanco); background: transparent; color: var(--blanco); }
.visor button.cerrar { background: var(--rojo); border-color: var(--rojo); }
.llamada { background: var(--blanco); border-top: 1px solid var(--linea); }
.llamada .contenedor { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-top: 56px; padding-bottom: 56px; }
.llamada h2 { margin: 0; font-size: 36px; }

/* Páginas legales */
.legal { max-width: 860px; }
.legal h2 { font-size: 30px; margin-top: 1.4em; }
.legal ul { padding-left: 22px; }

/* Pie */
.pie { background: var(--negro); color: #A9B0B8; font-size: 15px; }
.pie .contenedor { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; padding-top: 32px; padding-bottom: 32px; }
.pie a { color: #C9CED4; }
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Móvil */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .seccion { padding: 64px 0; }
  .contenedor { padding: 0 16px; }
  .cabecera { position: static; }
  .logo img { height: 48px; }
  .menu { order: 3; width: 100%; gap: 4px 18px; }
  .portada-texto .interior { padding: 56px 16px 48px; }
  .portada-foto { min-height: 420px; }
  .mosaico { grid-auto-rows: 220px; }
  .mosaico figure.ancha { grid-column: auto; }
  .formulario { padding: 20px; }
  .nave img { width: 100%; flex-basis: 100%; height: 360px; }
  .tarjeta img { height: 200px; }
}

/* ===== Mejoras (oct. 2026) ===== */

/* Los anclajes no quedan tapados por la cabecera fija */
html { scroll-padding-top: 96px; }

/* Franja de confianza: 4 bloques iguales con marca de verificación */
.franja .contenedor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 32px; align-items: start; }
.franja span { position: relative; padding-left: 30px; line-height: 1.35; }
.franja span::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--rojo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* Servicios: 3 columnas, sin tarjetas huérfanas */
.rejilla-servicios { grid-template-columns: repeat(3, 1fr); }
.tarjeta { transition: transform .2s ease, box-shadow .2s ease; }
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15,19,23,.12); }
.tarjeta h3 { position: relative; padding-top: 14px; }
.tarjeta h3::before { content: ""; position: absolute; top: 0; left: 0; width: 36px; height: 3px; background: var(--rojo); border-radius: 2px; }

/* Mosaico de trabajos: 4 columnas sin huecos */
.mosaico { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; }
.mosaico figure:last-child.ancha { grid-column: span 3; }
.mosaico img { transition: transform .4s ease; }
.mosaico figure:hover img { transform: scale(1.04); }

/* Clientes: 3 columnas (2 filas completas) */
.rejilla-clientes { grid-template-columns: repeat(3, 1fr); }
.rejilla-clientes li { border-left: 4px solid var(--rojo); background: var(--fondo); }

/* Formulario: foco más visible */
.formulario input:focus, .formulario textarea:focus { outline: none; border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(179,38,30,.18); }
.formulario .boton { width: 100%; }

/* Botón de llamada fijo (solo móvil) */
.llamar-flotante { display: none; }

@media (max-width: 1024px) {
  .franja .contenedor { grid-template-columns: repeat(2, 1fr); }
  .rejilla-servicios, .rejilla-clientes { grid-template-columns: repeat(2, 1fr); }
  .mosaico { grid-template-columns: repeat(2, 1fr); }
  .mosaico figure:last-child.ancha { grid-column: span 2; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 0; }
  /* Menú en una sola línea deslizable */
  .menu { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { white-space: nowrap; }
  /* Portada más compacta */
  .portada-texto .interior { padding: 40px 16px 36px; }
  .portada .entradilla { font-size: 18px; margin-bottom: 24px; }
  .portada .botones { gap: 10px; }
  .portada .botones .boton { flex: 1 1 0; padding: 12px 14px; }
  .portada-foto { min-height: 300px; }
  .franja .contenedor { grid-template-columns: 1fr; gap: 12px; padding-top: 20px; padding-bottom: 20px; font-size: 16px; }
  .rejilla-servicios, .rejilla-clientes { grid-template-columns: 1fr; }
  .rejilla-clientes li { padding: 16px 20px; }
  .mosaico { grid-template-columns: 1fr; }
  .mosaico figure:last-child.ancha { grid-column: auto; }
  .titulo-seccion { margin-bottom: 24px; }
  /* Barra de llamada fija abajo */
  body { padding-bottom: 72px; }
  .llamar-flotante { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; min-height: 52px;
    align-items: center; justify-content: center; gap: 10px; border-radius: 10px; background: var(--rojo); color: var(--blanco);
    font-weight: 600; font-size: 18px; text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
  .llamar-flotante:hover { color: var(--blanco); background: var(--rojo-oscuro); }
  .llamar-flotante svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tarjeta, .mosaico img { transition: none; }
  .tarjeta:hover { transform: none; }
  .mosaico figure:hover img { transform: none; }
}

/* WhatsApp */
.enlace-whatsapp { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: #128C4A; }
.enlace-whatsapp:hover { color: #0B6B37; }
.enlace-whatsapp svg { width: 22px; height: 22px; }
.whatsapp-flotante { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: #25D366; color: #fff; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s ease; }
.whatsapp-flotante:hover { color: #fff; transform: scale(1.07); }
.whatsapp-flotante svg { width: 32px; height: 32px; }
.whatsapp-flotante span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) {
  .llamar-flotante { right: calc(50% + 5px); }
  .whatsapp-flotante { left: calc(50% + 5px); right: 12px; bottom: 12px; width: auto; height: auto; min-height: 52px;
    border-radius: 10px; gap: 10px; font-weight: 600; font-size: 18px; background: #1DA851; }
  .whatsapp-flotante:hover { transform: none; background: #168F44; }
  .whatsapp-flotante svg { width: 22px; height: 22px; }
  .whatsapp-flotante span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (prefers-reduced-motion: reduce) { .whatsapp-flotante { transition: none; } .whatsapp-flotante:hover { transform: none; } }
