@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Raleway", sans-serif;
}

.div {
  height: 100px;
  width: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  justify-content: center;
}

.horarios {
  padding: 100px 20px;
  background-color: #f4f4f4;
  text-align: center;
}

.horarios h2 {
  font-size: clamp(26px, 4vw, 40px);
  color: #2a2a90;
  margin-bottom: 40px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === Pestañas de cursos === */
.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.tabs::-webkit-scrollbar {
  height: 6px;
}

.tabs::-webkit-scrollbar-thumb {
  background-color: #0077cc;
  border-radius: 4px;
}

.tab-button {
  flex: 0 0 auto;
  padding: 10px 20px;
  border: none;
  background: #e0e0e0;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  scroll-snap-align: start;
  font-size: 15px;
  font-weight: 600;
}

.tab-button:hover {
  background: #d0d0d0;
}

.tab-button.active {
  background: #0077cc;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* === Contenido de cada curso === */
.tab-content {
  display: none;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  max-width: 1100px;
  margin: auto;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* === Tablas de horarios === */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: clamp(12px, 1.8vw, 15px);
  min-width: 600px;
}

table th,
table td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  word-break: break-word;
}

table th {
  background: #f0f0f0;
  font-weight: 700;
  text-transform: uppercase;
}

table tr:nth-child(even) {
  background-color: #fafafa;
}

table tr:hover {
  background-color: #f5faff;
}

/* === Responsividad === */
@media (max-width: 768px) {
  .tabs {
    justify-content: flex-start;
  }

  .tab-button {
    font-size: 14px;
    padding: 8px 15px;
  }

  .tab-content {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .horarios h2 {
    font-size: 28px;
  }

  .tabs {
    justify-content: flex-start;
  }

  .tab-button {
    font-size: 13px;
    padding: 6px 12px;
  }
}
