/* =========================================================
   Bomberos Gigante — Hoja de estilos
   Sistema: Trust & Authority | Paleta: Alert Red + Safety Blue
   Mobile-first | WCAG AA | Tipografía: Poppins + Open Sans
   ========================================================= */

/* ----------- 1. TOKENS ----------- */
:root {
  /* Color */
  --color-primary: #DC2626;
  --color-primary-dark: #B91C1C;
  --color-on-primary: #FFFFFF;
  --color-secondary: #EF4444;
  --color-accent: #2563EB;
  --color-accent-dark: #1D4ED8;

  --color-bg: #FFFFFF;
  --color-bg-alt: #FFF1F2;
  --color-foreground: #0F172A;
  --color-muted: #FCF1F1;
  --color-muted-foreground: #475569;
  --color-border: #E2E8F0;
  --color-border-soft: #F1F5F9;

  --color-danger: #DC2626;
  --color-success: #059669;
  --color-warning: #B45309;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 18px -4px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.18);
  --shadow-emergency: 0 12px 28px -6px rgba(220, 38, 38, 0.45);

  /* Radio */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Espaciado (escala 4/8) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Tipografía */
  --font-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", var(--font-sans);

  /* Layout */
  --container: 1200px;
  --header-h: 64px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-base: 220ms;
}

/* ----------- 2. RESET / BASE ----------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-foreground);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-foreground);
  letter-spacing: -0.01em;
}

p { color: var(--color-muted-foreground); }

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--color-primary); color: #fff; }

/* Accesibilidad: skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10000;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  transition: top var(--t-base) var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------- 3. LAYOUT ----------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) { .container { padding-inline: 32px; } }

.section {
  padding-block: 56px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
@media (min-width: 768px) { .section { padding-block: 96px; } }

.section-alt { background: var(--color-bg-alt); }
.section-cta {
  background: linear-gradient(160deg, #0F172A 0%, #1E293B 100%);
  color: #fff;
}
.section-cta h2, .section-cta h3 { color: #fff; }
.section-cta p { color: rgba(255, 255, 255, 0.78); }
.kicker-light { color: #FCA5A5; }

.section-head {
  max-width: 720px;
  margin: 0 auto var(--s-7);
  text-align: center;
}
.section-head h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin-bottom: 12px; }
.section-head p { font-size: 1.0625rem; }

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  background: rgba(220, 38, 38, 0.1);
  padding: 6px 14px;
  border-radius: var(--r-full);
  margin-bottom: 16px;
}

/* ----------- 4. BOTONES ----------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 22px;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  transition: transform var(--t-fast) var(--ease-out),
              background-color var(--t-base) var(--ease-out),
              color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
  white-space: nowrap;
  user-select: none;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-emergency {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #fff;
  box-shadow: var(--shadow-emergency);
  position: relative;
  animation: pulse-emergency 2.4s var(--ease-out) infinite;
}
.btn-emergency:hover { transform: translateY(-2px) scale(1.02); }

.btn-ghost {
  background: transparent;
  color: var(--color-foreground);
  border-color: var(--color-border);
}
.btn-ghost:hover { background: var(--color-muted); border-color: #CBD5E1; }

.section-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.25); }
.section-cta .btn-ghost:hover { background: rgba(255,255,255,0.1); }

@keyframes pulse-emergency {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45), 0 12px 28px -6px rgba(220, 38, 38, 0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0),   0 12px 28px -6px rgba(220, 38, 38, 0.4); }
}

/* ----------- 5. HEADER ----------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.site-header.is-scrolled {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FCD34D;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.1;
  color: var(--color-foreground);
}
.brand-sub {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-muted-foreground);
  letter-spacing: 0.04em;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.nav-desktop a {
  padding: 8px 9px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted-foreground);
  white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav-desktop a:hover { color: var(--color-foreground); background: var(--color-muted); }

.btn-emergency--desktop { display: none; }

/* Toggle móvil */
.nav-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.nav-toggle:hover { background: var(--color-muted); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-foreground);
  border-radius: 2px;
  position: relative;
  transition: transform var(--t-base) var(--ease-out),
              opacity var(--t-base) var(--ease-out);
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .btn-emergency--desktop { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Menú móvil */
.nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 24px;
  background: #fff;
  border-top: 1px solid var(--color-border);
  animation: slide-down 280ms var(--ease-out);
}
.nav-mobile[hidden] { display: none; }
.nav-mobile a {
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-foreground);
  transition: background var(--t-fast);
}
.nav-mobile a:hover, .nav-mobile a:focus-visible { background: var(--color-muted); }
.btn-emergency--mobile { margin-top: 12px; justify-content: center; }

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------- 6. HERO ----------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: 64px 48px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero { padding-block: 96px 72px; }
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #FFFFFF 0%, #FFF1F2 100%);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220, 38, 38, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 38, 38, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.hero-inner { max-width: 880px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 8px 14px;
  border-radius: var(--r-full);
  margin-bottom: 20px;
  border: 1px solid rgba(220, 38, 38, 0.15);
}
.hero-eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: blink 1.5s var(--ease-out) infinite;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
}
@keyframes blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

