{# Machete #}
div[data-global-resource-path="bandi/templates/partials/header.html"] > .container-fluid.content-wrapper { padding: 0px !important; }

/* variable de acento tipada como color */
@property --mm-accent-color {
  syntax: "<color>";
  inherits: true;
  initial-value: #EF2222;
}

:root {
  --mm-btn-color: #EF2222;
  --mm-btn-color-hover: color-mix(in srgb, #EF2222 85%, #000000);
  --mm-red: var(--mm-accent-color);
  --mm-red-hover: color-mix(in srgb, var(--mm-accent-color) 85%, #000000);
  --mm-red-soft: color-mix(in srgb, var(--mm-accent-color) 8%, #ffffff);
  --mm-red-icon: color-mix(in srgb, var(--mm-accent-color) 18%, #ffffff);
  --mm-dark: #241634;
  --mm-text: #1c1c1e;
  --mm-muted: #6e6e73;
  --mm-border: #e7e5e4;
  --mm-bg-light: #faf7f8;
  --mm-radius: 14px;
  --mm-shadow: 0 24px 48px -12px rgba(28, 28, 30, 0.18), 0 4px 12px rgba(28, 28, 30, 0.06);
  --mm-container: 1220px;
}

html {
  scroll-padding-top: 90px; /* anclas no queden bajo la navbar sticky */
  interpolate-size: allow-keywords; /* permite animar height: auto en ::details-content */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ============================================================
   Bloque: megamenu
   ============================================================ */

.megamenu {
  position: relative;
}

/* ------------------------------------------------------------
   Topbar
   ------------------------------------------------------------ */

.megamenu__topbar {
  background: var(--mm-bg-light);
  border-bottom: 1px solid var(--mm-border);
  position: relative;
  z-index: 250; /* por encima de la navbar sticky para que el dropdown de "Nosotros" no quede debajo */
}

.megamenu__topbar-inner {
  max-width: var(--mm-container);
  margin: 0 auto;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.megamenu__region-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
}

.megamenu__region-label {
  font-size: 13px;
  color: var(--mm-text);
}

.megamenu__region-arrow {
  display: inline-block;
  margin-left: 2px;
}

.megamenu__region-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--mm-dark);
  border-radius: 999px;
  padding: 3px;
}

.megamenu__region-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.megamenu__region-pill:hover { color: rgba(255, 255, 255, 0.75); }

.megamenu__region-pill strong {
  color: #ffffff;
  font-weight: 600;
}

.megamenu__region-pill--active {
  background: #ffffff;
  color: rgba(28, 22, 52, 0.65);
}

.megamenu__region-pill--active:hover { color: rgba(28, 22, 52, 0.65); }

.megamenu__region-pill--active strong {
  color: var(--mm-text);
}

.megamenu__region-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.megamenu__about-wrap {
  position: relative;
}

.megamenu__about {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--mm-text);
  padding: 8px 0;
}

.megamenu__about-icon {
  width: 17px;
  height: 17px;
}

/* ------------------------------------------------------------
   Dropdown "Nosotros"
   ------------------------------------------------------------ */

.megamenu__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid var(--mm-border);
  border-radius: 12px;
  box-shadow: var(--mm-shadow);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100;
}

.megamenu__dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
}

.megamenu__about-wrap:hover .megamenu__dropdown,
.megamenu__about-wrap:focus-within .megamenu__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.megamenu__dropdown-link {
  display: block;
  font-size: 14px;
  color: var(--mm-text);
  padding: 10px 12px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.megamenu__dropdown-link:hover {
  background: var(--mm-red-soft);
}

/* ------------------------------------------------------------
   Navbar
   ------------------------------------------------------------ */

.megamenu__navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid var(--mm-border);
}

.megamenu__navbar-inner {
  position: relative;
  max-width: var(--mm-container);
  margin: 0 auto;
  padding: 0 10px;
  height: 78px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.megamenu__logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.megamenu__logo-img {
  display: block;
  height: 25px;
  width: auto;
}

.megamenu__list {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
  margin-bottom: 0px;
}
.megamenu__list > .megamenu__item { margin: 0px; }
.megamenu__item {
  position: static;
  height: 100%;
  display: flex;
  align-items: center;
}

.megamenu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--mm-text);
  height: 100%;
}

.megamenu__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--mm-red);
  transition: transform 0.2s ease;
}

/* ------------------------------------------------------------
   Acciones (botones derecha)
   ------------------------------------------------------------ */

