/* ===== CONFIGURACIÓN GENERAL ===== */
html, body {
  height: 100%;
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f7;
  color: #002147;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-bottom: 100px;
}

/* ===== HEADER ===== */
header {
  background-color: #f8f8f8;
  color: #002147;
  padding: 15px 20px;
  box-shadow: 0 2px 55px rgba(0,33,71,0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  flex-wrap: wrap;
  gap: 15px;
}

.logos img {
  width: 90px;
  max-width: 30vw;
  margin-right: 10px;
}

.titulo h1 {
  font-family: 'Anton', sans-serif;
  font-size: 40px;
  margin: 0;
  text-align: right;
}

/* ===== TEXTO CENTRAL ===== */
.centered-text {
  text-align: center;
  font-size: 1.1rem;
  color: #333;
  background-color: #f4f4f4;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 85%;
  max-width: 800px;
  margin: 20px auto;
}

/* ===== GRID DE CURSOS ===== */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.curso {
  background-color: #bf930d;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.curso:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.curso img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 7px solid #ffffff;
}

.curso h3 {
  background-color: #bf930d;
  color: #002147;
  padding: 15px;
  text-align: center;
  margin: 0;
  font-size: 18px;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-contenido {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  position: relative;
  text-align: center;
  box-sizing: border-box;
  animation: aparecer 0.3s ease-out;
  margin: auto;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-contenido img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.modal-contenido h3 {
  color: #002147;
  padding: 1px;
  text-align: center;
  margin: 0;
  font-size: 16px;
}

.cerrar {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  color: #333;
  cursor: pointer;
}

@keyframes aparecer {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== BOTÓN INSCRIBIRSE ===== */
.btn-inscribirse {
  background-color: #4CAF50;
  color: white;
  font-size: 16px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-inscribirse:hover {
  background-color: #45a049;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-inscribirse:active {
  background-color: #3e8e41;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  transform: translateY(2px);
}

/* ===== FORMULARIO ===== */
.formulario {
  background: white;
  max-width: 500px;
  margin: 40px auto;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.formulario h2 {
  text-align: center;
  margin-bottom: 20px;
}

.formulario label {
  display: block;
  margin-top: 10px;
  font-size: 0.9em;
}

.formulario input, select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

button {
  margin-top: 15px;
  width: 100%;
  background: #003366;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #0055aa;
}

/* ===== FOOTER ===== */
footer {
  position: static;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #002147;
  color: white;
  text-align: center;
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.5;
  z-index: 1000;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* ===== WHATSAPP FLOTANTE ===== */
.float-wa {
  position: fixed;
  width: 65px;
  height: 65px;
  bottom: 150px;
  right: 25px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px rgba(0,0,0,0.3);
  z-index: 100;
  transition: background 0.3s;
}

.float-wa:hover {
  background-color: #20b85e;
  text-decoration: none;
  color: #fff;
}

/* ===== CONTENEDOR VISTA ===== */
.contenedor-vista {
  max-width: 1000px;
  margin: 40px auto;
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contenedor-vista h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #bf930d;
}

/* ===== GRÁFICO ===== */
.grafico-contenedor {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

#graficoCursos {
  max-width: 500px;
  max-height: 500px;
}

/* ===== TABLAS DOCENTES ===== */
.tabla-curso {
  margin-top: 40px;
}

.tabla-curso h3 {
  text-align: center;
  margin-bottom: 10px;
  color: #003366;
}

.tabla-contenedor {
  overflow-x: auto;
}

.tab-content {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.tab-content.active {
  opacity: 1;
  height: auto;
  overflow: visible;
}

.tabla-docentes {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  table-layout: fixed;
  background-color: #fff;
}

.tabla-docentes th,
.tabla-docentes td {
  padding: 10px 8px;
  border: 1px solid #ccc;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  text-overflow: ellipsis;
}

.tabla-docentes th:nth-child(1), .tabla-docentes td:nth-child(1) { width: 6%; }
.tabla-docentes th:nth-child(2), .tabla-docentes td:nth-child(2) { width: 25%; }
.tabla-docentes th:nth-child(3), .tabla-docentes td:nth-child(3) { width: 25%; }
.tabla-docentes th:nth-child(4), .tabla-docentes td:nth-child(4) { width: 15%; }
.tabla-docentes th:nth-child(5), .tabla-docentes td:nth-child(5) { width: 14%; }
.tabla-docentes th:nth-child(6), .tabla-docentes td:nth-child(6) { width: 15%; }

.tabla-docentes th {
  background-color: #bf930d;
  color: white;
  text-align: center;
}

.tabla-docentes tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* BOTÓN EXCEL */
.btn-excel {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
  float: right;
}

.btn-excel:hover {
  background-color: #218838;
}

/* PAGINACIÓN */
.paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 25px 0;
}

.paginacion button {
  background: #fff;
  color: #002147;
  border: 1px solid #bf930d;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.paginacion button:hover {
  background: #bf930d;
  color: #fff;
  transform: translateY(-2px);
}

.paginacion button.active {
  background: #002147;
  color: #fff;
  font-weight: bold;
  border-color: #002147;
  transform: scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .titulo h1 { font-size: 28px; text-align: center; }
  .logos img { width: 80px; margin: 5px; }
  .curso img { height: 150px; }
  .centered-text { width: 90%; font-size: 1rem; }
  footer { font-size: 12px; padding: 8px; }
  .modal { align-items: flex-start; }
  .modal-contenido { margin: 40px auto; max-width: 90%; }
  .contenedor-vista { width: 90%; padding: 20px; }
  .tabla-docentes th, .tabla-docentes td { font-size: 13px; padding: 8px; }
  .btn-excel { float: none; display: block; width: 100%; text-align: center; }
  .paginacion button { width: 32px; height: 32px; font-size: 13px; }
}

@media (max-width: 480px) {
  .titulo h1 { font-size: 22px; }
  .curso h3 { font-size: 16px; padding: 10px; }
  .btn-inscribirse { font-size: 14px; padding: 10px 18px; }
}

