/* ==========================================================================
   Claves WiFi Colombia - Material Design theme
   Capa visual sobre style.css. No modifica la lógica ni el marcado funcional.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Marca (se conservan los colores originales del sitio) */
  --md-primary: #516ca9;
  --md-primary-dark: #384b75;
  --md-primary-darker: #2b3a5c;
  --md-primary-soft: #e8edf9;
  --md-on-primary: #ffffff;
  --md-accent: #f16583;
  --md-secondary: #24b8b5;

  /* Superficies */
  --md-bg: #f1f4f9;
  --md-surface: #ffffff;
  --md-surface-2: #f7f9fc;
  --md-surface-3: #e9eef6;
  --md-surface-4: #dde5f1;

  /* Texto */
  --md-text: #26323e;
  --md-heading: #1d2a38;
  --md-text-muted: #5d6b7a;
  --md-text-soft: #7b8797;
  --md-link: #3f5c9c;
  --md-link-hover: #2b3f6e;

  /* Bordes y sombras */
  --md-outline: #d7dfeb;
  --md-outline-strong: #bcc8d9;
  --md-shadow-1: 0 1px 2px rgba(16, 27, 45, .06), 0 4px 12px rgba(16, 27, 45, .06);
  --md-shadow-2: 0 6px 18px rgba(16, 27, 45, .10), 0 14px 40px rgba(16, 27, 45, .08);
  --md-shadow-3: 0 12px 30px rgba(16, 27, 45, .16), 0 24px 70px rgba(16, 27, 45, .12);

  /* Navegación y pie */
  --md-nav-glass: rgba(22, 32, 48, .52);
  --md-nav-solid: #ffffff;
  --md-nav-text: #ffffff;
  --md-nav-inner-text: #24313f;
  --md-topbar: #384b75;
  --md-footer-bg: #232f3d;
  --md-footer-bg-2: #1b2531;
  --md-footer-text: #c3cdda;
  --md-footer-link: #d7e0eb;

  /* Formas y movimiento */
  --md-radius-xs: 10px;
  --md-radius-sm: 14px;
  --md-radius-md: 20px;
  --md-radius-lg: 28px;
  --md-radius-xl: 36px;
  --md-ease: cubic-bezier(.2, 0, 0, 1);
  --md-speed: 240ms;

  --md-container: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --md-primary: #8fa9e8;
  --md-primary-dark: #6f8bd0;
  --md-primary-darker: #4d63a1;
  --md-primary-soft: #24324b;
  --md-on-primary: #101a2c;
  --md-accent: #ff8ba3;
  --md-secondary: #5dd9d6;

  --md-bg: #0e141c;
  --md-surface: #171f29;
  --md-surface-2: #1d2733;
  --md-surface-3: #25313f;
  --md-surface-4: #303f50;

  --md-text: #dce5f0;
  --md-heading: #f1f6fc;
  --md-text-muted: #a9b7c8;
  --md-text-soft: #8c9bad;
  --md-link: #9db4ef;
  --md-link-hover: #c4d4ff;

  --md-outline: #32404f;
  --md-outline-strong: #45566a;
  --md-shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .28);
  --md-shadow-2: 0 8px 22px rgba(0, 0, 0, .42), 0 18px 50px rgba(0, 0, 0, .34);
  --md-shadow-3: 0 16px 40px rgba(0, 0, 0, .52), 0 30px 80px rgba(0, 0, 0, .42);

  --md-nav-glass: rgba(10, 15, 22, .64);
  --md-nav-solid: #141c25;
  --md-nav-text: #f2f7fd;
  --md-nav-inner-text: #e8f0fa;
  --md-topbar: #1c2740;
  --md-footer-bg: #121922;
  --md-footer-bg-2: #0c1118;
  --md-footer-text: #b8c5d5;
  --md-footer-link: #dbe4ef;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  background: var(--md-bg);
}

body {
  font-family: "Lato", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.68;
  color: var(--md-text);
  background-color: var(--md-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--md-speed) var(--md-ease), color var(--md-speed) var(--md-ease);
}

h1, h2, h3, h4, h5, h6, [class^="heading-"] {
  color: var(--md-heading);
  letter-spacing: -.015em;
  text-wrap: balance;
}

h1 { font-weight: 900; }
h2, h3 { font-weight: 800; }
h4, h5, h6 { font-weight: 700; }

p { color: inherit; }

a {
  color: var(--md-link);
  transition: color var(--md-speed) var(--md-ease), background-color var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease), transform var(--md-speed) var(--md-ease);
}

a:hover,
a:focus {
  color: var(--md-link-hover);
}

::selection {
  color: #ffffff;
  background: var(--md-primary);
}

:focus-visible {
  outline: 3px solid var(--md-accent) !important;
  outline-offset: 3px;
  border-radius: 6px;
}

.big {
  font-size: 17px;
  line-height: 1.7;
  color: var(--md-text-muted);
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--md-text-muted);
}

.text-muted,
.form-text.text-muted {
  color: var(--md-text-soft) !important;
}

.text-light { font-weight: 300; }

.list-marked-2 {
  color: var(--md-text);
}

.list-marked-2 > li::before {
  color: var(--md-accent);
}

/* Las secciones oscuras conservan el texto claro */
.context-dark,
.bg-gray-800,
.bg-primary {
  color: #ffffff;
}

.context-dark h1, .context-dark h2, .context-dark h3, .context-dark h4, .context-dark h5, .context-dark h6,
.bg-gray-800 h1, .bg-gray-800 h2, .bg-gray-800 h3, .bg-gray-800 h4, .bg-gray-800 h5, .bg-gray-800 h6,
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6 {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. Secciones y fondos
   -------------------------------------------------------------------------- */
.section {
  position: relative;
}

.bg-default {
  background-color: var(--md-bg) !important;
}

.bg-gray-100 {
  background-color: var(--md-surface-2) !important;
}

.bg-gray-800 {
  background-color: var(--md-footer-bg) !important;
}

.bg-primary {
  background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 60%, var(--md-primary-darker) 100%) !important;
}

/* --------------------------------------------------------------------------
   4. Barra superior y navegación
   -------------------------------------------------------------------------- */
.rd-navbar-transparent.rd-navbar-static .rd-navbar-aside-outer {
  color: #ffffff !important;
  background: linear-gradient(90deg, var(--md-topbar) 0%, var(--md-primary) 100%) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0;
  box-shadow: none;
}

.rd-navbar-transparent.rd-navbar-static .rd-navbar-aside-outer a,
.rd-navbar-transparent.rd-navbar-static .rd-navbar-aside-outer a:hover,
.rd-navbar-transparent.rd-navbar-static .rd-navbar-aside-outer a:focus {
  color: #ffffff !important;
}

.rd-navbar-transparent.rd-navbar-static .rd-navbar-aside {
  padding: 8px 0;
}

.rd-navbar-transparent.rd-navbar-static .rd-navbar-main-inner {
  background: var(--md-nav-glass) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 34px rgba(10, 17, 28, .18);
}

.rd-navbar-transparent.rd-navbar-static .rd-navbar-main {
  padding: 16px 0;
}

.rd-navbar-transparent.rd-navbar-static .rd-nav-link {
  color: #ffffff !important;
  padding: 9px 14px;
  border: 0 !important;
  border-radius: 999px;
  line-height: 1.3;
}

