/* =============================================================
   TEEG Modern Design System — teeg-modern.css
   Variables con prefijo --tm- para evitar conflictos con Bootstrap / style.css
   ============================================================= */

:root {
  --tm-primary:    #92842C;
  --tm-primary-dk: #7a6e24;
  --tm-secondary:  #A65A29;
  --tm-dark:       #1D1D1B;
  --tm-gray:       #f8f7f4;
  --tm-border:     #e5e0d3;
  --tm-white:      #ffffff;
}

/* Ocultar elementos del diseño anterior — sin esperar DOMContentLoaded */
nav.bg-fdmenu,
#spinner {
  display: none !important;
}

/* =============================================================
   TIPOGRAFÍA GLOBAL
   ============================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: "Avenir Black", sans-serif !important;
  font-size: 36px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  color: var(--tm-secondary) !important;
}

/* Excepción: headings dentro de componentes de interfaz — restablece con !important */
.tm-nav h1, .tm-nav h2, .tm-nav h3,
.tm-nav h4, .tm-nav h5, .tm-nav h6,
.tm-header h1, .tm-header h2, .tm-header h3,
.tm-footer h1, .tm-footer h2, .tm-footer h3 {
  font-family: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  color: inherit !important;
}

p, li, td, th, dd, dt, figcaption, blockquote, address {
  font-family: "avenir roman", sans-serif;
  font-size: 15px;
  color: var(--tm-dark);
  font-weight: 400;
  text-align: justify;
}

/* Excluir justify en zonas de interfaz */
.tm-nav p, .tm-nav li,
.tm-header p,
.tm-footer p, .tm-footer li,
.tm-back-to-top,
.tm-dropdown a,
nav p, nav li {
  text-align: unset;
}

.tm-footer p { text-align: center; }

em, i, cite, dfn {
  font-family: "avenir oblique", sans-serif;
  font-style: normal;
}

strong, b {
  font-family: "Avenir Black", sans-serif;
  font-weight: 700;
}

.tm-header .tm-tagline strong {
  color: var(--tm-secondary) !important;
  font-size: 1rem !important;
}

/* =============================================================
   TOP BAR
   ============================================================= */

/* Topbar oculto — redes sociales movidas al navbar */
.tm-topbar {
  display: none;
}

/* =============================================================
   HEADER
   ============================================================= */

.tm-header {
  background: var(--tm-white);
  padding: 0 20px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  border-bottom: 2px solid var(--tm-border);
}

.tm-header .tm-logo img {
  max-height: 200px;
  width: auto;
}

/* Leyenda eliminada */
.tm-header .tm-tagline {
  display: none;
}

/* Buscador del header (solo index.html) — absoluto a la derecha */
.tm-header-search {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
}

/* Estilo del widget Google CSE en el header */
.tm-header-search .gsc-search-box,
.tm-header-search table.gsc-search-box {
  margin: 0 !important;
}

/* =============================================================
   NAVBAR
   ============================================================= */

.tm-nav {
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1040;
  border-bottom: 2px solid var(--tm-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.tm-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* Redes sociales en el lado derecho del menú */
.tm-nav-social {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  flex-shrink: 0;
}

.tm-nav-social a {
  color: var(--tm-dark);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s, transform .2s;
  display: inline-flex;
  align-items: center;
}

.tm-nav-social a:hover {
  color: var(--tm-primary);
  transform: scale(1.2);
}

/* Lista principal */
.tm-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.tm-nav ul li {
  position: relative;
}

.tm-nav ul li > a {
  display: block;
  padding: 14px 15px;
  font-family: "Avenir Black", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tm-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}

.tm-nav ul li > a:hover,
.tm-nav ul li.tm-open > a {
  color: var(--tm-primary);
}

/* Dropdown */
.tm-nav ul li .tm-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--tm-white);
  border-top: 3px solid var(--tm-primary);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 1050;
  padding: 8px 0;
}

.tm-nav ul li.tm-open .tm-dropdown {
  display: block;
}

.tm-nav ul li .tm-dropdown a {
  display: block;
  padding: 9px 22px;
  font-family: "avenir roman", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--tm-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.tm-nav ul li .tm-dropdown a:hover {
  background: var(--tm-gray);
  color: var(--tm-primary);
}

/* Ocultar redes en móvil */
@media (max-width: 991.98px) {
  .tm-nav-social { display: none; }
  .tm-header-search { display: none; }
}

/* Hamburguesa — siempre absolute-right para no afectar centrado */
.tm-nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--tm-primary);
  border-radius: 4px;
  cursor: pointer;
  padding: 6px 10px;
  flex-direction: column;
  gap: 5px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.tm-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tm-primary);
}

