/* ====== ESTILOS GENERALES ====== */
:root {
  --primary-color: #6366f1;
  --secondary-color: #10b981;
  --dark-color: #1f2937;
  --light-color: #f9fafb;
  --gray-color: #6b7280;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --basico: #3b82f6;
  --intermedio: #f59e0b;
  --avanzado: #8b5cf6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  min-height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 700;
  text-align: center;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  width: 100%;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--gray-color);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

/* ====== BOTONES ====== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* ====== NAVEGACIÓN ====== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 1000;
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--dark-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-btn {
  padding: 10px 24px;
}

/* ====== SECCIÓN HERO ====== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  overflow: hidden;
  width: 100%;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 500;
  margin-bottom: 25px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--dark-color);
  text-align: center;
}

.hero p {
  font-size: 1.2rem;
  color: var(--gray-color);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-btns {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ====== ESTADÍSTICAS ====== */
.stats-bar {
  background: white;
  padding: 50px 20px;
  border-bottom: 1px solid #e5e7eb;
  width: 100%;
}

.stats-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-desc {
  color: var(--gray-color);
  font-size: 0.95rem;
}

/* ====== SECCIÓN MATERIAS ====== */
.subjects-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.filter-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.filter-btn.active {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: white;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  justify-items: center;
  width: 100%;
}

.subject-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.subject-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
  border-color: var(--primary-color);
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 15px;
}

.badge {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.badge-basico {
  background: var(--basico);
}

.badge-intermedio {
  background: var(--intermedio);
}

.badge-avanzado {
  background: var(--avanzado);
}

.card-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.subject-card h3 {
  font-size: 1.25rem;
  color: var(--dark-color);
  text-align: center;
}

.card-desc {
  color: var(--gray-color);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: center;
}

.syllabus-list {
  margin-bottom: 25px;
  text-align: left;
}

.syllabus-list li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--dark-color);
}

.syllabus-list i {
  color: var(--success-color);
  margin-right: 10px;
}

.card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #f3f4f6;
}

.modules-count {
  font-size: 0.9rem;
  color: var(--gray-color);
}

.card-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ====== GIMNASIO MATEMÁTICO ====== */
.interactive-section {
  background: var(--light-color);
  padding: 80px 20px;
  width: 100%;
}

.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  text-align: center;
}

.quiz-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.quiz-question {
  margin-bottom: 30px;
  text-align: center;
}

.quiz-question p {
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-align: center;
}

.math-box {
  font-size: 1.3rem;
  padding: 20px;
  background: var(--light-color);
  border-radius: 8px;
  text-align: center;
  font-family: 'Fira Code', monospace;
}

.quiz-options {
  margin-bottom: 25px;
}

.option-btn.correct {
  border-color: var(--success-color) !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
}

.option-btn.incorrect {
  border-color: var(--danger-color) !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.explanation-box {
  padding: 20px;
  background: #fef9c3;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid #eab308;
  text-align: center;
}

.quiz-controls {
  text-align: center;
}

/* ====== LABORATORIO MATEMÁTICO ====== */
.tools-section {
  padding: 80px 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  justify-items: center;
  width: 100%;
}

.tool-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-align: center;
}

.tool-inputs input,
.matrix-grid input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}

.tool-result {
  background: #f0fdf4;
  border-radius: 6px;
  color: #166534;
  font-weight: 500;
  text-align: center;
}

/* ====== PIE DE PÁGINA ====== */
footer {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 30px 20px;
  width: 100%;
  margin-top: auto;
}

/* ====== RESPONSIVO ====== */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .subjects-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .stats-container {
    grid-template-columns: 1fr;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .hero-btns .btn {
    width: 100%;
    text-align: center;
  }
}
