/****************************************
 * PSYCOPYME · CSS OPTIMIZADO
 * NAV PREMIUM + MASTERSTUDY + EMBEDS
 * SIN CAMBIAR TAMAÑOS
 ****************************************/
/* ========================================
   MENÚ INFERIOR MÓVIL · ROJO PREMIUM PSYCOPYME
   Rojo vivo difuminado + línea superior tricolor
======================================== */

.menu-inferior-movil{
  position: fixed !important;
  inset: auto 0 0 0 !important;
  z-index: 2147483647 !important;

  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 4px;

  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  overflow: hidden;

  background:
    radial-gradient(
      720px 220px at 50% -35%,
      rgba(255,255,255,.18),
      transparent 58%
    ),
    radial-gradient(
      520px 220px at 12% 115%,
      rgba(196,0,45,.45),
      transparent 62%
    ),
    radial-gradient(
      520px 220px at 88% 115%,
      rgba(130,0,32,.48),
      transparent 62%
    ),
    linear-gradient(
      135deg,
      #35000b 0%,
      #650015 22%,
      #920020 48%,
      #b0002b 68%,
      #700018 84%,
      #2c0009 100%
    );

  background-size: 260% 260%;
  animation: psycopymeRojoPremium 10s ease-in-out infinite;

  border-top: 1px solid rgba(255,255,255,.16);

  box-shadow:
    0 -18px 40px rgba(0,0,0,.46),
    0 -1px 0 rgba(255,255,255,.08) inset,
    0 0 26px rgba(176,0,43,.28);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  isolation: isolate;
}

/* ========================================
   BRILLOS Y TEXTURA PREMIUM
======================================== */

.menu-inferior-movil::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1 !important;
  pointer-events:none;

  background:
    radial-gradient(
      460px 150px at 0% -12%,
      rgba(255,255,255,.20),
      transparent 62%
    ),

    radial-gradient(
      460px 150px at 100% -12%,
      rgba(255,255,255,.14),
      transparent 62%
    ),

    radial-gradient(
      340px 130px at 50% 118%,
      rgba(255,255,255,.10),
      transparent 64%
    ),

    linear-gradient(
      115deg,
      transparent 0%,
      rgba(255,255,255,.045) 36%,
      rgba(255,255,255,.13) 48%,
      rgba(255,255,255,.045) 60%,
      transparent 100%
    ),

    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.018) 0,
      rgba(255,255,255,.018) 26px,
      transparent 26px,
      transparent 52px
    ),

    linear-gradient(
      180deg,
      rgba(255,255,255,.06),
      rgba(0,0,0,.20)
    );

  mix-blend-mode: screen;
  opacity:.95;
}

/* ========================================
   LÍNEA SUPERIOR TRICOLOR MÉXICO
======================================== */

.menu-inferior-movil::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  top:0;
  height:2px;
  z-index:1 !important;
  pointer-events:none;

  border-radius:999px;

  background:
    linear-gradient(
      90deg,
      transparent 0%,
      #008f5a 18%,
      #ffffff 50%,
      #cf2434 82%,
      transparent 100%
    );

  box-shadow:
    0 0 8px rgba(255,255,255,.28),
    0 0 14px rgba(207,36,52,.24),
    0 0 18px rgba(0,143,90,.18);
}

/* ========================================
   ENLACES
======================================== */

.menu-inferior-movil a{
  position: relative;
  z-index: 2 !important;

  flex: 1 1 0;
  min-width: 58px;

  text-align: center;
  text-decoration: none !important;

  color: rgba(255,255,255,.95) !important;

  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;

  opacity: .96;

  text-shadow:
    0 1px 2px rgba(0,0,0,.35);

  transition:
    transform .18s ease,
    opacity .18s ease,
    filter .18s ease,
    color .18s ease;
}

/* ========================================
   ICONOS
======================================== */