.rd-navbar-transparent.rd-navbar-static .rd-nav-item:hover .rd-nav-link,
.rd-navbar-transparent.rd-navbar-static .rd-nav-item.focus .rd-nav-link,
.rd-navbar-transparent.rd-navbar-static .rd-nav-item.active .rd-nav-link,
.rd-navbar-transparent.rd-navbar-static .rd-nav-item.opened .rd-nav-link {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .16) !important;
  border-bottom-color: transparent !important;
}

.rd-navbar-transparent.rd-navbar-static .rd-nav-item > .rd-navbar-submenu-toggle {
  color: #ffffff !important;
}

.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-stuck .rd-navbar-main-inner,
.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-clone .rd-navbar-main-inner {
  background: var(--md-nav-solid) !important;
  border-bottom: 1px solid var(--md-outline);
  box-shadow: var(--md-shadow-2);
}

.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-stuck .rd-nav-link,
.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-clone .rd-nav-link {
  color: var(--md-nav-inner-text) !important;
}

.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-stuck .rd-nav-item.active .rd-nav-link,
.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-clone .rd-nav-item.active .rd-nav-link,
.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-stuck .rd-nav-item:hover .rd-nav-link,
.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-clone .rd-nav-item:hover .rd-nav-link {
  color: var(--md-primary) !important;
  background: var(--md-primary-soft) !important;
}

.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-stuck .rd-nav-item > .rd-navbar-submenu-toggle,
.rd-navbar-transparent.rd-navbar-static.rd-navbar--is-clone .rd-nav-item > .rd-navbar-submenu-toggle {
  color: var(--md-nav-inner-text) !important;
}

/* Páginas internas sin hero: navbar sólida y contenido debajo, sin solaparse */
.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-navbar-main-outer .rd-navbar-main-inner {
  position: relative;
  left: auto;
  top: auto;
  right: auto;
  background: var(--md-nav-solid) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--md-outline);
  box-shadow: var(--md-shadow-1);
}

.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-navbar-main {
  padding: 14px 0;
}

.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-nav-link {
  color: var(--md-nav-inner-text) !important;
}

.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-nav-item:hover .rd-nav-link,
.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-nav-item.focus .rd-nav-link,
.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-nav-item.active .rd-nav-link,
.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-nav-item.opened .rd-nav-link {
  color: var(--md-primary) !important;
  background: var(--md-primary-soft) !important;
}

.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-nav-item > .rd-navbar-submenu-toggle {
  color: var(--md-nav-inner-text) !important;
}

.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-navbar-brand .brand-logo-dark {
  display: block !important;
}

.page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-navbar-brand .brand-logo-light {
  display: none !important;
}

[data-theme="dark"] .page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-navbar-brand .brand-logo-dark {
  display: none !important;
}

[data-theme="dark"] .page-header-solid .rd-navbar-transparent.rd-navbar-static .rd-navbar-brand .brand-logo-light {
  display: block !important;
}

/* Menú desplegable personalizado del header */
.rd-navbar .dropdown-contentx {
  background: var(--md-surface) !important;
  border: 1px solid var(--md-outline) !important;
  border-radius: var(--md-radius-md);
  box-shadow: var(--md-shadow-3) !important;
  padding: 8px !important;
  margin-top: 10px;
  overflow: hidden;
}

.rd-navbar .dropdown-contentx a {
  color: var(--md-text) !important;
  border-radius: var(--md-radius-xs);
  padding: 11px 14px !important;
}

.rd-navbar .dropdown-contentx a:hover,
.rd-navbar .dropdown-contentx a:focus {
  color: var(--md-on-primary) !important;
  background: var(--md-primary) !important;
}

/* Menú móvil / fijo */
.rd-navbar-fixed .rd-navbar-panel {
  color: var(--md-nav-inner-text) !important;
  background: var(--md-nav-solid) !important;
  box-shadow: var(--md-shadow-2) !important;
  border-bottom: 1px solid var(--md-outline);
  height: 62px;
}

.rd-navbar-fixed .rd-navbar-nav-wrap {
  color: var(--md-text) !important;
  background: var(--md-surface) !important;
  border: 1px solid var(--md-outline) !important;
  border-radius: 0 var(--md-radius-md) var(--md-radius-md) 0;
  box-shadow: var(--md-shadow-3) !important;
}

.rd-navbar-fixed .rd-navbar-nav-wrap::-webkit-scrollbar-thumb {
  background: var(--md-primary);
  border-radius: 999px;
}

.rd-navbar-fixed .rd-navbar-nav-wrap::-webkit-scrollbar-track {
  background: var(--md-surface-2);
}

.rd-navbar-fixed .rd-nav-link {
  color: var(--md-text) !important;
  border-radius: 999px;
  margin: 2px 8px;
  padding: 11px 18px;
}

.rd-navbar-fixed .rd-nav-item:hover .rd-nav-link,
.rd-navbar-fixed .rd-nav-item.focus .rd-nav-link,
.rd-navbar-fixed .rd-nav-item.active .rd-nav-link,
.rd-navbar-fixed .rd-nav-item.opened .rd-nav-link {
  color: var(--md-on-primary) !important;
  background: var(--md-primary) !important;
}

.rd-navbar-fixed .rd-navbar-collapse {
  background: var(--md-surface) !important;
  border-radius: 0 0 var(--md-radius-md) var(--md-radius-md);
  box-shadow: var(--md-shadow-3) !important;
}

.rd-navbar-fixed .rd-navbar-collapse,
.rd-navbar-fixed .rd-navbar-collapse a {
  color: var(--md-text) !important;
}

.rd-navbar-fixed .rd-navbar-toggle span,
.rd-navbar-fixed .rd-navbar-toggle span::before,
.rd-navbar-fixed .rd-navbar-toggle span::after {
  background-color: var(--md-nav-inner-text);
}

.rd-navbar-toggle {
  border-radius: 12px;
}

/* Logotipo: claro sobre navbar oscuro, oscuro sobre navbar clara */
.rd-navbar-fixed .brand-logo-dark { display: block !important; }
.rd-navbar-fixed .brand-logo-light { display: none !important; }

[data-theme="dark"] .rd-navbar-fixed .brand-logo-dark { display: none !important; }
[data-theme="dark"] .rd-navbar-fixed .brand-logo-light { display: block !important; }

@media (min-width: 992px) {
  .rd-navbar-transparent.rd-navbar-static .rd-navbar-brand .brand-logo-dark {
    display: none !important;
  }
  .rd-navbar-transparent.rd-navbar-static .rd-navbar-brand .brand-logo-light {
    display: block !important;
  }
}

/* La franja decorativa original rompía la continuidad del navbar Material */
.rd-navbar-bg {
  display: none !important;
}

/* --------------------------------------------------------------------------
   5. Hero / slider
   -------------------------------------------------------------------------- */
.swiper-slider-1 {
  min-height: clamp(500px, 64vw, 680px);
  border-radius: 0 0 var(--md-radius-xl) var(--md-radius-xl);
  overflow: hidden;
  background: var(--md-primary-darker);
}

.swiper-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg, rgba(16, 24, 37, .92) 0%, rgba(16, 24, 37, .72) 42%, rgba(16, 24, 37, .30) 72%, rgba(16, 24, 37, .12) 100%);
}

