/* =========================================================
   EFFATA Construcciones — hoja de estilos
   Paleta de marca: azul (#2E9BF0), navy oscuro (#0B2E4F),
   texto neutro (#16233A), fondos claros (#FFFFFF / #F5F8FC),
   acento CTA naranja (#C1440E) — solo para botones de acción.
   Sin frameworks, sin fuentes externas (pila system-ui).
   ========================================================= */

:root {
  --color-primary: #2E9BF0;
  --color-dark: #0B2E4F;
  --color-text: #16233A;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F8FC;
  --color-accent: #C1440E;
  --color-accent-dark: #A83A0C;
  --color-border: #E1E8F2;
  --color-success: #1E7B3C;
  --color-error: #B23B3B;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(11, 46, 79, 0.10);
  --max-width: 1140px;
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-dark);
  box-shadow: 0 2px 12px rgba(11, 46, 79, 0.25);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  height: 52px;
  width: auto;
  border-radius: 8px;
}

@media (min-width: 860px) {
  .brand img {
    height: 62px;
  }
}

/* ---------- Navegación del header ---------- */

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.main-nav {
  order: 10;
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.main-nav.is-open {
  max-height: 260px;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 4px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.main-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* A partir de este ancho, la navegación cabe en una sola fila y se oculta
   el botón hamburguesa (definido junto con el breakpoint equivalente al
   resto de secciones del sitio). */
@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    order: 0;
    flex-basis: auto;
    max-height: none;
    overflow: visible;
    flex: 1;
  }

  .main-nav ul {
    flex-direction: row;
    justify-content: center;
    gap: 28px;
    padding: 0;
  }

  .main-nav a {
    min-height: auto;
    padding: 8px 2px;
  }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-size: 1rem;
  padding: 13px 24px;
  min-height: 48px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-cta {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(193, 68, 14, 0.35);
}

.btn-cta:hover {
  background: var(--color-accent-dark);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-whatsapp {
  background: #25D366;
  color: #0B2E4F;
}

.btn-whatsapp:hover {
  background: #1ebd5a;
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.92rem;
  min-height: 48px;
}

.btn-block {
  width: 100%;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
}

.hero-bg {
  position: absolute;
  inset: -3%;
  z-index: 0;
  background-image: url('assets/hero-effata.jpg');
  background-size: cover;
  background-position: center;
  animation: heroKenBurns 14s ease-in-out infinite alternate;
  will-change: transform;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 46, 79, 0.55);
  z-index: 1;
}

.hero-shine {
  position: absolute;
  inset: -20% -40%;
  z-index: 1;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.16) 47%,
    rgba(255, 255, 255, 0.05) 53%,
    transparent 70%
  );
  animation: heroShineSweep 9s ease-in-out infinite;
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--size, 6px);
  height: var(--size, 6px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(122, 190, 245, 0.55) 60%, transparent 100%);
  filter: blur(0.5px);
  opacity: 0;
  animation-name: heroParticleFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-duration: var(--duration, 12s);
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.1) translate(-1.5%, 1%);
  }
  100% {
    transform: scale(1.18) translate(1.5%, -1%);
  }
}

@keyframes heroShineSweep {
  0% {
    transform: translateX(-35%) rotate(0deg);
  }
  50% {
    transform: translateX(35%) rotate(0deg);
  }
  100% {
    transform: translateX(-35%) rotate(0deg);
  }
}

