@charset "UTF-8";
/* ===== Paleta Med Club (extraída del logo) ===== */
:root {
  --mc-red: #b8402a;
  --mc-red-dark: #8f2f1f;
  --mc-purple: #4a1942;
  --mc-purple-light: #6b2a63;
  --mc-blue: #a9c8dc;
  --mc-cream: #fbf7f2;
  --mc-white: #ffffff;
  --mc-text: #2b1330;
  --mc-text-muted: #6b5a68;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(74, 25, 66, 0.12);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { box-sizing: border-box; }

/* Red de seguridad: cualquier elemento con el atributo "hidden" debe ocultarse
   siempre, aunque alguna clase (como .btn) le fuerce un display propio. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--mc-text);
  background: var(--mc-cream);
  line-height: 1.55;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4, h5 {
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--mc-purple);
}
p { margin: 0 0 16px; color: var(--mc-text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mc-red);
  margin-bottom: 8px;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--mc-red); color: var(--mc-white); }
.btn-primary:hover { background: var(--mc-red-dark); }
.btn-ghost { background: transparent; color: var(--mc-purple); }
.btn-outline { background: transparent; color: var(--mc-purple); border: 2px solid var(--mc-purple); }
.btn-aula { background: var(--mc-purple); color: var(--mc-white); }
.btn-aula:hover { background: var(--mc-purple-light); }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--mc-red);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
.auth-form .link-btn {
  display: block;
  margin: 14px auto 0;
  text-align: center;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(74, 25, 66, 0.07), rgba(169, 200, 220, 0.07)), var(--mc-white);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(74, 25, 66, 0.08);
  z-index: 100;
}
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.site-header::before {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--mc-red) 0%, transparent 70%);
  top: -400px;
  left: 10%;
}
.site-header::after {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--mc-blue) 0%, transparent 70%);
  top: -400px;
  right: 10%;
}
.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { height: 52px; width: auto; display: block; }
.hero-logo-img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(74, 25, 66, 0.18)); }
.footer-logo-img { height: 60px; width: auto; display: block; }

.main-nav { display: flex; gap: 28px; }
.main-nav a { color: var(--mc-text); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover { color: var(--mc-red); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--mc-purple); }

.header-user { position: relative; }
.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--mc-red);
  color: var(--mc-white);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-avatar:hover { background: var(--mc-red-dark); }
.header-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
}
.header-user-dropdown[hidden] { display: none; }
.header-user-email { font-size: 13px; color: var(--mc-text); word-break: break-all; }
.header-user-link { color: var(--mc-red); font-weight: 600; font-size: 14px; text-decoration: none; }
.header-user-link:hover { text-decoration: underline; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 84px 0 96px;
  background: var(--mc-white);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -160px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 25, 66, 0.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-copy { max-width: 600px; }
.hero h1 { font-size: clamp(32px, 2.4vw + 24px, 52px); line-height: 1.08; margin-top: 18px; color: var(--mc-purple); font-weight: 800; }
.hero-highlight { background: linear-gradient(100deg, var(--mc-red), #e0654a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-buttons { display: flex; align-items: center; gap: 22px; margin-top: 8px; flex-wrap: wrap; }
.hero-microcopy { margin-top: 18px; font-size: 14px; }

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--mc-white);
  border: 1px solid rgba(43, 19, 48, 0.1);
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mc-text);
  box-shadow: 0 2px 10px rgba(43, 19, 48, 0.06);
}
.eyebrow-badge-tag {
  background: var(--mc-red);
  color: var(--mc-white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 5px 12px;
  border-radius: 999px;
}

.btn-link-arrow {
  background: none;
  border: none;
  padding: 0;
  color: var(--mc-text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s ease, color 0.15s ease;
}
.btn-link-arrow:hover { gap: 10px; color: var(--mc-red); }

.hero-features {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(74, 25, 66, 0.1);
}
.hero-feature {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mc-text);
}
.hero-feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(74, 25, 66, 0.08);
  color: var(--mc-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-feature-icon svg { width: 15px; height: 15px; }

.hero-visual {
  position: relative;
  flex-shrink: 0;
  width: 480px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.35;
}
.blob-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--mc-red) 0%, transparent 70%);
  top: -20px;
  right: -20px;
}
.blob-2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--mc-blue) 0%, transparent 70%);
  bottom: -30px;
  left: -30px;
  opacity: 0.5;
}
.hero-visual .hero-logo-img { position: relative; z-index: 1; }

.hero-callout {
  position: absolute;
  z-index: 2;
  top: 6%;
  left: -4%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 240px;
  background: var(--mc-white);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.hero-callout-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mc-purple);
  color: #fff;
}
.hero-callout-icon svg { width: 17px; height: 17px; }
.hero-callout strong { display: block; color: var(--mc-purple); font-size: 15px; margin-bottom: 6px; }
.hero-callout p { margin: 0; font-size: 12px; line-height: 1.4; color: var(--mc-text-muted); }

@media (max-width: 480px) {
  .hero-callout { left: 0; max-width: 200px; padding: 12px 14px; }
}

/* ===== Modal tutorial ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 19, 48, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  position: relative;
  background: var(--mc-white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--mc-text-muted);
}
.modal-video-placeholder {
  background: var(--mc-cream);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
}
.modal-video-placeholder span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(74, 25, 66, 0.08);
  color: var(--mc-purple);
}
.modal-video-placeholder span svg { width: 26px; height: 26px; }
.modal-video-placeholder p { margin: 0; }

/* ===== Auth section ===== */
.auth-section { position: relative; padding: 60px 0; background: var(--mc-purple); }
.auth-section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--mc-cream);
  clip-path: ellipse(60% 100% at 50% 0%);
}
.auth-inner { max-width: 460px; }
.auth-tabs:not([hidden]) { display: flex; margin-bottom: 24px; border-radius: 999px; background: rgba(255,255,255,0.1); padding: 4px; }
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--mc-white);
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
}
.auth-tab.active { background: var(--mc-red); }

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: var(--mc-white);
  color: var(--mc-text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 18px;
}
.btn-google:hover { background: #f2f2f2; }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: rgba(255, 255, 255, 0.6); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.25); }

.auth-form { background: var(--mc-white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.auth-form h2 { margin-bottom: 4px; }
.auth-note { font-size: 13px; font-style: italic; }
.form-error:not([hidden]) {
  display: block;
  background: rgba(184, 64, 42, 0.1);
  color: var(--mc-red-dark);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.auth-form label { display: block; font-size: 14px; font-weight: 600; color: var(--mc-text); margin-bottom: 14px; }
.auth-form input:not([hidden]), .auth-form select,
.voucher-fields input:not([hidden]), .voucher-fields select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

/* ===== Comprobante de pago ===== */
.voucher-form { background: var(--mc-white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.voucher-form h2 { margin-bottom: 4px; }
.voucher-form .selected-course:not([hidden]) { display: flex; }
.voucher-fields label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--mc-text);
  margin-bottom: 14px;
}

.payment-recap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--mc-cream);
  border: 1px solid rgba(74, 25, 66, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
}
.payment-recap strong { color: var(--mc-purple); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.payment-recap em { color: var(--mc-text-muted); font-style: italic; }

.file-field { margin-bottom: 18px; }
.file-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 14px;
  border: 2px dashed var(--mc-blue);
  border-radius: 10px;
  background: var(--mc-cream);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--mc-text-muted);
}
.file-drop:hover { border-color: var(--mc-red); }
.file-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(74, 25, 66, 0.08);
  color: var(--mc-purple);
  flex-shrink: 0;
}
.file-drop-icon svg { width: 15px; height: 15px; }

/* ===== Cursos ===== */
.courses-section { position: relative; padding: 90px 0; background: linear-gradient(180deg, var(--mc-white) 0%, var(--mc-cream) 100%); overflow: hidden; }
.courses-section::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 64, 42, 0.08) 0%, rgba(184, 64, 42, 0) 70%);
  pointer-events: none;
}
.courses-section::after {
  content: "";
  position: absolute;
  bottom: -120px;
  left: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 25, 66, 0.06) 0%, rgba(74, 25, 66, 0) 70%);
  pointer-events: none;
}
.courses-section-header { position: relative; z-index: 1; max-width: 620px; }
.courses-section-header h2 { font-size: 34px; }
.section-intro { max-width: 560px; }
.cycle-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 32px 0 40px;
  width: fit-content;
  background: var(--mc-white);
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(74, 25, 66, 0.1);
}
.cycle-tab {
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--mc-purple);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.cycle-tab:hover { background: rgba(74, 25, 66, 0.07); }
.cycle-tab.active { background: var(--mc-purple); color: var(--mc-white); box-shadow: 0 8px 20px rgba(74, 25, 66, 0.28); transform: translateY(-1px); }