.swiper-slide-caption {
  position: relative;
  z-index: 1;
}

/* El texto del hero siempre es legible, incluso si la animación no se inicia */
.swiper-slide-caption [data-caption-animate] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.swiper-slider-1 .swiper-slide-caption {
  padding: 120px 0 110px;
}

.swiper-slide-caption h1,
.swiper-slide-caption h2,
.swiper-slide-caption h3 {
  color: #ffffff !important;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .35);
}

.swiper-slide-caption h1 span,
.swiper-slide-caption h2 span,
.swiper-slide-caption h3 span {
  color: inherit;
}

.swiper-slide-caption h1 span.text-light,
.swiper-slide-caption h2 span.text-light,
.swiper-slide-caption h3 span.text-light {
  color: rgba(255, 255, 255, .80) !important;
}

.swiper-slide-caption .lead {
  color: rgba(255, 255, 255, .90) !important;
  font-weight: 500;
  max-width: 680px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

.swiper-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, .55);
}

/* Sin círculo exterior: solo punto/píldora limpio */
.swiper-pagination .swiper-pagination-bullet::before,
.swiper-pagination .swiper-pagination-bullet::after {
  display: none !important;
  content: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
  transform: none !important;
}

.swiper-pagination .swiper-pagination-bullet-active {
  width: 30px;
  border-radius: 999px;
  background: #ffffff;
}

.swiper-slider-1 .swiper-pagination-wrap {
  height: 56px;
}

/* Flechas del slider */
.swiper-button-prev,
.swiper-button-next {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--md-primary-dark);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--md-shadow-2);
  transition: transform var(--md-speed) var(--md-ease), background var(--md-speed) var(--md-ease);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  color: var(--md-on-primary);
  background: var(--md-primary);
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   6. Tarjetas de features (.box-icon-2)
   -------------------------------------------------------------------------- */
.section .box-icon-2 {
  height: 100%;
  padding: clamp(20px, 3vw, 32px);
  color: #ffffff;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: var(--md-radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(8, 14, 26, .12);
  transition: transform var(--md-speed) var(--md-ease), background var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease);
}

.section .box-icon-2:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 18px 44px rgba(8, 14, 26, .22);
}

.box-icon-2 > i,
.box-icon-2 .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
  font-size: 28px !important;
  line-height: 1 !important;
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 20px;
}

.box-icon-2 .title {
  color: #ffffff !important;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.box-icon-2 .text {
  color: rgba(255, 255, 255, .88) !important;
  font-size: 15.5px;
  line-height: 1.6;
}

.box-icon-2 .text strong {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   7. Bloque con imagen y vídeo
   -------------------------------------------------------------------------- */
.box-image-left .box-image-item {
  border-radius: var(--md-radius-lg) 0 0 var(--md-radius-lg);
  overflow: hidden;
  box-shadow: var(--md-shadow-2);
}

.box-image-left .box-image-video .icon {
  color: var(--md-primary);
  background: #ffffff;
  box-shadow: var(--md-shadow-3);
  transition: transform var(--md-speed) var(--md-ease), color var(--md-speed) var(--md-ease), background var(--md-speed) var(--md-ease);
}

.box-image-left .box-image-video .icon:hover {
  color: #ffffff;
  background: var(--md-primary);
  transform: translate(-50%, -50%) scale(1.06);
}

.title-icon > .fa-solid,
.title-icon > .fa,
.title-icon > .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-right: 16px;
  font-size: 26px !important;
  color: #ffffff;
  background: linear-gradient(135deg, var(--md-primary), var(--md-primary-dark));
  border-radius: 18px;
  box-shadow: var(--md-shadow-1);
}

.title-icon-2 > .fa-solid {
  width: 68px;
  height: 68px;
  font-size: 28px !important;
  border-radius: 20px;
}

.title-icon .text-light {
  color: var(--md-primary) !important;
}

/* Icono del bloque "Conectamos oportunidades" (viene envuelto en <font>) */
.title-icon > font {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-right: 16px;
  color: var(--md-accent) !important;
  background: rgba(241, 101, 131, .12);
  border: 1px solid rgba(241, 101, 131, .20);
  border-radius: 18px;
}

.title-icon > font .fa {
  font-size: 27px;
  line-height: 1;
  color: var(--md-accent) !important;
}

/* --------------------------------------------------------------------------
   8. Contadores
   -------------------------------------------------------------------------- */
.box-counter {
  height: 100%;
  padding: clamp(20px, 3vw, 32px) 14px;
  color: var(--md-text);
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-md);
  box-shadow: var(--md-shadow-1);
  transition: transform var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease), border-color var(--md-speed) var(--md-ease);
}

.box-counter:hover {
  transform: translateY(-4px);
  border-color: var(--md-primary);
  box-shadow: var(--md-shadow-2);
}

.box-counter:hover .box-counter-main {
  color: var(--md-primary) !important;
}

.box-counter-main {
  color: var(--md-primary) !important;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.03em;
}

.box-counter-title {
  color: var(--md-text-muted) !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   9. Artículos / tarjetas con imagen
   -------------------------------------------------------------------------- */
.box-image-small {
  overflow: hidden;
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-lg);
  box-shadow: var(--md-shadow-1);
  transition: transform var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease);
}

.box-image-small:hover {
  transform: translateY(-4px);
  box-shadow: var(--md-shadow-2);
}

.box-image-small .item-image {
  min-height: 240px;
  background-color: var(--md-surface-3);
}

.box-image-small .item-body {
  padding: 28px;
  color: var(--md-text);
}

.box-image-small .item-body > p:first-child {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  margin-bottom: 4px;
  color: var(--md-primary) !important;
  background: var(--md-primary-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.box-image-small h4,
.box-image-small h3 {
  color: var(--md-heading) !important;
  font-weight: 800;
  letter-spacing: -.015em;
}

.box-image-small .big {
  color: var(--md-text-muted);
}

.box-image-small small,
.box-image-small .form-text {
  color: var(--md-text-soft) !important;
}

/* --------------------------------------------------------------------------
   10. Botones
   -------------------------------------------------------------------------- */
.button,
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .01em;
  border: 0;
  border-radius: 999px;
  box-shadow: var(--md-shadow-1);
  transition: transform var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease), background-color var(--md-speed) var(--md-ease), color var(--md-speed) var(--md-ease);
}

.button:hover,
.button:focus,
.btn:hover,
.btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--md-shadow-2);
}

.button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: var(--md-shadow-1);
}

.button-primary,
.button-primary:focus,
.btn-primary,
.btn-primary:focus {
  color: var(--md-on-primary) !important;
  background: var(--md-primary) !important;
  border-color: var(--md-primary) !important;
}

.button-primary:hover,
.button-primary:active,
.button-primary.active,
.btn-primary:hover,
.btn-primary:active {
  color: var(--md-on-primary) !important;
  background: var(--md-primary-dark) !important;
  border-color: var(--md-primary-dark) !important;
}

.bg-primary .button-primary,
.bg-primary .button-primary:focus {
  color: var(--md-primary) !important;
  background: #ffffff !important;
  border-color: #ffffff !important;
}

.bg-primary .button-primary:hover,
.bg-primary .button-primary:active {
  color: var(--md-on-primary) !important;
  background: var(--md-primary-darker) !important;
  border-color: var(--md-primary-darker) !important;
}

