/* ============================================================
   CENTRAL MÉDICO — Hoja de Estilos Principal
   Paleta: Teal #0a4c6e | Oro #c8870c | Rojo emergencia #c0392b
   Tipografía: Cormorant Garamond + DM Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&display=swap');

:root {
  --primary:    #0a4c6e;
  --primary-lt: #1a6b9e;
  --primary-dk: #063248;
  --gold:       #c8870c;
  --gold-lt:    #e8a020;
  --gold-pale:  #fef3dc;
  --red:        #c0392b;
  --green:      #1e7e4a;
  --purple:     #6a1b9a;
  --teal-c:     #00838f;
  --bg:         #f5f7fa;
  --bg-card:    #ffffff;
  --border:     #e1e8f0;
  --text:       #1a2535;
  --text-muted: #5a6a7e;
  --shadow-sm:  0 2px 8px rgba(10,76,110,.10);
  --shadow-md:  0 6px 24px rgba(10,76,110,.14);
  --shadow-lg:  0 16px 48px rgba(10,76,110,.18);
  --radius:     12px;
  --radius-sm:  8px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dk);
}

a { color: var(--primary-lt); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.container-xs { max-width: 520px; margin: 0 auto; padding: 0 20px; }

/* ── NAVBAR ── */
.navbar {
  background: var(--primary-dk);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.navbar-brand span { color: var(--gold-lt); }
.navbar-brand .icon { font-size: 1.6rem; }
.navbar-nav {
  display: flex; align-items: center; gap: 6px;
  list-style: none; flex-wrap: wrap;
}
.navbar-nav a {
  color: rgba(255,255,255,.82);
  font-size: .88rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  transition: all var(--transition);
  letter-spacing: .02em;
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.12);
}
.navbar-btn {
  background: var(--gold);
  color: var(--primary-dk) !important;
  font-weight: 700 !important;
  padding: 8px 18px !important;
}
.navbar-btn:hover { background: var(--gold-lt) !important; color: var(--primary-dk) !important; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 60%, #1a6b9e 100%);
  position: relative; overflow: hidden;
  padding: 80px 0 90px;
  color: #fff;
}
.hero::before {
  content:'';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero h1 em { color: var(--gold-lt); font-style: normal; }
.hero p { font-size: 1.1rem; opacity: .88; max-width: 640px; margin: 0 auto 32px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.btn-primary { background: var(--primary-lt); color: #fff; border-color: var(--primary-lt); }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); color: #fff; }
.btn-outline { background: transparent; color: var(--primary-lt); border-color: var(--primary-lt); }
.btn-outline:hover { background: var(--primary-lt); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); border-color: #fff; color: #fff; }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover { background: #a93226; border-color: #a93226; color: #fff; }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-body { padding: 24px; }
.card-header {
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

/* ── CURSO CARDS ── */
.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.curso-card { cursor: pointer; }
.curso-card-header {
  padding: 28px 24px 20px;
  position: relative; overflow: hidden;
}
.curso-icon { font-size: 2.8rem; margin-bottom: 12px; display: block; }
.curso-card-header h3 { font-size: 1.2rem; color: #fff; margin-bottom: 6px; }
.curso-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  color: #fff; font-size: .75rem;
  padding: 3px 10px; border-radius: 20px;
}
.curso-card-body { padding: 20px 24px 24px; }
.curso-desc { font-size: .9rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.curso-meta { display: flex; gap: 16px; align-items: center; font-size: .82rem; color: var(--text-muted); }
.curso-meta span { display: flex; align-items: center; gap: 4px; }

/* ── PROGRESO ── */
.progreso-bar {
  background: var(--border);
  border-radius: 99px; height: 8px; overflow: hidden;
  margin: 8px 0;
}
.progreso-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary-lt), var(--gold));
  transition: width .6s ease;
}

/* ── DISCIPLINAS LIST ── */
.disciplinas-list { display: flex; flex-direction: column; gap: 12px; }
.disciplina-item {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  cursor: pointer;
  transition: all var(--transition);
  gap: 16px;
}
.disciplina-item:hover { border-color: var(--primary-lt); box-shadow: var(--shadow-sm); }
.disciplina-num {
  min-width: 36px; height: 36px;
  background: var(--primary-lt);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.disciplina-num.aprobada { background: var(--green); }
.disciplina-num.pendiente { background: var(--border); color: var(--text-muted); }
.disciplina-info { flex: 1; }
.disciplina-info h4 { font-size: .95rem; margin-bottom: 2px; font-family: 'DM Sans', sans-serif; font-weight: 600; }
.disciplina-info p { font-size: .8rem; color: var(--text-muted); }
.disciplina-status { font-size: .78rem; font-weight: 600; }
.disciplina-status.aprobada { color: var(--green); }
.disciplina-status.reprobada { color: var(--red); }
.disciplina-status.pendiente { color: var(--text-muted); }

/* ── EVALUACIÓN ── */
.eval-header {
  background: var(--primary-dk);
  color: #fff; padding: 20px 28px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; justify-content: space-between; align-items: center;
}
.timer {
  background: rgba(255,255,255,.12);
  padding: 8px 16px; border-radius: 6px;
  font-size: 1.1rem; font-weight: 700;
  font-family: monospace; min-width: 70px; text-align: center;
}
.pregunta-num {
  font-size: .78rem; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 8px;
}
.pregunta-texto {
  font-size: 1.05rem; color: var(--text);
  line-height: 1.6; margin-bottom: 24px;
  font-weight: 500;
}
.alternativas { display: flex; flex-direction: column; gap: 10px; }
.alternativa-label {
  display: flex; align-items: center; gap: 14px;
  background: #f8f9fb; border: 2px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 18px;
  cursor: pointer; transition: all var(--transition);
  font-size: .95rem;
}
.alternativa-label:hover { border-color: var(--primary-lt); background: #edf4fb; }
.alternativa-label input[type=radio] { display: none; }
.alternativa-label.selected { border-color: var(--primary-lt); background: #edf4fb; }
.alternativa-label.correta { border-color: var(--green); background: #e8f5e9; }
.alternativa-label.errada { border-color: var(--red); background: #fdecea; }
.alt-letter {
  min-width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-lt); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700;
}

/* ── FORMULARIOS ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary-lt); }
.form-control::placeholder { color: #a0aab8; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── ALERTAS ── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .9rem; margin-bottom: 20px;
  border-left: 4px solid;
}
.alert-success { background: #e8f5e9; border-color: var(--green); color: #1b5e20; }
.alert-danger  { background: #fdecea; border-color: var(--red);   color: #7f1d1d; }
.alert-warning { background: var(--gold-pale); border-color: var(--gold); color: #7c4800; }
.alert-info    { background: #e3f2fd; border-color: var(--primary-lt); color: #0d3c6e; }

/* ── PÁGINA DE AUTH ── */
.auth-page {
  min-height: 100vh; display: flex;
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
}
.auth-sidebar {
  width: 420px; min-height: 100vh;
  padding: 40px;
  display: flex; flex-direction: column; justify-content: center;
  background: rgba(0,0,0,.15);
  border-right: 1px solid rgba(255,255,255,.08);
}
.auth-sidebar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; color: #fff;
  margin-bottom: 12px;
}
.auth-sidebar-title span { color: var(--gold-lt); }
.auth-sidebar p { color: rgba(255,255,255,.75); font-size: .9rem; line-height: 1.6; }
.auth-main {
  flex: 1; display: flex;
  align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%; max-width: 420px;
}
.auth-box h2 {
  font-size: 1.7rem; margin-bottom: 6px;
  color: var(--primary-dk);
}
.auth-box p.subtitle { color: var(--text-muted); font-size: .9rem; margin-bottom: 28px; }
.auth-divider {
  text-align: center; color: var(--text-muted);
  font-size: .82rem; margin: 20px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 42%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── PORTAL DASHBOARD ── */
.portal-header {
  background: linear-gradient(135deg, var(--primary-dk), var(--primary));
  padding: 36px 0 28px;
  color: #fff;
}
.portal-header h1 { color: #fff; font-size: 1.8rem; }
.portal-header p  { color: rgba(255,255,255,.75); font-size: .95rem; }
.stats-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 20px;
}
.stat-chip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px; padding: 12px 20px;
  text-align: center; min-width: 100px;
}
.stat-chip .n { font-size: 1.6rem; font-weight: 700; font-family: 'Cormorant Garamond', serif; }
.stat-chip .label { font-size: .75rem; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }

/* ── CERTIFICADO ── */
.certificado-page { background: #f0f2f5; }
.certificado-wrapper {
  background: #fff;
  max-width: 820px; margin: 40px auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  overflow: hidden;
}
.cert-header {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  padding: 40px 60px 30px;
  text-align: center; color: #fff;
  position: relative;
}
.cert-header::after {
  content:'';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: #fff;
  clip-path: ellipse(55% 100% at 50% 100%);
}
.cert-logo { font-size: 3rem; margin-bottom: 8px; }
.cert-header h2 { font-size: 1rem; letter-spacing: .15em; text-transform: uppercase; opacity: .8; margin-bottom: 4px; }
.cert-header h1 { font-size: 2rem; color: var(--gold-lt); }
.cert-body { padding: 40px 60px; text-align: center; }
.cert-body p.declara { font-size: .9rem; color: var(--text-muted); margin-bottom: 16px; }
.cert-nombre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem; font-weight: 700;
  color: var(--primary-dk);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px; margin-bottom: 20px;
  display: inline-block;
}
.cert-curso {
  font-size: 1.3rem;
  color: var(--text); margin-bottom: 8px;
}
.cert-detalles {
  display: flex; justify-content: center; gap: 40px;
  margin: 24px 0; flex-wrap: wrap;
}
.cert-det-item { text-align: center; }
.cert-det-item .val { font-weight: 700; color: var(--primary-dk); }
.cert-det-item .key { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.cert-footer {
  padding: 20px 60px 40px;
  display: flex; justify-content: space-between; align-items: flex-end;
  border-top: 1px solid var(--border);
}
.cert-firma { text-align: center; }
.cert-firma .linea { border-top: 2px solid var(--text); width: 180px; margin: 0 auto 8px; }
.cert-firma .nombre { font-weight: 700; font-size: .9rem; }
.cert-firma .cargo { font-size: .8rem; color: var(--text-muted); }
.cert-qr { text-align: center; }
.cert-qr p { font-size: .72rem; color: var(--text-muted); margin-top: 6px; }
.cert-cod { font-size: .7rem; color: var(--text-muted); font-family: monospace; margin-top: 4px; }

/* ── ADMIN ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; min-height: 100vh;
  background: var(--primary-dk);
  padding: 0; position: fixed; top: 0; left: 0; z-index: 100;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 20px rgba(0,0,0,.2);
}
.admin-sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 700; color: #fff;
}
.admin-sidebar-brand span { color: var(--gold-lt); }
.admin-nav { flex: 1; padding: 16px 12px; }
.admin-nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); margin: 20px 0 8px 8px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.75);
  padding: 10px 12px; border-radius: 8px;
  font-size: .88rem; font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.admin-nav a:hover, .admin-nav a.active {
  color: #fff; background: rgba(255,255,255,.12);
}
.admin-nav a .icon { font-size: 1rem; min-width: 20px; }
.admin-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 32px; display: flex;
  justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.admin-topbar h2 { font-size: 1.2rem; color: var(--primary-dk); }
.admin-content { padding: 32px; flex: 1; }

/* ── TABLAS ── */
.tabla-wrapper { overflow-x: auto; border-radius: var(--radius-sm); }
table.tabla {
  width: 100%; border-collapse: collapse;
  font-size: .88rem;
}
.tabla th {
  background: var(--primary-dk); color: #fff;
  padding: 12px 16px; text-align: left;
  font-weight: 600; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.tabla td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.tabla tr:last-child td { border-bottom: none; }
.tabla tr:hover td { background: #f8fafc; }
.tabla-actions { display: flex; gap: 6px; }

/* ── BADGE ── */
.badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 99px;
  font-size: .75rem; font-weight: 600;
}
.badge-green  { background: #e8f5e9; color: #1b5e20; }
.badge-red    { background: #fdecea; color: #7f1d1d; }
.badge-blue   { background: #e3f2fd; color: #0d3c6e; }
.badge-gold   { background: var(--gold-pale); color: #7c4800; }
.badge-gray   { background: #f1f3f5; color: #5a6a7e; }

/* ── VIDEO PLAYER ── */
.video-container {
  position: relative; padding-bottom: 56.25%;
  height: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: #000;
}
.video-container iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #fff; border-radius: var(--radius);
  max-width: 560px; width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(.95);
  transition: transform var(--transition);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { font-size: 1.15rem; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-muted); padding: 4px; }
.modal-body  { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── FOOTER ── */
footer {
  background: var(--primary-dk);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 24px 20px;
  font-size: .82rem;
  border-top: 3px solid var(--gold);
}
footer a { color: var(--gold-lt); }

/* ── SECTION TITLES ── */
.section { padding: 64px 0; }
.section-title {
  font-size: 2rem; color: var(--primary-dk);
  margin-bottom: 10px;
}
.section-title span { color: var(--gold); }
.section-sub { color: var(--text-muted); margin-bottom: 40px; font-size: .95rem; max-width: 600px; }
.section-divider {
  width: 60px; height: 3px;
  background: var(--gold);
  border-radius: 2px; margin: 14px 0 32px;
}

/* ── UTILITIES ── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-white  { color: #fff; }
.text-gold   { color: var(--gold); }
.text-primary { color: var(--primary-lt); }
.mt-1 { margin-top:  6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 6px;} .mb-2 { margin-bottom:12px;} .mb-3 { margin-bottom:20px;} .mb-4 { margin-bottom:32px;}
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 12px; } .gap-3 { gap: 20px; }
.fw-bold { font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }

/* ── NO-PRINT ── */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .certificado-wrapper { box-shadow: none; margin: 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .auth-sidebar { display: none; }
  .admin-sidebar { transform: translateX(-100%); transition: transform var(--transition); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .cert-body, .cert-header, .cert-footer { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 600px) {
  .hero { padding: 48px 0; }
  .cursos-grid { grid-template-columns: 1fr; }
  .stats-row { flex-direction: column; }
  .cert-detalles { gap: 20px; }
  .cert-footer { flex-direction: column; align-items: center; gap: 20px; }
}

/* ── ADMIN LAYOUT ── */
.admin-body { margin: 0; background: #f0f2f7; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--primary-dk);
  color: white;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.4rem 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo { font-size: 1.4rem; }
.sidebar-nav { flex: 1; padding: .8rem 0; }
.sidebar-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem 1.2rem;
  color: rgba(255,255,255,.75);
  text-decoration: none; font-size: .9rem;
  transition: all .2s; cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,.12);
  color: white;
}
.sidebar-link.active { border-left: 3px solid var(--gold); }
.sidebar-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.1); padding: .8rem 0; }
.sidebar-logout { color: rgba(255,100,100,.8) !important; }
.admin-main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
  background: white; padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  position: sticky; top: 0; z-index: 50;
}
.admin-page-title { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; color: var(--primary-dk); margin: 0; }
.admin-user { font-size: .85rem; color: #555; }
.admin-content { padding: 2rem; flex: 1; }
.admin-card {
  background: white; border-radius: 12px; padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.admin-card h3 { font-size: 1rem; font-weight: 600; color: var(--primary); margin: 0 0 1.2rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { background: #f5f7fb; padding: .6rem .8rem; text-align: left; font-weight: 600; color: #444; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table td { padding: .7rem .8rem; border-bottom: 1px solid #f0f2f7; vertical-align: top; }
.admin-table tr:last-child td { border-bottom: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
.stat-card { background: white; border-radius: 12px; padding: 1.2rem; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.stat-icon { font-size: 1.8rem; margin-bottom: .4rem; }
.stat-val { font-size: 2rem; font-weight: 700; color: var(--primary); font-family: 'Cormorant Garamond', serif; }
.stat-lbl { font-size: .75rem; color: #888; text-transform: uppercase; letter-spacing: .05em; }

/* ── DISCIPLINE CARDS (curso.php) ── */
.disciplines-grid { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.discipline-card {
  background: white; border-radius: 12px; padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex; align-items: center; gap: 1.2rem;
  border-left: 4px solid #ddd; transition: box-shadow .2s;
}
.discipline-card.approved { border-left-color: #27ae60; }
.discipline-card.failed { border-left-color: #c0392b; }
.discipline-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.disc-number { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 700; color: #ddd; min-width: 44px; text-align: center; }
.disc-body { flex: 1; }
.disc-name { font-weight: 600; color: #1a2744; margin: 0 0 .3rem; font-size: 1rem; }
.disc-desc { font-size: .85rem; color: #666; margin: 0 0 .5rem; }
.disc-meta { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .8rem; color: #888; }
.disc-nota { font-weight: 600; }
.disc-nota.nota-ok { color: #27ae60; }
.disc-nota.nota-fail { color: #c0392b; }
.disc-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.course-header { padding: 2rem; border-radius: 12px; margin-bottom: 1.5rem; }
.course-header-inner { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1rem; }
.course-icon-lg { font-size: 3rem; }
.course-title-lg { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: #1a2744; margin: 0 0 .4rem; }
.course-desc-lg { color: #555; margin: 0 0 .6rem; font-size: .95rem; }
.course-meta-row { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── DISCIPLINE PAGE ── */
.disc-header { padding: 1.5rem; background: white; border-radius: 12px; margin-bottom: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.disc-header h1 { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; color: var(--primary); margin: 0 0 .3rem; }
.disc-header p { color: #666; margin: 0; }
.eval-badge { padding: .6rem 1rem; border-radius: 8px; text-align: center; font-weight: 600; font-size: .85rem; }
.eval-ok { background: #e8f8ef; color: #1a7a4c; }
.eval-fail { background: #fde8e8; color: #922b21; }
.content-section { margin-bottom: 2.5rem; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--primary); margin-bottom: 1.2rem; }
.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.video-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.video-embed { position: relative; padding-bottom: 56.25%; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.video-info { padding: 1rem; }
.video-info h4 { margin: 0 0 .3rem; font-size: .95rem; color: #1a2744; }
.video-info p { margin: 0; font-size: .82rem; color: #666; }
.apostilas-list { display: flex; flex-direction: column; gap: .8rem; }
.apostila-item { background: white; border-radius: 10px; padding: 1rem 1.2rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.apostila-icon { font-size: 1.5rem; }
.apostila-info { flex: 1; }
.apostila-info h4 { margin: 0 0 .2rem; font-size: .95rem; }
.apostila-info p { margin: 0; font-size: .82rem; color: #666; }
.eval-cta { background: linear-gradient(135deg, #f8f4ee, #fff); border: 2px dashed var(--gold); border-radius: 12px; padding: 1.8rem; }
.eval-cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.eval-cta h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--primary); margin: 0 0 .5rem; }
.eval-cta p { margin: 0; font-size: .9rem; color: #555; }

/* ── BREADCRUMB ── */
.breadcrumb { font-size: .82rem; color: #888; margin-bottom: 1rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── PAGE WRAPPER ── */
.page-wrapper { max-width: 900px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.page-back { margin-top: 2.5rem; }

/* ── BADGE extras ── */
.badge-danger { background: #fde8e8; color: #922b21; }
.badge-neutral { background: #eee; color: #555; }

/* ── BTN extras ── */
.btn-primary-sm {
  background: var(--primary); color: white; border: none;
  padding: .35rem .8rem; border-radius: 6px; font-size: .82rem;
  font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block;
  transition: background .2s;
}
.btn-primary-sm:hover { background: var(--primary-dk); }
.btn-danger-sm {
  background: #fde8e8; color: #922b21; border: 1px solid #f5c6c6;
  padding: .3rem .6rem; border-radius: 6px; font-size: .82rem; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.btn-danger-sm:hover { background: #c0392b; color: white; }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; }
.btn-sm { padding: .3rem .8rem; font-size: .82rem; }

/* ── ADMIN RESPONSIVE ── */
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── HERO BUTTON — azul semitransparente ── */
.btn-hero-blue {
  background: rgba(10, 76, 110, 0.45) !important;
  color: #ffffff !important;
  border: 2.5px solid rgba(130, 200, 255, 0.85) !important;
  outline: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: .85rem 2.2rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  text-decoration: none;
  display: inline-block;
  transition: all .25s ease;
  letter-spacing: .02em;
  box-shadow: 0 0 0 1px rgba(130, 200, 255, 0.3), inset 0 0 12px rgba(10,76,110,.2);
}
.btn-hero-blue:hover {
  background: rgba(10, 76, 110, 0.75) !important;
  border-color: #90d4ff !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(10, 76, 110, 0.55), 0 0 0 1px rgba(130,200,255,.5);
}
