/* Metalúrgica Guerreiro — maqueta estática */
:root {
  /* Fondo general gris claro profesional */
  --bg: #f5f6f8;
  --bg-elevated: #ffffff;
  --bg-muted: #eef0f3;
  --text: #1a1d23;
  --text-muted: #5a6270;
  --accent: #515151;
  --accent-hover: #3d3d3d;
  --accent-deep: #2a2a2a;
  --brand-red: #515151;
  --band-stat: #8a8a8a;
  --plate-bg: #2b2b2b;
  --border: rgba(0, 0, 0, 0.08);
  /* Alturas cabecera fija: fallback hasta que JS mida */
  --header-h: 72px;
  --site-header-total: 113px;
  /* Tema MG por defecto (preview editable desde el footer) */
  --theme-bar-bg: #1a1d23;
  --theme-bar-fg: #f5f6f8;
  --theme-bar-fg-muted: #979ea8;
  --theme-bar-accent: #c3c7cb;
  --theme-bar-accent-hover: #ffffff;
  --theme-bar-btn-bg: #dbdcde;
  --theme-bar-btn-fg: #1a1d23;
  --theme-bar-btn-hover: #f2f3f3;
  --theme-bar-border: rgba(255, 255, 255, 0.14);
  --theme-bar-hover-bg: rgba(255, 255, 255, 0.1);
  --theme-container-bg: rgba(71, 85, 105, 0.25);
  --theme-container-fg: #1a1d23;
  --theme-container-fg-muted: #1a1d23;
  --theme-container-accent: #1a1d23;
  --theme-container-accent-hover: #000000;
  --theme-container-border: rgba(0, 0, 0, 0.1);
  --theme-footer-bg: rgba(26, 29, 35, 1);
  --theme-footer-fg: #f5f6f8;
  --theme-footer-fg-muted: #979ea8;
  --theme-footer-accent: #c3c7cb;
  --theme-footer-accent-hover: #ffffff;
  --theme-footer-border: rgba(255, 255, 255, 0.14);
  --radius: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --container: min(1120px, calc(100% - 40px));
  --font: "Barlow", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

/* Patrón logo (tile 45°) + velo #f5f6f8 — no aplica en .hero ni .section--plate */
body::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 50%;
  width: 300vmax;
  height: 300vmax;
  z-index: -2;
  transform: translate(-50%, -50%) rotate(-45deg);
  background-color: var(--bg);
  background-image: url("../assets/pattern-logo-bg.png");
  background-image: image-set(
    url("../assets/pattern-logo-bg.avif") type("image/avif"),
    url("../assets/pattern-logo-bg.webp") type("image/webp"),
    url("../assets/pattern-logo-bg.png") type("image/png")
  );
  background-repeat: repeat;
  background-size: 294px 148px;
  background-position: center;
  pointer-events: none;
  contain: strict;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(245, 246, 248, 0.92);
  pointer-events: none;
}

main {
  padding-top: var(--site-header-total);
}

section[id] {
  scroll-margin-top: calc(var(--site-header-total) + 12px);
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Top bar (debajo del header principal) */
.topbar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 280;
  background: var(--theme-bar-bg);
  border-bottom: 1px solid var(--theme-bar-border);
  font-size: 0.875rem;
  color: var(--theme-bar-fg);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.topbar__tag {
  color: var(--theme-bar-fg);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar__phone {
  font-weight: 600;
  color: var(--theme-bar-accent);
}

.topbar__phone:hover {
  color: var(--theme-bar-accent-hover);
}

/* Header (fixed: el nav móvil también es fixed; dentro de sticky rompe en Safari/iOS) */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 290;
  background: color-mix(in srgb, var(--theme-bar-bg) 95%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--theme-bar-border);
  color: var(--theme-bar-fg);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: min(320px, 55vw);
  font-weight: 700;
  color: var(--theme-bar-fg);
  text-decoration: none;
}

.logo:hover {
  color: var(--theme-bar-fg);
}

html[data-theme-bar-logo="contrast"][data-theme-bar-tone="dark"] .header .logo__img {
  filter: brightness(0) invert(1);
}

html[data-theme-bar-logo="outline"][data-theme-bar-outline-on="true"] .header .logo__img {
  filter: url(#mg-logo-outline-bar);
}

.logo__img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  background: transparent;
}

@media (min-width: 768px) {
  .logo__img {
    height: 56px;
  }
}

.logo__img--footer {
  height: 32px;
  max-width: 200px;
}

@media (min-width: 768px) {
  .logo__img--footer {
    height: 36px;
  }
}

.logo__symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--brand-red);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.logo__symbol--small {
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
}

.logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.logo__line--top {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  line-height: 1.2;
}

.logo__line--main {
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--text);
}

.logo--footer .logo__line--main {
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  .logo__line--top {
    display: none;
  }

  .logo__line--main {
    font-size: 0.8rem;
  }
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent-hover), var(--accent-deep));
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.logo__mark--small {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.logo__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo__name {
  font-size: 1.05rem;
  line-height: 1.1;
}

.logo__sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--theme-bar-border);
  border-radius: 10px;
  background: var(--theme-bar-bg);
  cursor: pointer;
  position: relative;
  z-index: 320;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  margin-inline: auto;
  background: var(--theme-bar-fg);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list > li > a,
.nav__dropdown-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--theme-bar-fg);
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.nav__list > li > a:hover,
.nav__dropdown-btn:hover {
  background: var(--theme-bar-hover-bg);
  color: var(--theme-bar-fg);
}

.nav__item--dropdown {
  position: relative;
}

.nav__dropdown-btn::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--theme-bar-fg-muted);
}

.nav__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--theme-bar-bg);
  border: 1px solid var(--theme-bar-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav__item--dropdown:hover .nav__dropdown,
.nav__item--dropdown:focus-within .nav__dropdown,
.nav__item--dropdown.is-open .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--theme-bar-fg-muted);
}

.nav__dropdown a:hover {
  background: var(--theme-bar-hover-bg);
  color: var(--theme-bar-fg);
}

.nav__cta {
  flex-shrink: 0;
}

.header .btn--accent,
.nav .btn--accent {
  background: var(--theme-bar-btn-bg);
  color: var(--theme-bar-btn-fg);
  border-color: transparent;
}

.header .btn--accent:hover,
.nav .btn--accent:hover {
  background: var(--theme-bar-btn-hover);
  color: var(--theme-bar-btn-fg);
}