.megamenu__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.megamenu__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 999px;
  padding: 11px 22px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.megamenu__btn--ghost {
  border: 1px solid #c9c7c6;
  color: var(--mm-text);
  background: #ffffff;
}

.megamenu__btn--ghost:hover {
  border-color: var(--mm-text);
  color: var(--mm-text);
}

.megamenu__btn--primary {
  background: var(--mm-btn-color);
  color: #ffffff;
}

.megamenu__btn--primary:hover {
  background: var(--mm-btn-color-hover);
  color: #ffffff;
}

/* ------------------------------------------------------------
   Panel (megamenu desplegable) — apertura sólo con CSS
   ------------------------------------------------------------ */

.megamenu__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(1420px, calc(100% - 10px));
  background: #ffffff;
  border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius);
  box-shadow: var(--mm-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 100;
}

/* puente invisible para mantener el hover entre la barra y el panel */
.megamenu__panel::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  width: 100%;
  height: 14px;
}

.megamenu__item:hover .megamenu__panel,
.megamenu__item:focus-within .megamenu__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(10px);
}

.megamenu__item:hover .megamenu__caret {
  transform: rotate(180deg);
}

.megamenu__panel-body {
  padding: 28px 28px 24px;
}

.megamenu__panel-footer {
  border-top: 1px solid var(--mm-border);
  padding: 16px 28px;
  display: flex;
  gap: 20px;
}

.megamenu__panel-note { width: 100%; }
.megamenu__panel-note > *:last-child{ margin-bottom: 0px; }

/* ------------------------------------------------------------
   Variante: panel por columnas (Servicios)
   ------------------------------------------------------------ */

.megamenu__panel--columns .megamenu__panel-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 28px;
}

.megamenu__column-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
}

.megamenu__entry {
  display: block;
  padding: 10px 12px;
  margin: 0 -12px 7px;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

.megamenu__entry:hover,
.megamenu__entry--active {
  background: var(--mm-red-soft);
}

.megamenu__entry-title {
  display: block;
  font-size: 14px;
  color: var(--mm-text);
  margin-bottom: 4px;
}

.megamenu__entry-desc {
  display: block;
  font-size: 12px;
  color: var(--mm-muted);
  line-height: 1.4;
}

/* ------------------------------------------------------------
   Variante: panel por tarjetas (Soluciones)
   ------------------------------------------------------------ */

.megamenu__panel-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 20px;
}

.megamenu__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.megamenu__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--mm-border);
  border-radius: 12px;
  padding: 20px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.megamenu__card:hover,
.megamenu__card--active {
  background: var(--mm-red-soft);
  border-color: transparent;
}

.megamenu__card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mm-red-icon);
  color: var(--mm-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.megamenu__card-icon svg {
  width: 20px;
  height: 20px;
}

.megamenu__card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.megamenu__card-desc {
  font-size: 13px;
  color: var(--mm-muted);
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Toggle mobile (checkbox hack, sin JS)
   ------------------------------------------------------------ */

.megamenu__toggle-input {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}

.megamenu__toggle {
  display: none; /* solo mobile */
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--mm-dark);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.megamenu__toggle-icon {
  display: block;
  width: 32px;
  height: 32px;
}

/* ------------------------------------------------------------
   Fondo oscuro + desenfoque tras el offcanvas
   ------------------------------------------------------------ */

.megamenu__backdrop {
  display: none; /* solo mobile */
}

@media (max-width: 999.98px) {
  .megamenu__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 290; /* por debajo del offcanvas (300), por encima del header */
    background: rgba(20, 16, 30, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    cursor: pointer;
  }

  #megamenu-toggle:checked ~ .megamenu__backdrop {
    opacity: 1;
    visibility: visible;
  }
}

/* ------------------------------------------------------------
   Menú mobile (hoja con esquinas redondeadas según mobile.png)
   ------------------------------------------------------------ */

.megamenu__mobile {
  display: none; /* solo mobile */
}

.megamenu__mobile-close {
  position: relative;
  width: 44px;
  height: 44px;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--mm-red);
  border-radius: 50%;
  cursor: pointer;
  margin: 24px 0 8px 24px;
  box-sizing: content-box;
  flex-shrink: 0;
}

/* X dibujada con CSS para lograr una alineación perfectamente simétrica */
.megamenu__mobile-close::before,
.megamenu__mobile-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--mm-red);
}