.cycle-panel-wrap { position: relative; }
.cycle-panel { display: none; }
.cycle-panel.active { display: block; animation: mc-fade-in 0.35s ease; }
@keyframes mc-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); justify-content: start; gap: 22px; align-items: stretch; }
.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--mc-white);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(74, 25, 66, 0.08);
  border: 1px solid rgba(74, 25, 66, 0.06);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.course-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--mc-red), var(--mc-blue));
  z-index: 1;
}
.course-card-media {
  margin: -24px -24px 16px -24px;
  height: 160px;
  overflow: hidden;
}
.course-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* :hover reemplazado por .is-hovering + tilt (ver bloque EFECTOS al final del archivo) */
.course-card h3 { font-size: 18px; margin-top: 6px; display: flex; align-items: center; gap: 10px; }
.course-card h3::before {
  content: "";
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background-color: rgba(74, 25, 66, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a1942' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 5.2c2.4-1 5.6-1 7.8.6a1 1 0 0 0 1.4 0c2.2-1.6 5.4-1.6 7.8-.6v13c-2.4-1-5.6-1-7.8.6a1 1 0 0 1-1.4 0c-2.2-1.6-5.4-1.6-7.8-.6v-13Z'/%3E%3Cpath d='M12 6.4V19'/%3E%3Cpath d='M4.6 9.6h1.5l.9-1.6 1.3 3.1 1-1.5h1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}
.course-card p { font-size: 14px; margin: 0; }
.combo-note { font-size: 13px; font-style: italic; color: var(--mc-text-muted); margin-bottom: 10px; }

.topic-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  flex-grow: 1;
}
.topic-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  font-size: 14px;
  color: var(--mc-text-muted);
}
.topic-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(184, 64, 42, 0.12);
  color: var(--mc-red);
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(74, 25, 66, 0.1);
}
.course-footer .price {
  font-size: 12px;
  font-weight: 700;
  color: var(--mc-purple);
  background: rgba(74, 25, 66, 0.07);
  padding: 6px 12px;
  border-radius: 999px;
}
.course-footer .price.price-free { color: #157a58; background: rgba(29, 158, 117, 0.14); }

.course-media {
  position: relative;
  height: 150px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.14), transparent 55%), linear-gradient(135deg, var(--mc-purple) 0%, var(--mc-purple-light) 48%, var(--mc-red) 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -30px 34px -22px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease;
  overflow: hidden;
}
.course-media::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 8v20M8 18h20' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 36px 36px;
}
.course-card:hover .course-media { transform: scale(1.03); }
.course-media-fallback {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 14px 26px rgba(0, 0, 0, 0.22);
}
.course-media-fallback svg { width: 30px; height: 30px; }
.course-media-play {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: var(--mc-purple);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-media-play:hover { background: var(--mc-white); }
.btn-sm { padding: 8px 16px; font-size: 13px; transition: transform 0.15s ease; }
.btn-sm:hover { transform: translateY(-1px); }

/* ===== Curso con unidades (Medicina I/II, Gineco-Obste) ===== */
.course-card-wide { grid-column: 1 / -1; max-width: none; }
.unit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  background: var(--mc-cream);
  padding: 6px;
  border-radius: 999px;
  width: fit-content;
}
.unit-tab {
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--mc-purple);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transform: scale(1);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.unit-tab:hover { background: rgba(74, 25, 66, 0.08); }
.unit-tab.active {
  background: var(--mc-blue);
  color: var(--mc-purple);
  box-shadow: 0 4px 10px rgba(45, 91, 140, 0.3);
  animation: mc-unit-tab-pop 0.28s ease;
}
@keyframes mc-unit-tab-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1.06); }
}
.unit-tab.active { transform: scale(1.06); }

