/* ---------- base ---------- */
.tb{
  width: 100%;
  background: #F5F5F5;
  margin-bottom: 20px;
}

.tb__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 0 18px;
}

/* header */
.tb__header{ text-align: center; margin-bottom: 14px; }
.tb__kicker{ margin: 0 0 6px; font-size: 20px; font-weight: 300; color: #0B2739; }
.tb__title{ margin: 0; font-size: 20px; line-height: 1.2; font-weight: 900; color: #0B2739; }

/* ===== TABS: wrapper que recorta lados + barra visible para triángulo ===== */
/* contenedor que RECORTA lateralmente (overflow hidden) */
.tb__tabclip{
  border-radius: 0;
  overflow: hidden;
  background: var(--blue);
  
}

.tb__tabbar{
  background: transparent;
  border-radius: 10px;
  overflow: visible;
  position: relative;
}

.tb__tablist{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;       
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.tb__tablist::-webkit-scrollbar{ display:none; }

.tb__tab{
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  white-space: nowrap;

  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

/* span interior opcional (puedes usarlo en diseño) */
.tb__tab > span{ display: inline-block; }

/* estado activo: pill oscuro */
.tb__tab.is-active{
  background: #0B2739;
  padding: 14px 28px;
  z-index: 3;
}

.tb__tab.is-active::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px; /* fuera del contenedor azul */
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #0B2739;
  z-index: 4;
}

/* panels (asegura que no tape el triángulo) */
.tb__panels{
  background: #F5F5F5;
  padding-top: 14px;
  padding-left: 55px;
  padding-right: 55px;
  position: relative;
  z-index: 1;
  margin-top: 20px;
  margin-bottom: 40px;
  align-content: center;
}


/* ===== items ===== */
.tb__grid{
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 25px; 
    justify-content: center;
}
.mundo{
    margin-left: 70px;
}
.tb__item{
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}
.tb__item{ 
    display: grid; 
    grid-template-columns: 42px 1fr; 
    gap: 12px; 
    align-items: center; 
}

.tb__icon{ width: 42px; height: 42px; overflow: hidden; }
.tb__icon img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.tb__item-title{ margin: 0; font-size: 16px; font-weight: 700; color: #323232; }
.tb__item-desc{ margin: 3px 0 0; font-size: 16px; line-height: 1.25; color: #575757; font-weight: 400; }

/* ===== DESKTOP (>=786px): mostrar los 4 tabs en fila y normalizar apariencia ===== */
@media (min-width: 786px){
  .tb__inner{ padding: 26px 24px 26px; }
  .tb__header{
    margin-bottom: 30px;
  }
  .tb__kicker{ font-size: 30px; }
  .tb__title{ font-size: 30px; }

  /* en desktop el clip ya no recorta (opcional) */
  .tb__tabclip{
    max-width: 800px;     /* ✅ como tu figma (ajusta si necesitas) */
    margin: 0 auto;        /* ✅ centra */
    overflow: visible;
    border-radius: 10px;
    margin-bottom: 20px;
  }

  .tb__tabbar{ 
    border-radius: 10px; 
    overflow: visible; 
    }

  .tb__tablist{
    padding: 0 0px; 
    gap: 0;
    justify-content: space-between;
    overflow-x: visible;
    
  }

  .tb__tab{
    font-size: 22px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 10px;
  }
  .tb__panels{
    max-width: 1100px;  /* opcional: para que todo quede alineado con la barra */
    margin: 0 auto;
  }
  .tb__panel_asistencia{
        max-width: 700px;
        margin: 0 auto;     
        }
    .tb__panel_seguridad{
        max-width: 800px;
        margin: 0 auto;  
    }

  .tb__tab.is-active{ background: #0B2739; padding: 12px 22px; }

  /* oculta triángulo en desktop */
  .tb__tab.is-active::after{ display: none; }

  /* grid 3 columnas para items */
  .tb__grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 26px; }
  .tb__grid_asistencia{
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap: 18px 26px; 
    padding-top: 4px;
    max-width: 800px;
    align-self: start;
    margin-left: 40px;
  }
  .tb__grid_seguridad{
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap: 18px 26px; 
    padding-top: 4px;
    max-width: 800px;
    align-self: start;
    margin-left: 40px;
  }
  .tb__item{ 
    grid-template-columns: 80px 1fr; 
    margin-left: 10px;
    }
  .tb__icon{ width: 60px; height: 60px; }
  .tb__item-title{ font-size: 20px; }
  .tb__item-desc{ font-size: 20px; }
}