.menu-inferior-movil a span{
  position: relative;
  z-index: 2 !important;

  width: 38px;
  height: 38px;
  margin: 0 auto 3px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:20px;
  border-radius:50%;

  background:
    radial-gradient(
      circle at 32% 24%,
      rgba(255,255,255,.26),
      rgba(255,255,255,.08) 42%,
      rgba(90,0,22,.32) 72%,
      rgba(0,0,0,.18) 100%
    );

  border:1px solid rgba(255,255,255,.14);

  box-shadow:
    0 7px 14px rgba(0,0,0,.28),
    0 0 10px rgba(255,255,255,.05),
    0 0 16px rgba(176,0,43,.16);

  transition:
    transform .22s ease,
    filter .22s ease,
    box-shadow .22s ease,
    background .22s ease,
    border-color .22s ease;
}

.menu-inferior-movil i{
  position:relative;
  z-index:2 !important;
}

/* ========================================
   HOVER / FOCUS
======================================== */

.menu-inferior-movil a:hover,
.menu-inferior-movil a:focus{
  transform:translateY(-3px);
  opacity:1;
  color:#ffffff !important;
  filter:brightness(1.08);
}

.menu-inferior-movil a:hover span,
.menu-inferior-movil a:focus span{
  transform:translateY(-2px) scale(1.08);

  background:
    radial-gradient(
      circle at 32% 24%,
      rgba(255,255,255,.34),
      rgba(255,255,255,.12) 38%,
      rgba(190,0,48,.36) 66%,
      rgba(60,0,15,.72) 100%
    );

  border-color:rgba(255,255,255,.22);

  box-shadow:
    0 9px 18px rgba(0,0,0,.34),
    0 0 12px rgba(255,255,255,.14),
    0 0 24px rgba(190,0,48,.32);
}

/* ========================================
   ELEMENTO ACTIVO
======================================== */

.menu-inferior-movil a.active{
  opacity:1;
  color:#ffffff !important;
  font-weight:700;
}

.menu-inferior-movil a.active span{
  transform:translateY(-3px) scale(1.08);

  background:
    radial-gradient(
      circle at 30% 22%,
      rgba(255,255,255,.40),
      rgba(255,255,255,.14) 34%,
      rgba(210,0,52,.44) 62%,
      rgba(76,0,19,.92) 100%
    );

  border-color:rgba(255,255,255,.26);

  box-shadow:
    0 9px 20px rgba(0,0,0,.36),
    0 0 12px rgba(255,255,255,.18),
    0 0 26px rgba(210,0,52,.38);
}

/* Indicador inferior del elemento activo */
.menu-inferior-movil a.active::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-5px;

  width:20px;
  height:3px;

  transform:translateX(-50%);
  border-radius:999px;

  background:#ffffff;

  box-shadow:
    0 0 7px rgba(255,255,255,.60),
    0 0 14px rgba(207,36,52,.40);
}

/* ========================================
   ANIMACIÓN DEL DIFUMINADO
======================================== */

@keyframes psycopymeRojoPremium{
  0%{
    background-position:0% 50%;
  }

  50%{
    background-position:100% 50%;
  }

  100%{
    background-position:0% 50%;
  }
}

/* ========================================
   ACCESIBILIDAD
======================================== */

@media (prefers-reduced-motion: reduce){
  .menu-inferior-movil{
    animation:none;
    background-size:100% 100%;
  }

  .menu-inferior-movil a,
  .menu-inferior-movil a span{
    transition:none;
  }
}

/* ========================================
   VISIBILIDAD RESPONSIVA
======================================== */

@media (min-width:1025px){
  .menu-inferior-movil{
    display:none;
  }
}

@media (max-width:1024px){
  body{
    padding-bottom:94px !important;
  }
}

/* ========================================
   2) MASTERSTUDY · TOPBAR MODERN
======================================== */
body.single-stm-courses .masterstudy-single-course-modern__topbar:before{
  background: linear-gradient(
    135deg,
    #1a0f3d 0%,
    #3c0d75 50%,
    #e0b84c 100%
  ) !important;
}


/* ========================================
   3) MASTERSTUDY · BREADCRUMBS / HEADER SPACING
======================================== */