@keyframes heroParticleFloat {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.9;
    transform: translate(calc(var(--drift, 1) * 6px), -30px) scale(1);
  }
  50% {
    opacity: 0.75;
    transform: translate(calc(var(--drift, 1) * -8px), -80px) scale(1.1);
  }
  85% {
    opacity: 0.5;
  }
  100% {
    transform: translate(calc(var(--drift, 1) * 4px), -150px) scale(0.9);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .hero-shine,
  .hero-particle {
    animation: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 3;
  padding: 72px 20px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  color: #9FD2FF;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  margin: 0 0 18px;
  line-height: 1.18;
  max-width: 780px;
}

.accent-text {
  color: var(--color-accent);
}

/* ---------- Kicker de sección (encima de un .section-title) ---------- */

.section-kicker {
  margin: 0 0 8px;
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .subtitle {
  font-size: clamp(1rem, 2.3vw, 1.2rem);
  max-width: 640px;
  margin: 0 0 30px;
  color: #EAF2FB;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Barra de confianza ---------- */

.trust-strip {
  background: var(--color-bg-alt);
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-grid li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.trust-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(46, 155, 240, 0.12);
  color: var(--color-primary);
  font-size: 1.2rem;
}

/* ---------- Secciones ---------- */

section {
  padding: 60px 0;
}

/* Evita que el header sticky tape el título al hacer scroll desde un ancla
   del menú (altura del header + margen de aire). */
#quien-hace-tu-reforma,
#servicios,
#trabajos,
#presupuesto {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  position: relative;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  margin: 0 0 16px;
  padding-bottom: 12px;
  color: var(--color-dark);
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-primary);
}

.section-lead {
  max-width: 680px;
  color: #43536B;
  margin: 0 0 32px;
}

/* ---------- Blobs decorativos ---------- */

.has-blobs {
  position: relative;
  overflow: hidden;
}

.deco-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.blob-primary {
  width: 340px;
  height: 340px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle, rgba(46, 155, 240, 0.35), transparent 70%);
}

.blob-accent {
  width: 260px;
  height: 260px;
  bottom: -90px;
  left: -80px;
  background: radial-gradient(circle, rgba(193, 68, 14, 0.25), transparent 70%);
}

.has-blobs > .container {
  position: relative;
  z-index: 1;
}

/* Sobre fondo navy oscuro (banda CTA) el azul de marca se pierde por falta
   de contraste: se sustituye por un tono más claro y algo más intenso. */
.cta-band.has-blobs .blob-primary {
  background: radial-gradient(circle, rgba(120, 195, 255, 0.4), transparent 70%);
}

/* ---------- Aparición al hacer scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Sobre Juan Jesús ---------- */

.about-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}

.about-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 220px;
}

.about-visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.about-text p {
  color: #33425A;
  margin: 0 0 16px;
}

/* ---------- Servicios ---------- */

.services-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(11, 46, 79, 0.14);
}

.service-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-card-body {
  padding: 26px;
}

.service-card h3 {
  margin: 0 0 10px;
  color: var(--color-dark);
  font-size: 1.15rem;
}

.service-card p {
  margin: 0;
  color: #43536B;
}

/* ---------- Categorías de servicios (tarjetas clicables -> modal) ---------- */

.category-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.category-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 220px;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  background: var(--color-dark);
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(11, 46, 79, 0.22);
}

.category-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.category-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-card-img {
  transform: scale(1.06);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(185deg, rgba(11, 46, 79, 0.25) 0%, rgba(11, 46, 79, 0.55) 55%, rgba(11, 46, 79, 0.92) 100%);
}

.category-card.is-icon {
  background: linear-gradient(135deg, var(--color-dark) 0%, #184c7a 100%);
}

.category-card.is-icon .category-card-overlay {
  background: linear-gradient(185deg, rgba(11, 46, 79, 0) 0%, rgba(11, 46, 79, 0.65) 100%);
}

.category-card-icon {
  position: absolute;
  top: 26px;
  left: 24px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.category-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 56px 22px 24px;
  color: #fff;
}

.category-card-count {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.category-card-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.category-card-tagline {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.category-card-arrow {
  position: absolute;
  right: 20px;
  bottom: 24px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  transition: transform 0.25s ease, background 0.25s ease;
}

.category-card:hover .category-card-arrow {
  transform: translateX(3px);
  background: var(--color-accent-dark);
}

/* ---------- Modal de servicios por categoría ---------- */

.service-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 20, 33, 0.72);
  padding: 20px;
}

.service-overlay[hidden] {
  display: none;
}

.service-overlay-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 32px 28px 28px;
}

.service-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-overlay-close:hover {
  background: var(--color-border);
}

.service-overlay-header {
  padding-right: 40px;
  margin-bottom: 20px;
}