.unit-panel { display: none; }
.unit-panel.active { display: block; animation: mc-fade-in 0.25s ease; }

.topic-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.topic-group h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--mc-red);
}
.topic-group .topic-list { margin-bottom: 0; }
.topic-group .topic-list li { font-size: 13px; margin-bottom: 6px; }

.unit-subheading {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--mc-purple);
  border-bottom: 2px solid var(--mc-blue);
  padding-bottom: 6px;
}

.selected-course:not([hidden]) {
  display: flex;
  flex-direction: column;
  background: rgba(184, 64, 42, 0.08);
  border: 1px solid rgba(184, 64, 42, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.selected-course span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mc-red); font-weight: 700; }
.selected-course strong { color: var(--mc-purple); font-size: 15px; }
.selected-course-note { margin: 8px 0 0; font-size: 13px; color: var(--mc-text-muted); }

.auth-success { background: var(--mc-white); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); text-align: center; }
.auth-success p { margin-bottom: 20px; }

/* ===== Pagos ===== */
.payments-section { padding: 72px 0; background: var(--mc-white); }
.payment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; }
.payment-card {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius);
  background: var(--mc-cream);
  border: 1px solid rgba(74, 25, 66, 0.08);
  box-shadow: 0 4px 18px rgba(74, 25, 66, 0.06);
  transition: transform 0.25s var(--ease-soft, ease), box-shadow 0.25s ease;
}
.payment-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(74, 25, 66, 0.14); }
.payment-icon { font-size: 34px; margin-bottom: 10px; }
.payment-logo { width: 140px; height: 48px; margin-bottom: 12px; }
.payment-card h3 { font-size: 16px; }
.payment-card p { font-size: 13px; }