/* Ocultar breadcrumbs / pagetitle */
body.single-stm-courses #breadcrumb-section,
body.single-stm-courses .breadcrumb-area,
body.single-stm-courses .dt__pagetitle{
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;

  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;

  background: transparent !important;
  box-shadow: none !important;
}

/* Quitar contenido interno */
body.single-stm-courses #breadcrumb-section *,
body.single-stm-courses .breadcrumb-area *,
body.single-stm-courses .dt__pagetitle *{
  display: none !important;
}

/* Evita que el contenido quede debajo del header */
body.single-stm-courses .site-content,
body.single-stm-courses .stm-lms-wrapper{
  padding-top:150px !important;
}

/* Evita dobles espacios */
body.single-stm-courses .masterstudy-single-course,
body.single-stm-courses .masterstudy-single-course__main,
body.single-stm-courses .masterstudy-single-course-whole,
body.single-stm-courses .masterstudy-single-course-wrapper,
body.single-stm-courses main.site-main,
body.single-stm-courses .site-main{
  margin-top:0 !important;
}

@media (max-width:1024px){
  body.single-stm-courses .site-content,
  body.single-stm-courses .stm-lms-wrapper{
    padding-top:60px !important;
  }
}


/* ========================================
   4) EMBEDS GENERALES · MASTERSTUDY
======================================== */

/* Evitar scroll / recorte dentro del reproductor */
.masterstudy-course-player,
.masterstudy-course-player iframe,
.masterstudy-course-player .course-content,
.masterstudy-course-player .course-content__inner{
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}


/* ========================================
   5) GOOGLE FORMS
======================================== */
iframe[src*="docs.google.com/forms"]{
  width:100% !important;
  max-width:100% !important;
  min-height:4000px !important;
  border:0 !important;
  display:block !important;
}

/* ========================================
   LOOKER STUDIO · PÁGINAS NORMALES
======================================== */
iframe[src*="lookerstudio.google.com"]{
  width:100% !important;
  max-width:100% !important;
  min-height:700px !important;
  height:700px !important;
  border:0 !important;
  display:block !important;
}

/* ========================================
   LOOKER STUDIO · MASTERSTUDY
======================================== */
.masterstudy-course-player iframe[src*="lookerstudio.google.com"],
body.single-stm-courses iframe[src*="lookerstudio.google.com"]{
  width:100% !important;
  max-width:100% !important;
  min-height:3000px !important;
  height:3000px !important;
  border:0 !important;
  display:block !important;
}

/* ========================================
   7) GOOGLE SHEETS
======================================== */
iframe[src*="docs.google.com/spreadsheets"]{
  width: 100% !important;
  max-width: 100% !important;
  min-height: 1200px !important;
  height: 1200px !important;
  border: 0 !important;
  display: block !important;
}

.masterstudy-course-player iframe[src*="docs.google.com/spreadsheets"],
.masterstudy-course-player iframe[src*="/spreadsheets/"]{
  width: 100% !important;
  min-height: 1200px !important;
  height: 1200px !important;
  max-height: none !important;
  display: block !important;
}


/* ========================================
   8) YOUTUBE EMBEDS · PÁGINAS NORMALES
======================================== */
iframe[src*="youtube.com"],
iframe[src*="youtu.be"]{
  width: 100% !important;
  height: auto !important;
  min-height: unset !important;
  max-height: none !important;
  aspect-ratio: 16 / 9 !important;
  display: block !important;
}

.wp-block-embed__wrapper,
.wp-block-embed-youtube,
.wp-video,
.video-wrapper,
.responsive-video,
.fluid-width-video-wrapper{
  height: auto !important;
  min-height: unset !important;
  max-height: none !important;
  overflow: visible !important;
}

.wp-block-embed__wrapper iframe,
.wp-block-embed-youtube iframe,
.video-wrapper iframe,
.responsive-video iframe,
.fluid-width-video-wrapper iframe{
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  display: block !important;
}


/* ========================================
   9) COMPRA · TEXTOS DEL DROPDOWN
======================================== */