/* =============================================================
   RESPONSIVE — móvil (<992px)
   ============================================================= */

@media (max-width: 991.98px) {
  .tm-nav-toggle {
    display: flex;
  }

  .tm-nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0;
    background: var(--tm-white);
    border-top: 1px solid var(--tm-border);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
    z-index: 1045;
  }

  .tm-nav ul.tm-open {
    display: flex;
  }

  .tm-nav ul li {
    width: 100%;
  }

  .tm-nav ul li > a {
    padding: 10px 20px;
    border-bottom: 1px solid var(--tm-border);
  }

  .tm-nav ul li .tm-dropdown {
    position: static;
    box-shadow: none;
    border-top: none;
    padding: 0;
    background: var(--tm-gray);
    min-width: unset;
  }

  .tm-nav ul li .tm-dropdown a {
    padding: 8px 36px;
  }
}

/* =============================================================
   FOOTER
   ============================================================= */

.tm-footer {
  background: var(--tm-white);
  border-top: 2px solid var(--tm-border);
  padding: 30px 20px 15px;
  text-align: center;
  margin-top: 40px;
}

.tm-footer img {
  max-width: 100%;
  height: auto;
}

.tm-footer .tm-copyright {
  font-family: "avenir roman", sans-serif;
  font-size: 13px;
  color: #666;
  margin-top: 12px;
}

/* =============================================================
   BOTÓN VOLVER ARRIBA
   ============================================================= */

.tm-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--tm-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: background .2s;
  text-decoration: none;
}

.tm-back-to-top:hover {
  background: var(--tm-primary-dk);
  color: #fff;
}

.tm-back-to-top.tm-visible {
  display: flex;
}

/* =============================================================
   DROPDOWN ANIMATION
   ============================================================= */

@keyframes tm-drop-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tm-nav ul li.tm-open .tm-dropdown {
  animation: tm-drop-in .2s ease forwards;
}

/* Chevron rotation on open */
.tm-nav ul li > a i.fa-chevron-down {
  display: inline-block;
  transition: transform .25s ease;
}
.tm-nav ul li.tm-open > a i.fa-chevron-down {
  transform: rotate(180deg);
}

/* =============================================================
   HAMBURGER → X ANIMATION
   ============================================================= */

.tm-nav-toggle span {
  transform-origin: center;
  transition: transform .28s ease, opacity .28s ease;
}
.tm-nav-toggle.tm-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.tm-nav-toggle.tm-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.tm-nav-toggle.tm-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================================
   NAVBAR SCROLL SHADOW
   ============================================================= */

.tm-nav.tm-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
}

/* =============================================================
   SCROLL REVEAL
   ============================================================= */

.tm-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.tm-reveal.tm-reveal-left  { transform: translateX(-28px); }
.tm-reveal.tm-reveal-right { transform: translateX(28px); }
.tm-reveal.tm-visible {
  opacity: 1;
  transform: none;
}
.tm-reveal[data-d="1"] { transition-delay: .05s; }
.tm-reveal[data-d="2"] { transition-delay: .15s; }
.tm-reveal[data-d="3"] { transition-delay: .25s; }
.tm-reveal[data-d="4"] { transition-delay: .35s; }
.tm-reveal[data-d="5"] { transition-delay: .45s; }
.tm-reveal[data-d="6"] { transition-delay: .55s; }
.tm-reveal[data-d="7"] { transition-delay: .65s; }
.tm-reveal[data-d="8"] { transition-delay: .75s; }

/* =============================================================
   ICON CARDS (hover lift)
   ============================================================= */

.tm-icon-card {
  border-radius: 14px;
  padding: 14px;
  transition: transform .32s ease, box-shadow .32s ease, background .32s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-icon-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 16px 36px rgba(0,0,0,.14);
  background: rgba(146,132,44,.07);
}
.tm-icon-card img {
  max-width: 100%;
  height: auto;
  transition: filter .32s ease;
}
.tm-icon-card:hover img {
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.18));
}

/* =============================================================
   DOCUMENT CARDS (PADA, CADIDO, etc.)
   ============================================================= */