.payment-card { text-align: left; }
.payment-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.payment-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}
.payment-card-icon svg { width: 21px; height: 21px; }
.payment-icon-yape { background: linear-gradient(135deg, #8a3fc0, #6D2E9E); }
.payment-icon-plin { background: linear-gradient(135deg, #00c2b2, #00998D); }
.payment-icon-transfer { background: linear-gradient(135deg, var(--mc-purple-light), var(--mc-purple)); }
.payment-card-head h3 { margin: 0; }
.payment-card-yape .payment-card-head { color: #6D2E9E; }
.payment-card-plin .payment-card-head { color: #00998D; }
.payment-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(74, 25, 66, 0.08);
  font-size: 14px;
}
.payment-detail-row:first-of-type { border-top: none; }
.payment-detail-row span { color: var(--mc-text-light, #6b6b6b); }
.payment-detail-row strong { color: var(--mc-purple); text-align: right; }
.payment-note { margin-top: 24px; font-size: 13px; font-style: italic; }
.badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mc-red);
  background: rgba(184, 64, 42, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ===== Nosotros ===== */
.about-section { padding: 84px 0; background: var(--mc-cream); }
.about-inner { display: flex; gap: 56px; align-items: flex-start; max-width: none; }
.about-text { flex: 1 1 420px; max-width: 520px; }
.about-pillars { flex: 1 1 380px; display: flex; flex-direction: column; gap: 18px; }
.about-pillar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--mc-white);
  padding: 20px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease-soft, ease), box-shadow 0.25s ease;
}
.about-pillar:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(74, 25, 66, 0.14); }
.about-pillar-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(74, 25, 66, 0.08);
  color: var(--mc-purple);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-pillar-icon svg { width: 20px; height: 20px; }
.about-pillar strong { display: block; color: var(--mc-purple); font-size: 15px; margin-bottom: 4px; }
.about-pillar p { margin: 0; font-size: 13px; line-height: 1.5; }

@media (max-width: 800px) {
  .about-inner { flex-direction: column; }
  .about-text { max-width: none; }
}

/* ===== Panel de administrador ===== */
/* ===== Panel de administrador: shell tipo dashboard, distinto del sitio público ===== */
body.admin-mode .site-header,
body.admin-mode .hero,
body.admin-mode #cursos,
body.admin-mode #pagos,
body.admin-mode #nosotros,
body.admin-mode #registro,
body.admin-mode #mis-clases,
body.admin-mode #docente,
body.admin-mode .site-footer,
body.student-mode .site-header,
body.student-mode .hero,
body.student-mode #cursos,
body.student-mode #pagos,
body.student-mode #nosotros,
body.student-mode #registro,
body.student-mode #docente,
body.student-mode .site-footer,
body.docente-mode .site-header,
body.docente-mode .hero,
body.docente-mode #cursos,
body.docente-mode #pagos,
body.docente-mode #nosotros,
body.docente-mode #registro,
body.docente-mode #mis-clases,
body.docente-mode #admin,
body.docente-mode .site-footer {
  display: none !important;
}

/* Comprar un curso adicional desde el dashboard del alumno, sin salir de él */
body.student-mode.showing-payment #registro {
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: 700;
  overflow-y: auto;
  padding: 40px 0;
}
.payment-overlay-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.payment-overlay-close[hidden] { display: none; }
.payment-overlay-close:hover { background: rgba(255, 255, 255, 0.2); }

/* Overlay de carga inicial: evita el parpadeo del sitio público antes de saber si hay sesión */
#appLoadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mc-cream, #fff);
}
.ekg-wrap { position: relative; width: min(560px, 88vw); height: 130px; display: flex; align-items: center; justify-content: center; }
.ekg-line { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; z-index: 1; }
.ekg-line polyline {
  fill: none;
  stroke: var(--mc-red);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ekg-draw 2.6s linear infinite;
  filter: drop-shadow(0 0 5px rgba(184, 64, 42, 0.35));
}
/* Un solo tramo lineal de 0 a -1400: velocidad constante, sin el salto que
   producía el punto intermedio anterior (55%) -- de ahí el efecto "no fluido". */
@keyframes ekg-draw {
  from { stroke-dashoffset: 1400; }
  to { stroke-dashoffset: -1400; }
}
/* Disco sólido del color de fondo: el latido "desaparece" detrás de él en vez
   de verse cruzando por encima del logo. */
.ekg-logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 50%;
  background: radial-gradient(circle, var(--mc-cream) 0%, var(--mc-cream) 60%, rgba(251, 247, 242, 0) 78%);
  box-shadow: 0 0 0 6px rgba(184, 64, 42, 0.08), 0 10px 28px rgba(74, 25, 66, 0.16);
  animation: ekg-pulse 1.3s ease-in-out infinite;
  z-index: 2;
}
.ekg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 80px;
  transform: translate(-50%, -50%) scale(1);
  animation: ekg-pulse 1.3s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(74, 25, 66, 0.25));
  z-index: 3;
}
@keyframes ekg-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.06); }
}
body.app-ready #appLoadingOverlay { display: none; }