/* Ocultar texto original */
.masterstudy-buy-button-dropdown__head-title{
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Primer item */
.masterstudy-buy-button-dropdown > div:first-child .masterstudy-buy-button-dropdown__head-title::after{
  content: "Compra individual";
  display: inline-block;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  color: #0f172a;
}

/* Último item */
.masterstudy-buy-button-dropdown > div:last-child .masterstudy-buy-button-dropdown__head-title::after{
  content: "Compra grupal";
  display: inline-block;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  color: #0f172a;
}


/* ========================================
   10) TOP HEADER BLANCO · SOLO DESKTOP
======================================== */
@media (min-width:1025px){

  /* Fondo completo del header */
  .header-widget,
  .top-header,
  .header-top,
  .above-header{
    background:#ffffff !important;
  }

  /* Quitar fondo de columnas internas */
  .header-widget .av-column-6,
  .top-header .av-column-6,
  .header-top .av-column-6,
  .above-header .av-column-6{
    background: transparent !important;
  }

  /* Mantener colores de texto */
  .header-widget .nav-link,
  .header-widget .contact-info,
  .header-widget .contact-info .title,
  .header-widget .nav-link i,
  .header-widget .contact-icon i{
    color:#111827 !important;
  }
}

/* ========================================
   11) RATINGS
======================================== */

/* Ocultar rating cuando no hay estrellas llenas */
.masterstudy-single-course-rating:not(:has(.masterstudy-single-course-rating__star_filled)){
  display:none;
}

/* Ocultar texto "X valoraciones" */
.masterstudy-single-course-rating__quantity{
  display:none !important;
}


/* ========================================
   12) TOPBAR TIMELESS · PREMIUM COMPLETO
   Negro grafito + oro viejo
======================================== */

/* Contenedor principal */
body.single-stm-courses .masterstudy-single-course-timeless__topbar {
  position: relative !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 215, 0, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.42) !important;
}

/* Fondo premium */
body.single-stm-courses .masterstudy-single-course-timeless__topbar:before {
  background:
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 24%,
      rgba(180, 20, 35, 0.10) 30%,
      rgba(180, 20, 35, 0.45) 36%,
      rgba(255, 70, 90, 0.55) 39%,
      rgba(80, 0, 12, 0.35) 46%,
      transparent 56%
    ),
    radial-gradient(
      circle at 88% 8%,
      rgba(190, 20, 40, 0.28) 0%,
      rgba(90, 0, 15, 0.16) 34%,
      transparent 58%
    ),
    linear-gradient(
      135deg,
      #171717 0%,
      #0b0b0b 32%,
      #220006 58%,
      #050505 100%
    ) !important;

  border-bottom: 1px solid rgba(180, 20, 35, 0.5) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 80, 100, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.9),
    0 12px 32px rgba(35, 0, 8, 0.5) !important;
}

/* Forzar texto blanco en toda la topbar */
body.single-stm-courses .masterstudy-single-course-timeless__topbar,
body.single-stm-courses .masterstudy-single-course-timeless__topbar *,
body.single-stm-courses .masterstudy-single-course-timeless__topbar h1,
body.single-stm-courses .masterstudy-single-course-timeless__topbar h2,
body.single-stm-courses .masterstudy-single-course-timeless__topbar h3,
body.single-stm-courses .masterstudy-single-course-timeless__topbar p,
body.single-stm-courses .masterstudy-single-course-timeless__topbar span,
body.single-stm-courses .masterstudy-single-course-timeless__topbar div,
body.single-stm-courses .masterstudy-single-course-timeless__topbar a,
body.single-stm-courses .masterstudy-single-course-timeless__topbar li {
  color: #ffffff !important;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.85),
    0 0 10px rgba(212, 175, 55, 0.18) !important;
}

/* Título principal más premium */
body.single-stm-courses .masterstudy-single-course-timeless__topbar h1 {
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px !important;
  text-shadow:
    0 3px 8px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(212, 175, 55, 0.24) !important;
}

/* Links */
body.single-stm-courses .masterstudy-single-course-timeless__topbar a {
  color: #f5d76e !important;
  transition: all 0.25s ease !important;
}

