/* ============================================================
   GRUPO AES — Block Styles
   Maps WordPress blocks to the original BEM design.
   Source of truth: docs/css/styles.css
   ============================================================ */

/* ------------------------------------------------------------ */
/* 1. HERO                                                       */
/* ------------------------------------------------------------ */
.wp-block-group.home-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Content layer sits above aes/hero-background */
.wp-block-group.home-hero .home-hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  padding: 170px clamp(1rem, 5vw, 2.5rem) 60px;
}

/* Logo */
.wp-block-group.home-hero .hero-brand-logo {
  margin: 0 auto 2rem !important;
  width: 760px;
  max-width: 100%;
}

.wp-block-group.home-hero .hero-brand-logo img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.45));
}

.wp-block-group.home-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.wp-block-group.home-hero .hero-subtitle strong { color: #fff; }

/* Hero buttons */
.wp-block-group.home-hero .wp-block-button .wp-block-button__link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.85em 1.75em !important;
  border-radius: 4px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: clamp(0.875rem, 2vw, 1rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease !important;
}

.wp-block-group.home-hero .wp-block-button .wp-block-button__link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 20px rgba(22, 38, 64, 0.12) !important;
}

.wp-block-group.home-hero .hero-cta-primary .wp-block-button__link {
  background-color: #e52d22 !important;
  color: #fff !important;
}

/* Arrow icon inside primary CTA */
.wp-block-group.home-hero .hero-cta-primary .wp-block-button__link::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.4rem;
  transition: margin-left 0.25s ease;
}

.wp-block-group.home-hero .hero-cta-primary .wp-block-button__link:hover::after {
  margin-left: 0.7rem;
}

.wp-block-group.home-hero .hero-cta-primary .wp-block-button__link:hover {
  background-color: #c02218 !important;
}

.wp-block-group.home-hero .is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

.wp-block-group.home-hero .is-style-outline .wp-block-button__link:hover {
  background-color: #fff !important;
  color: #162640 !important;
}

/* Scroll indicator — pinned to hero bottom */
.wp-block-group.home-hero .home-hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  z-index: 10;
  display: block !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  pointer-events: none;
}

.wp-block-group.home-hero .home-hero-scroll::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg);
  animation: heroScrollBounce 1.6s ease infinite;
}

@keyframes heroScrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.45; }
  50% { transform: rotate(45deg) translate(6px, 6px); opacity: 1; }
}

/* ------------------------------------------------------------ */
/* 1d. WHY-US BANNER (service pages)                              */
/* ------------------------------------------------------------ */
/*
 * Same core/image figure-margin issue as the services grid.
 * The banner img is position:absolute inside the banner, but the
 * <figure> wrapper still carries wp-block-image's 16px bottom margin.
 */
.wp-block-group.por-que__banner .wp-block-image.por-que__banner-img {
  margin: 0;
}

/* ------------------------------------------------------------ */
/* 1e. VENTAJAS (comercial)                                       */
/* ------------------------------------------------------------ */
/*
 * The original carries these styles inline; they live here so the block
 * markup stays clean. Values are copied verbatim from docs/comercial.html.
 */
.wp-block-group.ventajas-competitivas .ventajas__quote {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(45, 122, 62, 0.08);
  border-left: 3px solid var(--color-comercial);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.wp-block-group.ventajas-competitivas .ventajas__quote p {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-navy);
  font-weight: 600;
}

/* core/image wraps in a <figure> that carries its own bottom margin */
.wp-block-group.ventajas-competitivas .wp-block-image.ventajas__image-wrap {
  margin: 0;
}

/* ------------------------------------------------------------ */
/* 1f. RUMO (comercial)                                           */
/* ------------------------------------------------------------ */
/*
 * The original puts `max-width: 700px` on an unclassed wrapper div around the
 * badge, the h2 and the paragraph. WordPress exposes no max-width control for
 * a group, and a `constrained` layout would centre the content instead of
 * leaving it flush left — so the constraint stays here.
 *
 * Dropping it is not cosmetic: without the 700px the h2 and the paragraph each
 * wrap a line short and the section comes out 97px shorter than the original.
 */
.wp-block-group.rumo__header {
  max-width: 700px;
}