.admin-section { background: var(--mc-cream); }
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }

.admin-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--mc-purple);
  color: var(--mc-white);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.25); border-radius: 3px; }
.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading, inherit);
  font-weight: 800;
  color: var(--mc-white);
  margin-bottom: 36px;
}
.admin-sidebar-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.admin-sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.admin-sidebar-link {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.admin-sidebar-footer .btn-outline { color: var(--mc-white); border-color: rgba(255, 255, 255, 0.5); }
.student-sidebar-name { color: rgba(255, 255, 255, 0.85); font-size: 14px; margin-bottom: 24px; word-break: break-word; }

.admin-main { flex: 1; padding: 36px 44px; min-width: 0; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(74, 25, 66, 0.12);
}
.admin-topbar { border-bottom: 1px solid rgba(74, 25, 66, 0.1); }
.admin-topbar h1 { margin: 0; font-size: 24px; color: var(--mc-purple); }
.admin-topbar-email { font-size: 13px; color: var(--mc-text-muted); }

.admin-toolbar { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.admin-status-msg { font-size: 13px; color: var(--mc-purple); }

.admin-subheading { color: var(--mc-purple); font-size: 15px; margin: 28px 0 12px; }
.admin-subheading:first-of-type { margin-top: 0; }

.video-source-toggle { display: flex; gap: 16px; align-items: center; font-size: 13px; font-weight: 600; }
.video-source-option { flex-direction: row !important; align-items: center; gap: 6px !important; }

.admin-table-wrap {
  overflow-x: auto;
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(74, 25, 66, 0.08);
  vertical-align: middle;
}
.admin-table th { color: var(--mc-purple); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-empty { text-align: center; color: var(--mc-text-muted); padding: 24px; }

.admin-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.admin-badge-pendiente { background: rgba(184, 64, 42, 0.12); color: var(--mc-red-dark); }
.admin-badge-aprobado { background: rgba(29, 158, 117, 0.15); color: #157a58; }
.admin-badge-rechazado { background: rgba(107, 90, 104, 0.15); color: var(--mc-text-muted); }
.admin-badge-admin { background: rgba(74, 25, 66, 0.12); color: var(--mc-purple); }
.admin-badge-docente { background: rgba(169, 200, 220, 0.35); color: #2a5a76; }

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-inline-input { width: 100%; min-width: 180px; padding: 7px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 12px; }

/* ===== Panel unificado de Cursos (curso + temas + videos) ===== */
/* Tarjeta de "Crear curso": más grande y distinta de las tarjetas de gestión, para que se note que es la acción principal */
.curso-create-card {
  background: linear-gradient(160deg, var(--mc-purple) 0%, var(--mc-purple-light) 100%);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 16px 34px rgba(74, 25, 66, 0.22);
}
.curso-create-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.curso-create-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.curso-create-icon svg { width: 28px; height: 28px; }
.curso-create-head h3 { margin: 0 0 4px; color: var(--mc-white); font-size: 19px; }
.curso-create-head p { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 13px; max-width: 560px; }
.curso-create-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  align-items: end;
  background: var(--mc-white);
  border-radius: 14px;
  padding: 22px;
}
.curso-create-field { display: flex; flex-direction: column; gap: 6px; }
.curso-create-field-wide { grid-column: 1 / -1; }
.curso-create-label { font-size: 12px; font-weight: 700; color: var(--mc-purple); }
.curso-create-form input {
  padding: 10px 12px;
  border: 1px solid #e2dde1;
  border-radius: 10px;
  font-size: 13px;
  background: var(--mc-cream);
}
.curso-create-form input:focus { outline: none; border-color: var(--mc-red); background: var(--mc-white); }
.curso-create-submit { grid-column: 1 / -1; padding: 13px; font-size: 14px; }
.curso-create-form .form-error { grid-column: 1 / -1; margin: 0; }

.cursos-manage-wrap { display: flex; flex-direction: column; gap: 18px; }
.curso-manage-card {
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}
.curso-manage-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--mc-red), var(--mc-purple));
}
.curso-manage-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.curso-manage-header h3 { margin: 0; color: var(--mc-purple); font-size: 17px; display: flex; align-items: center; gap: 10px; }
.curso-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(74, 25, 66, 0.08);
  color: var(--mc-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.curso-icon svg { width: 18px; height: 18px; }
.curso-manage-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mc-purple);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}
.curso-manage-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
  background: var(--mc-cream);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}