.tm-doc-card {
  border-radius: 12px;
  padding: 18px;
  background: var(--tm-white);
  border: 1px solid var(--tm-border);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.tm-doc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  border-color: var(--tm-primary);
}
.tm-doc-card img {
  max-width: 100%;
  height: auto;
}

/* =============================================================
   SECTION HEADERS (CSS — replace image separators)
   ============================================================= */

.tm-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  width: 100%;
}
.tm-section-head-title {
  font-family: "Avenir Black", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tm-secondary);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  margin: 0;
}
.tm-section-head-line {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--tm-primary) 0%, var(--tm-secondary) 45%, rgba(166,90,41,0) 100%);
}

/* =============================================================
   RESPONSIVE VIDEO EMBED
   ============================================================= */

.tm-video-wrap {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 16px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
}
.tm-video-wrap::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.tm-video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* =============================================================
   QUICK ACCESS BUTTONS (PNT, Obligaciones)
   ============================================================= */

.tm-quick-access {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0 8px;
}
.tm-quick-access a img {
  max-width: 100px;
  height: auto;
  transition: transform .3s ease, filter .3s ease;
}
.tm-quick-access a:hover img {
  transform: scale(1.1) rotate(-3deg);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.22));
}

/* =============================================================
   PARTNER LOGOS STRIP (fallback static layout — no carousel)
   ============================================================= */

.tm-logos-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 28px 20px;
  background: var(--tm-gray);
  border-radius: 14px;
  margin: 20px 0;
}
.tm-logos-strip a {
  display: inline-flex;
  align-items: center;
  transition: transform .3s ease, filter .3s ease;
}
.tm-logos-strip a:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.18));
}
.tm-logos-strip img {
  max-height: 58px;
  width: auto;
  max-width: 130px;
}

/* =============================================================
   LOGOS CAROUSEL (Owl Carousel — index.html)
   ============================================================= */

.tm-logos-carousel {
  background: transparent;
  padding: 20px 10px;
  margin: 20px 0;
  border-top: 2px solid var(--tm-primary);
  border-bottom: 2px solid var(--tm-primary);
  position: relative;
}

.tm-logos-carousel::before,
.tm-logos-carousel::after {
  content: "";
  display: block;
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--tm-primary) 15%, var(--tm-secondary) 50%, var(--tm-primary) 85%, transparent 100%);
  opacity: .45;
}
.tm-logos-carousel::before { top: 4px; }
.tm-logos-carousel::after  { bottom: 4px; }

.tm-logos-carousel .item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  height: 160px;
}

.tm-logos-carousel .item a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease, filter .3s ease;
}

.tm-logos-carousel .item a:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.18));
}

.tm-logos-carousel .item img {
  max-height: 116px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

/* =============================================================
   COMMUNICATION SECTION CARD
   ============================================================= */

.tm-comm-card {
  background: var(--tm-gray);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
}
.tm-comm-card img {
  max-width: 100%;
  height: auto;
  transition: filter .3s ease, transform .3s ease;
}
.tm-comm-card a:hover img {
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.18));
  transform: scale(1.03);
}
.tm-comm-card p {
  margin-bottom: 14px;
}

/* =============================================================
   COMMUNICATION SECTION — RESPONSIVE ADDITIONS
   ============================================================= */

/* Etiqueta "Próxima sesión:" */
.tm-comm-label {
  font-family: "Avenir Black", sans-serif;
  font-weight: 700;
  color: var(--tm-secondary);
  margin-bottom: 10px;
  text-align: left;
}

/* Fecha última sesión */
.tm-comm-meta {
  font-size: 13px;
  color: #888;
  margin-top: 6px;
  margin-bottom: 14px;
  text-align: left !important;
}

/* Imagen del aviso de sesión */
.tm-comm-img-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .3s ease;
}
.tm-comm-img-link img {
  width: 100%;
  height: auto;
  display: block;
}
.tm-comm-img-link:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* Columna derecha: Agenda + Boletines */
.tm-comm-links-wrap {
  display: flex !important;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  /* Sin height:100% — evita problemas de flex en columna con altura auto */
}

/* Tarjeta de enlace (Agenda / Boletines) */
.tm-comm-link-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  text-decoration: none;
  width: 100%;
}
.tm-comm-link-card img {
  width: 100%;
  height: auto;
  display: block;
}
.tm-comm-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(146,132,44,.20);
}

/* =============================================================
   CAROUSEL ENHANCEMENTS
   ============================================================= */

.carousel {
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}

/* =============================================================
   MOBILE — RESPONSIVE IMPROVEMENTS
   ============================================================= */

