:root {
  --mpt-green: #165b33;
  --mpt-green-dark: #0f4325;
  --mpt-green-soft: #eef7f1;
  --mpt-gold: #d7a83d;
  --mpt-ink: #243129;
  --mpt-muted: #657168;
  --mpt-border: #dfe8e2;
  --mpt-white: #ffffff;
}

.mpt-tour-tabs,
.mpt-tour-tabs * {
  box-sizing: border-box;
}

.mpt-tour-tabs {
  --mpt-desktop-sticky-offset: 0px;
  --mpt-mobile-sticky-offset: 0px;
  --mpt-mobile-scroll-offset: calc(var(--mpt-mobile-sticky-offset) + 12px);
  position: relative;
  width: 100%;
  overflow: visible !important;
  color: var(--mpt-ink);
  font-family: inherit;
}

/* =========================================================
   NAVEGACIÓN DE ESCRITORIO
========================================================= */

.mpt-tabs-list {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--mpt-border);
  border-radius: 18px 18px 0 0;
  background: var(--mpt-white);
  box-shadow: 0 12px 28px rgba(24, 61, 39, 0.1);
}

.mpt-tour-tabs.mpt-sticky-enabled .mpt-tabs-list {
  position: relative;
  top: auto;
}

.mpt-tabs-list.mpt-tabs-count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.mpt-tabs-list.mpt-tabs-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mpt-tabs-list.mpt-tabs-count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mpt-tabs-list.mpt-tabs-count-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mpt-tab-button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 18px 16px;
  border: 0;
  border-right: 1px solid var(--mpt-border);
  background: #f8fbf9;
  color: var(--mpt-muted);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.mpt-tabs-list .mpt-tab-button:last-child {
  border-right: 0;
}

.mpt-tab-button::after {
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--mpt-gold);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 180ms ease;
}

.mpt-tab-button:hover {
  color: var(--mpt-green);
  background: var(--mpt-green-soft);
}

.mpt-tab-button[aria-selected="true"] {
  color: var(--mpt-green-dark);
  background: var(--mpt-white);
}

.mpt-tab-button[aria-selected="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.mpt-tab-button:focus-visible {
  z-index: 2;
  outline: 3px solid rgba(215, 168, 61, 0.5);
  outline-offset: -3px;
}

.mpt-tab-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
}

.mpt-tab-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mpt-tab-label {
  min-width: 0;
}

.mpt-tab-chevron {
  display: none;
}

.mpt-tab-button-mobile {
  display: none;
}

/* =========================================================
   COPIAS FLOTANTES: FUERA DE LOS CONTENEDORES DE DIVI
========================================================= */

.mpt-floating-tabs-desktop,
.mpt-floating-tabs-desktop *,
.mpt-floating-tab-mobile,
.mpt-floating-tab-mobile * {
  box-sizing: border-box;
}

.mpt-floating-tabs-desktop,
.mpt-floating-tab-mobile {
  position: fixed !important;
  z-index: 999999;
  margin: 0 !important;
  transform: translateZ(0);
}

.mpt-floating-tabs-desktop {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(24, 61, 39, 0.2);
}

.mpt-floating-tab-mobile {
  display: none;
  overflow: hidden;
  border: 1px solid var(--mpt-border);
  border-radius: 13px;
  background: var(--mpt-green-soft);
  box-shadow: 0 9px 24px rgba(24, 61, 39, 0.2);
}

.mpt-floating-tabs-desktop[hidden],
.mpt-floating-tab-mobile[hidden] {
  display: none !important;
}

/* =========================================================
   PANELES DE CONTENIDO
========================================================= */

.mpt-tabs-panels {
  position: relative;
  z-index: 1;
  overflow: visible;
  border: 1px solid var(--mpt-border);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: var(--mpt-white);
  box-shadow: 0 12px 34px rgba(24, 61, 39, 0.09);
}

.mpt-tab-item {
  display: block;
}

.mpt-tab-panel {
  min-height: 150px;
  padding: clamp(28px, 4vw, 52px);
  border-radius: 0 0 17px 17px;
  background: var(--mpt-white);
  color: var(--mpt-ink);
  font-size: 17px;
  line-height: 1.75;
}

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