.curso-manage-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: var(--mc-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.curso-manage-fields button { height: 34px; }

.curso-manage-details { border-top: 1px solid rgba(74, 25, 66, 0.08); padding-top: 14px; }
.curso-manage-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--mc-purple);
  font-size: 13px;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mc-cream);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.curso-manage-details summary:hover { background: rgba(74, 25, 66, 0.1); }
.curso-manage-details summary::-webkit-details-marker { display: none; }
.curso-manage-details summary::before { content: "▸"; font-size: 10px; }
.curso-manage-details[open] summary::before { content: "▾"; }
.curso-manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.curso-manage-col h4 { margin: 0 0 10px; font-size: 13px; color: var(--mc-purple); }
.curso-sub-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--mc-cream);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}
.curso-sub-form input[type="text"],
.curso-sub-form input[type="url"],
.curso-sub-form select { flex: 1; min-width: 120px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 12px; }
.curso-sub-form input[type="number"] { width: 60px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 12px; }
.curso-sub-form-video { flex-direction: column; align-items: stretch; }
.curso-sub-form-video input,
.curso-sub-form-video select { width: 100%; }
.curso-sub-form .video-source-toggle { display: flex; gap: 12px; font-size: 12px; }
.curso-sub-form label[data-video-url-field],
.curso-sub-form label[data-video-file-field] { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--mc-text-muted); }
.curso-manage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.curso-manage-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--mc-cream);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.curso-manage-list li:hover { border-left-color: var(--mc-red); background: rgba(74, 25, 66, 0.05); }
.curso-manage-list li small { color: var(--mc-text-muted); }
.curso-manage-list li .link-btn { flex-shrink: 0; font-size: 12px; }

@media (max-width: 720px) {
  .curso-manage-grid { grid-template-columns: 1fr; }
}

/* ===== Campus Docente ===== */
.docente-campus-wrap { display: flex; flex-direction: column; gap: 24px; }
.docente-empty-state {
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  border-left: 4px solid var(--mc-red);
}
.docente-empty-state p { margin: 0 0 8px; color: var(--mc-text); font-size: 14px; }
.docente-empty-state p:last-child { margin-bottom: 0; }
.docente-empty-state strong { color: var(--mc-purple); }
.docente-curso-card {
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.docente-curso-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--mc-purple), var(--mc-purple-light));
  color: var(--mc-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.docente-curso-header h3 { margin: 0; font-size: 18px; color: var(--mc-white); display: flex; align-items: center; gap: 10px; }
.docente-curso-header .curso-icon { background: rgba(255, 255, 255, 0.18); color: var(--mc-white); }
.docente-duracion-field { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.14); padding: 6px 14px; border-radius: 999px; font-size: 13px; }
.docente-duracion-field input { width: 56px; border: none; border-radius: 6px; padding: 4px 6px; font-size: 13px; text-align: center; }
.docente-duracion-field button { border: none; background: var(--mc-red); color: var(--mc-white); border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 700; cursor: pointer; }
.docente-duracion-field button:hover { background: var(--mc-red-dark); }
.docente-curso-body { padding: 24px; }

.docente-upload-form {
  background: var(--mc-cream);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.docente-upload-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: var(--mc-text-muted); text-transform: uppercase; letter-spacing: 0.03em; flex: 1; min-width: 160px; }
.docente-upload-form input, .docente-upload-form select { padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; }
.docente-upload-form .form-error { flex-basis: 100%; margin: 0; }

