/*
Theme Name: TC English Method
Theme URI: https://teddycarrascal.com/
Description: Child theme of Mudarib with editorial premium look for the English Method course. Overrides Tutor LMS lesson and dashboard templates. Serif typography, navy/cream/gold palette.
Author: Teddy Carrascal · Pipeline Lecciones
Author URI: https://teddycarrascal.com/
Template: mudarib
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tc-english-method
Tags: education, course, podcast
*/

/* ===================================================================
   TC ENGLISH METHOD · EDITORIAL PREMIUM CHILD THEME
   Inherits Mudarib parent. Overrides only lesson-related styling.
   Palette: cream #fdf9f0 · navy #0b3d91 · gold #854F0B · charcoal #2c2826
   Type:    serif Georgia (titles) · sans Inter/system (chrome)
   =================================================================== */

:root {
  --tc-cream: #fdf9f0;
  --tc-cream-soft: #faf5e6;
  --tc-navy: #0b3d91;
  --tc-navy-deep: #082b69;
  --tc-gold: #854F0B;
  --tc-gold-soft: #d4a017;
  --tc-charcoal: #2c2826;
  --tc-muted: #6f6a5e;
  --tc-rule: #d8d2c1;
  --tc-serif: Georgia, "Times New Roman", "Source Serif Pro", serif;
  --tc-sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* ----- Base typography reset for lesson pages only ----- */
body.single-lesson,
body.tutor-screen-lesson-single {
  background: var(--tc-cream);
  color: var(--tc-charcoal);
  font-family: var(--tc-serif);
}

body.single-lesson .site-content,
body.tutor-screen-lesson-single .tutor-course-spotlight-wrapper {
  background: var(--tc-cream);
}

/* ----- TC lesson wrapper (2 columns) ----- */
.tc-lesson-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  background: var(--tc-cream);
  font-family: var(--tc-serif);
}

.tc-lesson-topbar {
  background: var(--tc-navy);
  color: var(--tc-cream);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--tc-serif);
  font-size: 14px;
  font-style: italic;
  border-radius: 4px 4px 0 0;
  margin-top: 2rem;
}

.tc-lesson-topbar .right {
  font-family: var(--tc-sans);
  font-size: 12px;
  font-style: normal;
  display: flex;
  gap: 18px;
  align-items: center;
}

.tc-lesson-topbar a { color: var(--tc-cream); text-decoration: none; }
.tc-lesson-topbar a:hover { text-decoration: underline; }

.tc-pill {
  background: var(--tc-cream);
  color: var(--tc-navy);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

/* ----- Hero ----- */
.tc-lesson-hero {
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, var(--tc-navy-deep) 100%);
  height: 220px;
  overflow: hidden;
  margin: 0;
}
.tc-lesson-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(253,249,240,0.04) 3px, rgba(253,249,240,0.04) 6px);
}
.tc-lesson-hero.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,22,70,0.55), rgba(8,22,70,0.85));
}
.tc-hero-meta {
  position: absolute;
  left: 32px;
  bottom: 24px;
  color: var(--tc-cream);
  font-family: var(--tc-serif);
  z-index: 2;
}
.tc-hero-meta .kicker {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-family: var(--tc-sans);
  opacity: 0.75;
  margin-bottom: 6px;
}
.tc-hero-meta h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 500;
  font-family: var(--tc-serif);
  color: var(--tc-cream) !important;
}
.tc-hero-meta .sub {
  font-size: 14px;
  font-family: var(--tc-sans);
  opacity: 0.75;
  margin-top: 6px;
}

/* ----- Podcast player sticky ----- */
.tc-podcast-player {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: var(--tc-cream);
  border-bottom: 1px solid var(--tc-rule);
  padding: 14px 28px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.tc-play-meta { flex: 1; min-width: 0; }
.tc-play-meta .ep-label {
  font-family: var(--tc-serif);
  font-size: 14px;
  color: var(--tc-navy);
  font-weight: 500;
  margin: 0 0 2px;
}
.tc-play-meta .ep-time {
  font-size: 11px;
  color: var(--tc-muted);
  font-family: var(--tc-sans);
}
.tc-play-meta audio {
  width: 100%;
  height: 30px;
  margin-top: 4px;
}
.tc-podcast-player .icon-btn {
  background: var(--tc-cream-soft);
  border: 1px solid var(--tc-rule);
  border-radius: 4px;
  padding: 7px 11px;
  font-size: 12px;
  color: var(--tc-navy);
  text-decoration: none;
  font-family: var(--tc-sans);
}
.tc-podcast-player .icon-btn:hover { background: var(--tc-navy); color: var(--tc-cream); }

/* ----- Two-column body ----- */
.tc-lesson-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 36px;
  padding: 32px 28px;
  background: var(--tc-cream);
}
@media (max-width: 800px) {
  .tc-lesson-body { grid-template-columns: 1fr; }
  .tc-lesson-sidebar { order: -1; position: static !important; margin-bottom: 1.5rem; }
}

