/* ==========================================================================
   VARIABLES DE DISEÑO CORPORATIVO Y BASE
   ========================================================================== */
:root {
  --primary-navy: #0b132b;      /* Azul oscuro institucional */
  --primary-accent: #1c2541;    /* Azul secundario profundo */
  --brand-blue: #2563eb;        /* Azul corporativo interactivo */
  --brand-blue-hover: #1d4ed8;  
  --accent-gold: #f59e0b;       /* Tono dorado cálido de contraste */
  
  --bg-main: #f8fafc;
  --surface-card: #ffffff;
  --border-subtle: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --font-heading: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  
  --max-width: 1180px;
}

/* RESET GENERAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-secondary);
  background-color: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   BARRA SUPERIOR (TOPBAR)
   ========================================================================== */
.topbar {
  background-color: #070d1f;
  color: #94a3b8;
  font-size: 0.825rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-info {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.topbar-phone {
  align-items: flex-start;
}

.topbar-phone-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-phone-number {
  display: block;
  line-height: 1.4;
  white-space: nowrap;
}

.topbar-item:hover {
  color: #ffffff;
}

.topbar-phone-number:hover {
  color: #ffffff;
  text-decoration: underline;
}

.topbar-badge {
  background-color: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.75rem;
}

/* ==========================================================================
   ENCABEZADO Y NAVEGACIÓN
   ========================================================================== */
.header {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand-image {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.25);
}

.logo-divider {
  width: 1px;
  height: 34px;
  background: var(--border-subtle);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue);
}

/* MENÚ DESPLEGABLE (DROPDOWN) */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: #ffffff;
  min-width: 220px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1050;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu a:hover {
  background-color: #f1f5f9;
  color: var(--brand-blue);
}

/* BOTÓN CTA NAV */
.btn-nav-cta {
  background-color: var(--brand-blue);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.btn-nav-cta:hover {
  background-color: var(--brand-blue-hover);
}

/* BOTÓN HAMBURGUESA (MENÚ MÓVIL) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   SECCIÓN HERO
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-accent) 100%);
  color: #ffffff;
  padding: 4.5rem 1.5rem;
  position: relative;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.9rem;
  border-radius: 30px;
  font-size: 0.825rem;
  color: #93c5fd;
  margin-bottom: 1.25rem;
}

.pill-dot {
  width: 6px;
  height: 6px;
  background-color: #60a5fa;
  border-radius: 50%;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 10px 24px -12px rgba(37, 99, 235, 0.75);
}

.btn-primary:hover {
  background-color: var(--brand-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(37, 99, 235, 0.8);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* TARJETA HERO */
.hero-card {
  background-color: #ffffff;
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.badge-accent {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: 0.5px;
}

.hero-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.hero-checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.hero-checklist svg {
  color: #10b981;
  flex-shrink: 0;
}

/* ==========================================================================
   BARRA DE ESTADÍSTICAS
   ========================================================================== */
.stats-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
}

.stats-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--primary-navy);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL Y CARACTERÍSTICAS
   ========================================================================== */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-block {
  margin-bottom: 4.5rem;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem auto;
}

.section-subtitle {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: 1px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-primary);
  margin-top: 0.3rem;
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface-card);
  padding: 2.25rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background-color: #eff6ff;
  color: var(--brand-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   LAYOUT INFORMATIVO CON IMAGEN
   ========================================================================== */
.content-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  margin-bottom: 4.5rem;
}

.content-layout--full .content-body {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.content-layout--full .content-body p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.content-layout--full {
  display: block;
}

.content-layout--full .quote-card {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.badge-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.content-body h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

.content-body p {
  margin-bottom: 1.25rem;
  font-size: 0.975rem;
}

.quote-card {
  background-color: #f1f5f9;
  border-left: 4px solid var(--brand-blue);
  padding: 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.75rem 0;
  font-weight: 500;
  color: var(--primary-navy);
  font-style: italic;
}

.img-container {
  position: relative;
  width: 100%;
}

.img-container img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: block;
  object-fit: cover;
}

.img-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--primary-navy);
  color: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-hover);
}

.img-badge-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
}

.img-badge-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ==========================================================================
   SECCIÓN DE GRADOS
   ========================================================================== */
.degrees-section {
  margin-bottom: 4.5rem;
}

.degrees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.degree-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.degree-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), #60a5fa);
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.degree-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.degree-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-blue);
}

.degree-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.degree-card:hover::before {
  transform: scaleX(1);
}

/* ==========================================================================
   CTA BANNER
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1e40af 100%);
  color: #ffffff;
  padding: 3.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-hover);
}

.cta-content h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  margin-bottom: 0.75rem;
}

.cta-content p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 2rem auto;
}

.btn-white {
  background-color: #ffffff;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-white:hover {
  background-color: #f8fafc;
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER CORREGIDO Y MEJORADO)
   ========================================================================== */
