/* ===========================
   RESET GENERAL
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #e8f0f8;
  color: #333;
  line-height: 1.5;
}

/* ===========================
   HEADER
=========================== */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

header img.img_header {
  max-width: 120px;
}

/* ===========================
   MAIN CONTENEDOR (Centrado)
=========================== */
main {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===========================
   TITULOS
=========================== */
h1 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 25px;
  color: #2c3e50;
}

h2, h3, h4 {
  color: #2c3e50;
  margin-bottom: 15px;
  text-align: center;
}

/* ===========================
   FORMULARIOS
=========================== */
form {
  width: 100%;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

form input, form textarea, form select {
  width: 90%;
  max-width: 600px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: all 0.3s ease;
}

form input:focus, form textarea:focus, form select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 8px rgba(52,152,219,0.3);
}

form button {
  padding: 12px 20px;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

form button:hover {
  opacity: 0.9;
}

/* Botones específicos */
.save-btn {
  background: #28a745;
  color: white;
  margin-top: 10px;
}

.save-btn:hover {
  background: #1e7e34;
}

.item button, .alumno-item button {
  background: #e74c3c;
  color: white;
  border-radius: 6px;
}

.item button:hover, .alumno-item button:hover {
  background: #c0392b;
}

/* ===========================
   TARJETAS
=========================== */
.secuencia-card, .actividad-card {
  width: 95%;
  max-width: 900px;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #ddd;
}

/* ===========================
   ITEMS DINÁMICOS (objetivos, capacidades, campos, alumnos)
=========================== */
.item, .alumno-item {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.35s ease;
}

.item.show, .alumno-item.show {
  opacity: 1;
  transform: translateY(0);
}

.item input, .item textarea, .alumno-item input, .alumno-item select {
  flex: 1 1 200px;
  max-width: 300px;
}

/* ===========================
   GRID DE ALUMNOS
=========================== */
.alumnos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.alumno-cuadro {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-align: center;
  padding: 6px;
  background: #f8f9fa;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.punto {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 5px;
}

.punto.malo { background-color: #e74c3c; }
.punto.regular { background-color: #f39c12; }
.punto.bueno { background-color: #27ae60; }

/* ===========================
   ACORDEÓN
=========================== */
.accordion {
  width: 95%;
  max-width: 900px;
  margin-bottom: 15px;
}

.accordion-header {
  cursor: pointer;
  padding: 12px;
  background: #3498db;
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.accordion-header:hover {
  background: #2980b9;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s ease;
  background: #f1f1f1;
  padding: 0 12px;
  border-radius: 0 0 8px 8px;
}

.accordion-content.open {
  max-height: 800px;
  padding: 12px;
}

/* ===========================
   TARJETAS - CENTRADO Y RESPONSIVE
=========================== */
.secuencia-card, .actividad-card {
  width: 100%;
  max-width: 900px;       /* ancho máximo */
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;      /* centrado horizontal */
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

/* Pequeño responsive adicional */
@media (max-width: 1024px) {
  .secuencia-card, .actividad-card {
    max-width: 700px;
    padding: 18px;
  }
}

@media (max-width: 768px) {
  .secuencia-card, .actividad-card {
    max-width: 95%;
    padding: 15px;
  }
}


/* ===========================
   ANIMACIÓN FADE-IN
=========================== */
.fade-in {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeIn 0.35s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  main, .secuencia-card, .actividad-card {
    width: 95%;
    padding: 15px;
  }

  .item input, .item textarea, .alumno-item input, .alumno-item select {
    flex: 1 1 100%;
  }

  .alumno-cuadro {
    width: 60px;
    height: 60px;
    font-size: 10px;
  }
}