.button-default,
.button-gray-100,
.btn-secondary {
  color: var(--md-text) !important;
  background: var(--md-surface-3) !important;
  border-color: var(--md-surface-3) !important;
}

.button-default:hover,
.button-gray-100:hover,
.btn-secondary:hover {
  color: var(--md-on-primary) !important;
  background: var(--md-primary) !important;
  border-color: var(--md-primary) !important;
}

.button-secondary {
  color: #ffffff !important;
  background: var(--md-accent) !important;
  border-color: var(--md-accent) !important;
}

/* Efecto ripple generado por js/material-theme.js */
.md-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: .22;
  pointer-events: none;
  animation: md-ripple 560ms var(--md-ease) forwards;
}

@keyframes md-ripple {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   11. Formularios, modales, tarjetas y tablas
   -------------------------------------------------------------------------- */
.form-input,
.form-control,
.form-select,
select.form-control,
textarea.form-control {
  color: var(--md-text) !important;
  background-color: var(--md-surface-2) !important;
  border: 1px solid var(--md-outline) !important;
  border-radius: var(--md-radius-sm) !important;
  box-shadow: none !important;
  transition: border-color var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease), background-color var(--md-speed) var(--md-ease);
}

.form-input:focus,
.form-control:focus,
.form-select:focus,
select.form-control:focus,
textarea.form-control:focus {
  color: var(--md-text) !important;
  background-color: var(--md-surface) !important;
  border-color: var(--md-primary) !important;
  box-shadow: 0 0 0 3px rgba(81, 108, 169, .18) !important;
}

.form-input::placeholder,
.form-control::placeholder {
  color: var(--md-text-soft) !important;
}

.form-label,
.form-check-label,
label {
  color: var(--md-text-muted);
}

.form-check-input {
  accent-color: var(--md-primary);
}

/* Bootstrap modal */
.modal-content {
  color: var(--md-text);
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-lg);
  box-shadow: var(--md-shadow-3);
}

.modal-header,
.modal-footer {
  border-color: var(--md-outline);
}

.modal-title {
  color: var(--md-heading);
  font-weight: 800;
}

.modal-backdrop.show {
  opacity: .55;
  backdrop-filter: blur(3px);
}

.close {
  color: var(--md-text);
  text-shadow: none;
}

.close:hover,
.close:focus {
  color: var(--md-primary);
}

/* Tarjetas genéricas (galería, perfil, admin) */
.card {
  color: var(--md-text);
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-md);
  box-shadow: var(--md-shadow-1);
}

.card-body {
  color: var(--md-text);
}

.card-header,
.card-footer {
  background: var(--md-surface-2);
  border-color: var(--md-outline);
}

/* Alertas */
.alert {
  color: var(--md-text);
  background: var(--md-surface-2);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-sm);
}

.alert-success {
  color: #146c43;
  background: #e8f7ef;
  border-color: #a6e3c3;
}

.alert-info {
  color: #0b5f6b;
  background: #e6f7f8;
  border-color: #a9e4e7;
}

.alert-warning {
  color: #7a4b00;
  background: #fff5df;
  border-color: #f2d699;
}

.alert-danger {
  color: #842029;
  background: #fdecef;
  border-color: #f2b7c1;
}