.hero-title {
  font-size: clamp(1.875rem, 6vw, 3.4rem);
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-title .hl {
  background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.125rem;
  max-width: 640px;
  margin-bottom: 32px;
  color: var(--color-muted-foreground);
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
@media (min-width: 480px) {
  .hero-ctas { flex-direction: row; flex-wrap: wrap; }
}

.hero-trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.9375rem;
}
.hero-trust svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }

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

/* ----------- 7. CARDS / SERVICES ----------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(220, 38, 38, 0.25);
}
.card-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--icon-bg);
  color: var(--icon-fg);
  margin-bottom: 18px;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { font-size: 0.9375rem; }

/* ----------- 8. TAB-APH ----------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.two-col h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 16px; }
.two-col > div > p { margin-bottom: 24px; font-size: 1.0625rem; }

@media (min-width: 900px) {
  .two-col { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
}

.check-list { margin-bottom: 28px; display: grid; gap: 12px; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 500;
}
.check-list svg {
  width: 22px; height: 22px;
  color: var(--color-primary);
  background: rgba(220, 38, 38, 0.1);
  border-radius: 50%;
  padding: 4px;
  flex-shrink: 0;
}

.feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
.feature-stat {
  text-align: center;
  padding: 20px 12px;
  background: var(--color-bg-alt);
  border-radius: var(--r-md);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 6vw, 2rem);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ----------- 9. NOSOTROS / VALUES ----------- */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }

.value {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  position: relative;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--color-primary);
  opacity: 0.15;
  margin-bottom: 12px;
}
.value h3 { font-size: 1.375rem; margin-bottom: 8px; }
.value p { font-size: 0.9375rem; }

/* ----------- 10. NEWS ----------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news {
  display: flex;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.news:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.news--featured {
  padding: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.news-image {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

.news--featured .news-body {
  padding: 24px;
}

.news--featured h3 {
  margin-top: 10px;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
}

.news--featured p {
  margin-top: 12px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .news--featured {
    grid-column: 1 / -1;
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  }

  .news-image {
    height: 100%;
    min-height: 520px;
  }

  .news--featured .news-body {
    padding: 32px;
  }
}

.news-date {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  background: var(--color-bg-alt);
  border-radius: var(--r-md);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: flex-start;
}
.news-date .d {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-primary);
}
.news-date .m {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  margin-top: 4px;
}

.news-body { flex: 1; min-width: 0; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-primary);
  margin-bottom: 8px;
}
.tag-blue { background: rgba(37, 99, 235, 0.1); color: var(--color-accent); }
.tag-green { background: rgba(5, 150, 105, 0.1); color: var(--color-success); }

.news h3 { font-size: 1.0625rem; margin-bottom: 6px; line-height: 1.3; }
.news p { font-size: 0.875rem; }

/* ----------- 11. TRANSPARENCIA ----------- */
.trans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .trans-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trans-grid { grid-template-columns: repeat(4, 1fr); } }