/* ------------------------------------------------------------ */
/* 2. EMPRESAS                                                   */
/* ------------------------------------------------------------ */
.wp-block-group.home-empresas {
  background-color: #fff;
  padding: clamp(3rem, 8vw, 5rem) 0;
}

/* Grid — 3 equal columns */
.wp-block-group.home-empresas .empresas__grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  max-width: 1200px;
  margin: 0 auto !important;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
}

/*
 * The cards themselves are plain original markup now (aes/empresa-card),
 * so components.css styles them directly — including the group hover that
 * dims the sibling cards, which the previous assembly could not reproduce.
 */

/* ------------------------------------------------------------ */
/* 3. ¿POR QUÉ?                                                 */
/* ------------------------------------------------------------ */
.wp-block-group.home-porque {
  background-color: #f4f5f7;
  padding: 5rem clamp(1rem, 5vw, 2.5rem);
}

.wp-block-group.home-porque > .wp-block-cover {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background-color: #0e1929;
  box-shadow: 0 20px 40px rgba(22, 38, 64, 0.12);
}

/* Two stacked gradients, matching the original:
   1) 78deg 5-stop sweep — solid navy on the left third, fading right
   2) 0deg vertical — darkens the bottom where the carousel sits

   opacity must be forced to 1: WordPress adds has-background-dim-70
   which would render the whole gradient at 70% strength, washing the
   overlay out. The original carries its alpha inside the gradient stops
   and has no element-level opacity. */
.wp-block-group.home-porque .wp-block-cover__background {
  opacity: 1 !important;
  background:
    linear-gradient(
      78deg,
      #0e1929 0%,
      #0e1929 26%,
      rgba(14, 25, 41, 0.9) 42%,
      rgba(14, 25, 41, 0.5) 68%,
      rgba(14, 25, 41, 0.08) 100%
    ),
    linear-gradient(
      0deg,
      rgba(14, 25, 41, 0.65) 0%,
      rgba(14, 25, 41, 0) 48%
    ) !important;
}

/* Image anchored right at 65% width, cropped from 15% top */
.wp-block-group.home-porque .wp-block-cover__image-background {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: 65% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 15% !important;
  z-index: 0;
}

/* Inner container must span the banner so the carousel is full width.
   The cover is display:flex, so flex-basis must be forced too. */
.wp-block-group.home-porque .wp-block-cover__inner-container {
  max-width: 100% !important;
  width: 100% !important;
  flex: 1 1 100% !important;
  position: relative;
  z-index: 2;
}

/* Banner padding mirrors the original breakpoints */
.wp-block-group.home-porque .wp-block-cover {
  padding: 2rem 1rem 1.5rem !important;
}