.docente-clases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.docente-clase-card {
  background: var(--mc-cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(74, 25, 66, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.docente-clase-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(74, 25, 66, 0.15); }
.docente-clase-thumb {
  position: relative;
  padding-top: 56%;
  background: linear-gradient(135deg, var(--mc-red), var(--mc-purple));
}
.docente-clase-thumb span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: rgba(255, 255, 255, 0.9); }
.docente-clase-thumb iframe,
.docente-clase-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.docente-clase-info { padding: 12px 14px 4px; }
.docente-clase-info h5 { margin: 0 0 4px; font-size: 13px; color: var(--mc-purple); }
.docente-clase-info small { color: var(--mc-text-muted); }
.docente-clase-actions { display: flex; justify-content: flex-end; padding: 0 14px 12px; }
.docente-empty { color: var(--mc-text-muted); font-size: 13px; }
.docente-section-title { color: var(--mc-purple); font-size: 15px; margin: 20px 0 12px; }
.docente-curso-body .curso-manage-details { margin-bottom: 20px; }
.curso-sub-form-material { flex-direction: column; align-items: stretch; }
.curso-sub-form-material input[type="file"] { padding: 6px; }

/* ===== Comentarios (preguntas y respuestas) por clase ===== */
.comentarios-box { padding: 0 16px 14px; }
.comentarios-toggle {
  background: none;
  border: none;
  color: var(--mc-purple);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.comentarios-toggle:hover { text-decoration: underline; }
.comentarios-panel { margin-top: 8px; background: var(--mc-cream); border-radius: 10px; padding: 12px; }
.comentarios-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; max-height: 240px; overflow-y: auto; }
.comentario-item { background: var(--mc-white); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.comentario-item.comentario-staff { border-left: 3px solid var(--mc-red); }
.comentario-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comentario-head strong { color: var(--mc-purple); font-size: 12px; }
.comentario-head time { margin-left: auto; font-size: 11px; color: var(--mc-text-muted); }
.comentario-badge {
  background: var(--mc-red);
  color: var(--mc-white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.comentario-item p { margin: 0; font-size: 13px; color: var(--mc-text); }
.comentario-form { display: flex; gap: 8px; align-items: flex-start; }
.comentario-form textarea {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.comentario-form .form-error { flex-basis: 100%; margin: 4px 0 0; }
.admin-actions button { padding: 6px 12px; font-size: 12px; }
.admin-move-select { padding: 5px 8px; font-size: 12px; border-radius: 6px; border: 1px solid rgba(74, 25, 66, 0.2); max-width: 160px; }
.btn-approve { background: #1d9e75; color: #fff; border: none; border-radius: 999px; cursor: pointer; }
.btn-reject { background: transparent; color: var(--mc-red); border: 1px solid var(--mc-red); border-radius: 999px; cursor: pointer; }
.admin-view-link { color: var(--mc-purple); font-weight: 600; font-size: 12px; }

/* ===== Navegación del sidebar del panel de admin ===== */
.admin-tabs { display: flex; flex-direction: column; gap: 4px; }
.admin-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.admin-tab { transition: background 0.15s ease, transform 0.15s ease; }
.admin-tab:hover { background: rgba(255, 255, 255, 0.08); transform: translateX(2px); }
.admin-tab.active { background: rgba(255, 255, 255, 0.16); color: var(--mc-white); box-shadow: inset 3px 0 0 var(--mc-red); }
.admin-badge-count {
  background: var(--mc-red);
  color: var(--mc-white);
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.student-dashboard-panel { display: none; }
.student-dashboard-panel.active { display: block; }

#exploreCoursesContent { display: flex; flex-direction: column; gap: 30px; }
.explore-cycle-group { display: flex; flex-direction: column; gap: 16px; }
.explore-cycle-heading { display: flex; align-items: center; gap: 14px; }
.explore-cycle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--mc-purple);
  color: var(--mc-white);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(74, 25, 66, 0.2);
}
.explore-cycle-heading::after { content: ""; flex: 1; height: 1px; background: rgba(74, 25, 66, 0.12); }
.explore-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.explore-course-card {
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.explore-course-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(74, 25, 66, 0.16); }
.explore-course-media {
  position: relative;
  padding-top: 56%;
  background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.14), transparent 55%), linear-gradient(135deg, var(--mc-purple) 0%, var(--mc-purple-light) 48%, var(--mc-red) 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.explore-course-media::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 8v20M8 18h20' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 36px 36px;
}
.explore-course-media-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.explore-course-media-fallback svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 19px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 14px 26px rgba(0, 0, 0, 0.22);
}
.explore-course-play {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.92);
  color: var(--mc-purple);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.explore-course-play:hover { background: var(--mc-white); }
.explore-course-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.explore-course-card h4 { margin: 0; font-size: 15px; color: var(--mc-purple); display: flex; align-items: center; gap: 9px; }
.explore-course-card h4 .curso-icon { width: 26px; height: 26px; }
.explore-course-card h4 .curso-icon svg { width: 14px; height: 14px; }
.explore-course-actions { margin-top: auto; }

.modal-box-video { max-width: 640px; width: 100%; }

/* ===== Modal editar curso (admin) — fondo difuminado, ventana centrada ===== */
.modal-overlay-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-box-curso { max-width: 760px; width: 100%; max-height: 88vh; overflow-y: auto; }

.curso-compact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--mc-white);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.curso-compact-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--mc-cream);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mc-purple);
}
.curso-compact-info { flex: 1; min-width: 0; }
.curso-compact-info h3 { font-size: 16px; margin: 0 0 4px; }
.curso-compact-info p { font-size: 13px; color: var(--mc-text-muted); margin: 0; }
.modal-video-frame { position: relative; padding-top: 56.25%; background: #000; border-radius: var(--radius); overflow: hidden; }
.modal-video-frame iframe,
.modal-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.course-topics-layout { display: flex; gap: 24px; align-items: flex-start; }
.course-topics-nav {
  flex-shrink: 0;
  width: 200px;
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.course-topics-nav button {
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--mc-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.course-topics-nav button:hover { background: var(--mc-cream); }
.course-topics-nav button.active { background: var(--mc-purple); color: var(--mc-white); }
.course-topics-content { flex: 1; min-width: 0; }

@media (max-width: 700px) {
  .course-topics-layout { flex-direction: column; }
  .course-topics-nav { width: 100%; flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 800px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: auto; position: static; height: auto; overflow-y: visible; }
  .admin-tabs { flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: 24px 20px; }
}

.admin-manual-access {
  background: var(--mc-white);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
}
.admin-manual-access summary { font-weight: 700; cursor: pointer; color: var(--mc-purple); }
.admin-manual-access[open] summary { margin-bottom: 12px; }
.admin-manual-access .admin-inline-form { padding: 0; margin-bottom: 0; }

.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  background: var(--mc-white);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.admin-inline-form label:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mc-text);
}
.admin-inline-form input, .admin-inline-form select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  min-width: 160px;
}
.admin-inline-form .form-error, .admin-inline-form .admin-status-msg { flex-basis: 100%; margin: 0; }