.trans-card {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.trans-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.trans-card svg {
  width: 32px; height: 32px;
  color: var(--color-primary);
  margin: 0 auto 12px;
}
.trans-card h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.trans-card p { font-size: 0.875rem; }

.trans-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-muted);
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent);
  border-radius: var(--r-full);
  transition: background var(--t-fast), color var(--t-fast);
}
.trans-card-meta svg { width: 14px; height: 14px; margin: 0; }
.trans-card:hover .trans-card-meta {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ----------- 12. CONTACTO ----------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }

.contact-list { display: grid; gap: 20px; margin-top: 28px; }
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ci {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.ci svg { width: 20px; height: 20px; color: #FCA5A5; }
.contact-list .lbl {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  margin-bottom: 2px;
}
.contact-list .val {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
}
.contact-list a.val:hover { color: #FCA5A5; }

.contact-form {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 32px 24px;
  color: var(--color-foreground);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) { .contact-form { padding: 40px; } }
.contact-form h3 { font-size: 1.375rem; margin-bottom: 20px; }

.field { margin-bottom: 16px; display: block; }
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 480px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--color-foreground);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  background: #F8FAFC;
  border: 2px solid var(--color-border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}
.field input:invalid:not(:placeholder-shown) { border-color: var(--color-danger); }

.form-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(5, 150, 105, 0.1);
  color: var(--color-success);
  display: none;
}
.form-note.is-show { display: block; }
.form-note.is-error { background: rgba(220, 38, 38, 0.1); color: var(--color-primary); }

/* ----------- 13. FOOTER ----------- */
.site-footer {
  background: #0F172A;
  color: rgba(255, 255, 255, 0.78);
  padding-top: 56px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
}
.brand-light .brand-title { color: #fff; }
.brand-light .brand-sub { color: rgba(255, 255, 255, 0.6); }

.footer-tag { margin-top: 16px; font-size: 0.9375rem; max-width: 320px; color: rgba(255,255,255,0.6); }

.footer-nav h4, .site-footer h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-weight: 700;
}
.footer-nav { display: grid; gap: 8px; }
.footer-nav a { font-size: 0.9375rem; color: rgba(255,255,255,0.7); transition: color var(--t-fast); }
.footer-nav a:hover { color: #fff; }

.site-footer p { color: rgba(255,255,255,0.7); font-size: 0.9375rem; margin-bottom: 6px; }
.site-footer a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.3); text-underline-offset: 3px; }
.site-footer a:hover { text-decoration-color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  font-size: 0.8125rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
}
.footer-bottom p { color: inherit; font-size: inherit; margin: 0; }

/* ----------- 14. FAB EMERGENCY (móvil) ----------- */
.fab-emergency {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 14px 20px;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-emergency);
  animation: pulse-emergency 2.4s var(--ease-out) infinite;
  transition: transform var(--t-base);
}
.fab-emergency:hover { transform: scale(1.05); }
.fab-emergency svg { width: 20px; height: 20px; }
@media (min-width: 1024px) {
  .fab-emergency { display: none; }
}

/* ----------- 15. UTILIDADES ----------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------- 16. ANIMACIONES DE ENTRADA ----------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ----------- 17. HERO: LEMA Y BOTONES RÁPIDOS ----------- */
.hero-motto {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
  font-size: 1.0625rem;
}

.hero-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.hero-quick-grid .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
}

/* Logo real en brand-mark */
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

/* Segundo bloque TAB/APH: reequilibra proporciones al invertir el orden visual */
.two-col-reverse { }
@media (min-width: 900px) {
  .two-col-reverse { grid-template-columns: 0.9fr 1.1fr; }
}

/* ----------- 18. NOSOTROS: ORGANIGRAMA Y RANGOS ----------- */
.nosotros-sub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-top: 56px;
}
@media (min-width: 1024px) {
  .nosotros-sub { grid-template-columns: 1.5fr 1fr; }
}