@media (min-width: 768px) {
  .wp-block-group.home-porque .wp-block-cover {
    padding: 3rem 2rem 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  .wp-block-group.home-porque .wp-block-cover {
    padding: 3.5rem 3rem 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  .wp-block-group.home-porque {
    padding-block: 8rem;
  }
}

.wp-block-group.home-porque .porque-title {
  max-width: 580px;
}

.wp-block-group.home-porque .porque-subtitle {
  max-width: 580px;
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
}

@media (min-width: 768px) {
  .wp-block-group.home-porque .porque-subtitle {
    font-size: clamp(0.875rem, 2vw, 1rem);
  }
}

.wp-block-group.home-porque .porque-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 0.5rem;
}

.wp-block-group.home-porque .porque-subtitle {
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0 0 3rem;
}

/* ------------------------------------------------------------ */
/* 4. CERTIFICACIONES                                            */
/* ------------------------------------------------------------ */
.wp-block-group.home-certificaciones {
  background-color: #162640 !important;
  padding: 2.75rem clamp(1rem, 5vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 6 equal columns — one slot reserved for a pending certification logo */
.wp-block-group.home-certificaciones > .wp-block-columns {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 2rem !important;
  align-items: center;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto !important;
}

.wp-block-group.home-certificaciones .wp-block-column {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 90px;
  padding: 0.5rem !important;
  margin: 0 !important;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.9;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.wp-block-group.home-certificaciones .wp-block-column::before,
.wp-block-group.home-certificaciones .wp-block-column::after {
  content: none !important;
  display: none !important;
}

.wp-block-group.home-certificaciones .wp-block-column:last-child {
  border-right: none;
}

.wp-block-group.home-certificaciones .wp-block-column:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.wp-block-group.home-certificaciones .cert-img {
  margin: 0 auto !important;
  display: block;
}

.wp-block-group.home-certificaciones .cert-img img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  transition: transform 0.25s ease;
}

.wp-block-group.home-certificaciones .wp-block-column:hover .cert-img img {
  transform: scale(1.06);
}

/* Per-logo optical sizing, scaled for the 6-column layout.
   These SVGs ship with a viewBox but no width/height, so they have an
   intrinsic RATIO but no intrinsic SIZE — an explicit height is required
   or they collapse to 0x0. width:auto then derives from the viewBox.

   Emblems  = square shields (SSP, IMSS, Código Violeta)
   Wide     = horizontal marks (REPSE)
   Extra    = long typographic lockups (STPS) */
.wp-block-group.home-certificaciones .cert-img-emblem img {
  height: 64px !important;
  width: auto !important;
  max-height: 64px;
  max-width: 72px;
}

.wp-block-group.home-certificaciones .cert-img-wide img {
  height: 46px !important;
  width: auto !important;
  max-height: 46px;
  max-width: 138px;
}

.wp-block-group.home-certificaciones .cert-img-extra-wide img {
  height: 42px !important;
  width: auto !important;
  max-height: 42px;
  max-width: 144px;
}

@media (max-width: 1024px) {
  .wp-block-group.home-certificaciones > .wp-block-columns {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
  }

  .wp-block-group.home-certificaciones .wp-block-column:nth-child(3n) {
    border-right: none;
  }
}

@media (max-width: 640px) {
  .wp-block-group.home-certificaciones > .wp-block-columns {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .wp-block-group.home-certificaciones .wp-block-column:nth-child(3n) {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .wp-block-group.home-certificaciones .wp-block-column:nth-child(2n) {
    border-right: none;
  }
}

/* ------------------------------------------------------------ */
/* 5. CTA FINAL                                                  */
/* ------------------------------------------------------------ */
.wp-block-group.home-cta {
  background-color: #0e1929;
  padding: clamp(3rem, 8vw, 5rem) 0;
  position: relative;
  overflow: hidden;
}

.wp-block-group.home-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(30, 74, 122, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.wp-block-group.home-cta > .wp-block-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
  position: relative;
  z-index: 1;
}

.wp-block-group.home-cta .cta-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #e52d22;
  margin-bottom: 0.5rem;
}

.wp-block-group.home-cta .cta-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1rem;
}

.wp-block-group.home-cta .cta-body {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.wp-block-group.home-cta .wp-block-button .wp-block-button__link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.85em 1.75em !important;
  border-radius: 4px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: clamp(0.875rem, 2vw, 1rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease !important;
}

.wp-block-group.home-cta .wp-block-button .wp-block-button__link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 20px rgba(22, 38, 64, 0.12) !important;
}

.wp-block-group.home-cta .cta-btn-primary .wp-block-button__link {
  background-color: #e52d22 !important;
  color: #fff !important;
}

.wp-block-group.home-cta .cta-btn-primary .wp-block-button__link:hover {
  background-color: #c02218 !important;
}

.wp-block-group.home-cta .is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

.wp-block-group.home-cta .is-style-outline .wp-block-button__link:hover {
  background-color: #fff !important;
  color: #162640 !important;
}

/* ------------------------------------------------------------ */
/* 6. RESPONSIVE                                                 */
/* ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .wp-block-group.home-empresas .empresas__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .wp-block-group.home-certificaciones > .wp-block-columns {
    flex-wrap: wrap;
    gap: 0;
  }

  .wp-block-group.home-certificaciones .cert-col {
    flex: none;
    width: 33.33%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 640px) {
  .wp-block-group.home-empresas .empresas__grid {
    grid-template-columns: 1fr !important;
  }

  .wp-block-group.home-certificaciones .cert-col {
    width: 50%;
  }

  .wp-block-group.home-cta .wp-block-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ------------------------------------------------------------ */
/* 7. CUSTOM BLOCK: aes/hero-background                          */
/* ------------------------------------------------------------ */
.aes-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.aes-hero-bg__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.aes-hero-bg__video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Self-hosted MP4/WebM: no chrome at all, seamless loop */
.aes-hero-bg__video-native {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center;
  border: 0;
  pointer-events: none;
}

/* 16:9 scale trick to hide YouTube chrome; fades in when playing.
   Short transition so buffering gaps read as a soft cut, not a flash. */
.aes-hero-bg__video-wrapper iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%) scale(1.5);
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease-out;
  /* Belt and braces: never let the OS draw a non-interactive frame */
  -webkit-user-select: none;
  user-select: none;
}

.aes-hero-bg__video-wrapper iframe.is-playing {
  opacity: 1;
}

.aes-hero-bg__overlay {
  position: absolute;
  inset: 0;
}

/* Editor preview for aes/hero-background */
.editor-styles-wrapper .aes-hero-bg.is-editing,
.block-editor-block-list__block .aes-hero-bg.is-editing {
  position: relative;
  inset: auto;
  min-height: 300px;
  background-color: #162640;
  pointer-events: auto;
}

.aes-hero-bg__preview {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.aes-hero-bg__preview-overlay {
  position: absolute;
  inset: 0;
}

.aes-hero-bg__preview-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: rgba(22, 38, 64, 0.85);
  color: #fff;
  border-radius: 6px;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.aes-hero-bg__preview-label strong {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* ------------------------------------------------------------ */
/* 8. CUSTOM BLOCK: aes/carrusel                                 */
/* ------------------------------------------------------------ */
.aes-carrusel .por-que__track-group {
  animation-duration: var(--aes-carousel-speed, 20s) !important;
}

/* Editor preview */
.editor-styles-wrapper .aes-carrusel.is-editing,
.block-editor-block-list__block .aes-carrusel.is-editing {
  padding: 1.5rem;
  background: #162640;
  border-radius: 8px;
}

.aes-carrusel__preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aes-carrusel__preview-title {
  color: #fff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.aes-carrusel__preview-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.aes-carrusel__preview-chip {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------ */
/* 9. CUSTOM BLOCK: aes/sectores                                 */
/* ------------------------------------------------------------ */
.aes-sectores {
  background-color: #fff;
  padding: 5rem clamp(1rem, 5vw, 2.5rem);
}

@media (min-width: 1024px) {
  .aes-sectores {
    padding-block: 8rem;
  }
}

.aes-sectores .industrias__header {
  text-align: center;
  margin-bottom: 5rem;
}

.aes-sectores .section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #162640;
  margin: 0;
}

.aes-sectores .section-divider {
  width: 48px;
  height: 4px;
  background-color: #e52d22;
  margin-top: 1rem;
}

.aes-sectores .section-divider--center {
  margin-inline: auto;
}

.aes-sectores .industrias__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Item card */
.aes-sectores .industria-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1.5rem 0.85rem 1.25rem;
  border-radius: 8px;
  background-color: #f8fafc;
  border: 1px solid rgba(22, 38, 64, 0.1);
  box-shadow: 0 2px 6px rgba(22, 38, 64, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.aes-sectores .industria-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #162640;
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: center;
}

.aes-sectores .industria-item:hover {
  background-color: #fff;
  border-color: rgba(22, 38, 64, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(22, 38, 64, 0.12);
}

.aes-sectores .industria-item:hover::after {
  transform: scaleX(1);
}

.aes-sectores .industria-item:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 38, 64, 0.08);
}

.aes-sectores .industria-item:focus-visible {
  outline: 2px solid #162640;
  outline-offset: 3px;
}

.aes-sectores .industria-item--active {
  background-color: #162640;
  border-color: #162640;
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(22, 38, 64, 0.12);
}

.aes-sectores .industria-item--active::after {
  background-color: #e52d22;
  transform: scaleX(1);
}

.aes-sectores .industria-item__icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid rgba(22, 38, 64, 0.08);
  box-shadow: 0 2px 6px rgba(22, 38, 64, 0.06);
  color: #162640;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.aes-sectores .industria-item__icon svg {
  width: 100%;
  height: 100%;
  transition: transform 0.25s ease;
}

.aes-sectores .industria-item:hover .industria-item__icon {
  transform: scale(1.1);
  background-color: #162640;
  color: #fff !important;
  border-color: #162640;
  box-shadow: 0 4px 12px rgba(22, 38, 64, 0.22);
}

.aes-sectores .industria-item--active .industria-item__icon {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.aes-sectores .industria-item__label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #162640;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.aes-sectores .industria-item:hover .industria-item__label {
  color: #0e1929;
}

.aes-sectores .industria-item--active .industria-item__label {
  color: #fff;
}

/* Modal */
.aes-sectores .industrias__modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.aes-sectores .industrias__modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.aes-sectores .industrias__modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(22, 38, 64, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.aes-sectores .industrias__modal-content {
  position: relative;
  z-index: 2;
  width: 95%;
  max-width: 1020px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(22, 38, 64, 0.18);
  padding: 3rem 3rem 3rem 3rem;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.aes-sectores .industrias__modal.is-open .industrias__modal-content {
  transform: scale(1) translateY(0);
}

.aes-sectores .industrias__modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #81868e;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

.aes-sectores .industrias__modal-close:hover {
  background-color: #f4f5f7;
  color: #e52d22;
}

.aes-sectores .industrias__modal-close svg {
  width: 22px;
  height: 22px;
}

.aes-sectores .industrias__modal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.aes-sectores .industrias__modal-image-col {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(22, 38, 64, 0.08);
  background-color: #f4f5f7;
  aspect-ratio: 3 / 4;
}

.aes-sectores .industrias__modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aes-sectores .industrias__modal-info-col {
  display: flex;
  flex-direction: column;
}

.aes-sectores .industrias__modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #162640;
  margin: 0 0 2rem;
  border-bottom: 2px solid #f4f5f7;
  padding-bottom: 1rem;
}

.aes-sectores .industrias__modal-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aes-sectores .industrias__modal-col {
  background-color: #f4f5f7;
  padding: 1.25rem 2rem;
  border-radius: 8px;
  border-left: 4px solid transparent;
  transition: transform 0.25s ease;
}

.aes-sectores .industrias__modal-col:hover {
  transform: translateX(4px);
}

.aes-sectores .industrias__modal-col.col-seguridad { border-left-color: #1e4a7a; }
.aes-sectores .industrias__modal-col.col-limpieza { border-left-color: #35a8e0; }
.aes-sectores .industrias__modal-col.col-comercial { border-left-color: #2d7a3e; }

.aes-sectores .col-header {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #162640;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.aes-sectores .col-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(22, 38, 64, 0.08);
  flex: none;
}

.aes-sectores .col-header__icon svg {
  width: 14px;
  height: 14px;
}

.aes-sectores .col-header__icon--seguridad svg { color: #1e4a7a; }
.aes-sectores .col-header__icon--limpieza svg { color: #35a8e0; }
.aes-sectores .col-header__icon--comercial svg { color: #2d7a3e; }

.aes-sectores .col-text {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: #81868e;
  line-height: 1.6;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .aes-sectores .industrias__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .aes-sectores .industrias__modal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .aes-sectores .industrias__modal-image-col {
    aspect-ratio: 16 / 9;
    max-height: 200px;
  }

  .aes-sectores .industrias__modal-content {
    padding: 2.5rem 1.5rem 1.5rem;
  }
}

@media (max-width: 640px) {
  .aes-sectores .industrias__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Editor preview */
.aes-sectores-editor {
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px dashed #c3c4c7;
  border-radius: 6px;
}

.aes-sectores-editor__preview {
  color: #162640;
}

.aes-sectores-editor__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.aes-sectores-editor__chip {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #fff;
  border: 1px solid rgba(22, 38, 64, 0.15);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
}



/* ------------------------------------------------------------ */
/* CATÁLOGO                                                      */
/* ------------------------------------------------------------ */
/*
 * The palette is the site's: Comercial's green leads, with the blue, teal and
 * bright green Rumito wears picked up as accents in the hero and the chips.
 */
.catalogo,
.catalogo-hero {
  --cat-verde: var(--color-comercial);
  --cat-verde-oscuro: #1e5430;
  --cat-teal: #00b49c;
  --cat-azul: #006ccc;
  --cat-verde-claro: #48b43c;
}

/* Hero — short on purpose: the brief wants the first product row visible. */
.catalogo-hero {
  position: relative;
  overflow: hidden;
  /* The site header is fixed and this hero is solid, so it starts below it —
     the same 76px the blog's post hero uses. */
  margin-top: 76px;
  padding-block: var(--space-md);
  background:
    radial-gradient(circle at 88% 12%, rgba(72, 180, 60, 0.35), transparent 55%),
    linear-gradient(115deg, var(--color-navy) 0%, var(--cat-verde-oscuro) 62%, var(--cat-verde) 100%);
}

.catalogo-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.catalogo-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: var(--space-xs);
}

.catalogo-hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--color-white);
  margin: 0;
}

.catalogo-hero__subtitle {
  font-size: var(--text-base);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin-top: var(--space-xs);
  max-width: 52ch;
}

.catalogo-hero__mascot img {
  display: block;
  height: 180px;
  width: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.3));
}

/* Filter — anchors, so it works with scripting off. */
.catalogo__filtro {
  position: sticky;
  top: 76px;
  z-index: 20;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-gray-light);
}

.catalogo__filtro-lista {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding-block: var(--space-sm);
}

.catalogo__filtro-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-navy);
  background-color: var(--color-light);
  border: 1px solid transparent;
  border-radius: 50px;
  padding: 0.5em 1.1em;
  text-decoration: none;
  transition: background-color var(--ease-default), color var(--ease-default), border-color var(--ease-default);
}

.catalogo__filtro-link:hover {
  background-color: var(--cat-verde);
  color: var(--color-white);
}

.catalogo__filtro-cuenta {
  font-size: 0.78em;
  font-weight: 600;
  color: var(--color-gray);
  background-color: var(--color-white);
  border-radius: 50px;
  padding: 0.1em 0.5em;
}

.catalogo__filtro-link:hover .catalogo__filtro-cuenta {
  color: var(--cat-verde);
}

/* Category — a short banner under the name, not a wall of image. */
.catalogo__categoria {
  scroll-margin-top: 150px;
}

.catalogo__categoria-header {
  position: relative;
  background-color: var(--color-light);
  border-top: 1px solid var(--color-gray-light);
}

.catalogo__categoria-header--con-foto {
  background-color: var(--color-navy);
  border-top: 0;
}

.catalogo__categoria-foto {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.catalogo__categoria-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalogo__categoria-header--con-foto::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(14, 25, 41, 0.88) 0%, rgba(14, 25, 41, 0.55) 60%, rgba(14, 25, 41, 0.25) 100%);
}