/* Hover links */
body.single-stm-courses .masterstudy-single-course-timeless__topbar a:hover {
  color: #FFD700 !important;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.9),
    0 0 14px rgba(255, 215, 0, 0.65) !important;
}

/* Íconos SVG en blanco/dorado */
body.single-stm-courses .masterstudy-single-course-timeless__topbar svg,
body.single-stm-courses .masterstudy-single-course-timeless__topbar svg path {
  fill: #f5d76e !important;
  color: #f5d76e !important;
}

/* Meta, breadcrumbs, categorías o textos secundarios */
body.single-stm-courses .masterstudy-single-course-timeless__topbar [class*="breadcrumb"],
body.single-stm-courses .masterstudy-single-course-timeless__topbar [class*="category"],
body.single-stm-courses .masterstudy-single-course-timeless__topbar [class*="meta"],
body.single-stm-courses .masterstudy-single-course-timeless__topbar [class*="author"],
body.single-stm-courses .masterstudy-single-course-timeless__topbar [class*="instructor"] {
  color: #fff3c4 !important;
}

/* Botones o etiquetas dentro de la topbar */
body.single-stm-courses .masterstudy-single-course-timeless__topbar button,
body.single-stm-courses .masterstudy-single-course-timeless__topbar .masterstudy-button,
body.single-stm-courses .masterstudy-single-course-timeless__topbar [class*="button"] {
  color: #111111 !important;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 45%, #B8860B 100%) !important;
  border: 1px solid rgba(255, 215, 0, 0.65) !important;
  text-shadow: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

/* Hover de botones */
body.single-stm-courses .masterstudy-single-course-timeless__topbar button:hover,
body.single-stm-courses .masterstudy-single-course-timeless__topbar .masterstudy-button:hover,
body.single-stm-courses .masterstudy-single-course-timeless__topbar [class*="button"]:hover {
  color: #000000 !important;
  background: linear-gradient(135deg, #FFD700 0%, #D4AF37 52%, #8A6A12 100%) !important;
}

/* ========================================
   OCULTAR CATEGORÍAS · TEMPLATE TIMELESS
======================================== */

body.single-stm-courses:has(.masterstudy-single-course-timeless__topbar)
.masterstudy-single-course-categories__wrapper {
  display: none !important;
}

/* =========================================
   MEGA MENÚ - TEMA AZUL OSCURO PREMIUM 
   (100% ESCRITORIO + FIX ANTI-SALTOS MODERNO)
========================================= */

/* =========================================
   1. VARIABLES GLOBALES
========================================= */
:root {
  --mega-bg: #0b0f24; 
  --mega-card-bg: #12183b; 
  --mega-border: rgba(255, 255, 255, 0.08); 
  --mega-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --mega-card-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  --mega-text-main: #ffffff; 
  --mega-text-sec: #b0b8d1; 
  --mega-text-muted: #7d87a8; 
  --mega-hover-bg: #007bff; 
  --mega-hover-text: #ffffff; 
  --mega-hover-main: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --mega-hover-soft: rgba(37, 99, 235, 0.16);
  --mega-hover-soft-2: rgba(255, 255, 255, 0.08);
  --mega-hover-border: rgba(96, 165, 250, 0.45);
  --mega-glow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

/* =========================================
   2. REGLAS SOLO PARA ESCRITORIO (MÁS DE 992PX)
========================================= */
@media (min-width: 992px) {

  /* Reset básico */
  #menu-cta-menu .dropdown-menu,
  #menu-cta-menu .dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #menu-cta-menu > li.menu-item-has-children {
    position: relative;
  }

  /* --- PANEL PRINCIPAL DEL DROPDOWN (ANIMADO Y CON RETRASO) --- */
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu {
    position: absolute !important;
    top: 100% !important; 
    margin-top: 5px !important; /* Separación natural del menú */
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
    width: 980px;
    max-width: calc(100vw - 40px);
    padding: 22px;
    background: var(--mega-bg) !important; 
    border-radius: 20px;
    border: 1px solid var(--mega-border) !important;
    box-shadow: var(--mega-shadow) !important;
    left: 50% !important;
    z-index: 99999 !important;
    
    /* FIX ANTI-SALTOS: Animación y Periodo de gracia */
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important; /* Evita clics accidentales cuando está oculto */
    transform: translateX(-50%) translateY(15px) !important; /* Animación desde abajo */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
    transition-delay: 0.15s !important; /* El menú espera 150ms antes de desaparecer */
  }

  /* Estado Activo: Aparece inmediatamente */
  #menu-cta-menu > li.menu-item-has-children:hover > .dropdown-menu {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) !important;
    transition-delay: 0s !important; 
    z-index: 999999 !important;
  }

  /* --- NIVEL 1: TARJETAS PRINCIPALES --- */
  #menu-cta-menu > li > .dropdown-menu > li {
    background: var(--mega-card-bg) !important; 
    border: 1px solid var(--mega-border) !important;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--mega-card-shadow) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(6px);
  }

  #menu-cta-menu > li > .dropdown-menu > li:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
  }

  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li > a.dropdown-item,
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li > a.dropdown-item:hover,
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li > a.dropdown-item:focus,
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li:hover > a.dropdown-item,
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li:focus-within > a.dropdown-item {
    display: block;
    padding: 16px 16px 12px 16px;
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    color: var(--mega-text-main) !important; 
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none;
    background: transparent !important;
    border-bottom: 1px solid var(--mega-border) !important;
    white-space: normal;
    transition: background-color 0.2s ease, color 0.2s ease;
    opacity: 1 !important;
    text-shadow: none !important;
    position: relative;
    overflow: hidden;
  }

  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li > a.dropdown-item:hover,
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li:hover > a.dropdown-item {
    background: var(--mega-hover-main) !important;
    border-radius: 12px 12px 0 0 !important; 
    box-shadow: var(--mega-glow) !important;
  }

  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li > a.dropdown-item *,
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li > a.dropdown-item:hover *,
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu > li:hover > a.dropdown-item * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
  }

  #menu-cta-menu > li > .dropdown-menu > li > a.dropdown-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.12), transparent 40%, transparent 60%, rgba(255,255,255,0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
  }

  #menu-cta-menu > li > .dropdown-menu > li > a.dropdown-item:hover::after,
  #menu-cta-menu > li > .dropdown-menu > li > a.dropdown-item:focus::after {
    opacity: 1;
  }

  /* --- NIVEL 2: OPCIONES DENTRO DE LA TARJETA --- */
  #menu-cta-menu > li > .dropdown-menu > li > .dropdown-menu {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 10px 10px 12px 10px;
    transform: none !important;
  }

  #menu-cta-menu > li > .dropdown-menu > li > .dropdown-menu > li {
    margin-bottom: 6px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #menu-cta-menu > li > .dropdown-menu > li > .dropdown-menu > li > a.dropdown-item {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--mega-text-sec) !important; 
    text-decoration: none;
    white-space: normal;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
    background-clip: padding-box !important;
  }

  #menu-cta-menu > li > .dropdown-menu > li > .dropdown-menu > li > a.dropdown-item:hover,
  #menu-cta-menu > li > .dropdown-menu > li > .dropdown-menu > li > a.dropdown-item:focus {
    background: var(--mega-hover-soft) !important;
    color: #ffffff !important;
    border: 1px solid var(--mega-hover-border) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  }

  /* --- NIVEL 3: SUB-OPCIONES FINALES --- */
  #menu-cta-menu > li > .dropdown-menu .dropdown-menu .dropdown-menu {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 4px 0 0 10px;
    transform: none !important;
  }

  #menu-cta-menu > li > .dropdown-menu .dropdown-menu .dropdown-menu a.dropdown-item {
    display: block;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--mega-text-muted) !important; 
    border-left: 2px solid rgba(255, 255, 255, 0.15) !important;
    margin-left: 6px;
    border-radius: 0;
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  #menu-cta-menu > li > .dropdown-menu .dropdown-menu .dropdown-menu a.dropdown-item:hover,
  #menu-cta-menu > li > .dropdown-menu .dropdown-menu .dropdown-menu a.dropdown-item:focus {
    background: var(--mega-hover-soft-2) !important;
    color: #ffffff !important;
    border-left-color: #60a5fa !important;
  }

  /* --- FIX DE VISIBILIDAD DE TEXTOS Y SPANS --- */
  #menu-cta-menu .dropdown-menu .dropdown-menu a.dropdown-item,
  #menu-cta-menu .dropdown-menu .dropdown-menu a.dropdown-item:hover,
  #menu-cta-menu .dropdown-menu .dropdown-menu a.dropdown-item:focus,
  #menu-cta-menu .dropdown-menu .dropdown-menu li:hover > a.dropdown-item,
  #menu-cta-menu .dropdown-menu .dropdown-menu li:focus-within > a.dropdown-item {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    text-indent: 0 !important;
    text-shadow: none !important;
  }

  #menu-cta-menu .dropdown-menu .dropdown-menu a.dropdown-item *,
  #menu-cta-menu .dropdown-menu .dropdown-menu a.dropdown-item:hover *,
  #menu-cta-menu .dropdown-menu .dropdown-menu li:hover > a.dropdown-item * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
  }
}

