/* ================================
   NDM Overrides
   Bloques: global, header, menu base y shortcodes del plugin
   ================================ */

.arreglar-acento {
  line-height: 1.5 !important;
  overflow: visible !important;
}

/* ================================
   Header / alineacion general
   ================================ */

@media (min-width: 992px) {
  .cabecera-ndm {
    max-width: none !important;
    margin: 0 auto !important;
  }

  .cabecera-ndm .container-fluid,
  .cabecera-ndm .porto-wrap-container {
    padding-left: 20px !important;
  }

  .ndm-site-menu__toggle {
    left: calc(50% - 560px) !important;
  }
}

@media (max-width: 991px) {
  .cabecera-ndm {
    position: relative !important;
    min-height: 75px !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding-left: 40px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .ndm-site-menu__toggle {
    position: absolute !important;
    left: 15px !important;
    transform: translateY(-15%) !important;
    margin: 0 !important;
    z-index: 9999 !important;
  }

  .cabecera-ndm .porto-wrap-container,
  .cabecera-ndm .container-fluid,
  .cabecera-ndm .row,
  .cabecera-ndm .vc_column_container,
  .cabecera-ndm .wpb_column,
  .cabecera-ndm .wpb_wrapper,
  .cabecera-ndm .ndm-section-nav,
  .cabecera-ndm .ndm-section-nav__mobile-shell {
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .cabecera-ndm .ndm-section-nav__menu {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .cabecera-ndm .ndm-section-nav__menu a,
  .cabecera-ndm .ndm-section-nav__pill {
    position: static !important;
    margin: 0 !important;
  }

  .cabecera-ndm .row::before,
  .cabecera-ndm .row::after {
    display: none !important;
  }

  .page-id-19 button.ndm-section-nav__mobile-shell-toggle,
  .ndm-section-nav--contenidos button.ndm-section-nav__mobile-shell-toggle {
    display: none !important;
  }
}

/* ================================
   Limpieza base de todos los menus
   ================================ */

.ndm-section-nav a,
.ndm-section-nav a:hover,
.ndm-section-nav a:focus,
.ndm-section-nav a:visited,
.ndm-section-nav button,
.ndm-section-nav button:hover,
.ndm-section-nav button:focus {
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.ndm-section-nav__group {
  position: relative !important;
}

.ndm-section-nav__group-header {
  gap: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ndm-section-nav__pill--group-link {
  border-radius: 14px 0 0 14px !important;
  margin-right: 0 !important;
}

.ndm-section-nav__pill--group-toggle {
  border-radius: 0 14px 14px 0 !important;
  border-left: 0 !important;
  margin-left: 0 !important;
}

.ndm-section-nav__pill--group-link::before,
.ndm-section-nav__pill--group-link::after,
.ndm-section-nav__pill--group-toggle::before,
.ndm-section-nav__pill--group-toggle::after {
  display: none !important;
  content: none !important;
}

.ndm-section-nav__dropdown-link,
.ndm-section-nav__dropdown a,
.ndm-section-nav__dropdown button {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ================================
   NDM Overrides 1.2 - bloques administrables
   Estos estilos solo afectan shortcodes nuevos del plugin.
   ================================ */

.ndm-overrides-banner,
.ndm-overrides-carousel,
.ndm-overrides-people,
.ndm-overrides-articles {
  box-sizing: border-box;
  width: 100%;
  font-family: inherit;
  color: #111;
}

.ndm-overrides-banner {
  max-width: 1120px;
  margin: 0 auto 48px;
  text-align: center;
}

.ndm-overrides-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 0 auto 28px;
}

.ndm-overrides-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 28px;
  background: #f2f2f2;
}

.ndm-overrides-banner .ndm-overrides-media {
  border-radius: 14px;
  margin: 0 auto 28px;
}

.ndm-overrides-media::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.ndm-overrides-media iframe,
.ndm-overrides-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.ndm-overrides-banner h2 {
  margin: 0 0 12px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.95;
  text-transform: uppercase;
  color: #000;
}

.ndm-overrides-banner p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.45;
}

.ndm-overrides-carousel,
.ndm-overrides-people,
.ndm-overrides-articles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 1120px;
  margin: 0 auto 64px;
}

.ndm-overrides-carousel__item,
.ndm-overrides-people__item,
.ndm-overrides-articles__item {
  min-width: 0;
}

.ndm-overrides-carousel__item img,
.ndm-overrides-people__item img,
.ndm-overrides-articles__item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
  margin: 0 0 18px;
}

.ndm-overrides-carousel__item .ndm-overrides-media,
.ndm-overrides-people__item .ndm-overrides-media,
.ndm-overrides-articles__item .ndm-overrides-media {
  margin: 0 0 18px;
}

.ndm-overrides-carousel__item h3,
.ndm-overrides-people__item h3,
.ndm-overrides-articles__item h3 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.05;
  color: #000;
}

.ndm-overrides-carousel__subtitle,
.ndm-overrides-people__subtitle,
.ndm-overrides-articles__subtitle {
  margin: 0 0 12px;
  font-weight: 700;
  color: #000;
}

.ndm-overrides-carousel__content,
.ndm-overrides-people__content,
.ndm-overrides-articles__content {
  font-size: 17px;
  line-height: 1.45;
}

.ndm-overrides-carousel__content p,
.ndm-overrides-people__content p,
.ndm-overrides-articles__content p {
  margin: 0 0 12px;
}

.ndm-overrides-carousel__item a,
.ndm-overrides-people__item a,
.ndm-overrides-articles__item a,
.ndm-overrides-card-actions {
  display: inline-block;
  margin-top: 8px;
  color: #000;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .ndm-overrides-banner {
    margin-bottom: 42px;
  }

  .ndm-overrides-banner img {
    border-radius: 22px;
    margin-bottom: 22px;
  }

  .ndm-overrides-banner h2 {
    font-size: 42px;
    text-align: left;
  }

  .ndm-overrides-banner p {
    text-align: justify;
    font-size: 16px;
  }

  .ndm-overrides-carousel,
  .ndm-overrides-people,
  .ndm-overrides-articles {
    display: flex;
    gap: 0;
    max-width: none;
    margin-bottom: 52px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ndm-overrides-carousel::-webkit-scrollbar,
  .ndm-overrides-people::-webkit-scrollbar,
  .ndm-overrides-articles::-webkit-scrollbar {
    display: none;
  }

  .ndm-overrides-carousel__item,
  .ndm-overrides-people__item,
  .ndm-overrides-articles__item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding-right: 16px;
  }

  .ndm-overrides-carousel__item img,
  .ndm-overrides-people__item img,
  .ndm-overrides-articles__item img {
    border-radius: 28px;
  }

  .ndm-overrides-carousel__item h3,
  .ndm-overrides-people__item h3,
  .ndm-overrides-articles__item h3 {
    font-size: 36px;
  }

  .ndm-overrides-carousel__content,
  .ndm-overrides-people__content,
  .ndm-overrides-articles__content {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
    text-align: justify;
  }
}