.catalogo__categoria-contenido {
  position: relative;
  z-index: 1;
  padding-block: var(--space-sm);
}

.catalogo__categoria-titulo {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--color-navy);
  margin: 0;
}

.catalogo__categoria-header--con-foto .catalogo__categoria-titulo {
  color: var(--color-white);
}

.catalogo__categoria-cuenta {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-top: 0.35rem;
}

.catalogo__categoria-header--con-foto .catalogo__categoria-cuenta {
  color: rgba(255, 255, 255, 0.72);
}

.catalogo__categoria-desc {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-top: var(--space-xs);
  max-width: 70ch;
}

.catalogo__categoria-header--con-foto .catalogo__categoria-desc {
  color: rgba(255, 255, 255, 0.78);
}

/* Product grid */
.catalogo__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-lg);
}

.producto-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--ease-default), box-shadow var(--ease-default), border-color var(--ease-default);
}

.producto-card:hover {
  transform: translateY(-3px);
  border-color: var(--cat-verde);
  box-shadow: var(--shadow-md);
}

/*
 * 4:3 rather than square. The placeholder images have a light background, so
 * `contain` letterboxes them invisibly — and the shorter box is what keeps the
 * first row of products inside the first screen.
 */
.producto-card__img-wrap {
  background-color: var(--color-light);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.producto-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-sm);
  transition: transform var(--ease-default);
}