/* =========================================
   3. AJUSTES ESCRITORIO PEQUEÑO (Laptops)
========================================= */
@media (max-width: 1200px) and (min-width: 992px) {
  #menu-cta-menu > li.menu-item-has-children > .dropdown-menu {
    width: 860px;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
  }
}

/* ========================================
   POWER BI · PÁGINAS NORMALES
======================================== */
iframe[src*="app.powerbi.com"],
iframe[src*="powerbi.com/reportEmbed"],
iframe[src*="powerbi.com/view"]{
  width: 100% !important;
  max-width: 100% !important;
  min-height: 700px !important;
  height: 700px !important;
  border: 0 !important;
  display: block !important;
}

/* ========================================
   POWER BI · MASTERSTUDY
======================================== */
.masterstudy-course-player iframe[src*="app.powerbi.com"],
.masterstudy-course-player iframe[src*="powerbi.com/reportEmbed"],
.masterstudy-course-player iframe[src*="powerbi.com/view"],
body.single-stm-courses iframe[src*="app.powerbi.com"],
body.single-stm-courses iframe[src*="powerbi.com/reportEmbed"],
body.single-stm-courses iframe[src*="powerbi.com/view"]{
  width: 100% !important;
  max-width: 100% !important;
  min-height: 900px !important;
  height: 900px !important;
  max-height: none !important;
  border: 0 !important;
  display: block !important;
}

