/* =======================================
   EMGRAND – Seguridad (ajustado Figma)
======================================= */

.emg-safety {
  position: relative;
  padding: 72px 24px 80px;
  color: #03050f;
  margin-top: 0 !important;
  max-width: 100%;
  overflow: hidden;

  /* Fondo desde ACF */
  background: linear-gradient(135deg, rgba(163, 183, 255, 1) 0%, rgba(201, 212, 254, 1) 35%, rgba(209, 236, 245, 1) 65%, rgba(236, 239, 253, 1) 100%);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.emg-safety__inner {
  max-width: 1240px;
  margin: 0 auto;
}

/* Header principal */

.emg-safety__header {
  margin-bottom: 15px;
}

.emg-safety__title {
  font-family: var(--font-geely);
  margin: 0 0 36px;
  font-weight: 700;
  font-size: 48px;
  line-height: 44px;
  text-transform: uppercase;
}

.emg-safety__description {
  margin: 0;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 0px;
  vertical-align: middle;
}

/* Tabs */

/* Tabs – barra con título + descripción */

.emg-safety__tabs {
  display: flex;
  margin-top: 28px;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 0;
}

/* cada tab ocupa la mitad (o 1/N) del ancho */
.emg-safety__tab {
  flex: 1 1 0;
  position: relative;
  padding: 10px 24px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border-top: 2px solid transparent;
}

/* etiqueta INTERIOR / EXTERIOR */
.emg-safety__tab-label {
  font-family: var(--font-geely);
  display: block;
  text-transform: uppercase;
  color: #afb6b9;
  font-weight: 700;
  font-size: 22px;
  line-height: 33px;
  letter-spacing: 5px;
}

/* descripción corta debajo del título */
.emg-safety__tab-desc {
  display: block;
  margin-top: 4px;
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #000000;
}

/* estado activo: título azul, línea inferior azul, fondo un poco más claro */
.emg-safety__tab.is-active {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  border-top-color: #027bff;
}

.emg-safety__tab.is-active .emg-safety__tab-label {
  color: #027bff;
}

.emg-safety__tab.is-active .emg-safety__tab-desc {
  color: #555f6b;
}

/* Paneles */

.emg-safety__panels {
  margin-top: 24px;
}

.emg-safety__tab-panel {
  display: none;
}

.emg-safety__tab-panel.is-active {
  display: block;
}

/* Subheader de cada tab */

.emg-safety__subheader {
  margin-bottom: 20px;
}

.emg-safety__sub-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.emg-safety__sub-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* Slider */

.emg-safety__slider-wrapper {
  position: relative;
  margin-top: 10px;
}

/* === IMPORTANTE: limitamos el ancho del card para que
   se vea como en el diseño (no a todo el ancho) === */
.emg-safety__swiper {
  overflow: hidden;
  max-width: 100%;
  margin: 0 auto;
}

.emg-safety__slide {
  height: 100%;
}

.emg-safety__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
  align-items: center;
}

/* Imagen */

.emg-safety__media {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.23);
  background: #000;
}

.emg-safety__image {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* Texto derecha */

.emg-safety__card-body {
  padding: 8px 10%;
}

.emg-safety__card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.emg-safety__card-text {
  margin: 0;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0px;
  vertical-align: middle;
  color: #212529;
}

/* Controles slider (flechas + bullets) */

.emg-safety__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
}

.emg-safety__pagination {
  position: static;
}

/* bullets Swiper */
.emg-safety__pagination .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  margin: 0 3px !important;
  opacity: 0.35;
  background: #ffffff;
}

.emg-safety__pagination .swiper-pagination-bullet-active {
  opacity: 1;
  background: #027bff;
}

.emg-safety__nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 0px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.emg-safety__nav-btn img {
  width: 40px;
  height: 40px;
}

.emg-safety__nav-btn--prev {
  transform: rotate(180deg);
}

.emg-safety__nav-btn:hover:not(.is-disabled) {
  background: transparent;
  color: #ffffff;
}

/* estado deshabilitado (primera / última slide) */
.emg-safety__nav-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 1024px) {
  .emg-safety {
    padding: 56px 16px 64px;
  }

  .emg-safety__title {
    font-size: 36px;
  }

  .emg-safety__swiper {
    max-width: 100%;
  }

  .emg-safety__card {
    grid-template-columns: 1fr;
    //row-gap: 18px;
  }

  .emg-safety__image {
    max-height: 360px;
  }

  .emg-safety__controls {
    margin-top: 16px;
  }
}