.producto-card:hover .producto-card__img {
  transform: scale(1.04);
}

.producto-card__img--vacia::after {
  content: '';
  display: block;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background-color: var(--color-gray-light);
}

.producto-card__body {
  padding: var(--space-sm) var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.5rem;
}

.producto-card__titulo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--color-navy);
  margin: 0;
}

.producto-card__desc {
  font-size: var(--text-xs);
  line-height: 1.55;
  color: var(--color-gray);
  margin: 0;
}

.producto-card__presentaciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.producto-card__presentacion {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cat-verde-oscuro);
  background-color: rgba(45, 122, 62, 0.1);
  border: 1px solid rgba(45, 122, 62, 0.22);
  border-radius: 50px;
  padding: 0.2em 0.7em;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .catalogo__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .catalogo__grid { grid-template-columns: repeat(2, 1fr); }
  .catalogo-hero__inner { gap: var(--space-md); }
  .catalogo-hero__mascot img { height: 150px; }
}

@media (max-width: 600px) {
  .catalogo__grid { grid-template-columns: 1fr; }
  .catalogo-hero__mascot { display: none; }
  .catalogo__filtro { position: static; }
}

/* ------------------------------------------------------------ */
/* CATEGORÍAS DE PRODUCTO (enlaces al catálogo)                  */
/* ------------------------------------------------------------ */
/*
 * The Rumo section sends people into the catalogue rather than duplicating a
 * handful of items from it. Same card language as the product grid.
 */
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.categoria-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--ease-default), box-shadow var(--ease-default), border-color var(--ease-default);
}