/* ========================================
   LOOKER / DATA STUDIO · PÁGINAS NORMALES Y WOOCOMMERCE
======================================== */
iframe[src*="lookerstudio.google.com"],
iframe[src*="datastudio.google.com"],
body.single-product iframe[src*="lookerstudio.google.com"],
body.single-product iframe[src*="datastudio.google.com"]{
  width: 100% !important;
  max-width: 100% !important;
  min-height: 3000px !important;
  height: 3000px !important;
  max-height: none !important;
  border: 0 !important;
  display: block !important;
}

/* Contenedores WooCommerce anti-recorte */
body.single-product .woocommerce-Tabs-panel,
body.single-product .woocommerce-tabs,
body.single-product #tab-description,
body.single-product .entry-content,
body.single-product .product,
body.single-product article,
body.single-product main{
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* ======================================== OCULTAR BREADCRUMB / TÍTULO DUPLICADO EN PRODUCTOS ======================================== */ body.single-product #breadcrumb-section, body.single-product .breadcrumb-area{ display: none !important; } /* ======================================== FIX HEADER OVERLAY · PRODUCTOS ======================================== */ body.single-product .site-content, body.single-product main, body.single-product .woocommerce, body.single-product .product{ padding-top: 50px !important; } /* Reubicar etiqueta ¡Oferta! */ body.single-product span.onsale{ top: 60px !important; left: 20px !important; z-index: 5 !important; }

/* ========================================
   GOOGLE CALENDAR APPOINTMENTS · MASTERSTUDY (FIX COMPLETO)
======================================== */

/* Contenedor */
.masterstudy-course-player,
body.single-stm-courses .masterstudy-course-player{
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

/* IFRAME Calendar */
iframe[src*="calendar.google.com"],
iframe[src*="appointments/schedules"],
.masterstudy-course-player iframe{
  width: 100% !important;
  max-width: 100% !important;
  min-height: 1400px !important;
  height: 1400px !important;
  max-height: none !important;
  border: 0 !important;
  display: block !important;
}

/* ========================================
   EFECTO GLOBAL · LUCES DE ESTADIO
======================================== */

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:999999;
  pointer-events:none;

  background:
    linear-gradient(
      115deg,
      transparent 0%,
      transparent 38%,
      rgba(255,255,255,.04) 45%,
      rgba(255,255,255,.10) 50%,
      rgba(255,255,255,.04) 55%,
      transparent 62%,
      transparent 100%
    );

  background-size:220% 100%;
  animation:lucesEstadio 9s ease-in-out infinite;

  mix-blend-mode:screen;
}

@keyframes lucesEstadio{
  0%{
    background-position:200% 0;
    opacity:0;
  }

  20%{
    opacity:.65;
  }

  50%{
    opacity:.85;
  }

  80%{
    opacity:.55;
  }

  100%{
    background-position:-100% 0;
    opacity:0;
  }
}

/* Desactiva el efecto si el usuario reduce animaciones */
@media (prefers-reduced-motion:reduce){
  body::before{
    animation:none;
    display:none;
  }
}

/* Ocultar crédito "Funciona gracias a WordPress" */
footer a[href="https://wordpress.org/"],
.site-footer a[href="https://wordpress.org/"] {
  display: none !important;
}

/* ========================================
   CHECKOUT · FIX CHECKBOX TÉRMINOS WOOCOMMERCE
======================================== */

.woocommerce-checkout .woocommerce-form__label-for-checkbox,
.woocommerce-checkout label.woocommerce-form__label-for-checkbox{
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  line-height: 1.4 !important;
}

.woocommerce-checkout input#terms,
.woocommerce-checkout input[name="terms"],
.woocommerce-checkout .woocommerce-form__input-checkbox{
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;

  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px !important;

  margin: 2px 0 0 0 !important;
  padding: 0 !important;

  appearance: auto !important;
  -webkit-appearance: checkbox !important;

  accent-color: #d4af37 !important;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text{
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Checkout PsycoPyme Premium */
.woocommerce-checkout .entry-title,
.woocommerce-checkout h1 {
  font-size: 34px;
  font-weight: 800;
  color: #111827;
  text-align: center;
  margin-bottom: 12px;
}

.woocommerce-checkout form.checkout {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.10);
  border: 1px solid rgba(127, 29, 29, 0.14);
}

.woocommerce-checkout .col2-set,
.woocommerce-checkout #order_review {
  background: #fafafa;
  border-radius: 20px;
  padding: 22px;
  border: 1px solid #eeeeee;
}

.woocommerce-checkout h3 {
  color: #7f1d1d;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select {
  border-radius: 14px !important;
  border: 1px solid #d1d5db !important;
  padding: 13px 15px !important;
  background: #ffffff !important;
}

.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
  border-color: #991b1b !important;
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.12) !important;
  outline: none !important;
}

.woocommerce-checkout #place_order {
  background: linear-gradient(135deg, #7f1d1d, #991b1b, #111827) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  padding: 16px 28px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.28);
  transition: all 0.25s ease;
}

.woocommerce-checkout #place_order:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(127, 29, 29, 0.34);
}

.woocommerce-checkout-review-order-table {
  border-radius: 18px;
  overflow: hidden;
}

.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message {
  border-top-color: #991b1b;
  background: #fff7ed;
  border-radius: 16px;
}