[data-theme="dark"] .alert-success { color: #9ee8bf; background: #17352a; border-color: #265c45; }
[data-theme="dark"] .alert-info { color: #9de7ea; background: #15323a; border-color: #285b66; }
[data-theme="dark"] .alert-warning { color: #f4d18e; background: #3a2c17; border-color: #6b5228; }
[data-theme="dark"] .alert-danger { color: #f5b2be; background: #3b1e25; border-color: #71323e; }

/* Tablas */
.table {
  color: var(--md-text);
}

.table thead th {
  color: var(--md-text);
  background: var(--md-surface-3);
  border-color: var(--md-outline);
}

.table td,
.table th {
  border-color: var(--md-outline);
}

.table-striped tbody tr:nth-of-type(odd) {
  background: var(--md-surface-2);
}

/* --------------------------------------------------------------------------
   12. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs-custom {
  background: linear-gradient(135deg, var(--md-primary) 0%, var(--md-primary-dark) 100%) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .12);
}

.breadcrumbs-custom-path a,
.breadcrumbs-custom-path a:active,
.breadcrumbs-custom-path a:focus,
.breadcrumbs-custom-path li {
  color: #ffffff;
}

.breadcrumbs-custom-path a {
  padding: 3px 6px;
  border-radius: 8px;
}

.breadcrumbs-custom-path li + li {
  margin-left: 10px;
}

.breadcrumbs-custom-path li.active {
  font-weight: 700;
  opacity: .92;
}

.breadcrumbs-custom-path a:hover {
  background: rgba(255, 255, 255, .14);
  border-bottom-color: transparent;
}

@media (max-width: 575.98px) {
  .breadcrumbs-custom {
    padding: 10px 0 8px;
  }

  .breadcrumbs-custom .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .breadcrumbs-custom-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin: 0;
    row-gap: 6px;
    column-gap: 10px;
    overflow: visible;
    white-space: nowrap;
  }

  .breadcrumbs-custom-path li {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1;
  }

  .breadcrumbs-custom-path li + li {
    margin-left: 0;
  }

  .breadcrumbs-custom-path li.active {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 52vw;
    top: 0;
    opacity: .9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .breadcrumbs-custom-path li.active,
  .breadcrumbs-custom-path li a {
    line-height: 1.6;
  }

  .notifications-menu.notifications-menu {
    margin-left: auto;
  }
}

/* --------------------------------------------------------------------------
   13. Pie de página
   -------------------------------------------------------------------------- */
.footer-classic .footer-inner-1 {
  color: var(--md-footer-text);
  background: var(--md-footer-bg) !important;
  padding: clamp(44px, 6vw, 76px) 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-classic .footer-inner-1 h5,
.footer-classic .footer-inner-1 h6,
.footer-classic .footer-inner-1 [class^="heading-"] {
  color: #ffffff !important;
  font-weight: 800;
  letter-spacing: .01em;
}

.footer-classic a {
  color: var(--md-footer-link);
}

.footer-classic a:hover,
.footer-classic a:focus {
  color: #ffffff;
}

.footer-classic .icon-primary {
  color: var(--md-secondary) !important;
}

.footer-classic .unit-left {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
}

.footer-classic .unit-left i {
  color: #ffffff;
}

.footer-classic .footer-list > li + li {
  margin-top: 10px;
}

.footer-classic .footer-list a {
  display: inline-block;
  padding: 2px 0;
}

.footer-classic .footer-list a:hover {
  transform: translateX(3px);
}

.footer-classic .link-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
  transition: transform var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease);
}

.footer-classic .link-image:hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.footer-classic .link-image img {
  width: auto;
  max-width: 100%;
  max-height: 30px;
  object-fit: contain;
}

.footer-classic .footer-inner-2 {
  color: var(--md-footer-text);
  background: var(--md-footer-bg-2) !important;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.footer-classic .rights {
  color: var(--md-footer-text);
}

/* --------------------------------------------------------------------------
   14. Botones flotantes (WhatsApp y tema)
   -------------------------------------------------------------------------- */
.inf-whats {
  width: 62px !important;
  height: 62px !important;
  left: 20px !important;
  right: auto !important;
  bottom: 20px !important;
  padding: 12px;
  object-fit: contain;
  background: #25d366 !important;
  border-radius: 20px !important;
  box-shadow: var(--md-shadow-3) !important;
  animation: md-whats-vibrate 3.2s ease-in-out infinite;
  transition: transform var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease), background-color var(--md-speed) var(--md-ease);
}

@keyframes md-whats-vibrate {
  0%, 18%, 100% { transform: translate(0, 0) rotate(0deg); }
  3% { transform: translate(-1.5px, 1px) rotate(-1.2deg); }
  6% { transform: translate(1.5px, -1px) rotate(1.2deg); }
  9% { transform: translate(-1.5px, 1px) rotate(-1.2deg); }
  12% { transform: translate(1.5px, -1px) rotate(1.2deg); }
  15% { transform: translate(-1px, .5px) rotate(-.6deg); }
}

.inf-whats:hover,
.inf-whats:focus {
  width: 62px !important;
  height: 62px !important;
  left: 20px !important;
  right: auto !important;
  bottom: 20px !important;
  background: #128c7e !important;
  border-radius: 20px !important;
  animation: none;
  transform: translateY(-3px) scale(1.03);
}

.md-theme-fab {
  position: fixed;
  right: 20px;
  bottom: 23px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  color: var(--md-on-primary);
  background: var(--md-primary);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  box-shadow: var(--md-shadow-3);
  cursor: pointer;
  transition: bottom .35s var(--md-ease), right .35s var(--md-ease), transform var(--md-speed) var(--md-ease), background-color var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease);
}

.md-theme-fab:hover,
.md-theme-fab:focus {
  background: var(--md-primary-dark);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
}

.md-theme-fab i {
  font-size: 21px;
  line-height: 1;
}

@media (min-width: 576px) {
  .md-theme-fab {
    right: 40px;
    bottom: 23px;
  }

  /* Cuando "subir rápido" (.ui-to-top) está visible, el tema se apila encima */
  body.ui-to-top-visible .md-theme-fab,
  body:has(.ui-to-top.active) .md-theme-fab {
    right: 40px;
    bottom: 112px;
  }
}

@media (max-width: 575.98px) {
  .ui-to-top {
    display: none !important;
  }
  .md-theme-fab {
    right: 16px;
    bottom: 21px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
  .inf-whats,
  .inf-whats:hover,
  .inf-whats:focus {
    left: 16px !important;
    bottom: 16px !important;
  }
}

/* Refuerzo de compatibilidad con el botón "volver arriba" original */
.ui-to-top {
  color: var(--md-on-primary) !important;
  background: var(--md-primary) !important;
  border-radius: 18px;
  box-shadow: var(--md-shadow-2);
}

.ui-to-top:after {
  background: var(--md-primary-darker) !important;
}

/* --------------------------------------------------------------------------
   15. Preloader WiFi, snackbars y utilidades
   -------------------------------------------------------------------------- */
.preloader {
  background: var(--md-bg) !important;
}

.preloader-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.preloader-wifi {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  border: 1px solid var(--md-outline);
  border-radius: 32px;
  background: var(--md-surface);
  box-shadow: var(--md-shadow-3);
  animation: md-preloader-breathe 2.2s ease-in-out infinite;
}

.preloader-wifi svg {
  width: 72px;
  height: 72px;
  display: block;
  overflow: visible;
  color: var(--md-primary);
}

.wifi-arc {
  stroke: currentColor;
  animation: md-wifi-signal 1.6s ease-in-out infinite;
}

.wifi-arc--outer { animation-delay: .45s; }
.wifi-arc--middle { animation-delay: .3s; }
.wifi-arc--inner { animation-delay: .15s; }

.wifi-dot {
  fill: var(--md-accent);
  animation: md-wifi-signal 1.6s ease-in-out infinite;
}

.preloader-body p {
  margin: 0;
  color: var(--md-text-muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

@keyframes md-wifi-signal {
  0%, 100% { opacity: .16; }
  50% { opacity: 1; }
}

@keyframes md-preloader-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@media (max-width: 575.98px) {
  .preloader-wifi {
    width: 100px;
    height: 100px;
    border-radius: 28px;
  }

  .preloader-wifi svg {
    width: 62px;
    height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader-wifi,
  .wifi-arc,
  .wifi-dot {
    animation: none !important;
    opacity: 1 !important;
  }
}

.snackbars {
  color: var(--md-heading);
  background: var(--md-surface-3);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-sm);
  box-shadow: var(--md-shadow-2);
}

.snackbars a {
  color: var(--md-primary);
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

/* Enlaces de texto con mejor legibilidad */
.footer-classic .unit-body a,
.footer-classic .footer-list a,
.breadcrumbs-custom a {
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   16. Modo oscuro: refuerzos específicos
   -------------------------------------------------------------------------- */
[data-theme="dark"] .bg-primary {
  background: linear-gradient(135deg, #2c3d60 0%, #22304b 60%, #1b263c 100%) !important;
}

[data-theme="dark"] .rd-navbar-static .rd-navbar--is-stuck,
[data-theme="dark"] .rd-navbar-static.rd-navbar--is-clone {
  background: var(--md-nav-solid) !important;
}

[data-theme="dark"] .rd-navbar-static .rd-navbar-dropdown,
[data-theme="dark"] .rd-navbar-static .rd-navbar-megamenu:before {
  background: var(--md-surface) !important;
  border-top-color: var(--md-primary) !important;
  box-shadow: var(--md-shadow-3);
}

[data-theme="dark"] .rd-navbar-static .rd-dropdown-link,
[data-theme="dark"] .rd-navbar-static .rd-megamenu-list-link {
  color: var(--md-link) !important;
}

[data-theme="dark"] .rd-navbar-static .rd-dropdown-link:hover,
[data-theme="dark"] .rd-navbar-static .rd-megamenu-list-link:hover {
  color: var(--md-heading) !important;
}

[data-theme="dark"] .box-image-left .box-image-video .icon {
  color: var(--md-primary-dark);
  background: var(--md-surface);
}

[data-theme="dark"] .box-image-left .box-image-video .icon:hover {
  color: var(--md-on-primary);
  background: var(--md-primary);
}

[data-theme="dark"] .footer-classic .link-image {
  background: #ffffff;
}

[data-theme="dark"] .rd-navbar-fixed .rd-navbar-panel {
  border-bottom-color: var(--md-outline);
}

[data-theme="dark"] .box-counter,
[data-theme="dark"] .box-image-small,
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content {
  background: var(--md-surface);
}

[data-theme="dark"] .box-image-small .item-body > p:first-child {
  color: var(--md-link) !important;
  background: var(--md-primary-soft);
}

[data-theme="dark"] .title-icon .text-light {
  color: var(--md-link) !important;
}

[data-theme="dark"] .list-marked-2 > li::before {
  color: var(--md-accent);
}

[data-theme="dark"] .ui-to-top,
[data-theme="dark"] .md-theme-fab {
  color: var(--md-on-primary);
}

[data-theme="dark"] .ui-to-top:after {
  background: var(--md-primary-darker) !important;
}

[data-theme="dark"] .preloader-body p {
  color: var(--md-text-muted);
}

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  body {
    font-size: 15.5px;
  }

  .swiper-slider-1 {
    min-height: 560px;
  }

  .swiper-slider-1 .swiper-slide-caption {
    padding: 100px 0 90px;
  }

  .swiper-slide-caption h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1.12;
  }

  .swiper-slide-caption h2,
  .swiper-slide-caption h3 {
    font-size: clamp(1.7rem, 6.4vw, 2.4rem);
    line-height: 1.16;
  }

  .swiper-slide-caption .lead {
    font-size: 16px;
    line-height: 1.55;
  }

  .box-image-left .box-image-item {
    border-radius: var(--md-radius-lg);
    margin: 0 15px;
  }

  .footer-classic .footer-inner-1 {
    padding: 46px 0;
  }

  .footer-classic .link-image {
    min-height: 50px;
  }
}

@media (max-width: 575.98px) {
  .section-lg,
  .section-md,
  .section-sm {
    padding-left: 0;
    padding-right: 0;
  }

  .swiper-slider-1 {
    min-height: 520px;
    border-radius: 0 0 var(--md-radius-lg) var(--md-radius-lg);
  }

  .swiper-slider-1 .swiper-slide-caption {
    padding: 92px 0 84px;
  }

  .box-icon-2 > i,
  .box-icon-2 .icon {
    width: 56px;
    height: 56px;
    font-size: 24px !important;
    border-radius: 17px;
  }

  .box-image-small .item-image {
    min-height: 200px;
  }

  .box-image-small .item-body {
    padding: 20px;
  }

  .title-icon > .fa-solid,
  .title-icon > .fa,
  .title-icon > .icon,
  .title-icon-2 > .fa-solid,
  .title-icon > font {
    width: 50px;
    height: 50px;
    font-size: 21px !important;
    border-radius: 15px;
  }

  .title-icon > font .fa {
    font-size: 22px;
  }

  .footer-classic .link-image img {
    max-height: 26px;
  }
}

/* --------------------------------------------------------------------------
   18. Centro de notificaciones (Material Design 3)
   -------------------------------------------------------------------------- */
.notifications-menu.notifications-menu {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.md3-notif-toggle.md3-notif-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  transition: background-color var(--md-speed) var(--md-ease);
}

.md3-notif-toggle:hover,
.md3-notif-toggle:focus-visible {
  background: rgba(255, 255, 255, .14);
  border-color: transparent;
  color: #ffffff;
  text-decoration: none;
  transform: none;
}

.md3-notif-toggle:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: none;
}

@media (min-width: 768px) {
  .md3-notif-toggle.md3-notif-toggle {
    font-size: 14px;
    width: 32px;
    height: 32px;
  }
}

.md3-notif-badge.md3-notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: var(--md-accent);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  pointer-events: none;
}

.md3-notif-toggle.dropdown-toggle::after {
  display: none !important;
}

.md3-notif-panel.md3-notif-panel {
  white-space: normal; /* anula el nowrap heredado de .breadcrumbs-custom-path */
  left: auto !important;
  right: 0 !important;
  top: calc(100% + 10px) !important;
  z-index: 1060;
  width: min(400px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-md) !important;
  background: var(--md-surface);
  color: var(--md-text);
  box-shadow: var(--md-shadow-3);
  overflow: hidden;
  transform: translateY(-6px);
  opacity: 0;
  transition: opacity var(--md-speed) var(--md-ease), transform var(--md-speed) var(--md-ease);
}

.md3-notif-panel.show.md3-notif-panel,
.show > .md3-notif-panel.md3-notif-panel {
  transform: translateY(0);
  opacity: 1;
}

.md3-notif-root.md3-notif-root {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.md3-notif-form.md3-notif-form {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Encabezado del panel */
.md3-notif-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--md-outline);
  background: linear-gradient(160deg, var(--md-surface-2) 0%, var(--md-surface) 100%);
}

.md3-notif-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 15px;
  background: var(--md-primary);
  color: #ffffff;
  font-size: 18px;
  box-shadow: var(--md-shadow-1);
}

.md3-notif-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--md-heading);
  letter-spacing: .01em;
}

.md3-notif-head-text small {
  font-size: 11px;
  font-weight: 600;
  color: var(--md-text-muted);
  letter-spacing: .02em;
}

.md3-notif-head-count {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--md-primary-soft);
  color: var(--md-link);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.md3-notif-head-count.is-clear {
  background: rgba(36, 184, 181, .15);
  color: #128a87;
}

/* Área de resultados (AJAX) */
.md3-notif-result:empty {
  display: none;
}

.md3-notif-result {
  padding: 10px 14px 0;
}

.md3-notif-result .alert,
.md3-notif-result [class*="alert"] {
  margin: 0 !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: var(--md-radius-sm) !important;
  background: var(--md-primary-soft);
  color: var(--md-heading);
  font-size: 13px;
  line-height: 1.45;
}

.md3-notif-result img {
  vertical-align: middle;
}

/* Lista con desplazamiento */
.md3-notif-scroll.md3-notif-scroll {
  margin: 0;
  padding: 10px 12px 12px;
  height: min(520px, 64vh);
  max-height: min(520px, 64vh);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--md-outline-strong) transparent;
}

