/* ============================================
   KOINÉ ACADEMY - ESTILOS GLOBALES PARA EL CURSO
   Compatible con lecciones 1 a 70
   ============================================ */

/* ---------- RESET Y BASE ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f6f9fc;
  color: #1a2c3e;
  line-height: 1.5;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- HEADER (sticky, navegación) ---------- */
.site-header {
  background: white;
  border-bottom: 1px solid #e9edf2;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8rem 0;
  gap: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 1.8rem;
  color: #1a4c61;
}

.logo-text {
  font-weight: 700;
  font-size: 1.3rem;
  color: #0b2b3b;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
}

.nav-links a {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-links a:hover {
  color: #c6a43b;
}

.social-icons-header {
  display: flex;
  gap: 0.8rem;
}

.social-icons-header a {
  color: #5b6e8c;
  font-size: 1.1rem;
}

.social-icons-header a:hover {
  color: #c6a43b;
}

/* Responsive header */
@media (max-width: 900px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }
}

/* ---------- HERO (cabecera de cada lección) ---------- */
.hero {
  background: linear-gradient(135deg, #0b2b3b 0%, #1a4c61 100%);
  border-radius: 2rem;
  padding: 2rem 1.8rem;
  margin: 1.5rem 0 2rem;
  color: white;
}

.hero h1 {
  font-size: 1.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-badge {
  background: #ffb347;
  color: #1e2f3a;
  border-radius: 40px;
  padding: 0.25rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.progress-section {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.progress-bar-container {
  flex: 1;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  width: 15%;
  background: #ffcd7e;
  height: 100%;
  border-radius: 30px;
}

.stats {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---------- ACORDEONES ---------- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.accordion-item {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid #e9edf2;
  overflow: hidden;
}

.accordion-header {
  background: white;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: #f9fafc;
}

.accordion-header i:first-child {
  color: #2c7a6e;
  margin-right: 0.6rem;
}

.accordion-header .toggle-icon {
  color: #2c7a6e;
  transition: transform 0.3s;
}

.accordion-item.active .accordion-header .toggle-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  padding: 0 1.5rem;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  border-top: 0px solid #eef2f6;
}

.accordion-item.active .accordion-content {
  max-height: 2000px;
  padding: 0 1.5rem 1.8rem 1.5rem;
  border-top: 1px solid #eef2f6;
}

/* ---------- CARD HIGHLIGHT ---------- */
.card-highlight {
  background: #fef9e6;
  border-left: 6px solid #f4b942;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  margin: 1rem 0;
}

/* ---------- TEXTO GRIEGO ---------- */
.greek-word {
  font-family: 'Segoe UI', 'Noto Sans', 'Times New Roman', serif;
  font-size: 1.3rem;
  font-weight: 600;
  background: #eef3fa;
  padding: 0.2rem 0.6rem;
  border-radius: 16px;
  display: inline-block;
}

/* ---------- BOTONES ---------- */
.btn-reveal {
  background: #eef2fa;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0.5rem 0;
  transition: background 0.2s;
}

.btn-reveal i {
  margin-right: 0.4rem;
}

.btn-reveal:hover {
  background: #dce5f0;
}

/* ---------- RESPUESTA OCULTA ---------- */
.answer-text {
  background: #e9f3e6;
  padding: 0.75rem;
  border-radius: 1rem;
  margin-top: 0.6rem;
  display: none;
  border-left: 4px solid #3f9e6d;
}

.answer-text.show {
  display: block;
}

/* ---------- TABLAS ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

th, td {
  padding: 0.7rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #eef2f6;
  font-weight: 600;
}

/* ---------- FLASHCARDS ---------- */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.vocab-card {
  background: #f8fafd;
  border-radius: 1rem;
  padding: 0.8rem;
  text-align: center;
  cursor: pointer;
  transition: 0.1s;
}

.vocab-card:hover {
  background: #eef3fa;
}

/* ---------- QUIZ ---------- */
.quiz-option {
  background: #f1f5f9;
  border-radius: 3rem;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0;
  cursor: pointer;
  transition: background 0.2s;
}

.quiz-option:hover {
  background: #e2eaf5;
}

.correct-feedback {
  color: #1f7b4d;
  font-weight: 500;
}

.wrong-feedback {
  color: #c2410c;
}

/* ---------- LÍNEA DE TIEMPO ---------- */
.timeline {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 0;
}

.timeline-node {
  min-width: 150px;
  background: #f1f5f9;
  border-radius: 1.2rem;
  padding: 1rem;
  text-align: center;
}

/* ---------- ALFABETO, DIPTONGOS, ACENTOS, CASOS ---------- */
.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.letter-card {
  background: #f8fafd;
  border-radius: 1rem;
  padding: 0.8rem;
  text-align: center;
}

.dip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.dip-card {
  background: #f1f5f9;
  border-radius: 1rem;
  padding: 0.8rem;
  text-align: center;
  min-width: 80px;
}

.accent-table {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.accent-card {
  flex: 1;
  background: #f1f5f9;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.case-table {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.case-card {
  flex: 1;
  background: #f1f5f9;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  min-width: 120px;
}

@media (max-width: 700px) {
  .case-card {
    min-width: 100%;
  }
}

/* ---------- FOOTER (mejorado) ---------- */
.main-footer {
  background: #111c16;
  color: #cdd9cf;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid #2a3a2e;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: #e0d6c6;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #c6a43b;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-social a {
  color: #cdd9cf;
  font-size: 1.4rem;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: #c6a43b;
}

/* ---------- UTILIDADES ---------- */
.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #c6a43b;
  padding: 10px;
  border-radius: 50%;
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 45px;
  height: 45px;
  transition: 0.2s;
  z-index: 1000;
}

.scroll-top:hover {
  background: #1a4c61;
}

/* ---------- RESPONSIVE GENERAL ---------- */
@media (max-width: 700px) {
  .hero h1 {
    font-size: 1.5rem;
  }
  .container {
    padding: 0 1rem;
  }
  .accordion-header {
    font-size: 1rem;
    padding: 1rem;
  }
}