.categoria-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-comercial);
  box-shadow: var(--shadow-md);
}

.categoria-card__img-wrap {
  background-color: var(--color-light);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.categoria-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--ease-default);
}

.categoria-card:hover .categoria-card__img {
  transform: scale(1.04);
}

.categoria-card__img--vacia {
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-mid));
}

.categoria-card__body {
  padding: var(--space-sm) var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.categoria-card__titulo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--color-navy);
  margin: 0;
}

.categoria-card__cuenta {
  font-size: var(--text-xs);
  color: var(--color-gray);
}

.categoria-card__cta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-comercial);
}

.categoria-card:hover .categoria-card__cta {
  color: var(--color-red);
}

@media (max-width: 1024px) {
  .categorias-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* ------------------------------------------------------------ */
/* CONTACTO DIRECTO (WhatsApp y correo, junto al formulario)     */
/* ------------------------------------------------------------ */
.form-direct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-gray-light);
}

.form-direct__lead {
  font-size: var(--text-xs);
  color: var(--color-gray);
}

.form-direct__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease-default), border-color var(--ease-default);
}

.form-direct__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-direct__link:hover {
  color: var(--color-comercial);
  border-bottom-color: var(--color-comercial);
}

.form-direct__link--wa:hover {
  color: #128c4a;
  border-bottom-color: #128c4a;
}