.mpt-tab-panel.is-empty {
  min-height: 90px;
}

.mpt-tab-panel > :first-child {
  margin-top: 0;
}

.mpt-tab-panel > :last-child {
  margin-bottom: 0;
}

.mpt-tab-panel p,
.mpt-tab-panel li {
  font-size: 17px;
  line-height: 1.75;
}

.mpt-tab-panel h2 {
  margin: 0 0 20px;
  color: var(--mpt-green-dark);
  font-size: clamp(20px, 3vw, 20px);
  line-height: 1.2;
}

.mpt-tab-panel h3 {
  margin: 28px 0 12px;
  color: var(--mpt-green);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.3;
}

.mpt-tab-panel a {
  color: var(--mpt-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.mpt-tab-panel img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.mpt-tabs-admin-notice {
  margin-bottom: 16px;
  padding: 14px 18px;
  border-left: 4px solid #dba617;
  background: #fff8df;
  color: #533f05;
  font-size: 16px;
}

.mpt-tabs-admin-notice code {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(83, 63, 5, 0.08);
  color: inherit;
  font-size: 0.92em;
}

/* =========================================================
   CELULAR: ACORDEÓN CON ENCABEZADO ACTIVO FLOTANTE
========================================================= */

@media (max-width: 767px) {
  .mpt-tabs-list {
    display: none;
  }

  .mpt-tabs-panels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .mpt-tab-item {
    display: block;
    overflow: hidden;
    border: 1px solid var(--mpt-border);
    border-radius: 14px;
    background: var(--mpt-white);
    box-shadow: 0 7px 22px rgba(24, 61, 39, 0.07);
  }

  .mpt-tab-item.is-active {
    position: relative;
    z-index: 2;
    overflow: visible;
  }

  .mpt-tab-button-mobile {
    display: flex;
    width: 100%;
    min-height: 68px;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 16px 18px;
    border-right: 0;
    border-radius: 13px;
    background: var(--mpt-white);
    font-size: 16px;
    scroll-margin-top: var(--mpt-mobile-scroll-offset);
    text-align: left;
  }

  .mpt-tour-tabs.mpt-sticky-enabled .mpt-tab-item.is-active .mpt-tab-button-mobile {
    position: relative;
    z-index: 1;
    top: auto;
    border-radius: 13px 13px 0 0;
    box-shadow: none;
  }

  .mpt-tab-button-mobile::after {
    top: 15px;
    right: auto;
    bottom: 15px;
    left: 0;
    width: 4px;
    height: auto;
    border-radius: 0 4px 4px 0;
    transform: scaleY(0.35);
  }

  .mpt-tab-button-mobile[aria-selected="true"] {
    background: var(--mpt-green-soft);
  }

  .mpt-tab-button-mobile[aria-selected="true"]::after {
    transform: scaleY(1);
  }

  .mpt-tab-button-mobile .mpt-tab-label {
    flex: 1;
  }

  .mpt-tab-button-mobile .mpt-tab-chevron {
    display: block;
    width: 10px;
    height: 10px;
    margin: 0 3px 5px 14px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms ease, margin 180ms ease;
  }

  .mpt-tab-button-mobile[aria-expanded="true"] .mpt-tab-chevron {
    margin-top: 5px;
    margin-bottom: 0;
    transform: rotate(225deg);
  }

  .mpt-tab-panel {
    min-height: 0;
    padding: 22px 18px 26px;
    border-top: 1px solid var(--mpt-border);
    border-radius: 0 0 13px 13px;
    font-size: 16px;
    line-height: 1.7;
  }

  .mpt-tab-panel.is-empty {
    min-height: 50px;
  }

  .mpt-tab-panel p,
  .mpt-tab-panel li {
    font-size: 16px;
    line-height: 1.7;
  }

  .mpt-floating-tab-mobile:not([hidden]) {
    display: block;
  }

  .mpt-floating-tab-mobile .mpt-tab-button-mobile {
    display: flex;
    min-height: 68px;
    border-radius: 12px;
    background: var(--mpt-green-soft);
    box-shadow: none;
    scroll-margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mpt-tour-tabs *,
  .mpt-tour-tabs *::before,
  .mpt-tour-tabs *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