.sub-head {
  font-size: 1.25rem;
  margin-bottom: 24px;
  text-align: center;
}
@media (min-width: 1024px) { .sub-head { text-align: left; } }

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.org-node {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--r-md);
  text-align: center;
}
.org-top { background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%); }
.org-second { background: #1E293B; }
.org-connector {
  width: 2px;
  height: 20px;
  background: var(--color-border);
}
.org-branches {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  margin-top: 20px;
}
@media (min-width: 640px) { .org-branches { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .org-branches { grid-template-columns: repeat(4, 1fr); } }

.org-branch {
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--branch-fg, var(--color-primary));
  border-radius: var(--r-md);
  padding: 18px 16px;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.org-branch:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.org-branch h4 {
  font-size: 0.9375rem;
  color: var(--branch-fg, var(--color-primary));
  margin-bottom: 10px;
}
.org-branch ul { display: grid; gap: 6px; }
.org-branch li {
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
  padding-left: 14px;
  position: relative;
}
.org-branch li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--branch-fg, var(--color-primary));
}

.rank-list {
  display: grid;
  gap: 8px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.rank-item:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.rank-badge {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1E293B;
  color: #FCD34D;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
}

/* ----------- 19. ALMACÉN: TABS Y CATÁLOGO ----------- */
.store-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}
.store-tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 20px;
  color: var(--color-muted-foreground);
  border-bottom: 3px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
  min-height: 44px;
}
.store-tab:hover { color: var(--color-foreground); }
.store-tab.is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
/* Contador de coincidencias durante la búsqueda */
.store-tab .tab-count {
  display: inline-block;
  margin-left: 6px;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--color-muted);
  color: var(--color-muted-foreground);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: middle;
}
.store-tab .tab-count[hidden] { display: none; }
.store-tab.is-active .tab-count {
  background: var(--color-primary);
  color: #fff;
}
.store-tab.is-empty { opacity: 0.5; }

.store-panel[hidden] { display: none; }

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start; /* evita que las tarjetas cerradas se estiren a la altura de la abierta */
}
.catalog-cat[hidden] { display: none; }
@media (min-width: 640px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }

.catalog-cat {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 4px;
  transition: box-shadow var(--t-base), border-color var(--t-base);
}
.catalog-cat[open] { box-shadow: var(--shadow-sm); border-color: rgba(220, 38, 38, 0.25); }
.catalog-cat summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  min-height: 44px;
}
.catalog-cat summary::-webkit-details-marker { display: none; }
.catalog-cat summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 2px solid var(--color-muted-foreground);
  border-bottom: 2px solid var(--color-muted-foreground);
  transform: rotate(45deg);
  transition: transform var(--t-base) var(--ease-out);
}
.catalog-cat[open] summary::after { transform: rotate(-135deg); }
.catalog-cat .count {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
  text-transform: none;
  letter-spacing: normal;
  margin-right: auto;
  margin-left: 12px;
}
.catalog-cat ul {
  padding: 0 20px 20px 20px;
  display: grid;
  gap: 8px;
}
.catalog-cat li {
  font-size: 0.9375rem;
  color: var(--color-muted-foreground);
  padding-left: 16px;
  position: relative;
}
.catalog-cat li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ----------- 20. MAPA (CONTACTO) ----------- */
.map-embed {
  margin-top: 28px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 16 / 10;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ----------- 21. NUESTRO PERSONAL ----------- */
.staff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .staff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .staff-grid { grid-template-columns: repeat(4, 1fr); } }

.staff-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.staff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.staff-card--pending { border-style: dashed; }

.staff-photo {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.staff-photo svg { width: 40px; height: 40px; }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.staff-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-primary);
  margin-bottom: 10px;
}
.staff-card h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.staff-card p { font-size: 0.875rem; }