/* ===== Mis clases ===== */
.mis-clases-section { padding: 72px 0; background: var(--mc-cream); }
.clase-curso-group { margin-bottom: 36px; }
.clase-curso-group h3 { color: var(--mc-purple); margin-bottom: 16px; }
.clase-curso-header {
  position: relative;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--mc-purple), var(--mc-purple-light));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(74, 25, 66, 0.16);
}
.clase-curso-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(74, 25, 66, 0.86), rgba(74, 25, 66, 0.45));
}
.clase-curso-header h3 {
  position: relative;
  z-index: 1;
  color: var(--mc-white);
  margin: 0;
}
.clase-grid:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.clase-card { background: var(--mc-white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.clase-card .clase-video-wrap { position: relative; padding-top: 56.25%; background: #000; }
.clase-card .clase-video-wrap iframe,
.clase-card .clase-video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clase-watermark {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-family: monospace;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
  user-select: none;
}
.clase-card .clase-titulo { padding: 14px 16px; font-weight: 700; color: var(--mc-purple); font-size: 14px; }
.mis-clases-empty { color: var(--mc-text-muted); }
.clase-warning {
  background: rgba(184, 64, 42, 0.08);
  border: 1px solid rgba(184, 64, 42, 0.25);
  color: var(--mc-red-dark);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  margin: -6px 0 20px;
}

.materiales-list { display: flex; flex-direction: column; gap: 10px; }
.material-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--mc-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--mc-purple);
  font-weight: 600;
  font-size: 14px;
}
.material-item:hover { background: var(--mc-cream); }
.material-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(74, 25, 66, 0.08);
  color: var(--mc-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.material-item-icon svg { width: 17px; height: 17px; }

/* ===== Footer ===== */
.site-footer { background: var(--mc-purple); color: var(--mc-white); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.7); margin: 0; }
.footer-social { display: flex; gap: 18px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}
.footer-social a svg { width: 17px; height: 17px; }
.footer-social a:hover { color: var(--mc-blue); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-buttons { justify-content: center; }
  .hero-features { justify-content: center; }
  .eyebrow-badge { margin-inline: auto; }
}

@media (max-width: 480px) {
  body { overflow-x: clip; } /* clip (not hidden) preserves position: sticky */
  .header-inner { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .logo-img { height: 40px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-ghost { display: none; }
  .header-actions .btn-primary { padding: 8px 14px; font-size: 13px; }
  .nav-toggle { flex-shrink: 0; }
}

/* =============================================================
   EFECTOS (agregados para Hostinger — ver effects.js)
   Reveal on scroll, nav underline, tilt en tarjetas de curso.
   ============================================================= */

/* --- Reveal on scroll: aplicado por JS a hero, tarjetas, pagos --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-soft), transform 0.8s var(--ease-soft);
}
.reveal.is-revealed { opacity: 1; transform: none; }

/* --- Nav underline animado --- */
.main-nav a {
  position: relative;
  padding-bottom: 3px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--mc-red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* --- Tilt 3D sutil en tarjetas de curso (reemplaza el hover plano anterior) --- */
.course-card {
  --rx: 0deg; --ry: 0deg; --ty: 0px;
  transform: perspective(900px) translateY(var(--ty)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.4s var(--ease-soft), box-shadow 0.25s ease;
}
.course-card.is-hovering {
  --ty: -6px;
  transition-duration: 0.15s;
  box-shadow: 0 18px 34px rgba(74, 25, 66, 0.18);
}

/* --- Parallax sutil del panel visual del hero --- */
.hero-visual { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  /* Solo se apaga lo intrusivo; reveal/tilt/underline siguen activos (más rápido) */
  .reveal { transition-duration: 0.3s; }
}
