/* ==========================================================================
   ESCUELA DE SIG PLUS - ESTILOS PREMIUM
   ========================================================================== */

   :root {
    /* Colores por defecto (Modo Oscuro: Coral & Pizarra) */
    --bg-main: #0c1b1c;
    --bg-panel: #162a2d;
    --primary: #f25c4e;
    --primary-hover: #d64436;
    --primary-light: rgba(242, 92, 78, 0.15);
    --text-main: #ffffff;
    --text-muted: #b5e2e9;
    --border: #254549;
    --logo-accent: #b5e2e9;
    --logo-plus: #f25c4e;
    --bg-hero-overlay-start: rgba(12, 27, 28, 0.95);
    --bg-hero-overlay-mid: rgba(12, 27, 28, 0.4);
    --card-hover-shadow: 0 8px 24px rgba(242, 92, 78, 0.4);
    --bg-hero-card: rgba(22, 42, 45, 0.85);
    --btn-secondary-bg: rgba(255, 255, 255, 0.08);
    --btn-secondary-hover: rgba(255, 255, 255, 0.18);
  
    /* Variables del sistema de diseño */
    --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
  }
  
  /* Reset y base */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }
  
  body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
  }
  
  /* Contenedor principal */
  .portal-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  /* ==========================================================================
     PORTAL HEADER & NAVIGATION
     ========================================================================== */
  
  .portal-header {
    height: 70px;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background-color: var(--bg-panel);
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 40px;
  }
  
  .portal-logo {
    font-family: var(--font-title);
    font-size: 26px;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.5px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .portal-logo-img {
    height: 36px;
    width: auto;
    flex-shrink: 0;
  }
  
  .logo-accent {
    color: var(--logo-accent);
    font-weight: 900;
    transition: color 0.4s ease;
  }

  .logo-plus {
    color: var(--logo-plus);
    font-weight: 900;
    transition: color 0.4s ease;
  }
  
  .portal-nav {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  
  .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
  }
  
  .nav-link:hover,
  .nav-link.active {
    color: var(--text-main);
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  
  /* Theme Toggle Button: Light / Dark */
  .theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  
  .theme-toggle-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  .theme-toggle-btn i {
    width: 18px;
    height: 18px;
  }
  
  /* Avatar de Perfil */
  .user-avatar-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 15px;
    border: 2px solid var(--border);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }

  /* Enlaces de autenticacion en el header */
  .auth-link {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.4;
  }

  .auth-link:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  .auth-link-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
  }

  .auth-link-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
  }

  .user-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .user-nav-link i {
    width: 16px;
    height: 16px;
  }

  .logout-form {
    margin: 0;
  }

  .logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 6px;
    transition: var(--transition);
    white-space: nowrap;
  }

  .logout-btn:hover {
    color: var(--primary);
  }

  .logout-btn i {
    width: 16px;
    height: 16px;
  }
  
  /* ==========================================================================
     HERO FEATURED BANNER
     ========================================================================== */
  
  .hero-banner {
    position: relative;
    height: 75vh;
    min-height: 500px;
    max-height: 700px;
    overflow: hidden;
    margin-top: 70px; /* Push below fixed header */
  }
  
  .hero-slides-container {
    width: 100%;
    height: 100%;
    position: relative;
  }
  
  .hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    display: flex;
    align-items: center;
    padding: 0 4%;
    background-size: cover;
    background-position: center 25%;
    background-repeat: no-repeat;
    z-index: 1;
  }
  
  .hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }
  
  .hero-bg-overlay {
    display: none;
  }
  
  .hero-content {
    position: relative;
    z-index: 4;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 50px;
    background-color: var(--bg-hero-card);
    border: 1px solid var(--border);
    padding: 35px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
  }

  /* Rotator Dots */
  .hero-slider-dots {
    position: absolute;
    bottom: 30px;
    right: 4%;
    display: flex;
    gap: 10px;
    z-index: 10;
  }

  .slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-muted);
    opacity: 0.5;
    cursor: pointer;
    transition: var(--transition);
  }

  .slider-dot:hover {
    opacity: 0.8;
  }

  .slider-dot.active {
    background-color: var(--primary);
    opacity: 1;
    transform: scale(1.2);
  }

  /* Rotator Arrows */
  .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    opacity: 0.6;
    outline: none;
  }

  .slider-arrow:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
  }

  .slider-arrow.prev {
    left: 20px;
  }

  .slider-arrow.next {
    right: 20px;
  }

  .slider-arrow i {
    width: 20px;
    height: 20px;
  }
  
  .hero-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .hero-badge-item {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .hero-badge-item.featured {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
  }
  
  .hero-badge-item i {
    width: 12px;
    height: 12px;
  }
  
  .hero-title {
    font-family: var(--font-title);
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
  }

  .hero-description {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
  
  .hero-action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
  }
  
  .btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: var(--transition);
  }
  
  .btn-hero-primary {
    background-color: var(--primary);
    color: #ffffff;
  }
  
  .btn-hero-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-light);
  }
  
  .btn-hero-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    backdrop-filter: blur(5px);
  }
  
  .btn-hero-secondary:hover {
    background-color: var(--btn-secondary-hover);
    transform: translateY(-2px);
  }
  
  .btn-hero i {
    width: 16px;
    height: 16px;
  }
  