.md3-notif-scroll::-webkit-scrollbar {
  width: 9px;
}

.md3-notif-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--md-outline-strong);
}

.md3-notif-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* Tarjeta de notificación */
.md3-notif-item {
  position: relative;
  display: block;
}

.md3-notif-card {
  position: relative;
  display: flex;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px 46px 12px 12px;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-sm);
  background: var(--md-surface-2);
  color: var(--md-text);
  cursor: pointer;
  transition: background-color var(--md-speed) var(--md-ease),
              border-color var(--md-speed) var(--md-ease),
              transform var(--md-speed) var(--md-ease),
              box-shadow var(--md-speed) var(--md-ease);
}

.md3-notif-card:hover {
  background: var(--md-surface-3);
  border-color: var(--md-outline-strong);
}

.md3-notif-card:active {
  transform: scale(.99);
}

.md3-notif-item.is-unread .md3-notif-card {
  background: var(--md-primary-soft);
  border-color: var(--md-outline-strong);
}

.md3-notif-item.is-unread .md3-notif-icon {
  background: var(--md-primary);
  color: #ffffff;
}

.md3-notif-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 13px;
  background: var(--md-surface-4);
  color: var(--md-text-muted);
  font-size: 16px;
  align-self: flex-start;
}

.md3-notif-icon--visita { background: rgba(36, 184, 181, .15); color: #128a87; }
.md3-notif-icon--aviso  { background: var(--md-primary-soft); color: var(--md-link); }
.md3-notif-icon--alerta { background: rgba(241, 101, 131, .14); color: #d1436a; }
.md3-notif-icon--correcto { background: rgba(31, 157, 98, .15); color: #1f9d62; }
.md3-notif-icon--n      { background: var(--md-surface-4); color: var(--md-text-muted); }

.md3-notif-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.md3-notif-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.md3-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #ffffff;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.md3-chip--visita   { background: #24b8b5; }
.md3-chip--aviso    { background: #516ca9; }
.md3-chip--alerta   { background: #f16583; }
.md3-chip--correcto { background: #1f9d62; }
.md3-chip--n        { background: #6b7a8c; }

.md3-notif-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--md-text-muted);
  white-space: nowrap;
}

.md3-notif-msg {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: var(--md-text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.md3-notif-msg strong {
  color: var(--md-heading);
}

/* Checkbox nativo con estilo M3 */
.md3-notif-check.md3-notif-check {
  position: absolute;
  top: 14px;
  right: 13px;
  z-index: 2;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--md-primary);
  cursor: pointer;
}

.md3-notif-check:focus-visible {
  outline: 2px solid var(--md-link);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Estado vacío */
.md3-notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 34px 18px 26px;
  text-align: center;
  color: var(--md-text-muted);
  font-size: 13px;
}

.md3-notif-empty i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--md-surface-3);
  font-size: 22px;
  color: var(--md-text-soft);
}

/* Pie de acciones */
.md3-notif-actions {
  flex: 0 0 auto;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--md-outline);
  background: var(--md-surface);
}

.md3-notif-actions-label {
  display: block;
  margin: 2px 2px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--md-text-muted);
}

.md3-notif-select.md3-notif-select {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--md-outline-strong);
  border-radius: 14px;
  background-color: var(--md-surface-2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
  color: var(--md-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--md-speed) var(--md-ease), background-color var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease);
}

.md3-notif-select:focus,
.md3-notif-select:focus-visible {
  outline: none;
  border-color: var(--md-primary);
  background-color: var(--md-surface);
  box-shadow: 0 0 0 3px var(--md-primary-soft);
}

.md3-notif-submit.md3-notif-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--md-primary);
  color: var(--md-on-primary);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: var(--md-shadow-2);
  transition: background-color var(--md-speed) var(--md-ease), transform var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease), filter var(--md-speed) var(--md-ease);
}

