/* ==============================================================
   styles.css — Shared styles for Community Language Courses
   ============================================================== */

/* ---- CSS custom property defaults (overridden by theme files) ---- */
:root {
  --font-display: 'Cinzel', 'Georgia', serif;
  --font-body:    'Crimson Pro', 'Georgia', serif;

  --bg-color:           #f8f6f2;
  --text-color:         #1a1a1a;
  --text-muted:         #6b6b6b;
  --accent-color:       #444444;
  --card-bg:            #ffffff;
  --card-header-bg:     #f0f0f0;
  --card-header-hover:  #e4e4e4;
  --border-color:       #d4d0c8;
  --row-hover:          #f5f5f5;
  --table-header-text:  #ffffff;
  --footer-bg:          #2a2a2a;
  --footer-text:        rgba(255, 255, 255, 0.70);
  --hero-gradient:      linear-gradient(135deg, #333 0%, #555 100%);

  --radius:     8px;
  --shadow:     0 2px 14px rgba(0, 0, 0, 0.10);
  --transition: 0.18s ease;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-color);
  background: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==============================================================
   LANGUAGE COURSE PAGE
   ============================================================== */

/* ---- Hero ---- */
.lang-hero {
  background: var(--hero-gradient);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.site-nav {
  padding: 0.7rem 1.5rem;
  background: rgba(0, 0, 0, 0.22);
}

.nav-home {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}

.nav-home:hover,
.nav-home:focus {
  color: #fff;
  text-decoration: underline;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 2.5rem;
  text-align: center;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  font-style: italic;
  opacity: 0.9;
}

/* ---- Main layout ---- */
main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.course-note {
  border-left: 3px solid var(--accent-color);
  padding-left: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  opacity: 0.88;
}

.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.35rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
}

.section-desc {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* ---- Schedule table ---- */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.schedule-table th {
  background: var(--accent-color);
  color: var(--table-header-text);
  padding: 0.7rem 1rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.schedule-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.schedule-table tbody tr:last-child td {
  border-bottom: none;
}

.schedule-table tbody tr:hover {
  background: var(--row-hover);
}

/* ---- Lesson cards ---- */
.lesson-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  user-select: none;
  background: var(--card-header-bg);
  transition: background var(--transition);
}

.lesson-header:hover {
  background: var(--card-header-hover);
}

.lesson-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--accent-color);
  font-weight: 600;
  white-space: nowrap;
  min-width: 5rem;
}

.lesson-title {
  flex: 1;
  font-weight: 600;
  color: var(--text-color);
}

.lesson-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-style: italic;
}

.toggle-icon {
  color: var(--accent-color);
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}

.lesson-body {
  display: none;
  padding: 1rem 1.1rem 1.25rem;
  border-top: 1px solid var(--border-color);
}

.lesson-card.open .lesson-body {
  display: block;
}

/* ---- Materials ---- */
.material {
  margin-bottom: 1rem;
  padding-left: 0.2rem;
}

.material:last-child { margin-bottom: 0; }

.material-pdf a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity var(--transition);
}

.material-pdf a:hover,
.material-pdf a:focus {
  text-decoration: underline;
  opacity: 0.78;
}

.material-label {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* 16:9 responsive video wrapper */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

video {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #000;
}

/* ---- State messages ---- */
.empty-msg,
.loading-msg {
  font-style: italic;
  color: var(--text-muted);
  padding: 0.75rem 0;
}

.error-msg {
  color: #b91c1c;
  font-style: italic;
  padding: 0.75rem 0;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 1.25rem;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 0.9rem;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  margin-top: auto;
}

/* ==============================================================
   HOME PAGE
   ============================================================== */

.home-page {
  background: #16213e;
  color: #f0ece4;
}

.home-hero {
  background: linear-gradient(160deg, #0f0f1a 0%, #16213e 45%, #1a3a6c 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 2rem 3rem;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  letter-spacing: 0.07em;
  color: #c9a84c;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  margin-bottom: 0.7rem;
}

.home-hero .hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}

.hero-note {
  font-size: 0.95rem;
  opacity: 0.65;
  font-style: italic;
  max-width: 560px;
  margin: 0 auto;
}

.home-page main {
  max-width: 1100px;
  padding: 2.5rem 1.5rem 3rem;
}

.choose-prompt {
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ---- Language selection cards ---- */
.language-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.lang-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition), box-shadow var(--transition);
  outline-offset: 3px;
}

.lang-card:hover,
.lang-card:focus {
  transform: translateY(-5px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
}

.card-banner {
  height: 7px;
  flex-shrink: 0;
}

.card-body {
  flex: 1;
  padding: 1.75rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
}

.lang-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.lang-script {
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  opacity: 0.78;
  font-style: italic;
}

.lang-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
  opacity: 0.82;
  margin-bottom: 1.3rem;
}

.card-cta {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  font-weight: 600;
  text-transform: uppercase;
  align-self: flex-start;
}

/* Greek card — Aegean blue */
.greek-card {
  background: linear-gradient(155deg, #1d3f6e 0%, #2b6699 100%);
  color: #e8f4fd;
}
.greek-card .card-banner { background: #4a9fd4; }
.greek-card h2           { color: #a8d8f0; }
.greek-card .card-cta    { color: #a8d8f0; }

/* Hebrew card — earthy ochre */
.hebrew-card {
  background: linear-gradient(155deg, #5c3a1e 0%, #8b5a2b 100%);
  color: #faf3e8;
}
.hebrew-card .card-banner { background: #c4843a; }
.hebrew-card h2           { color: #f0c884; }
.hebrew-card .card-cta    { color: #f0c884; }

/* Latin card — parchment sepia */
.latin-card {
  background: linear-gradient(155deg, #3d2b1f 0%, #7a5a3a 100%);
  color: #f5e6c8;
}
.latin-card .card-banner { background: #a07830; }
.latin-card h2           { color: #f0d090; }
.latin-card .card-cta    { color: #f0d090; }

/* Home page footer */
.home-page .site-footer {
  --footer-bg:   rgba(8, 8, 20, 0.85);
  --footer-text: rgba(255, 255, 255, 0.55);
  background: var(--footer-bg);
  color: var(--footer-text);
}

/* ==============================================================
   RESPONSIVE
   ============================================================== */

@media (max-width: 640px) {
  main {
    padding: 1.5rem 1rem;
  }

  .schedule-table {
    font-size: 0.9rem;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 0.5rem 0.7rem;
  }

  /* Hide Location column on small screens */
  .schedule-table th:last-child,
  .schedule-table td:last-child {
    display: none;
  }

  .lesson-header {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .lesson-date {
    display: none;
  }

  .home-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .language-cards {
    grid-template-columns: 1fr;
  }
}