.service-overlay-count {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(46, 155, 240, 0.12);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.service-overlay-header h3 {
  margin: 0;
  color: var(--color-dark);
  font-size: 1.5rem;
}

.service-overlay-list {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}

.service-overlay-list li {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.service-overlay-list h4 {
  margin: 0 0 6px;
  color: var(--color-dark);
  font-size: 1rem;
}

.service-overlay-list p {
  margin: 0;
  color: #43536B;
  font-size: 0.92rem;
}

.service-overlay-footer {
  text-align: center;
}

/* ---------- Trabajos ---------- */

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.work-single {
  max-width: 980px;
}

.work-loading {
  color: #43536B;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0;
}

.work-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(11, 46, 79, 0.14);
}

.work-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.work-card-media {
  position: relative;
}

.work-card-cover {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.work-card:hover .work-card-cover {
  transform: scale(1.04);
}

.work-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.work-badge.is-proceso {
  background: var(--color-accent);
}

.work-badge.is-terminado {
  background: var(--color-success);
}

.work-card-title {
  margin: 0;
  padding: 16px 18px;
  font-size: 1.05rem;
  color: var(--color-dark);
}

/* ---------- Tarjeta de obra en curso (badge + slider antes/ahora) ---------- */

.work-progress-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.live-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot {
    animation: live-pulse 1.8s ease-in-out infinite;
  }
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.3); }
}

/* Comparador "antes / ahora": clip-path sobre la imagen before revela su
   mitad izquierda, la imagen after queda siempre a pantalla completa
   debajo, así no hace falta recalcular anchos en JS al redimensionar. */
.ba-slider {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  background: var(--color-bg-alt);
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ba-img-before {
  clip-path: inset(0 50% 0 0);
}

.ba-tag {
  position: absolute;
  top: 16px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(11, 20, 33, 0.65);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.ba-tag-before {
  left: 16px;
}

.ba-tag-after {
  right: 16px;
}

/* Mientras no haya foto de "después" se muestra una sola imagen, sin
   slider arrastrable (no hay nada que comparar todavía). */
.ba-slider-single {
  cursor: default;
}

.ba-tag-pending {
  top: 16px;
  right: 16px;
  background: var(--color-accent);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  z-index: 2;
  touch-action: none;
}

.ba-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ba-handle-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.ba-handle:focus-visible .ba-handle-btn {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.work-progress-footer {
  padding: 22px 24px 26px;
}

.work-progress-footer h3 {
  margin: 0 0 8px;
  color: var(--color-dark);
  font-size: 1.15rem;
}

.work-progress-footer > p {
  margin: 0 0 20px;
  color: #43536B;
}

.work-progress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-outline {
  background: #fff;
  color: var(--color-dark);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---------- Contacto directo (apartado propio, tras "Nuestros trabajos") ---------- */

.direct-contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 32px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.direct-contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.direct-contact-text {
  margin: 6px 0 20px;
  color: #43536B;
  max-width: 42ch;
}

.contact-card-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.contact-card-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(46, 155, 240, 0.35), transparent 70%);
  filter: blur(32px);
  z-index: 0;
}

.contact-card-logo {
  position: relative;
  z-index: 1;
  height: 150px;
  width: auto;
  border-radius: 20px;
}

@media (min-width: 620px) {
  .contact-card-logo {
    height: 190px;
  }
}

.contact-card-name {
  margin: 0;
  font-weight: 700;
  color: var(--color-dark);
  font-size: 1.15rem;
}

.contact-card-role {
  margin: 0;
  color: #43536B;
  font-size: 0.92rem;
}

.contact-card-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

@media (min-width: 620px) {
  .direct-contact-card {
    flex-direction: row;
    text-align: left;
    gap: 36px;
    padding: 40px 48px;
  }

  .direct-contact-info {
    align-items: flex-start;
  }

  .direct-contact-text {
    margin-left: 0;
  }

  .contact-card-actions {
    justify-content: flex-start;
  }
}

/* Capa (lightbox) para ver en grande las fotos de un trabajo, con
   navegación anterior/siguiente y contador. */
.img-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 20, 33, 0.92);
  padding: 24px;
}