.md3-notif-submit:hover {
  background: var(--md-primary-dark);
  box-shadow: var(--md-shadow-3);
}

.md3-notif-submit:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
}

.md3-notif-submit:active {
  transform: translateY(1px);
  filter: brightness(.97);
}

/* Tema oscuro */
[data-theme="dark"] .md3-notif-icon--visita { background: rgba(93, 217, 214, .14); color: #5dd9d6; }
[data-theme="dark"] .md3-notif-icon--alerta { background: rgba(255, 139, 163, .14); color: #ff8ba3; }
[data-theme="dark"] .md3-notif-icon--correcto { background: rgba(93, 217, 214, .12); color: #63d6a5; }
[data-theme="dark"] .md3-notif-head-count.is-clear { color: #5dd9d6; }
[data-theme="dark"] .md3-notif-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b7c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
}

@media (max-width: 767.98px) {
  .md3-notif-panel.md3-notif-panel {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 22px 22px 0 0 !important;
    max-height: 84vh;
    display: none; /* oculto por defecto; Bootstrap muestra al abrir */
    flex-direction: column;
    z-index: 1060;
    transform: none !important;
    opacity: 1 !important;
    box-shadow: 0 -10px 44px rgba(0, 0, 0, .38);
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .md3-notif-panel.md3-notif-panel.show {
    display: flex;
  }

  .md3-notif-panel.md3-notif-panel::before {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: var(--md-outline-strong);
    margin: 9px auto 2px;
    flex: 0 0 auto;
  }

  .md3-notif-head {
    padding: 8px 18px 12px;
  }

  .md3-notif-head-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 13px;
    font-size: 16px;
  }

  .md3-notif-head-text {
    font-size: 15.5px;
  }

  .md3-notif-scroll.md3-notif-scroll {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 10px 12px;
  }

  .md3-notif-actions {
    padding: 12px 14px 14px;
  }

  .md3-notif-submit.md3-notif-submit {
    height: 52px;
    font-size: 14px;
  }
}

/* --------------------------------------------------------------------------
   19. Galería de ventas (Material Design 3)
   -------------------------------------------------------------------------- */

/* Banner informativo M3 */
.md3-gallery-notice.md3-gallery-notice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--md-radius-md);
  background: var(--md-primary-soft);
  color: var(--md-heading);
  box-shadow: var(--md-shadow-1);
  font-size: 14px;
  line-height: 1.55;
}

/* Mayor especificidad que Font Awesome (display de .fa) para centrar el glifo */
.md3-gallery-notice .md3-gallery-notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background: var(--md-accent);
  color: #ffffff;
  font-size: 17px;
}

.md3-gallery-notice-text {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.md3-gallery-notice strong {
  color: var(--md-link);
}

.md3-gallery-notice .close {
  position: static; /* anula el .alert-dismissible de Bootstrap (absolute top:0 right:0) */
  align-self: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  justify-self: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--md-text-muted);
  font-size: 22px;
  line-height: 1;
  opacity: 1;
  transition: background-color var(--md-speed) var(--md-ease), color var(--md-speed) var(--md-ease);
}

.md3-gallery-notice .close:hover {
  background: rgba(15, 23, 32, .08);
  color: var(--md-heading);
}

[data-theme="dark"] .md3-gallery-notice .close:hover {
  background: rgba(255, 255, 255, .08);
}

.md3-gallery-notice .close:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
}

/* Rejilla y tarjetas */
.md3-gallery-item {
  display: flex;
  justify-content: center;
}

.md3-gallery-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 190px;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-md);
  background: var(--md-surface);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--md-shadow-1);
  transition: transform .3s var(--md-ease), box-shadow .3s var(--md-ease), border-color .3s var(--md-ease);
  -webkit-tap-highlight-color: transparent;
}

.md3-gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--md-outline-strong);
  box-shadow: var(--md-shadow-3);
}

.md3-gallery-card:active {
  transform: translateY(-1px) scale(.99);
  box-shadow: var(--md-shadow-2);
}

.md3-gallery-card:focus-visible {
  outline: 3px solid var(--md-accent);
  outline-offset: 3px;
}

.md3-gallery-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 144 / 220;
  overflow: hidden;
  background: linear-gradient(110deg, var(--md-surface-2) 8%, var(--md-surface-3) 22%, var(--md-surface-2) 34%);
  background-size: 200% 100%;
  animation: md3-gallery-shimmer 1.5s linear infinite;
}

@keyframes md3-gallery-shimmer {
  to { background-position: -200% 0; }
}

.md3-gallery-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  image-rendering: auto;
  transform: scale(1.001);
  transition: transform .55s var(--md-ease);
}

.md3-gallery-card:hover .md3-gallery-img,
.md3-gallery-card:focus-visible .md3-gallery-img {
  transform: scale(1.03);
}

/* Chip de estado sobre la imagen */
.md3-gallery-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.md3-gallery-chip .fa,
.md3-gallery-chip .fas {
  font-size: 11px;
}

.md3-gallery-chip--success { background: #1f9d62; }
.md3-gallery-chip--danger  { background: #d1436a; }

/* Botón de zoom (affordance de ampliación) */
.md3-gallery-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(13, 20, 28, .55);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #ffffff;
  font-size: 17px;
  backdrop-filter: blur(4px);
  transition: transform .3s var(--md-ease), background-color .3s var(--md-ease);
  pointer-events: none;
}

.md3-gallery-card:hover .md3-gallery-zoom,
.md3-gallery-card:focus-visible .md3-gallery-zoom {
  background: var(--md-accent);
  transform: scale(1.12);
}

/* Paginación M3 */
.md3-gallery-pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.md3-pagination.md3-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: 999px;
  box-shadow: var(--md-shadow-1);
}

