/* Variables Institucionales IPN + BEAT */
:root {
  --primary-guinda: #6A1B2F; /* Guinda oficial IPN */
  --accent-guinda: #B71C3B;  /* Guinda brillante para interacción */
  --neutral-grey: #4d4d4d;
  --light-grey: #f8f9fa;
  --border-grey: #e1e4e8;
  --white: #ffffff;
  --black: #1a1a1a;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Colores de Estado para Horarios */
  --status-available: #e8f5e9;
  --status-available-text: #2e7d32;
  --status-occupied: #ffebee;
  --status-occupied-text: #c62828;
  --status-process: #fff3e0;
  --status-process-text: #ef6c00;
  --status-confirmed: #e3f2fd;
  --status-confirmed-text: #1565c0;
}

/* Reset y Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--light-grey);
  color: #333;
  line-height: 1.6;
}

/* Header Profesional - Fondo Guinda */
.site-header {
  background-color: var(--primary-guinda);
  padding: 0.8rem 20px; /* Reducción de padding para mayor alcance a las esquinas */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.logo-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%; /* Permite que se extienda a todo el ancho disponible */
  margin: 0 auto;
  width: 100%;
}

.logos-grupo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 50px;
  width: auto;
  /* Se eliminó el filtro para conservar colores originales */
}

.logo-cecyt {
  height: 45px;
  width: auto;
  /* Se eliminó el filtro para conservar colores originales */
}

.divider-v {
  width: 1px;
  height: 35px;
  background-color: rgba(255, 255, 255, 0.3);
}

/* Navegación - Texto Blanco */
.nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav a {
  text-decoration: none;
  color: var(--white);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  opacity: 0.9;
}

.nav a:hover {
  opacity: 1;
  color: var(--white);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.logout-btn {
  background-color: var(--accent-guinda);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  background-color: #d13c5c;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Menú Hamburguesa Mejorado */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 35px;
  height: 35px;
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  z-index: 1001;
  transition: var(--transition);
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.2);
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--white);
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--white);
  border-bottom: 1px solid var(--border-grey);
}

.brand-title {
  font-size: 4rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 0.5rem;
  letter-spacing: -2px;
}

.brand-title span {
  color: var(--primary-guinda);
}

.brand-subtitle {
  color: var(--primary-guinda);
  font-weight: 600;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 2rem;
}

.intro-text {
  max-width: 750px;
  margin: 0 auto 3rem;
  font-size: 1.15rem;
  color: var(--neutral-grey);
}

.botones-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.boton-primario, .boton-secundario {
  padding: 0.9rem 2.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.boton-primario {
  background-color: var(--black);
  color: var(--white);
}

.boton-secundario {
  background-color: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
}

.boton-primario:hover {
  background-color: var(--primary-guinda);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* --- ESTILOS PARA TABLA DE HORARIOS --- */
.schedule-container {
  background-color: var(--white);
  border-radius: 15px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
  overflow-x: auto;
}

.time-slot {
  display: flex;
  border-bottom: 1px solid var(--border-grey);
  min-width: 800px;
}

.time-cell {
  flex: 0 0 100px;
  padding: 15px;
  background-color: var(--light-grey);
  font-weight: bold;
  font-size: 0.85rem;
  color: var(--primary-guinda);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-grey);
}

.slot-cell {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-grey);
  transition: var(--transition);
  cursor: pointer;
  color: var(--text-dark);
}

.slot-cell:last-child { border-right: none; }

/* Estados de las celdas */
.slot-cell.available {
  background-color: var(--status-available);
  color: var(--status-available-text);
}

.slot-cell.occupied {
  background-color: var(--status-occupied);
  color: var(--status-occupied-text);
  cursor: not-allowed;
}

.slot-cell.reserved {
  background-color: var(--status-process);
  color: var(--status-process-text);
}

.slot-cell.reservado {
  background-color: var(--status-confirmed);
  color: var(--status-confirmed-text);
}

.slot-cell:hover:not(.occupied) {
  filter: brightness(0.95);
  transform: scale(1.02);
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

/* Grid de Laboratorios (Dashboard) */
.grid-container {
  max-width: 1300px;
  margin: 3rem auto 6rem;
  padding: 0 3%;
}

.section-title {
  margin-bottom: 3rem;
  color: var(--black);
  font-weight: 700;
  font-size: 1.8rem;
  text-align: center;
}

.grid-laboratorios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.5rem;
}

.laboratorio-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 30px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
}

.card-icon {
  font-size: 2.2rem;
  background-color: #fcebed;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.card-info h3 {
  color: var(--black);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.card-info p {
  color: #777;
  font-size: 0.9rem;
  margin: 0;
}

.laboratorio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-guinda);
}

.card-special {
  border-bottom: 15px solid var(--primary-guinda);
}

/* Footer */
.site-footer {
  background-color: var(--black);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}

.footer-content p {
  opacity: 0.6;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

/* Responsividad y Menú Hamburguesa */
@media (max-width: 900px) {
  .brand-title { font-size: 3rem; }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex; 
  }

  .nav {
    display: none; 
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background-color: var(--primary-guinda);
    flex-direction: column;
    padding: 2rem;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.2);
    border-radius: 0 0 0 20px;
  }

  .nav.active {
    display: flex;
  }

  .brand-title { font-size: 2.5rem; }
  .grid-laboratorios { grid-template-columns: 1fr; }
}