/* ==========================================================================
   CATALOG AREA & COURSE ROWS
   ========================================================================== */

.catalog-area {
  padding: 40px 4% 80px 4%;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 10;
  margin-top: -30px;
}

.category-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.category-title {
  display: none;
}

.course-rows-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Course Row */
.course-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-row-header {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
  padding: 12px 16px;
  border-radius: 12px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border);
  width: fit-content;
  min-width: 0;
}

.course-row-header:hover {
  border-color: var(--primary);
  box-shadow: var(--card-hover-shadow);
}

.course-row-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.course-row-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.course-row-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.course-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-row-meta-item {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  padding: 3px 10px;
  background-color: rgba(128, 128, 128, 0.1);
  border-radius: 20px;
  white-space: nowrap;
}

/* Lesson Squares Grid */
.course-lessons-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 12px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.course-lessons-grid::-webkit-scrollbar {
  display: none;
}

.course-lessons-grid.grabbing {
  cursor: grabbing;
  user-select: none;
}

.lesson-square {
  flex: 0 0 140px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  padding: 20px 12px 14px;
}

.lesson-square:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--primary);
}

.lesson-square-play {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  border-radius: 10px;
  color: #ffffff;
  flex-shrink: 0;
}

.lesson-square-play svg {
  width: 22px;
  height: 22px;
}

.lesson-square-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  margin-top: auto;
}

.lesson-square--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
  filter: grayscale(0.6);
}