/* ----------- 22. ALMACÉN: CATÁLOGO DE PRODUCTOS CON IMÁGENES ----------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1040px;
    margin-inline: auto;
  }
}

.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.product-card[hidden] { display: none; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Imagen apaisada: ocupa mucho menos alto que el cuadrado 1:1 anterior */
.product-img {
  aspect-ratio: 16 / 10;
  max-height: 220px;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
.product-card:hover .product-img img { transform: scale(1.05); }

.product-body { padding: 18px 18px 20px; }
.product-body h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.product-tagline {
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
  margin-bottom: 12px;
  min-height: 2.4em;
}

.product-details summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-primary);
  min-height: 32px;
}
.product-details summary::-webkit-details-marker { display: none; }
.product-details summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform var(--t-base) var(--ease-out);
}
.product-details[open] summary::after { transform: rotate(-135deg); }
.product-details ul {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}
.product-details li {
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
  padding-left: 14px;
  position: relative;
}
.product-details li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ----------- 23. INSPECCIONES DE SEGURIDAD (ALMACÉN) ----------- */
.insp-block { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--color-border); }

.inline-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.steps-list {
  counter-reset: step;
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}
.steps-list li {
  position: relative;
  padding-left: 44px;
  font-size: 0.9375rem;
  min-height: 28px;
}
.steps-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  display: grid;
  place-items: center;
}

.tariff-cat .count {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 3px 12px;
  border-radius: var(--r-full);
  margin-left: auto;
}

.tariff-note {
  margin-top: 20px;
  font-size: 0.8125rem;
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

/* ----------- 24. HERO BANNER ----------- */
.hero-banner-wrap { margin-bottom: 32px; }
.hero-banner {
  width: 100%;
  height: auto;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ----------- 25. CATÁLOGO DE PRECIOS (ALMACÉN) ----------- */
.price-catalog { margin-top: 48px; }

/* ----------- 25a. BUSCADOR GLOBAL DEL ALMACÉN ----------- */
/* Oculta la "x" nativa de input[type=search]: duplicaba nuestro botón de limpiar */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.store-search-wrap {
  margin-bottom: 24px;
  max-width: 560px;
  margin-inline: auto;
}
.store-search {
  position: relative;
}
.store-search > svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--color-muted-foreground);
  pointer-events: none;
}
.store-search input {
  width: 100%;
  padding: 12px 44px 12px 40px;
  font-size: 1rem;
  font-family: var(--font-sans);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-full);
  min-height: 46px;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.store-search input::placeholder { color: var(--color-muted-foreground); }
.store-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.store-search-clear {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  color: var(--color-muted-foreground);
  background: transparent;
  transition: background var(--t-fast), color var(--t-fast);
}
/* El atributo hidden debe ganarle al display:grid de arriba */
.store-search-clear[hidden] { display: none; }
.store-search-clear:hover { background: var(--color-bg-alt); color: var(--color-primary); }
.store-search-clear svg { width: 16px; height: 16px; }
.store-search-status {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
  text-align: center;
  min-height: 1.2em;
}

/* ----------- 25b. BUSCADOR DE CERTIFICACIÓN BOMBERIL ----------- */
.insp-search-wrap {
  margin-bottom: 28px;
  max-width: 560px;
  margin-inline: auto;
}
.insp-search {
  position: relative;
}
.insp-search > svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--color-muted-foreground);
  pointer-events: none;
}
.insp-search input {
  width: 100%;
  padding: 12px 44px 12px 40px;
  font-size: 1rem;
  font-family: var(--font-sans);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-full);
  min-height: 46px;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.insp-search input::placeholder { color: var(--color-muted-foreground); }
.insp-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.insp-search-clear {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  color: var(--color-muted-foreground);
  background: transparent;
  transition: background var(--t-fast), color var(--t-fast);
}
/* El atributo hidden debe ganarle al display:grid de arriba */
.insp-search-clear[hidden] { display: none; }
.insp-search-clear:hover { background: var(--color-bg-alt); color: var(--color-primary); }
.insp-search-clear svg { width: 16px; height: 16px; }
.insp-search-status {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
  text-align: center;
  min-height: 1.2em;
}

