/* Lectura cómoda, alto contraste, botones amplios y navegación accesible en todo dispositivo. */

html {
  font-size: 17px;
  scroll-padding-top: 110px;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #1f2937;
  background: #f8fafc;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  letter-spacing: -0.02em;
  color: #111827;
}

h1 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.18;
}

h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.24;
}

h3 {
  font-size: 1.3rem;
}

p, li {
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid #b91c1c !important;
  outline-offset: 3px !important;
}

.wrap {
  max-width: 1140px;
  width: calc(100% - 48px);
  margin-inline: auto;
}

/* Barra superior */
.topbar {
  background: #111827;
  color: #f3f4f6;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 0;
  text-align: center;
  border-bottom: 2px solid #b91c1c;
}

/* Encabezado */
.site-header {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.nav {
  min-height: 84px;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.96rem;
  font-weight: 700;
  flex-wrap: wrap;
}

.nav nav > a {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  color: #1f2937;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav nav > a:hover,
.nav nav > a[aria-current="page"] {
  background: #fef2f2;
  color: #b91c1c;
}

/* Botones de llamada a la acción */
.button,
.button.small,
.button.full-width {
  font-size: 1rem;
  font-weight: 700;
  min-height: 52px;
  padding: 12px 24px;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

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

.button.button-outline {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.button.button-outline:hover {
  border-color: #b91c1c;
  color: #b91c1c;
  background: #fef2f2;
}

/* Acordeones de contenido (sin afectar el menú superior) */
.service-details > summary,
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  color: #111827;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.service-details > summary:hover,
.faq-list summary:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.service-details > summary::-webkit-details-marker,
.faq-list summary::-webkit-details-marker {
  display: none;
}

.service-details > summary::after,
.faq-list summary::after {
  content: '+';
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  flex-shrink: 0;
}

.service-details[open] > summary::after,
.faq-list details[open] > summary::after {
  content: '−';
  background: #b91c1c;
  color: #ffffff;
}

.service-details {
  margin-bottom: 22px;
}

.service-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  background: transparent;
  border: 0;
  padding: 18px 0 4px;
  margin-bottom: 8px;
}

.info-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.info-block h4 {
  font-size: 1.02rem;
  color: #111827;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #fee2e2;
}

.info-block li {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #334155;
}

.consumer-notice {
  padding: 18px 20px;
  border-radius: 10px;
  background: #f1f5f9;
  border-left: 5px solid #334155;
}

.consumer-notice.warning {
  background: #fffbeb;
  border-left-color: #d97706;
}

.consumer-notice strong,
.consumer-notice p {
  font-size: 0.96rem;
  line-height: 1.6;
}

/* Barra flotante de contacto inferior */
.contact-dock {
  position: fixed;
  bottom: 18px;
  right: 20px;
  left: auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}

.contact-dock a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.18s ease;
}

.contact-dock a:hover {
  transform: translateY(-1px);
}

.dock-call {
  color: #1e293b;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}

.dock-call:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.dock-wa {
  background: #15803d;
  color: #ffffff;
  border: 1.5px solid #15803d;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25);
}

.dock-wa:hover {
  background: #166534;
}

.contact-dock span {
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
}

section[id],
article[id] {
  scroll-margin-top: 100px;
}

@media (max-width: 820px) {
  .service-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 16px;
    scroll-padding-top: 24px;
  }

  .wrap {
    width: calc(100% - 28px);
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .nav {
    gap: 10px;
    min-height: 0;
    padding-block: 10px;
    justify-content: space-between;
  }

  .nav nav {
    width: 100%;
    justify-content: center;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
    gap: 6px 10px;
    font-size: 0.9rem;
  }

  .nav nav > a {
    min-height: 38px;
    padding: 6px 10px;
    text-decoration: none;
  }

  .contact-dock {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border-inline: 0;
    border-bottom: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    justify-content: center;
  }

  .contact-dock a {
    flex: 1;
    max-width: 220px;
    min-height: 48px;
    border-radius: 10px;
    font-size: 0.96rem;
  }
}

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