/* ------------------------------------------------------------ */
/* MODAL DE CONTACTO                                             */
/* ------------------------------------------------------------ */
/*
 * Opened by the header's Contacto link. A native <dialog>, so Escape and the
 * focus trap are the browser's job.
 */
.contacto-modal {
  /*
   * `margin: auto` is what centres a native <dialog>, and the theme's global
   * reset (`* { margin: 0 }`) removes it — without this it opens pinned to the
   * top-left corner.
   */
  margin: auto;
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  box-shadow: 0 24px 60px rgba(11, 19, 32, 0.35);
  overflow: visible;
}

.contacto-modal::backdrop {
  background-color: rgba(11, 19, 32, 0.65);
  backdrop-filter: blur(2px);
}

.contacto-modal__inner {
  position: relative;
  padding: var(--space-lg);
  overflow-y: auto;
  max-height: calc(100vh - 2rem);
}

/* The card inside the modal carries its own padding; drop it there. */
.contacto-modal .contact-form-card {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.contacto-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--color-light);
  color: var(--color-navy);
  cursor: pointer;
  transition: background-color var(--ease-default), color var(--ease-default);
  z-index: 1;
}

.contacto-modal__close svg {
  width: 18px;
  height: 18px;
}

.contacto-modal__close:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* Nothing behind the modal should scroll while it is open. */
body.has-modal {
  overflow: hidden;
}

@media (max-width: 600px) {
  .contacto-modal__inner {
    padding: var(--space-md);
  }
}