.img-overlay[hidden] {
  display: none;
}

.img-overlay img {
  max-width: min(94vw, 1200px);
  max-height: 90vh;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.img-overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--color-text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-overlay-close:hover {
  background: var(--color-bg-alt);
}

.img-overlay-prev,
.img-overlay-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-overlay-prev:hover,
.img-overlay-next:hover {
  background: var(--color-bg-alt);
}

.img-overlay-prev {
  left: 12px;
}

.img-overlay-next {
  right: 12px;
}

.img-overlay-prev[hidden],
.img-overlay-next[hidden] {
  display: none;
}

.img-overlay-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (min-width: 560px) {
  .img-overlay-prev {
    left: 20px;
  }

  .img-overlay-next {
    right: 20px;
  }
}

/* ---------- Botón flotante de WhatsApp ---------- */

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.whatsapp-float-ring {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.55;
}

.whatsapp-float svg {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .whatsapp-float-ring {
    animation: whatsappPulse 2.2s ease-out infinite;
  }
}

@keyframes whatsappPulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* ---------- CTA intermedio ---------- */

.cta-band {
  background: var(--color-dark);
  color: #fff;
  text-align: center;
  padding: 56px 0;
}

.cta-band h2 {
  margin: 0 0 24px;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
}

/* ---------- Formulario ---------- */

.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  max-width: 680px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 620px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .full-width {
    grid-column: 1 / -1;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-dark);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 16px;
  font-family: inherit;
  background: var(--color-bg-alt);
  color: var(--color-text);
  min-height: 48px;
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--color-error);
  background: #FBEAEA;
}

.form-details {
  margin-top: 20px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 4px 16px;
  background: var(--color-bg-alt);
}

.form-details summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  color: var(--color-dark);
  list-style: none;
}

.form-details summary::-webkit-details-marker {
  display: none;
}

.form-details[open] summary {
  padding-bottom: 6px;
}

.form-details .form-grid {
  padding-bottom: 16px;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  font-size: 0.9rem;
  color: #43536B;
}

.consent-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.consent-field.invalid {
  color: var(--color-error);
}

.consent-field.invalid input[type="checkbox"] {
  outline: 2px solid var(--color-error);
  outline-offset: 2px;
}

.form-footer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-hint {
  font-size: 0.86rem;
  color: #6B7B93;
  margin: 0;
}

.form-message {
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
  display: none;
}

.form-message.success {
  display: block;
  background: #E5F5EA;
  color: var(--color-success);
  border: 1px solid #BEE3C9;
}

.form-message.error {
  display: block;
  background: #FBEAEA;
  color: var(--color-error);
  border: 1px solid #F0C2C2;
}

.whatsapp-alt {
  text-align: center;
  margin-top: 18px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-dark);
  color: #D7E4F2;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 8px;
}

.footer-brand::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(46, 155, 240, 0.35), transparent 70%);
  filter: blur(50px);
  z-index: 0;
}

.footer-brand img {
  position: relative;
  z-index: 1;
  height: 84px;
  width: auto;
  border-radius: 14px;
}

@media (min-width: 620px) {
  .footer-brand img {
    height: 104px;
  }
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #D7E4F2;
  text-decoration: none;
  font-weight: 600;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-legal-links a {
  color: #D7E4F2;
  text-decoration: underline;
}

.footer-note {
  width: 100%;
  font-size: 0.82rem;
  color: #9FB3CB;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 16px;
  margin: 0;
}

/* ---------- Páginas legales ---------- */

.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.legal-content h1 {
  color: var(--color-dark);
}

.legal-content h2 {
  color: var(--color-primary);
  margin-top: 32px;
}

.legal-content .placeholder {
  background: #fff3cd;
  padding: 2px 6px;
  border-radius: 4px;
  color: #7a5a00;
  font-weight: 600;
}

.legal-content .review-notice {
  background: #fff3cd;
  border: 1px solid #f0d98c;
  border-radius: 10px;
  padding: 14px 18px;
  color: #7a5a00;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */

@media (min-width: 720px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-overlay-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 320px 1fr;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-ctas .btn {
    width: 100%;
  }
}