.lesson-square--disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}
  
  /* ==========================================================================
     TECNOLOGÍAS ROTATOR SECTION (FULL-WIDTH BANNER)
     ========================================================================== */

  .tech-slider-section {
    width: 100%;
    margin: 40px 0 20px;
    padding: 0;
    position: relative;
    overflow: hidden;
  }

  .tech-slider-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: transparent;
  }

  .tech-slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    width: 100%;
  }

  .tech-slide {
    flex: 0 0 100%;
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .tech-slide img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    display: block;
  }

  .tech-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(12, 27, 28, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(4px);
  }

  .tech-slider-prev {
    left: 20px;
  }

  .tech-slider-next {
    right: 20px;
  }

  .tech-slider-arrow:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
  }

  .tech-slider-arrow i {
    width: 22px;
    height: 22px;
  }

  .tech-slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
  }

  .tech-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
  }

  .tech-slider-dot.active {
    width: 26px;
    border-radius: 10px;
    background-color: var(--primary);
  }

  /* ==========================================================================
     REVIEWS CAROUSEL
     ========================================================================== */

  .reviews-section {
    padding: 60px 4% 80px;
  }

  .reviews-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 36px;
  }

  .reviews-heading {
    font-family: var(--font-title);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    text-align: center;
  }

  .reviews-carousel {
    overflow: hidden;
    position: relative;
  }

  .reviews-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  .review-slide {
    flex: 0 0 100%;
    display: flex;
    gap: 20px;
    min-width: 0;
  }

  .review-card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 22px;
    transition: var(--transition);
  }

  .review-card:hover {
    border-color: var(--primary);
    box-shadow: var(--card-hover-shadow);
  }

  .review-card-stars {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
  }

  .review-card-stars i {
    width: 16px;
    height: 16px;
  }

  .star--filled {
    color: #f59e0b;
    fill: #f59e0b;
  }

  .star--empty {
    color: var(--border);
  }

  .review-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
  }

  .review-card-text::before {
    content: "\201C";
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    line-height: 0;
    vertical-align: -4px;
    margin-right: 2px;
  }

  .review-card-text::after {
    content: "\201D";
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    line-height: 0;
    vertical-align: -2px;
    margin-left: 2px;
  }

    .review-card-course {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0 2px;
    display: block;
  }

  .review-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .review-card-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }

  .review-card-date {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
  }

  .reviews-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }

  .reviews-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--btn-secondary-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
  }

  .reviews-arrow:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: scale(1.05);
  }

  .reviews-arrow i {
    width: 18px;
    height: 18px;
  }

  .reviews-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    flex: 1;
    justify-content: center;
    max-width: 240px;
  }

  .reviews-dots::-webkit-scrollbar {
    display: none;
  }

  .reviews-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    opacity: 0.4;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .reviews-dot:hover {
    opacity: 0.7;
  }

  .reviews-dot.active {
    background-color: var(--primary);
    opacity: 1;
    width: 24px;
    border-radius: 4px;
  }

  @media (max-width: 1024px) {
    .reviews-section {
      padding: 50px 4% 70px;
    }

    .reviews-content {
      gap: 28px;
    }

    .review-card {
      padding: 20px 18px;
    }
  }

  @media (max-width: 768px) {
    .reviews-section {
      padding: 36px 14px 50px;
    }

    .reviews-heading {
      font-size: 20px;
    }

    .reviews-content {
      gap: 20px;
    }

    .review-slide {
      gap: 14px;
    }

    .review-card {
      padding: 16px 14px;
      gap: 10px;
      border-radius: 10px;
    }

    .review-card-stars i {
      width: 14px;
      height: 14px;
    }

    .review-card-text {
      font-size: 13px;
      -webkit-line-clamp: 6;
      line-height: 1.5;
    }

    .review-card-text::before,
    .review-card-text::after {
      font-size: 16px;
    }

    .review-card-footer {
      padding-top: 8px;
    }

    .review-card-author {
      font-size: 12px;
      max-width: 100%;
    }

    .review-card-date {
      font-size: 11px;
    }

    .reviews-nav {
      gap: 10px;
    }

    .reviews-arrow {
      width: 36px;
      height: 36px;
    }

    .reviews-arrow i {
      width: 16px;
      height: 16px;
    }

    .reviews-dots {
      max-width: 160px;
      gap: 5px;
      justify-content: flex-start;
      padding: 2px 0;
    }

    .reviews-dot {
      width: 6px;
      height: 6px;
    }

    .reviews-dot.active {
      width: 18px;
    }
  }

  @media (max-width: 480px) {
    .reviews-section {
      padding: 28px 10px 40px;
    }

    .reviews-heading {
      font-size: 17px;
    }

    .reviews-content {
      gap: 16px;
    }

    .review-slide {
      gap: 0;
    }

    .review-card {
      padding: 14px 12px;
      gap: 8px;
      border-radius: 8px;
    }

    .review-card-text {
      font-size: 12px;
      -webkit-line-clamp: 7;
    }

    .review-card-text::before,
    .review-card-text::after {
      font-size: 14px;
    }

    .review-card-author {
      font-size: 11px;
    }

    .review-card-date {
      font-size: 10px;
    }

    .reviews-nav {
      gap: 8px;
    }

    .reviews-arrow {
      width: 32px;
      height: 32px;
    }

    .reviews-arrow i {
      width: 14px;
      height: 14px;
    }

    .reviews-dots {
      max-width: 120px;
      gap: 4px;
    }

    .reviews-dot {
      width: 5px;
      height: 5px;
    }

    .reviews-dot.active {
      width: 14px;
    }
  }

  /* ==========================================================================
     PORTAL FOOTER
     ========================================================================== */
  
  .portal-footer {
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 40px 4%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: auto;
  }
  
  .footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer-links a {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
  }
  
  .footer-links a:hover {
    color: var(--text-main);
  }
  
  .footer-copyright {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
  }
  
  /* ==========================================================================
     COURSE DETAILS MODAL
     ========================================================================== */
  
  .modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  .modal-container {
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
  }
  
  .modal-overlay.active .modal-container {
    transform: scale(1);
  }
  
  .modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: var(--transition);
  }
  
  .modal-close-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
  }
  
  .modal-close-btn i {
    width: 18px;
    height: 18px;
  }

  /* ==========================================================================
     MODAL DE AUTENTICACION (login / registro)
     ========================================================================== */
  .auth-modal {
    max-width: 460px;
    padding: 36px 34px 32px;
  }

  .auth-modal-title {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 22px;
    text-align: center;
  }

  .auth-modal-form {
    display: block;
  }

  .auth-row {
    display: flex;
    gap: 14px;
  }

  .auth-row .field {
    flex: 1;
  }

  .field {
    margin-bottom: 16px;
  }

  .field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
  }

  .field input {
    width: 100%;
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    transition: var(--transition);
  }

  .field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
  }

  .btn-block {
    width: 100%;
    padding: 13px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
  }

  .btn-block:hover { background: var(--primary-hover); }
  .btn-block:disabled { opacity: 0.6; cursor: not-allowed; }

  .link-btn {
    display: block;
    margin: 14px auto 0;
    background: none;
    border: none;
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
  }

  .auth-msg {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.4;
  }

  .auth-msg.error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: var(--primary);
  }

  .auth-msg.success {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #4ade80;
  }

  .auth-msg.info {
    background: var(--primary-light);
    border: 1px solid rgba(242, 92, 78, 0.35);
    color: var(--text-main);
  }

  .auth-footer-msg {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 14px;
  }

  .auth-footer-msg a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
  }

  .auth-footer-msg a:hover {
    text-decoration: underline;
  }

  .auth-success {
    text-align: center;
    padding: 20px 8px 8px;
  }

  .auth-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
  }

  .auth-success h3 {
    font-family: var(--font-title);
    font-size: 20px;
    margin-bottom: 8px;
  }

  .auth-success p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
  }

  .auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .auth-divider::before,
  .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  .google-btn-container {
    display: flex;
    justify-content: center;
  }

  .turnstile-field {
    margin-top: 4px;
  }

  @media (max-width: 480px) {
    .auth-modal {
      padding: 28px 20px 24px;
    }
    .auth-row {
      flex-direction: column;
      gap: 0;
    }
  }
  
  /* Cabecera del Modal */
  .modal-hero-header {
    position: relative;
    height: 240px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 30px;
  }
  
  .modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-panel) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0.1) 100%);
    z-index: 1;
  }
  
  .modal-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .modal-badge {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
  }
  
  .modal-course-title {
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
  }

  .modal-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
  }
  
  .meta-dot {
    color: var(--border);
  }
  
  /* Cuerpo del Modal */
  .modal-body-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
  }
  
  .modal-description-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .section-heading {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .modal-description-text {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
  }
  
  .modal-action-row {
    margin-top: auto;
    padding-top: 20px;
  }
  
  .btn-modal-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
  }
  
  .btn-modal-start:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-light);
  }
  
  .btn-modal-start i {
    width: 16px;
    height: 16px;
    fill: currentColor;
  }
  
  /* Columna del Programa */
  .modal-syllabus-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .modal-syllabus-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .syllabus-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
  }
  
  .syllabus-item i {
    width: 16px;
    height: 16px;
    color: var(--primary);
  }

  .syllabus-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
  }

  .syllabus-link:hover {
    color: var(--primary);
  }

  .syllabus-link:hover i {
    color: var(--primary);
  }
  
  /* ==========================================================================
     RESPONSIVE DESIGN MEDIA QUERIES
     ========================================================================== */
  
  @media (max-width: 1024px) {
    .hero-title {
      font-size: 38px;
    }
  
    .modal-body-content {
      grid-template-columns: 1fr;
      gap: 30px;
    }
  }
  
  @media (max-width: 768px) {
    .portal-header {
      height: 65px;
      padding: 0 16px;
    }
  
    .portal-nav {
      display: none; /* Ocultar menú largo en móvil */
    }
  
    .header-left {
      gap: 16px;
    }
  
    .portal-logo {
      font-size: 22px;
    }
  
    #course-search {
      width: 140px;
      padding: 6px 12px 6px 30px;
      font-size: 12px;
    }
  
    .search-icon {
      left: 10px;
      width: 15px;
      height: 15px;
    }
  
    #course-search:focus {
      width: 160px;
    }
  
    .hero-banner {
      height: 520px;
      min-height: auto;
      margin-top: 65px; /* Push exactly below header */
      padding: 0;
    }
  
    .hero-slide {
      background-position: center center;
      padding: 20px;
      justify-content: center;
      align-items: center;
    }
  
    .hero-content {
      margin-top: 0;
      padding: 30px;
      max-width: 90%;
      text-align: center;
    }

    .hero-badge-row {
      justify-content: center;
    }
  
    .hero-title {
      font-size: 26px;
    }
  
    .hero-description {
      font-size: 13px;
      line-height: 1.5;
      text-align: center;
    }
  
    .hero-action-buttons {
      justify-content: center;
    }

    .btn-hero {
      padding: 10px 18px;
      font-size: 13px;
    }
  
    .catalog-area {
      padding: 30px 16px 60px 16px;
      margin-top: 0;
      gap: 30px;
    }

    .slider-arrow {
      width: 36px;
      height: 36px;
      opacity: 0.8;
    }

    .slider-arrow.prev {
      left: 8px;
    }

    .slider-arrow.next {
      right: 8px;
    }

    .hero-slider-dots {
      bottom: 20px;
      right: 50%;
      transform: translateX(50%);
    }

    .header-right {
      gap: 10px;
    }

    .auth-link {
      font-size: 13px;
      padding: 7px 12px;
    }

    .user-nav-link span {
      display: none;
    }

    .logout-btn span {
      display: none;
    }

  }
  
  @media (max-width: 480px) {
    .portal-header {
      height: 60px;
    }

    .header-left {
      gap: 10px;
    }
  
    .portal-logo {
      font-size: 18px;
    }

  
    #course-search {
      width: 110px;
      font-size: 11px;
      padding: 6px 10px 6px 26px;
    }

    .search-icon {
      left: 8px;
      width: 12px;
      height: 12px;
    }
  
    #course-search:focus {
      width: 125px;
    }

    .auth-link-primary {
      padding: 7px 10px;
      font-size: 12px;
    }

    .auth-link {
      font-size: 12px;
      padding: 7px 10px;
    }
  
    .hero-banner {
      height: 440px;
      min-height: auto;
      margin-top: 60px; /* Push exactly below header */
      padding: 0;
    }
  
    .hero-slide {
      padding: 16px;
      justify-content: center;
      align-items: center;
    }

    .hero-content {
      padding: 20px 16px;
      margin-top: 0;
      gap: 10px;
      max-width: 100%;
      text-align: center;
    }

    .hero-title {
      font-size: 19px;
      text-align: center;
    }
  
    .hero-description {
      font-size: 12px;
      line-height: 1.4;
      text-align: center;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
  
    .hero-action-buttons {
      flex-direction: column;
      align-items: stretch;
      width: 100%;
      gap: 8px;
    }
  
    .btn-hero {
      width: 100%;
      justify-content: center;
      padding: 10px 14px;
      font-size: 12px;
    }

    .hero-slider-dots {
      bottom: 12px;
      right: 50%;
      transform: translateX(50%);
    }
  
    .modal-container {
      width: 95%;
      max-height: 95vh;
    }

    .modal-hero-header {
      padding: 20px 16px;
      height: 160px;
    }
  
    .modal-course-title {
      font-size: 20px;
    }
  
    .modal-body-content {
      padding: 20px 16px;
      gap: 20px;
    }

    .syllabus-item {
      padding: 8px 12px;
      font-size: 12px;
    }

    .lesson-square {
      flex: 0 0 110px;
      padding: 16px 10px 10px;
    }

    .lesson-square-play {
      width: 36px;
      height: 36px;
    }

    .lesson-square-play svg {
      width: 18px;
      height: 18px;
    }

    .lesson-square-title {
      font-size: 11px;
    }

    .course-row-header {
      width: 100%;
    }

    .course-row-thumb {
      width: 48px;
      height: 48px;
    }

    .course-row-title {
      font-size: 15px;
    }

    .course-row-meta-item {
      font-size: 11px;
      padding: 2px 8px;
    }

    .footer-links {
      gap: 14px;
    }
  }

  /* ==========================================================================
     MODALES INFORMATIVOS (¿Por qué Cambalache?, Membresía, FAQ, Contacto)
     ========================================================================== */
  .info-modal {
    max-width: 640px;
    width: calc(100% - 32px);
    padding: 32px 36px 28px;
  }

  .info-modal-body {
    color: var(--text-main);
  }

  .info-modal-title {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-main);
  }

  .info-modal-lead {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 12px;
  }

  .info-modal-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
  }

  .info-modal-list li {
    position: relative;
    padding: 10px 0 10px 26px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
  }

  .info-modal-list li:last-child {
    border-bottom: none;
  }

  .info-modal-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
  }

  .info-modal-action {
    margin-top: 22px;
  }

  .info-modal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
  }

  .info-modal-cta.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
  }

  .info-modal-cta.btn-outline:hover {
    background: var(--primary-light);
  }

  /* FAQ */
  .faq-modal { max-width: 720px; }

  .faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
  }

  .faq-item[open] {
    border-color: var(--primary);
    background: var(--primary-light);
  }

  .faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .faq-item summary::-webkit-details-marker { display: none; }

  .faq-item summary::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }

  .faq-item[open] summary::after {
    transform: rotate(-135deg);
  }

  .faq-item p {
    padding: 0 18px 16px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
  }

  /* Contacto */
  .contacto-modal { max-width: 560px; }

  .contacto-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
  }

  .contacto-link:hover {
    border-bottom-color: var(--primary);
  }

  .contacto-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
  }

  @media (max-width: 480px) {
    .info-modal {
      padding: 24px 20px 22px;
    }
    .info-modal-title { font-size: 21px; }
    .faq-item summary { font-size: 14px; padding: 12px 14px; }
    .faq-item p { padding: 0 14px 14px; }
  }

  /* ==========================================================================
     MODAL EMPEZAR MI MEMBRESIA (hero + copy + form)
     ========================================================================== */
  .empezar-membresia-container {
    max-width: 680px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
  }

  .empezar-membresia-container .modal-close-btn {
    z-index: 3;
  }

  .empezar-hero {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
  }

  .empezar-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-panel) 0%, rgba(12, 27, 28, 0.4) 60%, rgba(12, 27, 28, 0.1) 100%);
    z-index: 1;
  }

  .empezar-hero-content {
    position: relative;
    z-index: 2;
    padding: 76px 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .empezar-hero-title {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
  }

  .empezar-hero-sub {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  .empezar-body {
    padding: 20px 32px 28px;
    overflow-y: auto;
    flex: 1;
  }

  .empezar-section-title {
    font-family: var(--font-title);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    margin-top: 18px;
  }

  .empezar-section-title:first-child { margin-top: 0; }

  .empezar-p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 14px;
  }

  .empezar-highlight {
    background: var(--primary-light);
    border: 1px dashed var(--primary);
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .empezar-highlight-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
  }

  .empezar-highlight-value {
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
  }

  .empezar-features {
    list-style: none;
    padding: 0;
    margin: 12px 0;
  }

  .empezar-features li {
    position: relative;
    padding: 8px 0 8px 22px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
  }

  .empezar-features li:last-child { border-bottom: none; }

  .empezar-features li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 16px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
  }

  .empezar-features li strong {
    color: var(--text-main);
  }

  .empezar-divider {
    height: 1px;
    background: var(--border);
    margin: 22px 0 18px;
  }

  .empezar-form-section .auth-success {
    padding: 14px 0 0;
  }

  @media (max-width: 600px) {
    .empezar-membresia-container {
      max-width: 100%;
      width: 100%;
      max-height: 100vh;
      border-radius: 0;
    }

    .empezar-hero { height: 180px; }

    .empezar-hero-content {
      padding: 56px 20px 18px;
    }

    .empezar-hero-title { font-size: 18px; }

    .empezar-hero-sub { font-size: 13px; }

    .empezar-body {
      padding: 16px 20px 22px;
    }

    .empezar-highlight-value { font-size: 24px; }
  }