@media (max-width: 768px) {
  .emg-safety {
    padding: 40px 16px 80px;
  }

  /* Fondo mobile administrable */
  .emg-safety {
    //background-image: var(--emg-safety-bg-mobile, var(--emg-safety-bg-desktop));
    background-position: center top;
    background: linear-gradient(180deg, rgba(163, 183, 255, 1) 0%, rgba(201, 212, 254, 1) 33%, rgba(236, 239, 253, 1) 66%, rgba(209, 236, 245, 1) 100%);
  }

  .emg-safety__title {
    font-size: 28px;
    line-height: 48px;
  }

  .emg-safety__description {
    font-size: 16px;
    line-height: 140%;
    font-weight: 500;
    font-family: var(--font-inter);

  }

  .emg-safety__card-title{
    font-family: var(--font-geely);
    font-weight: 700;
    font-size: 20px;
    line-height: 28px;
    text-transform: uppercase;
    color: #0B0C0C;
    margin: 0 0 16px;
  }

  .emg-safety__tabs {
    margin-top: 20px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .emg-safety__tabs::-webkit-scrollbar {
    display: none;
  }

  .emg-safety__tab {
    flex: 0 0 auto;
    max-width: 80%;
    padding: 8px 14px 10px;
  }

  .emg-safety__tab-label {
    font-size: 12px;
    line-height: 24px;
    letter-spacing: 0;
  }

  .emg-safety__tab-desc {
    font-size: 14px;
    white-space: normal;
    line-height: 24px;
    letter-spacing: 0;
  }

  .emg-safety__sub-description {
    font-size: 12px;
  }

  .emg-safety__card-text {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
  }

  .emg-safety__image {
    max-height: 320px;
  }

  .emg-safety__controls {
    gap: 20px;
  }

  .emg-safety__nav-btn {
    display: none;
  }
}


/* ================================
   PATCH: emgrand-safety.css
   Pegar al FINAL del archivo existente
================================ */

/* Tabs — reemplaza estilo línea por pill (Figma) */

.emg-safety__tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
  box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  margin-top: 28px;
  margin-bottom: 24px;
  /* cancela estilos anteriores */
  border-top: none;
  overflow: visible;
}

.emg-safety__tab {
  flex: 0 0 auto;
  position: relative;
  padding: 8px 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: 100px;
  border-top: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.emg-safety__tab-label {
  font-family: var(--font-inter);
  display: block;
  text-transform: none;
  color: #555;
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0;
}

/* Ocultar la descripción en el tab (va dentro del card en Figma) */
.emg-safety__tab-desc {
  display: none;
}

.emg-safety__tab.is-active {
  background: #fff;
  border-top: none;
}

.emg-safety__tab.is-active .emg-safety__tab-label {
  color: #0B0C0C;
  font-weight: 500;
}

/* Card — fondo blanco con borde redondeado */

.emg-safety__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0;
  align-items: stretch;
  background: radial-gradient(
  circle at top left,
  #ffffff 0%,
  #f8f9ff 30%,
  #eef2ff 65%,
  #dde6ff 80%
);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.07);
}

.emg-safety__media {
  border-radius: 0;
  box-shadow: none;
  background: #000;
}

.emg-safety__image {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.emg-safety__card-body {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.emg-safety__card-title {
  font-family: var(--font-geely) !important;
  font-weight: 700;
  font-size: 32px;
  line-height: 120%;
  //letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0B0C0C;
  margin: 0 0 16px;
  max-width: 480px;
}

.emg-safety__card-text {
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 20px;
  line-height: 140%;
  color: #0B0C0C;
  margin: 0;
}

/* Controles — bullets pill + botones círculo */

.emg-safety__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

/* Bullets estilo pill */
.emg-safety__pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  opacity: 0.3;
  background: #0B0C0C;
  margin: 0 4px !important;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.emg-safety__pagination .swiper-pagination-bullet-active {
  width: 24px;
  opacity: 1;
  background: #194BFF;
}

/* Botones nav — círculo blanco con SVG azul */
.emg-safety__nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.10);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  padding: 0;
}

.emg-safety__nav-btn img,
.emg-safety__nav-btn .emg-config__icon-arrow-img {
  display: none; /* oculta el PNG anterior */
}

.emg-safety__nav-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.emg-safety__nav-btn:hover:not(.is-disabled) {
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.14);
  transform: scale(1.06);
  background: #fff;
}

.emg-safety__nav-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
}

.emg-safety__nav-btn--prev {
  transform: none;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .emg-safety__tabs {
    //width: 100%;
    justify-content: center;
  }

  .emg-safety__card {
    grid-template-columns: 1fr;
  }

 .emg-safety__card-title{
  font-size: 20px;
  font-weight: 700;
  line-height: 120%;
 }


 .emg-safety__card-text{
  font-size: 16px;
  font-weight: 400;
  line-height: 140%;
 }


  .emg-safety__card-body {
    padding: 14px 20px 40px 20px;
    background: linear-gradient(180deg, rgba(236, 239, 253, 1) 0%, rgba(183, 198, 255, 1) 300%);
  }
  .emg-safety__header{
    margin-bottom: 10px;
  }

  

  .emg-safety__nav-btn {
    display: inline-flex !important;
    width: 36px;
    height: 36px;
  }

  .emg-safety__controls {
    justify-content: space-between;
  }
}

.emg-safety__nav-buttons {
  display: flex;
  gap: 10px;
}

/* Fix: pagination no debe ocupar ancho completo */
.emg-safety__pagination.swiper-pagination {
  position: static !important;
  width: auto !important;
  bottom: auto !important;
  top: auto !important;
  left: auto !important;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border: 1.5px solid #ffffff;
  border-radius: 100px;
}

/* Bullets blancos */
.emg-safety__pagination .swiper-pagination-bullet {
  background: #fff !important;
  opacity: 0.45;
}

.emg-safety__pagination .swiper-pagination-bullet-active {
  background: #194BFF !important;
  opacity: 1;
  width: 24px;
}