/* Custom CSS para estilos personalizados */

/* Paleta corporativa C.D. Almazan */
:root {
  --sd-primary: #0b84bc;      /* azul escudo */
  --sd-primary-contrast: #2f6fa9; /* azul equivalente con más contraste */
  --sd-secondary: #e10613;    /* rojo escudo */
  --sd-accent: #62b784;       /* verde escudo */
  --sd-ink: #111111;          /* negro texto escudo */
  --sd-surface: #f6f9fc;
  --sd-table-font-size: 0.875rem; /* 14px: 2px menos que base 16px */
  --sd-team-row-bg: #d9eaf2; /* resaltado fila del club (ficha / clasificación) */
  --sd-team-row-bg-hover: #c5dde9;
  /* Sustituye Mona Sans (main.css) por Ubuntu en todo el front público */
  --tj-ff-body: "Ubuntu", system-ui, -apple-system, sans-serif;
  --tj-ff-heading: "Ubuntu", system-ui, -apple-system, sans-serif;
}

/* Tablas deportivas (jornadas + clasificacion) */
.sd-sport-table {
  font-size: var(--sd-table-font-size);
  border: 1px solid rgba(11, 132, 188, 0.28);
  box-shadow: 0 8px 20px rgba(11, 132, 188, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.sd-sport-table thead th {
background-color: var(--sd-primary-contrast);  color: #ffffff;
  border-bottom: 2px solid rgba(11, 132, 188, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

.sd-sport-table tbody tr:nth-child(even) {
  background-color: rgba(11, 132, 188, 0.05);
}

.sd-sport-table tbody td {
  border-bottom: 1px solid rgba(11, 132, 188, 0.24);
}
.sd-sport-table tbody tr:last-child td {
  border-bottom: 0;
}

.sd-sport-table tbody tr:hover {
  background-color: rgba(98, 183, 132, 0.14);
}

/* Fila del equipo: por encima del zebra striping de .sd-sport-table */
.sd-sport-table tbody tr.sd-team-highlight,
.sd-sport-table tbody tr.sd-team-highlight td {
  background-color: #d9f2dc !important;
  color: #0b1f2a;
}

.sd-sport-table tbody tr.sd-team-highlight:hover,
.sd-sport-table tbody tr.sd-team-highlight:hover td {
  background-color: var(--sd-team-row-bg-hover) !important;
}

/* Resaltado de la celda concreta del club (home: tabla últimos resultados) */
.sd-sport-table td.sd-team-highlight-cell {
  background-color: #ffffff !important;
  color: #2b679f !important;
  font-weight: 500;
}
.sd-sport-table tbody tr:hover td.sd-team-highlight-cell {
  background-color: #ffffff !important;
}

.sd-team-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration-line: underline !important;
  text-decoration-style: dotted !important;
  text-underline-offset: 0.18em;
}

.sd-team-detail-link:hover,
.sd-team-detail-link:focus-visible {
  color: var(--sd-primary);
}

.sd-team-detail-link i {
  font-size: 0.72em;
  opacity: 0.9;
}

.sd-sport-table td,
.sd-sport-table th {
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

/*
 * Tablas de resultados con layout fijo.
 * Local y Visitante comparten el espacio restante (misma anchura visual).
 */
.sd-sport-table.sd-match-table-fixed {
  table-layout: fixed;
  width: 100%;
}

.sd-sport-table.sd-match-table-fixed td.sd-cell-team,
.sd-sport-table.sd-match-table-fixed th.sd-cell-team {
  word-break: break-word;
  overflow-wrap: break-word;
}

/*
 * Local y Visitante: misma anchura siempre (misma fórmula en los dos col.sd-col-team).
 * Se define en <col> para que th/td hereden igual; se repite en .sd-cell-team por si el motor ignora col.
 */
@media (min-width: 576px) {
  .sd-sport-table.sd-match-table--home.sd-match-table-fixed col.sd-col-team,
  .sd-sport-table.sd-match-table--home.sd-match-table-fixed .sd-cell-team {
    width: calc((100% - 34% - 56px - 110px - 72px) / 2);
  }

  .sd-sport-table.sd-match-table--equipo-ultimos.sd-match-table-fixed col.sd-col-team,
  .sd-sport-table.sd-match-table--equipo-ultimos.sd-match-table-fixed .sd-cell-team {
    width: calc((100% - 56px - 110px - 72px) / 2);
  }

  .sd-sport-table.sd-match-table--equipo-jornada.sd-match-table-fixed col.sd-col-team,
  .sd-sport-table.sd-match-table--equipo-jornada.sd-match-table-fixed .sd-cell-team,
  .sd-sport-table.sd-match-table--clasif.sd-match-table-fixed col.sd-col-team,
  .sd-sport-table.sd-match-table--clasif.sd-match-table-fixed .sd-cell-team {
    width: calc((100% - 72px) / 2);
  }

  /*
   * Detalle equipo: no estirar al ancho completo de la tarjeta; Local/Visitante siguen iguales
   * pero el reparto es sobre una tabla más corta (~592px).
   */
  .sd-sport-table.sd-match-table--equipo-ultimos.sd-match-table-fixed,
  .sd-sport-table.sd-match-table--equipo-jornada.sd-match-table-fixed {
    width: 100%;
    max-width: min(100%, 37rem);
    margin-inline: auto;
  }
}

@media (max-width: 767.98px) {
  /*
   * Tabla más ancha que la pantalla: scroll dentro de .table-responsive.
   * Columnas fijas como en las reglas siguientes; Local y Visitante = mitad exacta del resto (misma anchura).
   */
  .table-responsive .sd-sport-table.sd-match-table-fixed {
    width: 100%;
    min-width: 34rem;
    font-size: 0.8125rem;
  }

  /* Anchos mínimos por tipo: evita columnas de equipos exageradamente anchas */
  .table-responsive .sd-sport-table.sd-match-table--home {
    min-width: 46rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos {
    min-width: 31rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--equipo-jornada,
  .table-responsive .sd-sport-table.sd-match-table--clasif {
    min-width: 100%;
  }

  /* Home: categoría | J | fecha | local | res | visitante */
  .table-responsive .sd-sport-table.sd-match-table--home col:nth-child(1) {
    width: 12%;
  }

  .table-responsive .sd-sport-table.sd-match-table--home col:nth-child(2) {
    width: 2rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--home col:nth-child(3) {
    width: 4.25rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--home col:nth-child(5) {
    width: 2.85rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--home col.sd-col-team,
  .table-responsive .sd-sport-table.sd-match-table--home .sd-cell-team {
    width: calc((100% - 12% - 2rem - 4.25rem - 2.85rem) / 2);
  }

  /* Forzar visualmente más ancho en Local/Visitante (sobre inline styles del colgroup) */
  .table-responsive .sd-sport-table.sd-match-table--home col.sd-col-team,
  .table-responsive .sd-sport-table.sd-match-table--home th.sd-cell-team,
  .table-responsive .sd-sport-table.sd-match-table--home td.sd-cell-team {
    width: 11rem !important;
    min-width: 11rem !important;
  }

  /* Últimos del equipo: J | fecha | local | res | visitante */
  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos col:nth-child(1) {
    width: 2.1rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos col:nth-child(2) {
    width: 5rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos col:nth-child(4) {
    width: 2.8rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos col.sd-col-team,
  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos .sd-cell-team {
    width: calc((100% - 2.1rem - 5rem - 2.8rem) / 2);
  }

  /* Últimos resultados: columnas compactas + Local/Visitante al mismo ancho */
  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos th:nth-child(2),
  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos td:nth-child(2),
  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos th:nth-child(4),
  .table-responsive .sd-sport-table.sd-match-table--equipo-ultimos td:nth-child(4) {
    white-space: nowrap;
  }

  /* Jornada / partidos por jornada (3 col): local | res | visitante */
  .table-responsive .sd-sport-table.sd-match-table--equipo-jornada col:nth-child(2),
  .table-responsive .sd-sport-table.sd-match-table--clasif col:nth-child(2) {
    width: 2.7rem;
  }

  .table-responsive .sd-sport-table.sd-match-table--equipo-jornada col.sd-col-team,
  .table-responsive .sd-sport-table.sd-match-table--equipo-jornada .sd-cell-team,
  .table-responsive .sd-sport-table.sd-match-table--clasif col.sd-col-team,
  .table-responsive .sd-sport-table.sd-match-table--clasif .sd-cell-team {
    width: calc((100% - 2.7rem) / 2);
  }

  .table-responsive .sd-sport-table.sd-match-table-fixed td,
  .table-responsive .sd-sport-table.sd-match-table-fixed th {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .table-responsive .sd-sport-table:not(.sd-match-table-fixed) {
    font-size: 0.8125rem;
  }

  .table-responsive .sd-sport-table:not(.sd-match-table-fixed) td,
  .table-responsive .sd-sport-table:not(.sd-match-table-fixed) th {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  /* Clasificación: ocultar columna Racha/Ultimos en móvil */
  .table-responsive .sd-clasificacion-table th:nth-child(10),
  .table-responsive .sd-clasificacion-table td:nth-child(10) {
    display: none;
  }
}

.sd-form-badges {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.sd-form-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  color: #ffffff;
}

.sd-form-badge--g {
  background-color: #10a340;
}

.sd-form-badge--e {
  background-color: #c5cb00;
}

.sd-form-badge--p {
  background-color: #e98a91;
}

.sd-form-badge--x {
  background-color: #6c757d;
}

/* Versión más club para botones principales */
.tj-primary-btn {
  background: linear-gradient(120deg, #ffcb03 0%, #851f1f 100%);
  border-color: #ffcb03;
  /* border: 2px solid #ffca00; */
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 79, 133, 0.28);
}

.tj-primary-btn .btn-text,
.tj-primary-btn .btn-text span {
  color: #ffffff;
}

.tj-primary-btn .btn-icon {
  background: #ffffff;
  color: #1f4f85;
}

.tj-primary-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

/* Iconos de bloques informativos */
.project-icons {
  background: linear-gradient(160deg, var(--sd-primary) 0%, #0832a6 100%);
  /* border: 2px solid var(--sd-secondary); */
  box-shadow: 0 6px 14px rgba(11, 132, 188, 0.25);
}

.project-icons i {
  color: #ffffff;
}

/* Vídeo del banner home: relación 1:1 (cuadrado) */
.banner-img--video {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.banner-img--video .banner-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Logo IGP Torrezno en el recuadro del banner */
.customers-box--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.customers-box--logo .logo-igp-torrezno {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.h8-service-item .service-content .desc ul {
  padding-left: 20px;
}
.tj-product-details-title {
    color: #fff
}
.tj-product {
        text-align: center;
            border: 1px solid #ccc;
            border-radius: 10px;
}
.blog ul {
    padding-left: 20px;
    padding-bottom: 20px;
}

.blog h3 {
    margin-bottom: 10px;
    color: #195700;
    font-size: 26px;
    padding-top: 8px;
}
.blog h4 {
    margin-bottom: 10px;
    color: #7cb37f;
    font-size: 20px;
    padding-top: 8px;
}
/* Noticias: badge fecha estilo cristal (esquina imagen) */
.blog-item--sd-noticia .blog-thumb {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.blog-date.blog-date--sd-glass {
  inset-inline-start: 16px;
  top: 16px;
  padding: 16px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.blog-date.blog-date--sd-glass .month {
  letter-spacing: 0.12em;
}
.sd-blog-meta-autor {
  font-size: 0.95rem;
  color: var(--tj-color-text-body, #555);
}
.sd-blog-meta-autor strong {
  font-weight: 600;
  color: var(--tj-color-heading-primary, #111);
}

/* Cabeceras con foto: velo gris oscuro semitransparente (texto por encima) */
.tj-page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(24, 26, 30, 0.2);
  z-index: 0;
  pointer-events: none;
}
.tj-page-header > * {
  position: relative;
  z-index: 1;
}

/* Cabeceras (páginas interiores): sombra tenue en el título sobre foto */
.tj-page-header .tj-page-title {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.32),
    0 2px 10px rgba(0, 0, 0, 0.18);
}

/* Home: hero tipo tj-page-header pero más alto (slide aleatorio) */
.sd-home-slide.tj-page-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(400px, 82vh, 1040px);
  padding-top: clamp(5.5rem, 16vh, 13rem);
  padding-bottom: clamp(4.5rem, 11vh, 10rem);
  margin-top: 10px;
}
/* Legibilidad sobre foto: sombra negra en textos */
.sd-home-slide .tj-page-title.sd-home-slide__title {
  margin-bottom: 1rem;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 3px 14px rgba(0, 0, 0, 0.85),
    0 0 28px rgba(0, 0, 0, 0.55);
}
.sd-home-slide .sd-home-slide__subtitle {
  margin: 0 auto 1.75rem;
  max-width: 52ch;
  font-size: clamp(1rem, 2.2vw, 1.95rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.88),
    0 0 20px rgba(0, 0, 0, 0.5);
}
.sd-home-slide .scroll-down {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 8px rgba(0, 0, 0, 0.85);
}
.sd-home-slide .sd-home-slide__btn-wrap {
  margin-top: 0.5rem;
}
.sd-home-slide .sd-home-slide__scroll {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 3;
}
@media (max-width: 767.98px) {
  .sd-home-slide.tj-page-header {
    min-height: clamp(340px, 66vh, 820px);
    padding-top: 5rem;
    padding-bottom: 5.5rem;
  }
}

/* Home: carrusel equipos — categoría sobre la imagen */
.sd-equipos-home .sd-equipos-home__badge {
  position: absolute;
  inset-inline-start: 16px;
  bottom: 16px;
  z-index: 2;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sd-equipos-home .blog-thumb {
  position: relative;
}

/* Home: logos patrocinadores Platino (instituciones.tipo = 1) */
.sd-patroc-plat-home {
  background-color: var(--tj-color-grey-5, #f6f8f9);
}
.sd-patroc-plat-home__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--tj-color-common-white, #fff);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
a.sd-patroc-plat-home__link:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.sd-patroc-plat-home__link img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* meanmenu: el hamburguesa real del theme es .mobile_menu_bar; ocultar el .meanmenu-reveal duplicado (sigue recibiendo .trigger) */
@media (max-width: 991.98px) {
  .header-area .mobile_menu.mean-container {
    position: relative;
    z-index: 1000;
  }
  .header-area .mobile_menu .mean-bar {
    background: transparent;
    min-height: 0;
    padding: 0;
    float: none;
  }
  .header-area .mobile_menu a.meanmenu-reveal {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    white-space: nowrap !important;
  }
  .header-area .mobile_menu .mean-nav {
    margin-top: 0;
    float: none;
    width: 100%;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.14);
  }
}

/* Menú desktop: submenú 1px menor que principal (16px -> 15px) */
.header-area .mainmenu ul > li > .sub-menu > li > a {
  font-size: 14px;
}

/* Header móvil más compacto y con más separación al contenido */
@media (max-width: 991.98px) {
  .header-area.h8-header.header-absolute {
    top: 10px;
  }

  .header-area.h8-header .header-wrapper {
    min-height: 50px;
    padding: 4px 10px !important;
  }

  .header-area.h8-header .site_logo .logo {
    max-width: 90px;
    width: auto;
    padding: 0 !important;
    margin: 0;
    line-height: 0;
    display: flex;
    align-items: center;
  }

  .header-area.h8-header .site_logo .logo img {
    display: block;
    max-height: 44px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
  }

  .header-area.h8-header .menu_bar.mobile_menu_bar {
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 6px;
  }

  .header-area.h8-header .menu_bar.mobile_menu_bar span {
    height: 2px;
  }

  .space-for-header {
    padding-top: 108px !important;
  }
}

@media (max-width: 575.98px) {
  .header-area.h8-header .header-wrapper {
    min-height: 46px;
    padding: 2px 8px !important;
  }

  .header-area.h8-header .site_logo .logo {
    max-width: 86px;
    width: auto;
    padding: 8px 0 !important;
    margin: 0;
    display: flex;
    align-items: center;
  }

  .header-area.h8-header .site_logo .logo img {
    max-height: 72px;
    margin: 0;
  }

  .header-area.h8-header .menu_bar.mobile_menu_bar {
    width: 40px;
    height: 40px;
    padding: 8px;
  }

  .space-for-header {
    padding-top: 10px !important;
  }
}

/* Breadcrumb más pequeño en móvil */
@media (max-width: 767.98px) {
  .tj-page-link {
    margin-top: 20px;
    padding: 4px 10px;
    gap: 6px;
  }

  .tj-page-link span {
    font-size: 13px;
  }

  .tj-page-link span i {
    font-size: 13px;
  }

  .tj-page-link span:not(:first-child) i {
    font-size: 14px;
  }
}

/* Sustituto del icono tji-box: favicon dinámico de siteConfig */
.sd-favicon-inline {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
  border-radius: 2px;
}

/* Merchandising: overlay de lupa y hover como en detalle */
.sd-merch-gallery {
  position: relative;
  display: block;
  overflow: hidden;
}

.sd-merch-gallery::before {
  content: "\e91c";
  font-family: "bexon-icons" !important;
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(114 222 147 / 62%);
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  transition: opacity .25s ease, visibility .25s ease;
}

.sd-merch-gallery:hover::before {
  opacity: 1;
  visibility: visible;
}

.sd-merch-gallery img {
  display: block;
  width: 100%;
}

/* En tarjetas tipo team-item, el overlay nativo bloquea el click del lightbox */
.sd-merch-section .team-item .team-img::before,
.sd-merch-section .team-item .team-img::after {
  pointer-events: none;
}

/* Prioriza la lupa/overlay de galería para merchandising */
.sd-merch-section .team-item:hover .team-img::before {
  opacity: 0.2;
}

.sd-merch-section .sd-merch-gallery {
  z-index: 3;
}

/* Jugadores (detalle equipo): mismo ajuste para que lupa/click funcione siempre */
.sd-players-section .team-item .team-img::before,
.sd-players-section .team-item .team-img::after {
  pointer-events: none;
}

/* Anula el overlay nativo de team-item para que no tape la lupa personalizada */
.sd-players-section .team-item .team-img::before,
.sd-players-section .team-item:hover .team-img::before {
  opacity: 0 !important;
}

.sd-players-section .sd-players-gallery {
  position: relative;
  display: block;
  overflow: hidden;
  z-index: 3;
}

.sd-players-section .sd-players-gallery::before {
  content: "\e91c";
  font-family: "bexon-icons" !important;
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(12, 30, 33, 0.45);
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  transition: opacity .25s ease, visibility .25s ease;
}

.sd-players-section .sd-players-gallery:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Páginas (vista pagina): lupa y zoom en foto principal + galería */
.sd-page-gallery-section .sd-page-gallery {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

.sd-page-gallery-section .sd-page-gallery::before {
  content: "\e91c";
  font-family: "bexon-icons" !important;
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(12, 30, 33, 0.45);
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  transition: opacity .25s ease, visibility .25s ease;
}

.sd-page-gallery-section .sd-page-gallery:hover::before {
  opacity: 1;
  visibility: visible;
}

.sd-page-gallery-section .sd-page-gallery img {
  display: block;
  width: 100%;
}

.sd-page-gallery-section .sd-page-thumbs-row {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
}

.sd-campus-cols-row {
  --bs-gutter-x: 2rem;
  --bs-gutter-y: 1.25rem;
}

.card-campus {
  padding: 28px;
  background-color: #ffffff;
  border-radius: 10px;
}
.sidebar, .sumario {
        border-left: 6px solid #ffcb03;
            background-color: #1957000f;
            padding: 20px;
            font-size: 14px;
}
/* Tarjetas de contacto: icono grande + estado activo (:hover / :focus-within) */
.contact-info-card {
  --contact-card-accent: #2d6a3a;
  --contact-card-bg: #e8f2ea;
  --contact-card-border: rgba(45, 106, 58, 0.22);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: 1.35rem 1.35rem 1.5rem;
  background: var(--contact-card-bg);
  border: 1px solid var(--contact-card-border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(25, 87, 0, 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.contact-info-card:hover,
.contact-info-card:focus-within,
.contact-info-card.is-active {
  border-color: var(--contact-card-accent);
  box-shadow: 0 10px 28px rgba(25, 87, 0, 0.12);
  transform: translateY(-2px);
}
.contact-info-card.is-active .contact-info-card__icon,
.contact-info-card:hover .contact-info-card__icon,
.contact-info-card:focus-within .contact-info-card__icon {
  transform: scale(1.08);
  box-shadow: 0 8px 22px rgba(45, 106, 58, 0.45);
}
.contact-info-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.25rem;
  margin-bottom: 1rem;
  font-size: 2.15rem;
  line-height: 1;
  color: #fff;
  background: var(--contact-card-accent);
  border-radius: 50%;
  flex-shrink: 0;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(45, 106, 58, 0.35);
}
.contact-info-card__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}
.contact-info-card__body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #333;
  width: 100%;
}
.contact-info-card__body a {
  font-weight: 500;
}

/* Contacto: espacio entre las 4 tarjetas y entre el bloque informativo y el formulario */
.row.g-4.contact-page-main {
  --bs-gutter-y: 1.75rem;
}
@media (min-width: 992px) {
  .row.g-4.contact-page-main {
    --bs-gutter-x: 3.5rem;
    --bs-gutter-y: 2rem;
  }
}
.row.g-4.contact-page-cards {
  --bs-gutter-x: 1.75rem;
  --bs-gutter-y: 1.5rem;
}
@media (min-width: 768px) {
  .row.g-4.contact-page-cards {
    --bs-gutter-x: 2.25rem;
    --bs-gutter-y: 1.75rem;
  }
}

/* Bloque vídeo portada: fondo + overlay + textura, texto centrado, popup VenoBox (.video-popup) */
.sd-home-video-cta {
  position: relative;
  isolation: isolate;
  min-height: clamp(320px, 48vh, 560px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.sd-home-video-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* background: linear-gradient(
      180deg,
      rgba(12, 18, 14, 0.55) 0%,
      rgba(18, 28, 22, 0.72) 50%,
      rgba(8, 12, 10, 0.78) 100%
    ),
    repeating-linear-gradient(
      -28deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 5px
    ); */
  pointer-events: none;
}

.sd-home-video-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: multiply;
  pointer-events: none;
}

.sd-home-video-cta__link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: inherit;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem;
  text-decoration: none;
  color: #fff;
  outline: none;
}

.sd-home-video-cta__link:hover,
.sd-home-video-cta__link:focus-visible {
  color: #fff;
}

.sd-home-video-cta__link:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.sd-home-video-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* max-width: min(46rem, 100%); */
  gap: clamp(0.85rem, 2vw, 2.25rem);
}

.sd-home-video-cta__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.15);
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.sd-home-video-cta__play i {
  margin-inline-start: 3px;
}

.sd-home-video-cta__link:hover .sd-home-video-cta__play,
.sd-home-video-cta__link:focus-visible .sd-home-video-cta__play {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.sd-home-video-cta__title {
  margin: 0;
  font-family: var(--tj-ff-heading, "Ubuntu", system-ui, sans-serif);
  font-size: clamp(1.35rem, 3.8vw, 4.35rem);
  font-weight: 700;
  line-height: 1.2;
  /* letter-spacing: 0.06em; */
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 4px 18px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

.sd-home-video-cta__rule {
  display: block;
  width: min(22rem, 85%);
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.sd-home-video-cta__subtitle {
  margin: 0;
  font-family: var(--tj-ff-body, "Ubuntu", system-ui, sans-serif);
  font-size: clamp(0.78rem, 1.9vw, 1.5rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  max-width: 40rem;
}

/* Home: tres tarjetas (paginas id 46 — subtítulo + name/h1 + 3 bloques content) */
.sd-home-tres-tarjetas {
  background: #f9f7f5;
}

.sd-home-tres-tarjetas__heading .sd-home-tres-tarjetas__kicker.sub-title {
  color: #9a4a2c !important;
  letter-spacing: 0.08em;
}

.sd-home-tres-tarjetas__heading .sd-home-tres-tarjetas__kicker.sub-title i {
  color: #9a4a2c;
}

.sd-home-tres-tarjetas__heading .sd-home-tres-tarjetas__sumario {
  margin: 0.85rem auto 0;
  max-width: 52rem;
  font-family: var(--tj-ff-body, "Ubuntu", system-ui, sans-serif);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 400;
        line-height: 1.4;
        letter-spacing: 0em;
        color: var(--tj-color-text-body, #364e52);
}

.sd-home-tres-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(12, 30, 33, 0.08);
  border: 1px solid rgba(12, 30, 33, 0.06);
  display: flex;
  flex-direction: column;
}

.sd-home-tres-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #ece8e4;
}

.sd-home-tres-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sd-home-tres-card__media-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(145deg, #e8e4df 0%, #dcd6cf 100%);
}

.sd-home-tres-card__body {
  padding: 1.35rem 1.35rem 1.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.sd-home-tres-card__title {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--tj-color-heading-primary, #0c1e21);
  line-height: 1.25;
}

.sd-home-tres-card__text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--tj-color-text-body, #364e52);
  flex: 1 1 auto;
}

.sd-home-tres-card__text p:last-child {
  margin-bottom: 0;
}

.sd-home-tres-card__cta .tj-primary-btn.sd-home-tres-card__btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 992px) {
  .sd-home-tres-card__cta .tj-primary-btn.sd-home-tres-card__btn {
    width: auto;
    align-self: flex-start;
  }
}

/* Home «choose» (paginas id 47): anula width:100% del tema h7 para círculo fijo + icono grande */
.sd-home-choose .h7-choose-box .choose-icon.sd-home-choose__icon-slot {
  box-sizing: border-box;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  height: 90px;
  aspect-ratio: 1;
  margin-inline: auto;
  margin-bottom: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--tj-color-grey-1);
  transition: background-color 0.4s;
}

.sd-home-choose .h7-choose-box .choose-icon.sd-home-choose__icon-slot i {
  font-size: 2.65rem;
  line-height: 1;
  width: auto;
  height: auto;
  display: block;
  color: var(--tj-color-theme-primary);
  transition: color 0.4s;
}

.sd-home-choose .h7-choose-box .choose-icon.sd-home-choose__icon-slot--img img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.sd-home-choose .h7-choose-box:hover .choose-icon.sd-home-choose__icon-slot {
  background-color: var(--tj-color-theme-primary);
}

.sd-home-choose .h7-choose-box:hover .choose-icon.sd-home-choose__icon-slot i {
  color: var(--tj-color-common-white);
}

.sd-home-choose .h7-choose-box:hover .choose-icon.sd-home-choose__icon-slot--img img {
  filter: brightness(0) invert(1);
}

@media only screen and (min-width: 576px) and (max-width: 991px),
  only screen and (max-width: 575px) {
  .sd-home-choose .h7-choose-box .choose-icon.sd-home-choose__icon-slot {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    height: 80px;
  }

  .sd-home-choose .h7-choose-box .choose-icon.sd-home-choose__icon-slot i {
    font-size: 2.35rem;
  }

  .sd-home-choose .h7-choose-box .choose-icon.sd-home-choose__icon-slot--img img {
    width: 48px;
    height: 48px;
  }
}

/* Álbum de fotos: cabecera solo migas, bloque intro como home, filtros y rejilla */
.sd-album-page-header .tj-page-header-content {
  padding-top: 1.25rem;
  padding-bottom: 0.5rem;
}

.sd-album-intro .sd-home-tres-tarjetas__sumario {
  margin: 0.85rem auto 0;
  max-width: 52rem;
  font-family: var(--tj-ff-body, "Ubuntu", system-ui, sans-serif);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--tj-color-text-body, #364e52);
}

.sd-album-gallery {
  background: #fff;
}

.sd-album-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.25rem;
}

/* Botones de filtro: aspecto de píldora con borde redondeado (sobreescribe estilos del tema) */
.sd-album-gallery .sd-album-filters button.sd-album-filter-btn {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  min-height: 2.5rem;
  font-family: var(--tj-ff-body, "Ubuntu", system-ui, sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--tj-color-text-body, #364e52);
  background: #fff;
  border: 2px solid rgba(12, 30, 33, 0.2);
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(12, 30, 33, 0.06);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.sd-album-gallery .sd-album-filters button.sd-album-filter-btn:hover {
  border-color: var(--tj-color-theme-primary, #2d6a4f);
  color: var(--tj-color-theme-primary, #2d6a4f);
  background: rgba(45, 106, 79, 0.06);
}

.sd-album-gallery .sd-album-filters button.sd-album-filter-btn.is-active {
  border-color: var(--tj-color-theme-primary, #2d6a4f);
  color: #fff;
  background: var(--tj-color-theme-primary, #2d6a4f);
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.35);
}

/*
 * Álbum: Isotope masonry (igual idea que portfolio-filter-box en main.js).
 * Evita column-count de CSS, que rellena en vertical y con pocas fotos deja una sola columna estrecha.
 */
.sd-album-masonry.js-sd-album-isotope::after {
  content: "";
  display: block;
  clear: both;
}

.sd-album-grid-sizer,
.sd-album-masonry-item {
  box-sizing: border-box;
  width: 23.5%;
}

.sd-album-gutter-sizer {
  box-sizing: border-box;
  width: 2%;
}

.sd-album-masonry-item {
  margin-bottom: 1.25rem;
}

@media only screen and (max-width: 1199px) {
  .sd-album-grid-sizer,
  .sd-album-masonry-item {
    width: 31.333%;
  }

  .sd-album-gutter-sizer {
    width: 3%;
  }
}

@media only screen and (max-width: 767px) {
  .sd-album-grid-sizer,
  .sd-album-masonry-item {
    width: 48.5%;
  }

  .sd-album-gutter-sizer {
    width: 3%;
  }

  .sd-album-masonry-item {
    margin-bottom: 1rem;
  }
}

@media only screen and (max-width: 479px) {
  .sd-album-grid-sizer,
  .sd-album-masonry-item {
    width: 100%;
  }

  .sd-album-gutter-sizer {
    width: 0;
  }
}

/* Galería CMS (pagina.php): Isotope masonry — la columna es estrecha (col-lg-5) */
.pagina-masonry-gallery.js-pagina-gallery-masonry::after {
  content: "";
  display: block;
  clear: both;
}

.pagina-masonry-sizer,
.pagina-masonry-gallery .masonry-item {
  box-sizing: border-box;
  width: 48.5%;
}

.pagina-masonry-gutter {
  box-sizing: border-box;
  width: 3%;
}

.pagina-masonry-gallery .masonry-item {
  margin-bottom: 0.75rem;
}

.pagina-masonry-gallery .masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

@media only screen and (min-width: 576px) {
  .pagina-masonry-sizer,
  .pagina-masonry-gallery .masonry-item {
    width: 31.333%;
  }

  .pagina-masonry-gutter {
    width: 3%;
  }
}

@media only screen and (max-width: 479px) {
  .pagina-masonry-sizer,
  .pagina-masonry-gallery .masonry-item {
    width: 100%;
  }

  .pagina-masonry-gutter {
    width: 0;
  }
}

/* Tarjeta: borde redondeado y contorno claro */
.sd-album-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(12, 30, 33, 0.1);
  box-shadow: 0 6px 24px rgba(12, 30, 33, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.sd-album-card:hover {
  box-shadow: 0 10px 32px rgba(12, 30, 33, 0.12);
}

.sd-album-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.sd-album-card__media {
  overflow: hidden;
  background: #ece8e4;
  border-radius: 15px 15px 0 0;
}

.sd-album-card__media img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  transition: transform 0.35s ease;
}

.sd-album-card__link:hover .sd-album-card__media img {
  transform: scale(1.03);
}

.sd-album-card__body {
  padding: 1rem 0.85rem 1.1rem;
  flex: 1 1 auto;
}

.sd-album-card__title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tj-color-theme-primary, #2d6a4f);
}

.sd-album-card__cat {
  margin: 0;
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(54, 78, 82, 0.82);
}

/* --- Popup home (tabla popup) --- */
body.home-popup-open {
  overflow: hidden;
}

.home-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  padding: 1.25rem;
  pointer-events: none;
}

.home-popup:not([hidden]) {
  pointer-events: auto;
}

.home-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.home-popup.is-visible .home-popup__overlay {
  opacity: 1;
}

.home-popup__dialog {
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.home-popup.is-visible .home-popup__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.home-popup--pos-center { align-items: center; justify-content: center; }
.home-popup--pos-top { align-items: flex-start; justify-content: center; }
.home-popup--pos-bottom { align-items: flex-end; justify-content: center; }
.home-popup--pos-left { align-items: center; justify-content: flex-start; }
.home-popup--pos-right { align-items: center; justify-content: flex-end; }

.home-popup--anim-fade .home-popup__dialog,
.home-popup--anim-fade.is-visible .home-popup__dialog {
  transform: none;
}

.home-popup--anim-slide .home-popup__dialog { transform: translateY(40px); }
.home-popup--anim-slide.is-visible .home-popup__dialog { transform: translateY(0); }
.home-popup--anim-zoom .home-popup__dialog { transform: scale(0.85); }
.home-popup--anim-zoom.is-visible .home-popup__dialog { transform: scale(1); }

.home-popup--anim-bounce .home-popup__dialog {
  transition: opacity 0.28s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.7);
}

.home-popup--anim-bounce.is-visible .home-popup__dialog {
  transform: scale(1);
}

.home-popup__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  cursor: pointer;
}

.home-popup__close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.home-popup__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42vh;
  object-fit: contain;
}

.home-popup--alto-auto .home-popup__dialog {
  height: auto;
  max-height: min(92vh, calc(100vh - 2.5rem));
}

.home-popup--alto-auto .home-popup__media img {
  max-height: none;
}

.home-popup__body {
  padding-top: 0.25rem;
  text-align: center;
}

.home-popup__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  font-weight: 700;
}

.home-popup__text {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.home-popup__text--secondary {
  opacity: 0.85;
  font-size: 0.95rem;
}

.home-popup__video {
  margin-bottom: 1rem;
}

.home-popup__video iframe {
  max-width: 100%;
}

.home-popup__actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.home-popup__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--home-popup-btn-accent, #2d6a4f);
  background: #fff;
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.home-popup__btn:hover {
  background: var(--home-popup-btn-accent, #2d6a4f);
  color: #fff;
}

.home-popup__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--home-popup-btn-accent, #2d6a4f);
  color: #fff;
  font-size: 0.8rem;
}

.home-popup__btn:hover .home-popup__btn-icon {
  background: rgba(255, 255, 255, 0.25);
}

.home-popup__btn--static {
  cursor: default;
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .home-popup {
    padding: 0.75rem;
  }

  .home-popup:not(.home-popup--alto-auto) .home-popup__media img {
    max-height: 36vh;
  }
}