/* Consultenos CTA: 3D bevel — high specificity so theme solid bg cannot flatten it */
header.header .nav a.nav__cta.btn--accent,
.header .nav__cta,
.nav .nav__cta {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--theme-bar-btn-bg) 55%, #ffffff) 0%,
    color-mix(in srgb, var(--theme-bar-btn-bg) 78%, #ffffff) 18%,
    var(--theme-bar-btn-bg) 48%,
    color-mix(in srgb, var(--theme-bar-btn-bg) 72%, #000000) 82%,
    color-mix(in srgb, var(--theme-bar-btn-bg) 55%, #000000) 100%
  ) !important;
  border: 2px solid color-mix(in srgb, var(--theme-bar-btn-bg) 45%, #000000) !important;
  border-top-color: color-mix(in srgb, var(--theme-bar-btn-bg) 35%, #ffffff) !important;
  border-bottom-color: color-mix(in srgb, var(--theme-bar-btn-bg) 40%, #000000) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    inset 0 -3px 4px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.22) !important;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

header.header .nav a.nav__cta.btn--accent:hover,
.header .nav__cta:hover,
.nav .nav__cta:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--theme-bar-btn-hover) 50%, #ffffff) 0%,
    color-mix(in srgb, var(--theme-bar-btn-hover) 75%, #ffffff) 18%,
    var(--theme-bar-btn-hover) 48%,
    color-mix(in srgb, var(--theme-bar-btn-hover) 70%, #000000) 82%,
    color-mix(in srgb, var(--theme-bar-btn-hover) 52%, #000000) 100%
  ) !important;
  border-color: color-mix(in srgb, var(--theme-bar-btn-hover) 40%, #000000) !important;
  border-top-color: color-mix(in srgb, var(--theme-bar-btn-hover) 30%, #ffffff) !important;
  border-bottom-color: color-mix(in srgb, var(--theme-bar-btn-hover) 35%, #000000) !important;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.92),
    inset 0 -2px 3px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 3px 6px rgba(0, 0, 0, 0.38),
    0 6px 14px rgba(0, 0, 0, 0.26) !important;
  transform: translateY(-1px);
  color: var(--theme-bar-btn-fg);
}

header.header .nav a.nav__cta.btn--accent:active,
.header .nav__cta:active,
.nav .nav__cta:active {
  transform: translateY(1px);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--theme-bar-btn-bg) 65%, #000000) 0%,
    var(--theme-bar-btn-bg) 40%,
    color-mix(in srgb, var(--theme-bar-btn-bg) 70%, #ffffff) 100%
  ) !important;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn--light {
  background: #fff;
  color: #111;
}

.btn--light:hover {
  background: #f0f2f5;
  color: #111;
}

.btn--outline-light {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

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

.section--plate .btn--outline-light {
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

.section--plate .btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  overflow: hidden;
  background: #252a34;
  touch-action: pan-y;
}

.hero__slides {
  position: relative;
  height: min(78vh, 640px);
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero__slide--active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.hero__media {
  position: absolute;
  inset: 0;
  background-color: #252a34;
  contain: layout style paint;
  overflow: hidden;
}

.hero__media:not(.hero__media--loaded)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #2e3440;
  background-image: linear-gradient(
    90deg,
    #2e3440 0%,
    #3a4150 38%,
    #464f60 50%,
    #3a4150 62%,
    #2e3440 100%
  );
  background-size: 200% 100%;
  animation: img-shimmer 1.35s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.hero__media--loaded::before {
  opacity: 0;
  animation: none;
}

.hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.hero__img--chg5000 {
  object-position: 48% 55%;
}

@media (max-width: 767px) {
  .hero__img--chg5000 {
    object-position: 52% 42%;
  }
}

.hero__img--loaded {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 14, 22, 0.92) 0%,
    rgba(10, 14, 22, 0.65) 55%,
    rgba(10, 14, 22, 0.45) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-block: clamp(48px, 12vw, 120px);
  max-width: 620px;
}

.hero__content {
  color: #fff;
}

.hero__eyebrow {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8d6e8;
}

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  font-weight: 700;
  color: #fff;
}

.hero__lead {
  margin: 0 0 28px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 520px;
}

.hero__controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero__dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  cursor: pointer;
}

.hero__dot--active {
  background: var(--accent);
  border-color: var(--accent);
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 14, 22, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, color 0.2s ease;
}

.hero__arrow:hover,
.hero__arrow:focus-visible {
  background: rgba(10, 14, 22, 0.72);
  color: var(--accent);
  outline: none;
}

.hero__arrow--prev {
  left: max(12px, env(safe-area-inset-left, 0px));
}

.hero__arrow--next {
  right: max(12px, env(safe-area-inset-right, 0px));
}

@media (max-width: 767px) {
  .hero {
    min-height: min(62.4vh, 512px);
  }

  .hero__slides {
    height: min(62.4vh, 512px);
  }

  .hero__arrow {
    display: none;
  }
}

/* Sections */
.section {
  padding-block: clamp(56px, 8vw, 88px);
}

.section--defer {
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

.section--muted {
  background: transparent;
}

/* FAQ */
.faq__list {
  max-width: 720px;
  margin-inline: auto;
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--theme-container-bg);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq__item[open] {
  border-color: var(--accent);
}

.faq,
.faq .section__title,
.faq .section__intro,
.faq__question,
.faq__answer,
.faq__answer a {
  color: #1a1d23;
}

.faq__question {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__answer {
  margin: 0;
  padding: 0 20px 16px;
  color: #1a1d23;
  line-height: 1.55;
}

.faq__answer a {
  color: #1a1d23;
}

.section__head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 40px;
}

.section__head--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
  text-align: left;
}

.section__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.section__title--light {
  color: #fff;
}

.section__intro {
  margin: 0;
  color: var(--text-muted);
}

.link-arrow {
  font-weight: 700;
  color: var(--accent);
}

.link-arrow:hover {
  color: var(--accent-hover);
}

/* Plate texture sections - MANTIENEN TEMA OSCURO ORIGINAL */
.section--plate {
  position: relative;
  background-color: #2b2b2b;
  background-image: url("../assets/plate-texture.png");
  background-image: image-set(
    url("../assets/plate-texture.avif") type("image/avif"),
    url("../assets/plate-texture.webp") type("image/webp"),
    url("../assets/plate-texture.png") type("image/png")
  );
  background-repeat: repeat;
  background-size: 301px 35px;
  color: #eee;
}

.section--plate .section__title,
.section--plate .band__title,
.section--plate .band__number {
  color: #fff;
}

.section--plate .band__label {
  color: rgba(255, 255, 255, 0.65);
}

.section--plate .band__text p {
  color: rgba(255, 255, 255, 0.82);
}

.section--plate-tint::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 20, 0.72);
  pointer-events: none;
}

.section--plate-tint > * {
  position: relative;
  z-index: 1;
}

/* Band */
.band {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .band {
    grid-template-columns: 220px 1fr;
    gap: 48px;
  }
}

.band__stat {
  text-align: center;
}

@media (min-width: 768px) {
  .band__stat {
    text-align: left;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-right: 32px;
  }
}

.band__number {
  display: block;
  font-size: clamp(3rem, 8vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  color: var(--band-stat);
}

.band__label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.band__title {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.band__text p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
}

/* Cards grid */
.grid {
  display: grid;
  gap: 22px;
}

.grid--cards {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

.card,
.card__title,
.card__excerpt,
.card__cta {
  color: #1a1d23;
}

.card {
  background: var(--theme-container-bg);
  border-radius: var(--radius);
  border: 1px solid var(--theme-container-border);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s, border-color 0.2s;
  color: #1a1d23;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(136, 147, 164, 0.35);
}

.card__link {
  display: block;
  height: 100%;
  color: inherit;
}

@keyframes img-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(
      .card__thumb,
      .product-card__img,
      .product-gallery__main,
      .product-gallery__thumb,
      .service-block__media,
      .gallery-strip__item
    ):not(.bg-photo--loaded)::after,
  .hero__media:not(.hero__media--loaded)::before {
    animation: none;
  }
}

/* Fotos en CSS: image-set + lazy (ver .bg-photo en main.js) */
:is(
    .card__thumb,
    .product-card__img,
    .product-gallery__main,
    .product-gallery__thumb,
    .service-block__media,
    .gallery-strip__item
  ) {
  position: relative;
  overflow: hidden;
  background-color: #e2e5ea;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

:is(
    .card__thumb,
    .product-card__img,
    .product-gallery__main,
    .product-gallery__thumb,
    .service-block__media,
    .gallery-strip__item
  ):not(.bg-photo--loaded)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #e2e5ea;
  background-image: linear-gradient(
    90deg,
    #e2e5ea 0%,
    #eceef2 38%,
    #f5f6f8 50%,
    #eceef2 62%,
    #e2e5ea 100%
  );
  background-size: 200% 100%;
  animation: img-shimmer 1.35s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

:is(
    .card__thumb,
    .product-card__img,
    .product-gallery__main,
    .product-gallery__thumb,
    .service-block__media,
    .gallery-strip__item
  ).bg-photo--loaded::after {
  opacity: 0;
  animation: none;
}

:is(
    .card__thumb,
    .product-card__img,
    .product-gallery__main,
    .product-gallery__thumb,
    .service-block__media,
    .gallery-strip__item
  ).bg-photo--loaded {
  background-image: var(--bg-fallback);
  background-image: image-set(
    var(--bg-avif) type("image/avif"),
    var(--bg-webp) type("image/webp"),
    var(--bg-fallback) type("image/jpeg")
  );
}

:is(
    .card__thumb--6
  ).bg-photo--loaded {
  background-image: var(--bg-fallback);
  background-image: image-set(
    var(--bg-avif) type("image/avif"),
    var(--bg-webp) type("image/webp"),
    var(--bg-fallback) type("image/png")
  );
}

.logo picture {
  display: block;
  line-height: 0;
}

.bg-photo--lazy:not(.bg-photo--loaded) {
  background-image: none;
}

.section--plate :is(
    .card__thumb,
    .product-card__img,
    .product-gallery__main,
    .product-gallery__thumb,
    .service-block__media,
    .gallery-strip__item
  ) {
  background-color: #3a3f46;
}

.section--plate :is(
    .card__thumb,
    .product-card__img,
    .product-gallery__main,
    .product-gallery__thumb,
    .service-block__media,
    .gallery-strip__item
  ):not(.bg-photo--loaded)::after {
  background-color: #3a3f46;
  background-image: linear-gradient(
    90deg,
    #3a3f46 0%,
    #454b54 38%,
    #505862 50%,
    #454b54 62%,
    #3a3f46 100%
  );
}

.card__thumb {
  aspect-ratio: 16 / 9;
  min-height: 160px;
}

.card__body {
  padding: 18px 18px 22px;
}

.card__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card__excerpt {
  margin: 0 0 14px;
  color: #1a1d23;
  font-size: 0.95rem;
}

.card__cta {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a1d23;
}

.card__link:hover .card__cta {
  color: #000000;
}

/* News */
.grid--news {
  grid-template-columns: 1fr;
}

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

.news {
  background: var(--theme-container-bg);
  border-radius: var(--radius);
  border: 1px solid var(--theme-container-border);
  overflow: hidden;
  color: var(--theme-container-fg);
}

.news__link {
  display: block;
  height: 100%;
  color: inherit;
}

.news__link:hover .news__title {
  color: var(--accent);
}

.news__thumb {
  aspect-ratio: 16 / 9;
  background-image: var(--card-img);
  background-size: cover;
  background-position: center;
}

.news__body {
  padding: 18px;
}

.news__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.news__title {
  margin: 10px 0 8px;
  font-size: 1.15rem;
  transition: color 0.2s;
}

.news__excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Contact */
.contact,
.contact__lead,
.contact__facts,
.contact__facts a,
.contact .section__title {
  color: #1a1d23;
}

.contact {
  display: grid;
  gap: 36px;
  padding: clamp(28px, 4vw, 40px);
  background: var(--theme-container-bg);
  border: 1px solid var(--theme-container-border);
  border-radius: var(--radius);
  color: #1a1d23;
}

@media (min-width: 900px) {
  .contact {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 48px;
  }

  .contact__intro,
  .contact__map-wrap {
    flex: 1 1 0;
    min-width: 0;
  }
}

.contact__lead {
  margin: 0 0 20px;
  color: #1a1d23;
}

.contact__facts {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #1a1d23;
}

.contact__facts li + li {
  margin-top: 8px;
}

.contact__facts a {
  color: #1a1d23;
}

.contact__facts a:hover {
  color: #000000;
}

.contact__facts + .btn {
  margin-top: 28px;
}

.contact .section__title {
  color: #1a1d23;
}

.form {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  padding: 24px;
  background: var(--theme-container-bg);
  border: 1px solid var(--theme-container-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  color: var(--theme-container-fg);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form__field--full {
  grid-column: 1 / -1;
}

.form__field input,
.form__field textarea {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #f8f9fa;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form__field input:focus,
.form__field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form__submit {
  grid-column: 1 / -1;
  justify-self: start;
}

.form__hint {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* Footer */
.footer {
  border-top: 1px solid var(--theme-footer-border);
  padding-block: 48px 24px;
  background: var(--theme-footer-bg);
  color: var(--theme-footer-fg);
}

html[data-theme-footer-logo="contrast"][data-theme-footer-tone="dark"] .footer .logo__img {
  filter: brightness(0) invert(1);
}

html[data-theme-footer-logo="outline"][data-theme-footer-outline-on="true"] .footer .logo__img {
  filter: url(#mg-logo-outline-footer);
}

.footer__grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer__brand .logo--footer {
  margin-bottom: 12px;
}

.footer__tagline {
  margin: 12px 0 0;
  max-width: 280px;
  color: var(--theme-footer-fg-muted);
  font-size: 0.95rem;
}

.footer__title {
  margin: 0 0 14px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-footer-fg-muted);
}

.footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  color: var(--theme-footer-fg-muted);
  font-weight: 600;
}

.footer__links a:hover {
  color: var(--theme-footer-accent-hover);
}

.footer__links li + li {
  margin-top: 10px;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer__social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

.footer__bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--theme-footer-border);
  font-size: 0.85rem;
  color: var(--theme-footer-fg-muted);
  cursor: pointer;
  user-select: none;
}

/* Mobile nav */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--site-header-total);
    right: 0;
    left: auto;
    width: min(320px, 88vw);
    height: auto;
    max-height: calc(100vh - var(--site-header-total));
    max-height: calc(100svh - var(--site-header-total));
    max-height: calc(100dvh - var(--site-header-total));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: var(--theme-bar-bg);
    border-left: 1px solid var(--theme-bar-border);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 310;
    pointer-events: none;
    overscroll-behavior: contain;
  }

  body.nav-open .nav {
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    flex: 0 0 auto;
    max-height: calc(100dvh - var(--site-header-total) - 88px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
  }

  .nav__list > li > a,
  .nav__dropdown-btn {
    width: 100%;
    justify-content: flex-start;
  }

      .nav__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--theme-bar-hover-bg);
        margin-top: 4px;
        display: none;
      }

  .nav__item--dropdown.is-open .nav__dropdown {
    display: block;
  }

  .nav__cta {
    flex-shrink: 0;
    width: 100%;
    margin-top: 20px;
    text-align: center;
    justify-content: center;
  }

  body.nav-open::after {
    content: "";
    position: fixed;
    inset: var(--site-header-total) 0 0 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 280;
  }
}

/* ——— Páginas internas ——— */
.page-hero {
  padding-block: clamp(40px, 6vw, 64px);
  background: linear-gradient(135deg, #2b3038 0%, #3d4552 100%);
  color: #fff;
}

.page-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
}

.page-hero__lead {
  margin: 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb {
  margin: 0 0 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a:hover {
  color: #fff;
}

/* Página Empresa */
.empresa-historia {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 900px) {
  .empresa-historia {
    grid-template-columns: minmax(280px, 1fr) 1fr;
    gap: 48px;
  }
}

.empresa-historia__figure {
  margin: 0;
}

.empresa-historia__photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--theme-container-border);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
  filter: contrast(1.05) saturate(0.85);
}

.empresa-historia__caption {
  margin-top: 12px;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
}

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

.empresa-historia__title {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.empresa-historia__content p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.empresa-historia__values {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.empresa-historia__values li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.empresa-historia__values li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.empresa-expansion {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.empresa-expansion__eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.empresa-expansion__title {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
}

.empresa-expansion__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

/* Catálogo implementos */
.catalog-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.product-card,
.product-card__name,
.product-card__meta,
.product-card__desc {
  color: #1a1d23;
}

.product-card {
  background: var(--theme-container-bg);
  border: 1px solid var(--theme-container-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  color: #1a1d23;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(90, 106, 125, 0.35);
}

.product-card__link {
  display: block;
  color: inherit;
}

.product-card__img {
  aspect-ratio: 16 / 9;
}

.product-card__body {
  padding: 16px 18px 20px;
}

.product-card__name {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.product-card__meta {
  margin: 0;
  font-size: 0.9rem;
  color: #1a1d23;
}

.product-card__desc {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #1a1d23;
  line-height: 1.4;
}

/* Ficha producto */
.product-layout {
  display: grid;
  gap: 36px;
}

@media (min-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.product-gallery__main {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.product-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.product-gallery__thumb {
  width: 72px;
  height: 56px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.product-gallery__thumb--active {
  border-color: var(--accent);
}

/* Visor 360 ficha producto */
.product-viewer {
  position: relative;
}

.product-viewer__frame {
  position: relative;
}

.product-viewer__stage {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #e8eaee;
  overflow: hidden;
}

.product-viewer__zoom {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-viewer__zoom picture {
  display: block;
  width: 100%;
  height: 100%;
}

.product-viewer__zoom:hover .product-viewer__zoom-icon,
.product-viewer__zoom:focus-visible .product-viewer__zoom-icon {
  opacity: 1;
  transform: scale(1);
}

.product-viewer__zoom:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.product-viewer__zoom-icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 14, 22, 0.55);
  opacity: 0.85;
  transform: scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  pointer-events: none;
}

.product-viewer__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.product-viewer__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 14, 22, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, color 0.2s ease;
}

.product-viewer__arrow:hover,
.product-viewer__arrow:focus-visible {
  background: rgba(10, 14, 22, 0.72);
  color: var(--accent);
  outline: none;
}

.product-viewer__arrow--prev {
  left: 12px;
}

.product-viewer__arrow--next {
  right: 12px;
}

.product-viewer__hint {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

body.product-lightbox-open {
  overflow: hidden;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.product-lightbox[hidden] {
  display: none;
}

.product-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.88);
  cursor: zoom-out;
}

.product-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(96vw, 1200px);
  max-height: 96vh;
}

.product-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(96vh - 88px);
}

.product-lightbox__stage picture {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(96vh - 88px);
}

.product-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 2560px);
  max-height: calc(96vh - 88px);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.product-lightbox__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 14, 22, 0.72);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.product-lightbox__close:hover,
.product-lightbox__close:focus-visible {
  background: rgba(10, 14, 22, 0.92);
  color: var(--accent);
  outline: none;
}

.product-lightbox__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 14, 22, 0.55);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, color 0.2s ease;
}

.product-lightbox__arrow:hover,
.product-lightbox__arrow:focus-visible {
  background: rgba(10, 14, 22, 0.85);
  color: var(--accent);
  outline: none;
}

.product-lightbox__arrow--prev {
  left: 8px;
}

.product-lightbox__arrow--next {
  right: 8px;
}

.product-lightbox__caption {
  margin: 14px 0 0;
  color: #f2f4f7;
  font-size: 0.95rem;
  text-align: center;
}

@media (max-width: 767px) {
  .product-lightbox {
    padding: 12px;
  }

  .product-lightbox__arrow {
    width: 40px;
    height: 40px;
  }

  .product-lightbox__arrow--prev {
    left: 4px;
  }

  .product-lightbox__arrow--next {
    right: 4px;
  }

  .product-lightbox__close {
    top: 4px;
    right: 4px;
  }
}

.product-info__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.product-info__desc {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.specs-table th,
.specs-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.specs-table th {
  width: 42%;
  background: var(--bg-muted);
  font-weight: 600;
  color: var(--text-muted);
}

.product-buy {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
}

.product-buy__text {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.product-buy__list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
}

.product-buy__list li + li {
  margin-top: 6px;
}

.product-buy__list a {
  color: var(--accent);
}

.specs-table tr:nth-child(even) td:last-child {
  background: rgba(0, 0, 0, 0.02);
}

.related__title {
  margin: 0 0 20px;
  font-size: 1.25rem;
}

/* Página servicio */
.service-block {
  display: grid;
  gap: 32px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .service-block {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .service-block--reverse .service-block__media {
    order: 2;
  }
}

.service-block__media {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.service-block__title {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.service-block__text {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.cap-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cap-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.cap-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.gallery-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}

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

.gallery-strip__item {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cta-band {
  text-align: center;
  padding: 40px 24px;
  background: rgba(238, 240, 243, 0.75);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cta-band__title {
  margin: 0 0 12px;
}

.cta-band__text {
  margin: 0 0 20px;
  color: var(--text-muted);
}

/* Contacto mapa y WhatsApp */
.contact__map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  min-height: 300px;
}

.contact__map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
}

@media (min-width: 900px) {
  .contact__map-wrap {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
  }

  .contact__map {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
  }
}

.btn--wa {
  background: #25d366;
  color: #fff;
  width: 52px;
  height: 52px;
  min-width: 52px;
  padding: 0;
  border-radius: 50%;
  margin-top: 20px;
}

.btn--wa--labeled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
}

.btn--wa:hover {
  background: #1ebe57;
  color: #fff;
}

.btn--wa__icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* Burbuja flotante WhatsApp (inyectada por main.js) */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 250;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  color: #fff;
}

.wa-float__icon {
  width: 30px;
  height: 30px;
}

/* Paleta oculta de preview de colores (triple clic en footer) */
.theme-palette {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 400;
  width: min(360px, calc(100vw - 40px));
  max-height: min(82vh, 640px);
  overflow-y: auto;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
}

.theme-palette.is-open {
  display: block;
}

.theme-palette__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
}

.theme-palette__hint {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.theme-palette__group + .theme-palette__group {
  margin-top: 14px;
}

.theme-palette__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.theme-palette__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.theme-palette__opacity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.theme-palette__opacity-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.theme-palette__opacity input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}

.theme-palette__opacity-value {
  min-width: 2.6em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
}

.theme-palette__logo-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.theme-palette__group--logo-file {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.theme-palette__logo-file-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.theme-palette__logo-file-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 72px;
  padding: 8px 6px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.theme-palette__logo-file-btn::before {
  content: "";
  display: block;
  width: 100%;
  height: 34px;
  border-radius: 6px;
  background: var(--bg-muted) center / contain no-repeat;
}

.theme-palette__logo-file-btn[data-logo-variant="original"]::before {
  background-image: url("../assets/logo-gerreiro.png");
}

.theme-palette__logo-file-btn[data-logo-variant="gris"]::before {
  background-image: url("../assets/logo-gerreiro-variant-gris.png");
}

.theme-palette__logo-file-btn[data-logo-variant="bisel"]::before {
  background-image: url("../assets/logo-gerreiro-variant-bisel.png");
}

.theme-palette__logo-file-btn.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.theme-palette__logo-file-btn:hover:not(.is-active) {
  background: var(--bg-muted);
}

.theme-palette__logo-file-note {
  margin: 8px 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.theme-palette__logo-file-hint {
  margin: 8px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--accent);
}

.theme-palette__logo-file-hint.is-error {
  color: #991b1b;
}

.theme-palette__logo-btns {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.theme-palette__logo-btn {
  flex: 1 1 calc(33.333% - 6px);
  min-width: 4.8em;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-palette__logo-btn.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.theme-palette__logo-btn:hover:not(.is-active) {
  background: var(--bg-muted);
}

.theme-palette__outline.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.theme-palette__swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-palette__swatch:hover,
.theme-palette__swatch:focus-visible {
  transform: scale(1.08);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.theme-palette__swatch.is-active {
  box-shadow: 0 0 0 2px var(--text);
}

.theme-palette__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.theme-palette__btn--primary {
  flex: 1 1 100%;
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.theme-palette__btn--primary:hover {
  background: #2a2a2a;
  border-color: #2a2a2a;
}

.theme-palette__export-status {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.78rem;
  color: var(--accent);
}

.theme-palette__export-status.is-error {
  color: #991b1b;
}

.theme-palette__export-fallback {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  resize: vertical;
  color: var(--text-muted);
  background: var(--bg-muted);
}

.theme-palette__btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-palette__btn:hover {
  background: #e4e7ec;
}