/* ----- Lesson prose (editorial) ----- */
.tc-lesson-prose {
  font-family: var(--tc-serif);
  font-size: 16px;
  line-height: 1.7;
  color: var(--tc-charcoal);
}
.tc-lesson-prose h1,
.tc-lesson-prose h2,
.tc-lesson-prose h3 {
  font-family: var(--tc-serif);
  font-weight: 500;
  color: var(--tc-navy);
}
.tc-lesson-prose h1 { font-size: 28px; border-bottom: 3px solid var(--tc-navy); padding-bottom: 8px; margin: 1.5rem 0 1rem; }
.tc-lesson-prose h2 {
  font-size: 22px;
  border-left: 4px solid var(--tc-navy);
  padding-left: 12px;
  margin: 2rem 0 0.6rem;
  border-bottom: none;
}
.tc-lesson-prose h3 {
  font-size: 17px;
  color: var(--tc-charcoal);
  margin: 1.4rem 0 0.4rem;
}
.tc-lesson-prose p,
.tc-lesson-prose li { font-size: 16px; line-height: 1.7; }
.tc-lesson-prose strong { color: var(--tc-navy-deep); font-weight: 500; }

/* Editorial callouts */
.tc-lesson-prose .rule-box,
.tc-lesson-prose .callout-rule {
  background: #eef4ff;
  border: 1px solid var(--tc-navy);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 1.2rem 0;
  font-size: 15px;
  color: var(--tc-navy-deep);
}
.tc-lesson-prose .pitfall,
.tc-lesson-prose .callout-pitfall {
  background: #fff4f0;
  border-left: 5px solid #c0392b;
  padding: 12px 16px;
  margin: 1.2rem 0;
  border-radius: 0 4px 4px 0;
}
.tc-lesson-prose .upgrade,
.tc-lesson-prose .callout-tip {
  background: #f0fff4;
  border-left: 5px solid #1e7d4a;
  padding: 12px 16px;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.tc-lesson-prose .ex {
  background: var(--tc-cream-soft);
  padding: 12px 16px;
  margin: 0.8rem 0;
  border-radius: 4px;
  border-left: 3px solid var(--tc-gold);
}
.tc-lesson-prose .template-box {
  background: #fafafa;
  border: 1px dashed var(--tc-muted);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}
.tc-lesson-prose table.ipa {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 1rem 0;
}
.tc-lesson-prose table.ipa th {
  background: var(--tc-navy);
  color: var(--tc-cream);
  text-align: left;
  padding: 8px 10px;
}
.tc-lesson-prose table.ipa td {
  border: 1px solid var(--tc-rule);
  padding: 7px 10px;
  vertical-align: top;
}
.tc-lesson-prose .checklist {
  list-style: none;
  padding-left: 0;
}
.tc-lesson-prose .checklist li {
  padding: 5px 0 5px 28px;
  text-indent: -28px;
  font-size: 16px;
}
.tc-lesson-prose .checklist li:before {
  content: "☐ ";
  color: var(--tc-navy);
  font-weight: 500;
  font-size: 18px;
}
.tc-lesson-prose .answer-key {
  background: #f5f3ee;
  border: 1px solid var(--tc-rule);
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 2rem;
}
.tc-lesson-prose .tag {
  display: inline-block;
  background: var(--tc-navy);
  color: var(--tc-cream);
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 12px;
  margin-right: 6px;
  font-family: var(--tc-sans);
  letter-spacing: 0.5px;
}

/* ----- Sidebar (TOC + actions + notes) ----- */
.tc-lesson-sidebar {
  position: sticky;
  top: 130px;
  align-self: start;
  font-family: var(--tc-sans);
  font-size: 13px;
  color: var(--tc-muted);
}
.tc-sidebar-section { margin-bottom: 24px; }
.tc-sidebar-section h4 {
  font-family: var(--tc-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tc-muted);
  margin: 0 0 8px;
  font-weight: 500;
}
.tc-toc-item {
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--tc-charcoal);
  border-left: 2px solid transparent;
  text-decoration: none;
  margin-bottom: 1px;
  cursor: pointer;
}
.tc-toc-item:hover { background: var(--tc-cream-soft); }
.tc-toc-item.active {
  background: var(--tc-cream);
  border-left: 2px solid var(--tc-navy);
  color: var(--tc-navy);
  font-weight: 500;
}
.tc-action-row { display: flex; gap: 8px; }
.tc-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--tc-cream);
  border: 1px solid var(--tc-rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--tc-navy);
  cursor: pointer;
  text-decoration: none;
}
.tc-action-btn:hover { background: var(--tc-navy); color: var(--tc-cream); }
.tc-action-btn.active { background: var(--tc-gold); color: var(--tc-cream); border-color: var(--tc-gold); }

/* ----- Bottom action bar ----- */
.tc-lesson-bottom {
  padding: 18px 28px;
  background: var(--tc-cream-soft);
  border-top: 1px solid var(--tc-rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--tc-muted);
  font-family: var(--tc-sans);
  border-radius: 0 0 4px 4px;
}
.tc-cta {
  background: var(--tc-navy);
  color: var(--tc-cream);
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.tc-cta:hover { background: var(--tc-navy-deep); color: var(--tc-cream); }

/* ----- Dashboard editorial overlay (kept light, won't fight Mudarib) ----- */
body.tutor-screen-dashboard {
  --tc-cream: #fdf9f0;
}
body.tutor-screen-dashboard .tutor-dashboard {
  font-family: var(--tc-serif);
}
body.tutor-screen-dashboard .tutor-dashboard h1,
body.tutor-screen-dashboard .tutor-dashboard h2,
body.tutor-screen-dashboard .tutor-dashboard h3 {
  font-family: var(--tc-serif);
  color: var(--tc-navy);
  font-weight: 500;
}

/* ----- Print fallback ----- */
@media print {
  .tc-podcast-player, .tc-lesson-sidebar, .tc-lesson-bottom, .tc-lesson-topbar { display: none !important; }
  .tc-lesson-body { grid-template-columns: 1fr; padding: 0; }
  .tc-lesson-prose { font-size: 12pt; }
}