.megamenu__mobile-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.megamenu__mobile-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.megamenu__mobile-nav {
  padding: 0 24px;
}

.megamenu__mobile-group {
  border-bottom: none;
}

.megamenu__mobile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}

.megamenu__mobile-summary::-webkit-details-marker {
  display: none;
}

.megamenu__mobile-summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--mm-red);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.megamenu__mobile-group[open] .megamenu__mobile-summary::after {
  transform: rotate(180deg);
}

.megamenu__mobile-summary--plain::after {
  display: none;
}

.megamenu__mobile-content {
  border-left: 1px dotted #a8a5a3;
  margin: 0 0 0px 6px;
  padding: 0 0 0px 22px;
  overflow: hidden;
}

/* animación al desplegar el grupo */
.megamenu__mobile-group[open] .megamenu__mobile-content {
  animation: mm-expand 0.3s ease;
}

@keyframes mm-expand {
  0% {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
  }
}

/* navegantes con soporte de ::details-content: apertura y cierre suaves */
@supports selector(::details-content) {
  .megamenu__mobile-group::details-content {
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease, content-visibility 0.3s ease allow-discrete;
  }

  .megamenu__mobile-group[open]::details-content {
    height: auto;
    opacity: 1;
  }

  .megamenu__mobile-group[open] .megamenu__mobile-content {
    animation: none; /* evitar doble efecto */
  }
}

.megamenu__mobile-subsection {
  margin-bottom: 6px 0px 6px 0px;
}

.megamenu__mobile-subtitle {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  margin-top: 10px;
}

.megamenu__mobile-item {
  display: block;
  font-size: 15px;
  color: var(--mm-muted);
  padding: 6px 0;
}

.megamenu__mobile-item:hover {
  color: var(--mm-text);
}

.megamenu__mobile-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: #ffffff;
  border-top: 1px solid var(--mm-border);
  padding: 20px 24px 24px;
  margin-top: auto;
  text-align: center;
}

.megamenu__mobile-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.megamenu__mobile-btn {
  flex: 1;
  font-size: 13px;
  padding: 14px 10px;
}

.megamenu__mobile-note {
  max-width: 280px;
  margin: 0 auto 0px;
}
.megamenu__mobile-note > *:last-child {
  margin-bottom: 0px;
}

.megamenu__mobile-logo {
  height: 16px;
  width: auto;
}

/* ------------------------------------------------------------
   Responsive — breakpoint mobile: < 1000px
   ------------------------------------------------------------ */

@media (max-width: 999.98px) {
  /* topbar: sólo el selector de región */
  .megamenu__topbar-inner {
    padding: 8px 15px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .megamenu__about-wrap {
    display: none;
  }

  .megamenu__region-label {
    display: none;
  }

  .megamenu__region-icon {
    display: none;
  }

  /* navbar: logo + agenda una llamada + hamburguesa */
  .megamenu__navbar-inner {
    padding: 0 20px;
    height: 68px;
    gap: 14px;
  }

  .megamenu__list,
  .megamenu__navbar .megamenu__btn--ghost,
  .megamenu__panel {
    display: none;
  }

  .megamenu__actions .megamenu__btn--primary {
    display: none; /* sólo la del navbar; la del offcanvas permanece visible */
  }

  .megamenu__toggle {
    display: inline-flex;
  }

  /* hoja mobile (off-canvas anclado al borde izquierdo) */
  .megamenu__mobile {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: min(350px, 100%);
    max-width: 350px;
    z-index: 300;
    background: #ffffff;
    border: 1px solid var(--mm-border);
    border-left: none;
    border-radius: 0 20px 20px 0;
    box-shadow: var(--mm-shadow);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
    overflow-x: hidden;
    overflow-y: auto; /* toda la hoja (incluido el botón de cerrar) se mueve con el scroll */
  }

  #megamenu-toggle:checked ~ .megamenu__mobile {
    transform: translateX(0);
    visibility: visible;
  }

  body:has(#megamenu-toggle:checked) {
    overflow: hidden; /* bloquea el scroll con el menú abierto */
  }
}

@media (max-width: 1100px) {
  .megamenu__panel--columns .megamenu__panel-body,
  .megamenu__cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .megamenu__navbar-inner {
    gap: 20px;
  }

  .megamenu__panel--columns .megamenu__panel-body,
  .megamenu__cards {
    grid-template-columns: 1fr;
  }
}