.footer {
  background-color: var(--primary-navy);
  color: #94a3b8;
  padding: 4rem 1.5rem 2rem 1.5rem;
  font-size: 0.875rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  /* Ampliamos el espacio para la columna central de Titulaciones */
  grid-template-columns: 1.1fr 1.6fr 1.1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer-brand-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.35rem;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.35);
}

.footer-brand-name {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.footer-desc {
  margin-top: 0;
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 360px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* Rejilla de 2 columnas para las Titulaciones con alineación impecable */
.footer-links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  align-items: start;
}

.footer-links li {
  align-self: start;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease;
  line-height: 1.4;
  display: inline-block;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-contact li {
  line-height: 1.6;
  color: #cbd5e1;
}

.footer-contact strong {
  color: #f8fafc;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer-bottom a {
  color: #ffffff;
}

/* ==========================================================================
   WIDGET DE WHATSAPP
   ========================================================================== */
.wa-widget-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50px;
  width: 58px;
  height: 58px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  z-index: 9999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
  border: none;
}

.wa-widget-btn:hover {
  transform: scale(1.08);
}

.wa-chat-box {
  display: none;
  position: fixed;
  bottom: 95px;
  right: 24px;
  width: 340px;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  z-index: 9999;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.wa-chat-box.active {
  display: block;
}

.wa-chat-header {
  background-color: #075e54;
  color: #ffffff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-chat-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-avatar {
  width: 36px;
  height: 36px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
}

.wa-chat-info h4 {
  font-size: 0.9rem;
  margin: 0;
}

.wa-chat-info span {
  font-size: 0.7rem;
  color: #abebd2;
}

.wa-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
}

.wa-chat-body {
  padding: 1.25rem;
  background-color: #efeae2;
  min-height: 110px;
}

.wa-message {
  background-color: #ffffff;
  padding: 0.85rem 1rem;
  border-radius: 0 12px 12px 12px;
  font-size: 0.85rem;
  color: #1f2937;
  box-shadow: var(--shadow-subtle);
}

.wa-phone-display {
  margin-top: 8px;
  font-size: 0.725rem;
  color: #6b7280;
  font-weight: 600;
}

.wa-chat-footer {
  padding: 0.75rem;
  background-color: #f0f2f5;
  display: flex;
  gap: 8px;
}

.wa-chat-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  outline: none;
}

.wa-send-btn {
  background-color: #075e54;
  color: white;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-modal-link {
  display: inline-block;
  padding: 0.55rem 0.75rem;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.pdf-modal-link:hover,
.pdf-modal-link:focus-visible {
  background: #dbeafe;
  outline: none;
}

.horario-tabla {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--surface-card);
  color: var(--text-primary);
}

.horario-tabla th,
.horario-tabla td {
  border: 1px solid #94a3b8;
  padding: 0.75rem 0.45rem;
  text-align: center;
  vertical-align: middle;
}

.horario-tabla th {
  background: #e2e8f0;
  color: var(--primary-navy);
  font-family: var(--font-heading);
  font-size: 0.82rem;
}

.horario-tabla td {
  min-height: 5rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.horario-tabla .asignatura,
.horario-tabla .celda-ocupada {
  background: #eff6ff;
  color: #1e3a8a;
}

.horario-tabla .asignatura {
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.horario-tabla .asignatura:hover {
  background: #2563eb;
  color: #ffffff;
}

.horario-tabla .asignatura a {
  display: block;
  color: inherit;
}

.horario-tabla .hora {
  display: block;
  margin-top: 0.35rem;
  font-weight: 400;
}

.horario-franja {
  display: none;
}

.horario-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(7, 13, 31, 0.7);
}

.horario-modal-contenido {
  position: relative;
  width: min(720px, 100%);
  padding: 2rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
}

.horario-modal-contenido h2 {
  margin: 0;
  padding-right: 1.5rem;
  color: var(--primary-navy);
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.horario-modal-text {
  margin-top: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.horario-modal-text .opcion-horario {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 0.85rem;
  line-height: 1.8;
}

.horario-modal-cerrar {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 650px) {
  .horario-tabla {
    min-width: 650px;
  }

  .horario-tabla-wrapper {
    overflow-x: auto;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 900px) {
  .hero-container, .content-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .content-layout {
    padding: 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .topbar-info {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .topbar-badge {
    display: none;
  }
  
  .nav-container {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: #ffffff;
    border-top: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-hover);
    padding: 0.5rem 1.5rem 1rem;
    z-index: 1040;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu .nav-link {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    justify-content: space-between;
  }

  /* DESPLEGABLE EN MÓVIL: CLIC EN VEZ DE HOVER */
  .dropdown-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
    min-width: 0;
  }

  .dropdown:hover .dropdown-menu {
    display: none;
    transform: none;
  }

  .dropdown.active .dropdown-menu {
    display: block;
    transform: none;
  }

  .dropdown.active .dropdown-toggle svg {
    transform: rotate(180deg);
  }

  .dropdown-menu a {
    padding: 0.6rem 0;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}