.insp-results { margin-bottom: 32px; }
.insp-result-card {
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.insp-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.insp-result-head h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-top: 4px;
  color: var(--color-foreground);
}
.insp-result-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.insp-cat-tag {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 4px 14px;
  border-radius: var(--r-full);
}
.insp-result-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-primary);
  line-height: 1;
}
.insp-result-desc {
  font-size: 0.9375rem;
  color: var(--color-muted-foreground);
  margin-bottom: 16px;
  line-height: 1.55;
}
.insp-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.price-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.price-search {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
}
.price-search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--color-muted-foreground);
  pointer-events: none;
}
.price-search input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  font-size: 1rem;
  background: #F8FAFC;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-full);
  min-height: 44px;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.price-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.price-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.price-chip {
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--color-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted-foreground);
  min-height: 36px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.price-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.price-chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.price-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  background: #fff;
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
@media (max-width: 640px) {
  .price-table { min-width: 0; }
  .price-table th:nth-child(2),
  .price-table td:nth-child(2) { display: none; }
}
.price-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted-foreground);
  padding: 14px 18px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
}
.price-table td {
  padding: 12px 18px;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--color-border-soft);
}
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:hover td { background: var(--color-bg-alt); }
.price-table tr[hidden] { display: none; }

.price-cell {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.cat-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--color-muted);
  color: var(--color-muted-foreground);
  white-space: nowrap;
}

.price-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--color-muted-foreground);
  display: none;
}
.price-empty.is-show { display: block; }

.price-count {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
  text-align: center;
}

/* ----------- 26. FORMULARIO DE SOLICITUD DE INSPECCIÓN -----------
   Estilo "Accessible & Ethical": alto contraste, foco visible de 3-4px,
   objetivos táctiles de 44px+, movimiento discreto y divulgación
   progresiva en 3 pasos. Hereda la identidad roja del sitio.
   ---------------------------------------------------------------- */
.insp-form-wrap {
  margin: 40px 0 48px;
  max-width: 780px;
  margin-inline: auto;
}

/* --- Disparador plegado --- */
.form-opener {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 18px 20px;
  min-height: 72px;
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--t-base), transform var(--t-base), background var(--t-fast);
}
.form-opener:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.form-opener:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}
.form-opener[aria-expanded="true"] {
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-bottom-color: var(--color-border);
  transform: none;
}
.form-opener-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.form-opener-icon svg { width: 22px; height: 22px; }
.form-opener-text { display: grid; gap: 2px; }
.form-opener-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--color-foreground);
}
.form-opener-sub {
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
}
.form-opener-chevron {
  margin-left: auto;
  flex-shrink: 0;
  width: 12px; height: 12px;
  border-right: 2.5px solid var(--color-primary);
  border-bottom: 2.5px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform var(--t-base) var(--ease-out);
}
.form-opener[aria-expanded="true"] .form-opener-chevron { transform: rotate(-135deg); }

/* --- Panel --- */
.insp-form-panel {
  background: #fff;
  border: 2px solid var(--color-primary);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: 24px 20px 28px;
}
.insp-form-panel[hidden] { display: none; }
@media (min-width: 768px) { .insp-form-panel { padding: 32px 36px 36px; } }

/* --- Indicador de pasos --- */
.form-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  list-style: none;
  margin-bottom: 8px;
}
.form-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  padding-top: 4px;
}
/* Línea conectora entre pasos */
.form-step::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
}
.form-step:first-child::before { display: none; }
.form-step.is-done::before,
.form-step.is-current::before { background: var(--color-primary); }
.step-dot {
  position: relative;
  z-index: 1;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-border);
  color: var(--color-muted-foreground);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.form-step.is-current .step-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.form-step.is-done .step-dot {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
  font-size: 0;
}
/* Palomita del paso completado: forma, no solo color */
.form-step.is-done .step-dot::after {
  content: "";
  width: 6px; height: 11px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}
.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted-foreground);
  text-align: center;
  line-height: 1.3;
}
.form-step.is-current .step-label { color: var(--color-primary); }

.form-step-status {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-muted-foreground);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border-soft);
}

/* --- Paneles del formulario --- */
.form-pane { border: 0; }
.form-pane[hidden] { display: none; }
.form-pane-legend {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-foreground);
  margin-bottom: 4px;
  padding: 0;
}
.form-pane-hint {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  margin-bottom: 20px;
}

.req { color: var(--color-primary); margin-left: 2px; }