/* Utility .w-60 — Bootstrap 5 no la incluye, se usa en el carrusel secundario */
.w-60 { width: 60% !important; }

@media (max-width: 991.98px) {
  .tm-header .tm-tagline strong {
    font-size: 0.85rem !important;
  }
  .tm-logos-strip img {
    max-height: 48px;
    max-width: 110px;
  }
  /* Reducir padding de secciones en tablet */
  .container-xxl.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .container-xxl.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
}

@media (max-width: 767.98px) {
  /* Títulos más pequeños en tablet/móvil */
  h1, h2, h3, h4, h5, h6 {
    font-size: 26px !important;
  }
  .tm-section-head-title {
    font-size: 0.9rem;
  }
  .tm-comm-card {
    padding: 20px 14px;
  }
  .tm-video-wrap {
    max-width: 100%;
  }
  /* Header logo más pequeño */
  .tm-header .tm-logo img {
    max-height: 140px;
  }
  /* Carrusel secundario — ancho completo en tablet */
  .w-60 { width: 90% !important; }
}

@media (max-width: 575.98px) {
  /* Títulos aún más compactos en móvil pequeño */
  h1, h2, h3, h4, h5, h6 {
    font-size: 20px !important;
  }
  /* Header logo compacto */
  .tm-header {
    padding: 8px 12px 12px;
  }
  .tm-header .tm-logo img {
    max-height: 100px;
  }
  /* Reducir padding de secciones */
  .container-xxl.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
  /* 2-per-row icon grid on xs screens */
  .team-items .col-lg-3.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  .tm-icon-card img {
    max-width: 130px;
  }
  .tm-logos-strip img {
    max-height: 38px;
    max-width: 85px;
  }
  .tm-quick-access a img {
    max-width: 80px;
  }
  /* Hide legacy empty spacer cells */
  .team-items .col-lg-3.col-md-6:has(.tm-icon-card:empty),
  .team-items .col-lg-3.col-md-6.tm-spacer {
    display: none;
  }
  /* Carrusel secundario — ancho completo en móvil */
  .w-60 { width: 100% !important; }
}

/* =============================================================
   NAVIGATION ICON CARDS (quienes.html y similares)
   ============================================================= */

.tm-nav-icons {
  padding: 10px 0 30px;
}

.tm-nav-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 12px 16px;
  background: var(--tm-white);
  border-radius: 18px;
  border: 1.5px solid var(--tm-border);
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 140px;
}

.tm-nav-icon-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tm-primary), var(--tm-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}

.tm-nav-icon-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 14px 36px rgba(146,132,44,.20);
  border-color: var(--tm-primary);
  text-decoration: none;
}

.tm-nav-icon-card:hover::after {
  transform: scaleX(1);
}

.tm-nav-icon-card img {
  max-width: 90px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: filter .3s ease, transform .3s ease;
}

.tm-nav-icon-card:hover img {
  filter: drop-shadow(0 4px 10px rgba(146,132,44,.38));
  transform: scale(1.08);
}

.tm-nav-icon-card .tm-icon-label {
  font-family: "Avenir Black", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tm-dark);
  text-align: center;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  line-height: 1.3;
  transition: color .3s ease;
}

.tm-nav-icon-card:hover .tm-icon-label {
  color: var(--tm-primary);
}

/* =============================================================
   SMOOTH PAGE ENTRY ANIMATION
   ============================================================= */

@keyframes tm-fade-page {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body {
  animation: tm-fade-page .4s ease;
  background-color: #f4f1e8;
  background-image:
    repeating-linear-gradient(
      -52deg,
      transparent         0px,
      transparent         5px,
      rgba(146,132,44,.028) 5px,
      rgba(146,132,44,.028) 6px
    ),
    radial-gradient(ellipse 90% 55% at 8% 0%,   rgba(146,132,44,.10) 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 92% 100%, rgba(166,90,41,.07)  0%, transparent 58%);
  background-attachment: fixed;
}

/* =============================================================
   PAGE HERO — Páginas interiores
   ============================================================= */

.tm-page-hero {
  background: linear-gradient(135deg, var(--tm-primary) 0%, var(--tm-secondary) 100%);
  padding: 30px 24px 26px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}
.tm-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-52deg, transparent 0, transparent 5px, rgba(255,255,255,.04) 5px, rgba(255,255,255,.04) 6px);
  pointer-events: none;
}
.tm-page-hero h1 {
  font-family: "Avenir Black", sans-serif !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0;
  position: relative;
  letter-spacing: .02em;
}
@media (max-width: 575.98px) {
  .tm-page-hero { padding: 22px 16px 18px; }
  .tm-page-hero h1 { font-size: 20px !important; }
}

