:root {
  --primary: #1e3a8a;
  --secondary: #2563eb;
  --card: #ffffff;
  --muted: #475569;
  --accent: #fbbf24;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  --radius: 16px;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: var(--primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  min-height: 100vh;
}

/* Contenedor y navbar */
.container { width: 100%; max-width: 1000px; margin: 0 auto; }
.navbar { width:100%; background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:10px 16px; display:flex; align-items:center; gap:10px; box-shadow: var(--shadow); margin-bottom:16px; }
.navbar img { height:28px; width:auto; }
.navbar .brand { font-weight:700; color:#0f172a; }
.navbar a { margin-left:auto; color: var(--secondary); text-decoration:none; font-weight:600; }
.navbar a:hover { text-decoration:underline; }

header { text-align: center; margin-bottom: 30px; padding: 20px; background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%); color: #fff; border-radius: 16px; box-shadow: var(--shadow); width: 100%; max-width: 1000px; }
header h1 { font-size: 32px; margin-bottom: 6px; color:#fff; }
header p { color: #e2e8f0; font-size: 16px; margin-bottom: 20px; }

.header-actions {
  margin-top: 20px;
}

.btn-ingresar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-ingresar:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-ingresar:active {
  transform: translateY(0);
}

/* Sección Ruta de Formación */
.ruta { background:#0b5ed7; color:#fff; border-radius:16px; padding:20px; box-shadow: var(--shadow); width:100%; max-width:1000px; margin:16px 0 24px; }
.ruta h2 { margin-bottom:12px; font-size:24px; }
.steps { display:grid; grid-template-columns: 1fr; gap:10px; }
.step { display:flex; gap:12px; align-items:flex-start; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:12px; padding:12px; }
.step .num { background:#1e3a8a; color:#fff; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; }
.step h3 { margin:0 0 4px 0; color:#fff; }
.step p { margin:0; color:#e2e8f0; }

@media (min-width: 700px) {
  .steps { grid-template-columns: 1fr 1fr; }
}

.contenedor-programas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

.card {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  text-decoration: none;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  border: 1px solid #e2e8f0;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,.12); }
.card:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }

.card h2 { margin-bottom: 6px; }
.card button {
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  background: var(--secondary);
  color: #fff;
  cursor: pointer;
}
.card button:hover { background: var(--primary); }

/* Badge posicionada */
.card .badge { position:absolute; top:10px; left:10px; }

/* Logos en tarjetas de inicio */
.logos-mini { display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:wrap; margin-top:8px; }
.logos-mini img { height:20px; width:auto; filter: grayscale(20%); opacity:.9; transition: transform .2s ease, filter .2s ease; }
.logos-mini img:hover { transform: translateY(-2px) scale(1.02); filter: none; }

.video-container {
  width: 100%; max-width: 1000px; height: 450px;
  background: #000; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  margin-bottom: 20px;
}
iframe { width: 100%; height: 100%; border: 0; }

.info, .formulario {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 1000px;
  margin-bottom: 20px;
  width: 100%;
}
.info #descripcion-programa {
  white-space: pre-line; /* respetar \n como salto de línea */
  color: #334155;
}

/* Barra volver y botones reutilizables */
.volver-bar { width: 100%; text-align: center; margin: 30px 0 10px 0; }
.btn { display: inline-block; padding: 10px 24px; background: var(--secondary); color: #fff; border-radius: 8px; text-decoration: none; font-weight: 600; box-shadow: 0 2px 8px #0002; transition: background .2s; border: 0; cursor: pointer; }
.btn:hover { background: var(--primary); }

/* Badges */
.badge { display: inline-block; background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* Chips */
.chips { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin:6px 0 2px; }
.chip { background:#eff6ff; color:#1d4ed8; border:1px solid #dbeafe; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; }

/* Responsive */
@media (max-width: 640px) {
  body { padding: 20px; }
  .contenedor-programas { grid-template-columns: 1fr; }
  .video-container { height: 200px; }
  .formulario form { grid-template-columns: 1fr; }
}
.formulario input, .formulario select, .formulario button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid #cbd5e1;
  font-size: 16px;
}
.formulario button {
  background: var(--secondary);
  color: #fff;
  border: none;
  cursor: pointer;
}
.formulario button:hover { background: var(--primary); }

/* Form grid */
.formulario form { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.formulario label { display:block; font-size:14px; color:#334155; }
.formulario input, .formulario select { margin-top:6px; }
.formulario button { grid-column: 1 / -1; }
.formulario #mensaje-exito { grid-column: 1 / -1; }

footer {
  margin-top: 30px;
  font-size: 14px;
  color: var(--muted);
}

.volver { display:inline-block; font-size:14px; color: var(--secondary); text-decoration:none; }
.volver:hover { text-decoration: underline; }
.volver-bar { width:100%; margin: 8px 0 12px 0; }

/* Mejorar el botón de volver */
.volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--primary);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.volver:hover {
  background: var(--secondary);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.volver:active {
  transform: translateY(0);
}

.volver-bar {
  width: 100%;
  margin: 16px 0 20px 0;
  text-align: left;
}

/* Sección instituciones */
.instituciones {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 1000px;
  margin-bottom: 20px;
  width: 100%;
}
.instituciones h2 { margin-bottom: 8px; }
.instituciones ul { padding-left: 20px; color: #334155; }
.instituciones li { margin: 6px 0; }
.instituciones .logos-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap:12px; margin-top:10px; }
.instituciones .logos-grid .logo { display:flex; align-items:center; justify-content:center; padding:10px; border:1px solid #e2e8f0; border-radius:12px; background:#fff; }
.instituciones .logos-grid img { max-width: 120px; height: 40px; object-fit: contain; }

/* Animación de entrada */
.reveal-up { opacity:0; transform: translateY(10px); animation: reveal .5s ease forwards; }
@keyframes reveal { to { opacity:1; transform: translateY(0); } }

/* Botón volver arriba */
.to-top { position: fixed; right: 18px; bottom: 18px; background: var(--secondary); color:#fff; border:0; border-radius: 999px; width:44px; height:44px; display:flex; align-items:center; justify-content:center; box-shadow: 0 10px 22px rgba(0,0,0,.18); cursor:pointer; opacity:.9; }
.to-top:hover { background: var(--primary); }
.to-top[hidden] { display:none; }

/* Sección de Carreras Técnicas */
.carreras-tecnicas {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  max-width: 1000px;
  margin-bottom: 20px;
  width: 100%;
}

.carreras-header {
  text-align: center;
  margin-bottom: 25px;
}

.carreras-header h2 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 28px;
}

.carreras-header p {
  color: var(--muted);
  font-size: 16px;
}

.escuelas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

@media (min-width: 768px) {
  .escuelas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .escuelas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.escuela-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  min-height: 200px; /* Altura mínima uniforme */
  display: flex;
  flex-direction: column;
}

.escuela-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary);
}

.escuela-header h3 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px; /* Altura fija para alinear todas las líneas */
  line-height: 1.2;
}

.carreras-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1; /* Ocupa el espacio restante */
}

.carrera-item {
  background: white;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  font-size: 14px;
  color: #334155;
  transition: all 0.2s ease;
  cursor: pointer;
}

.carrera-item:hover {
  background: #f1f5f9;
  border-left-color: var(--secondary);
  transform: translateX(3px);
}

.carreras-footer {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 12px;
  color: white;
}

.carreras-footer p {
  margin: 0;
  font-size: 16px;
}

.carreras-footer strong {
  color: var(--accent);
}

/* Sección Próximamente para Profesionales */
.proximamente-seccion {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 1000px;
  margin-bottom: 20px;
  width: 100%;
}

.proximamente-container {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.proximamente-icono {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.proximamente-container h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.proximamente-descripcion {
  color: #6b7280;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.proximamente-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.feature-item {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary);
}

.feature-icono {
  font-size: 2rem;
}

.feature-item span:last-child {
  font-weight: 600;
  color: var(--primary);
  text-align: center;
}

.proximamente-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 16px;
  padding: 25px;
  color: white;
  margin-top: 20px;
}

.proximamente-cta p {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.proximamente-cta p:last-child {
  margin: 0;
  opacity: 0.9;
}

/* Estilos para páginas de autenticación */
.auth-container {
  max-width: 500px;
  margin: 0 auto 30px;
  width: 100%;
}

.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 20px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h2 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 24px;
}

.auth-header p {
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
}

.form-group input,
.form-group select {
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
  color: var(--muted);
  font-size: 12px;
}

.checkbox-group {
  flex-direction: row !important;
  align-items: center;
  gap: 12px !important;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkmark {
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  color: rgba(255, 255, 255, 0.8);
}

.mensaje {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 10px;
}

.mensaje.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.mensaje.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.auth-footer p {
  margin: 8px 0;
  font-size: 14px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Información adicional en login */
.info-login {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-top: 20px;
}

.info-login h3 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 20px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.feature {
  text-align: center;
  padding: 15px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.feature h4 {
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 5px;
}

.feature p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

/* Sección de Carreras Tecnológicas */
.carreras-tecnologicas {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  max-width: 1000px;
  margin-bottom: 20px;
  width: 100%;
}

.tecnologicas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

@media (min-width: 768px) {
  .tecnologicas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .tecnologicas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tecnologica-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.tecnologica-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary);
}

.tecnologica-header h3 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  line-height: 1.2;
}