.field-help {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
}
.field-error {
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.field-error[hidden] { display: none; }
/* Marca de error con forma, no solo color */
.field-error::before {
  content: "!";
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--color-primary);
  background: rgba(220, 38, 38, 0.04);
}
/* El estilo :invalid global no debe pintar campos aún sin tocar */
.insp-form input:invalid:not(:placeholder-shown) { border-color: var(--color-border); }
.insp-form .field.has-error input:invalid { border-color: var(--color-primary); }

.insp-form input[readonly] {
  background: var(--color-muted);
  color: var(--color-muted-foreground);
  cursor: default;
}

/* Casilla de autorización */
.field-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 24px;
  padding: 16px;
  background: var(--color-bg-alt);
  border-radius: var(--r-md);
}
/* Deshace el estilo de input de texto heredado de `.field input`
   para que vuelva a verse (y a marcarse) como una casilla nativa */
.field-check input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  margin-top: 2px;
  border: 0;
  border-radius: 0;
  background: none;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.field-check input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: none;
}
.field-check label {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-muted-foreground);
  margin: 0;
  cursor: pointer;
}
.field-check.has-error { outline: 2px solid var(--color-primary); }

/* --- Adjuntos --- */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px) { .upload-grid { grid-template-columns: 1fr 1fr; } }

.upload-item { position: relative; }
/* Input real: invisible pero enfocable por teclado */
.upload-item input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}
.upload-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  min-height: 76px;
  background: #F8FAFC;
  border: 2px dashed var(--color-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.upload-drop:hover { border-color: var(--color-primary); background: var(--color-bg-alt); }
.upload-item input[type="file"]:focus-visible + .upload-drop {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
.upload-item.is-filled .upload-drop {
  border-style: solid;
  border-color: var(--color-success);
  background: rgba(5, 150, 105, 0.06);
}
.upload-item.has-error .upload-drop { border-color: var(--color-primary); }
.upload-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-muted-foreground);
}
.upload-icon svg { width: 18px; height: 18px; }
.upload-item.is-filled .upload-icon { color: var(--color-success); border-color: var(--color-success); }
.upload-text { display: grid; gap: 2px; min-width: 0; }
.upload-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-foreground);
}
.upload-sub {
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
}
.upload-file {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--color-muted);
  font-size: 0.75rem;
  color: var(--color-foreground);
}
.upload-file[hidden] { display: none; }
.upload-file .file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file .file-remove {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--color-muted-foreground);
  background: transparent;
  cursor: pointer;
}
.upload-file .file-remove:hover { background: #fff; color: var(--color-primary); }
.upload-file .file-remove svg { width: 14px; height: 14px; }

/* --- Resumen --- */
.form-summary {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--color-bg-alt);
  border-radius: var(--r-md);
  border: 1px solid rgba(220, 38, 38, 0.18);
}
.form-summary h4 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  margin-bottom: 12px;
  color: var(--color-foreground);
}
.form-summary dl {
  display: grid;
  gap: 8px;
  font-size: 0.8125rem;
}
.form-summary .sum-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: space-between;
}
.form-summary dt { color: var(--color-muted-foreground); }
.form-summary dd { font-weight: 600; color: var(--color-foreground); text-align: right; }

/* --- Acciones --- */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.form-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 48px; }
.form-actions .btn[hidden] { display: none; }
.form-actions .btn-ghost { flex: 0 1 auto; }
.form-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.form-legal {
  margin-top: 16px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-muted-foreground);
  text-align: center;
}
.form-legal strong { color: var(--color-primary); }

.insp-form .form-note { margin-top: 20px; }

/* Trampa antispam: fuera de pantalla, nunca visible */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .form-opener:hover { transform: none; }
}