/* =============================================================
   TABLAS DE DATOS — Directorio y similares
   ============================================================= */

.tm-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--tm-border);
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  background: var(--tm-white);
}

.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0;
}

/* Fila de encabezado de área (colspan) */
.tm-table thead tr:first-child th {
  background: linear-gradient(135deg, var(--tm-primary) 0%, var(--tm-secondary) 100%);
  color: #fff;
  font-family: "Avenir Black", sans-serif;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 13px 18px;
  text-align: center;
  border: none;
}

/* Fila de encabezados de columna */
.tm-table thead tr:nth-child(2) th {
  background: #f5f1e7;
  color: var(--tm-secondary);
  font-family: "Avenir Black", sans-serif;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-bottom: 2px solid var(--tm-primary);
  white-space: nowrap;
}

.tm-table tbody tr {
  border-bottom: 1px solid #ede9dc;
  transition: background .18s;
}
.tm-table tbody tr:last-child { border-bottom: none; }
.tm-table tbody tr:hover { background: rgba(146,132,44,.05); }
.tm-table tbody tr:nth-child(even) { background: #faf8f2; }
.tm-table tbody tr:nth-child(even):hover { background: rgba(146,132,44,.07); }

.tm-table td {
  padding: 10px 14px;
  vertical-align: middle;
  font-size: 14px;
  color: var(--tm-dark);
}
.tm-table td:nth-child(3) {
  text-align: center;
  font-family: "Avenir Black", sans-serif;
  color: var(--tm-secondary);
  white-space: nowrap;
}
.tm-table td a {
  color: var(--tm-primary);
  text-decoration: none;
  word-break: break-all;
}
.tm-table td a:hover {
  color: var(--tm-secondary);
  text-decoration: underline;
}

/* Móvil: cada fila se convierte en una tarjeta */
@media (max-width: 767.98px) {
  .tm-table-wrap {
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    overflow-x: visible;
  }

  .tm-table, .tm-table thead, .tm-table tbody,
  .tm-table tr, .tm-table td, .tm-table th {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  /* Encabezado de área queda como banner */
  .tm-table thead tr:first-child {
    border-radius: 10px 10px 0 0;
  }
  /* Fila de columnas oculta en móvil */
  .tm-table thead tr:nth-child(2) { display: none; }

  /* Cada fila de datos = card */
  .tm-table tbody tr {
    background: var(--tm-white) !important;
    border: 1px solid var(--tm-border);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
  }
  .tm-table tbody tr:hover {
    box-shadow: 0 4px 14px rgba(146,132,44,.14);
    border-color: var(--tm-primary);
  }

  .tm-table td {
    padding: 4px 0;
    display: flex;
    gap: 8px;
    align-items: baseline;
    border: none;
    font-size: 13px;
  }
  /* Etiqueta de columna generada por data-label */
  .tm-table td::before {
    content: attr(data-label);
    font-family: "Avenir Black", sans-serif;
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--tm-secondary);
    min-width: 56px;
    flex-shrink: 0;
    padding-top: 1px;
  }
  .tm-table td:nth-child(3) {
    text-align: left;
  }
}

/* =============================================================
   LISTA DE DOCUMENTOS — Normatividad
   ============================================================= */

.tm-doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  background: var(--tm-white);
  border: 1px solid var(--tm-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.tm-doc-list > li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid #ede9dc;
  transition: background .18s;
}
.tm-doc-list > li:last-child { border-bottom: none; }
.tm-doc-list > li:hover { background: rgba(146,132,44,.05); }

.tm-doc-list > li i {
  color: var(--tm-secondary);
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

.tm-doc-list > li a {
  color: var(--tm-dark);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
  transition: color .18s;
  text-align: left;
}
.tm-doc-list > li a:hover { color: var(--tm-primary); }

/* Sub-ítems (formatos, anexos) */
.tm-doc-list > li.tm-doc-subitem {
  padding-left: 48px;
  background: #faf8f2;
}
.tm-doc-list > li.tm-doc-subitem i {
  color: var(--tm-primary);
  font-size: 13px;
}
.tm-doc-list > li.tm-doc-subitem a {
  font-size: 13px;
}