.md3-pagination .page-item {
  margin: 0;
}

.md3-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--md-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background-color var(--md-speed) var(--md-ease), color var(--md-speed) var(--md-ease), transform var(--md-speed) var(--md-ease);
}

.md3-pagination .page-link:hover {
  background: var(--md-surface-3);
  color: var(--md-heading);
}

.md3-pagination .page-link:active {
  background: var(--md-surface-4);
  transform: scale(.96);
}

.md3-pagination .page-link:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
}

/* Bootstrap pone a 0 las esquinas exteriores del primer/último botón; las devolvemos a pill */
.md3-pagination.md3-pagination .page-item:first-child .page-link,
.md3-pagination.md3-pagination .page-item:last-child .page-link {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.md3-pagination .page-item.active .page-link {
  background: var(--md-primary);
  color: #ffffff;
  box-shadow: var(--md-shadow-2);
  cursor: default;
}

.md3-pagination .page-item.active .page-link:hover {
  background: var(--md-primary-dark);
}

/* Resumen de registros */
.md3-pagination-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(36, 184, 181, .14);
  color: #0f7d7b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

[data-theme="dark"] .md3-pagination-info {
  color: var(--md-secondary);
}

.md3-pagination-info b {
  color: var(--md-heading);
  font-weight: 800;
}

.md3-pagination-info u {
  text-decoration: none;
  border-bottom: 2px solid var(--md-secondary);
}

.md3-pagination-info .fa {
  font-size: 15px;
  opacity: .85;
}

@media (max-width: 575.98px) {
  .md3-gallery-notice.md3-gallery-notice {
    gap: 10px;
    padding: 12px 12px;
    font-size: 12.5px;
  }

  .md3-gallery-notice-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 15px;
  }

  .md3-gallery-chip {
    top: 8px;
    left: 8px;
    height: 23px;
    padding: 0 9px;
    font-size: 10px;
  }

  .md3-gallery-zoom {
    right: 8px;
    bottom: 8px;
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .md3-pagination.md3-pagination {
    gap: 6px;
    padding: 8px;
    border-radius: 24px;
  }

  .md3-pagination .page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .md3-pagination-info {
    font-size: 12px;
    padding: 7px 14px;
  }
}

/* --------------------------------------------------------------------------
   20. Términos y condiciones (Material Design 3)
   -------------------------------------------------------------------------- */

/* Sección y cabecera */
.md3-tyc-section {
  background: var(--md-bg);
}

.md3-tyc-title-wrap {
  max-width: 760px;
  margin-bottom: 10px;
}

.md3-tyc-title-wrap h1 {
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.1;
}

.md3-tyc-lead {
  margin: 0 0 18px;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  color: var(--md-text-muted);
}

.md3-tyc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.md3-tyc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--md-outline);
  border-radius: 999px;
  background: var(--md-surface-2);
  color: var(--md-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.md3-tyc-chip .fa {
  color: var(--md-secondary);
  font-size: 13px;
}

.md3-tyc-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--md-accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--md-shadow-2);
  transition: transform var(--md-speed) var(--md-ease), box-shadow var(--md-speed) var(--md-ease);
}

.md3-tyc-admin-btn:hover,
.md3-tyc-admin-btn:focus-visible {
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--md-shadow-3);
}

.md3-tyc-admin-btn:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 3px;
}

/* Rejilla de tarjetas: 1 col móvil / 2 tablet / 3 escritorio */
.md3-tyc-grid {
  margin-top: 0;
}

.md3-tyc-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  height: 100%;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-md);
  background: var(--md-surface);
  box-shadow: var(--md-shadow-1);
  transition: transform .25s var(--md-ease), box-shadow .25s var(--md-ease), border-color .25s var(--md-ease), background-color .25s var(--md-ease);
}

.md3-tyc-card:hover {
  transform: translateY(-2px);
  border-color: var(--md-outline-strong);
  box-shadow: var(--md-shadow-2);
}

/* Número de punto: pastilla M3 con escalera tonal según paridad */
.md3-tyc-card .unit-left {
  order: 0;
  margin: 0;
}

.md3-tyc-card .index-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  background: var(--md-primary-soft);
  color: var(--md-link);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--md-outline);
}

.md3-tyc-grid .col-md-6:nth-child(even) .md3-tyc-card .index-counter,
.md3-tyc-grid .col-xl-4:nth-child(3n + 2) .md3-tyc-card .index-counter {
  background: rgba(36, 184, 181, .14);
  color: #0f7d7b;
}

.md3-tyc-grid .col-xl-4:nth-child(3n) .md3-tyc-card .index-counter {
  background: rgba(241, 101, 131, .12);
  color: #c93a61;
}

[data-theme="dark"] .md3-tyc-grid .col-md-6:nth-child(even) .md3-tyc-card .index-counter,
[data-theme="dark"] .md3-tyc-grid .col-xl-4:nth-child(3n + 2) .md3-tyc-card .index-counter {
  color: var(--md-secondary);
}

[data-theme="dark"] .md3-tyc-grid .col-xl-4:nth-child(3n) .md3-tyc-card .index-counter {
  color: var(--md-accent);
}

/* Título y cuerpo legible */
.md3-tyc-card .unit-body {
  min-width: 0;
  flex: 1;
}

.md3-tyc-card .unit-body .title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--md-heading);
}

.md3-tyc-card .unit-body .title .edit-link {
  margin-left: auto;
  text-decoration: none;
}

.md3-tyc-card .badge {
  border-radius: 999px;
}

.md3-tyc-card .content {
  font-size: 15px;
  line-height: 1.68;
  color: var(--md-text);
  overflow-wrap: anywhere;
}

.md3-tyc-card .content p {
  margin-bottom: 10px;
}

.md3-tyc-card .content p:last-child {
  margin-bottom: 0;
}

.md3-tyc-card .content strong,
.md3-tyc-card .content b {
  color: var(--md-heading);
  font-weight: 800;
}

.md3-tyc-card .content a {
  color: var(--md-link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(81, 108, 169, .35);
  overflow-wrap: anywhere;
}

.md3-tyc-card .content a:hover {
  color: var(--md-link-hover);
  text-decoration-color: currentColor;
}

.md3-tyc-card .content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--md-radius-sm);
}

/* Responsive cómodo */
@media (max-width: 767.98px) {
  .md3-tyc-section {
    padding-left: 0;
    padding-right: 0;
  }

  .md3-tyc-card {
    padding: 18px;
    gap: 14px;
  }

  .md3-tyc-card .index-counter {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    font-size: 19px;
  }

  .md3-tyc-card .unit-body .title {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .md3-tyc-card .content {
    font-size: 14.5px;
    line-height: 1.64;
  }

  .md3-tyc-meta {
    gap: 7px;
  }

  .md3-tyc-chip {
    min-height: 31px;
    padding: 0 12px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .md3-tyc-card {
    flex-direction: column;
    gap: 12px;
  }

  .md3-tyc-card .unit-left {
    align-self: flex-start;
  }
}

/* --------------------------------------------------------------------------
   21. Accesibilidad y preferencias del usuario
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   22. Impresión
   -------------------------------------------------------------------------- */
@media print {
  .md-theme-fab,
  .inf-whats,
  .ui-to-top,
  .rd-navbar-wrap,
  .preloader {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}