/* ----------- 27. PÁGINA DE CONFIRMACIÓN ----------- */
.thanks-main {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: var(--color-bg-alt);
}
.thanks-card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 36px 24px 32px;
  text-align: center;
}
@media (min-width: 640px) { .thanks-card { padding: 48px 44px 40px; } }
.thanks-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.12);
  color: var(--color-success);
}
.thanks-icon svg { width: 36px; height: 36px; }
.thanks-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-bottom: 12px;
}
.thanks-card > p {
  color: var(--color-muted-foreground);
  margin-bottom: 24px;
}
.thanks-next {
  text-align: left;
  background: var(--color-bg-alt);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.thanks-next h2 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  margin-bottom: 10px;
}
.thanks-next ul { display: grid; gap: 8px; list-style: none; }
.thanks-next li {
  position: relative;
  padding-left: 18px;
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
}
.thanks-next li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}
.thanks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* =========================================================
   13. ROSTER (Personal / Unidades activas)
   Mobile-first · 5 columnas desktop · 3 tablet · 2 móvil
   ========================================================= */

.roster-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.roster-card {
  --tier-color: var(--color-foreground);
  --tier-bg: var(--color-muted);
  --tier-accent: var(--color-accent);

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  overflow: hidden;
  isolation: isolate;
}

.roster-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--tier-color);
  z-index: 1;
}

.roster-card:hover,
.roster-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--tier-color) 35%, var(--color-border));
}

.roster-card:focus-within {
  outline: 3px solid color-mix(in srgb, var(--tier-accent) 60%, transparent);
  outline-offset: 2px;
}

/* Jerarquía por tier (data-tier en el <li>) */
.roster-card[data-tier="lead"] {
  --tier-color: var(--color-primary);
  --tier-bg: #FEF2F2;
  background: linear-gradient(180deg, #FEF2F2 0%, var(--color-bg) 70%);
  border-color: color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
  padding: 18px 14px 16px;
}

.roster-card[data-tier="lead"] .roster-avatar {
  width: 88px;
  height: 88px;
  box-shadow: 0 8px 20px -6px rgba(220, 38, 38, 0.45);
}

.roster-card[data-tier="lead"] .roster-name {
  font-size: 0.9375rem;
  font-weight: 700;
}

.roster-card[data-tier="lead"] .roster-rank {
  font-size: 0.8125rem;
  color: var(--color-primary-dark);
  font-weight: 600;
}

.roster-card[data-tier="of"] {
  --tier-color: #1D4ED8;
  --tier-bg: #EFF6FF;
  --tier-accent: #2563EB;
}

.roster-card[data-tier="nco"] {
  --tier-color: #047857;
  --tier-bg: #ECFDF5;
  --tier-accent: #059669;
}

.roster-card[data-tier="bmb"] {
  --tier-color: #B45309;
  --tier-bg: #FFFBEB;
  --tier-accent: #D97706;
}

/* Avatar */
.roster-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: block;
  background: var(--tier-bg);
  border: 2px solid color-mix(in srgb, var(--tier-color) 30%, transparent);
  flex-shrink: 0;
  margin-top: 4px;
  object-fit: cover;
  object-position: center top;
}

/* Tag opcional (ej. Comandante) */
.roster-lead-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--r-full);
  margin-bottom: -2px;
}

/* Nombre */
.roster-name {
  margin: 0;
  font-family: var(--font-heading, "Poppins", system-ui, sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-foreground);
  /* wrap-friendly: permite hasta 2-3 líneas sin desbordes */
  word-break: break-word;
  hyphens: auto;
}

/* Rango */
.roster-rank {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-muted-foreground);
  font-weight: 500;
}

/* ---------- Breakpoints ---------- */

/* ≥640px → 3 columnas (tablet) */
@media (min-width: 640px) {
  .roster-grid {
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ≥900px → 5 columnas */
@media (min-width: 900px) {
  .roster-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Ajustes de tamaño para escritorio */
@media (min-width: 1100px) {
  .roster-grid {
    gap: 20px;
  }
  .roster-card { padding: 20px 16px 18px; }
  .roster-avatar { width: 96px; height: 96px; }
  .roster-card[data-tier="lead"] { padding: 20px 16px 18px; }
  .roster-card[data-tier="lead"] .roster-avatar {
    width: 96px;
    height: 96px;
  }
  .roster-name { font-size: 0.9375rem; }
  .roster-rank { font-size: 0.8125rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .roster-card { transition: none; }
  .roster-card:hover { transform: none; }
}
