/* ======================================== */
/* English Teaching Site — Styles */
/* ======================================== */

:root {
  --primary: #8c3b4e;
  --primary-dark: #6a2c3b;
  --secondary: #b08d57;
  --accent: #4a5d4a;
  --tertiary: #7a6a4a;
  --bg: linear-gradient(180deg, #1a140f 0%, #2d2218 50%, #3a2e24 100%);
  --surface: #2d241c;
  --text: #e8ddc7;
  --text-muted: #a89878;
  --border: #5c4a3a;
  --radius: 24px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}
body.home-page {
  background: url('../images/backsplash.jfif') center/cover no-repeat fixed;
  background-size: cover;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navbar */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.logo span { color: var(--secondary); }
.nav-links { display: flex; list-style: none; gap: 1.5rem; }
.nav-links a { font-weight: 500; color: var(--text); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; border: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* Hero */
.hero {
  padding: 4rem 2rem; text-align: center;
  background: linear-gradient(135deg, rgba(140, 59, 78, 0.9) 0%, rgba(176, 141, 87, 0.9) 100%); color: #fff;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 700; }
.hero p { font-size: 1.125rem; margin-bottom: 2rem; opacity: 0.95; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero .btn { margin: 0 0.5rem; }

/* Layout */
.container { max-width: 1000px; margin: 0 auto; padding: 0 1rem; }
section { padding: 3rem 1rem; }
h2 { font-size: 1.875rem; margin-bottom: 1rem; color: var(--text); }
h3 { font-size: 1.25rem; margin: 1rem 0 0.5rem; color: var(--primary); }
p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }

/* About */
.about { background: var(--surface); }
.about p { font-size: 1.05rem; color: var(--text); }

/* Home */
.home { background: var(--surface); }

/* Calendar Section */
.calendar-section { background: var(--surface); }
.calendar-controls {
  display: flex; justify-content: center; align-items: center;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.calendar-controls .btn { padding: 0.1rem 0.8rem; font-size: 1.2rem; min-width: 40px; }
.calendar {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem; max-width: 700px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; padding: 0.5rem;
}
.calendar-weekday {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  padding: 0.1rem 0;
}
.calendar-day {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; aspect-ratio: 1;
  padding: 0.1rem; border-radius: 8px;
  font-size: 0.6rem; color: var(--text);
  cursor: pointer; transition: background 0.2s, transform 0.1s;
}

@media (max-width: 480px) {
  .calendar-day {
    font-size: 0.4rem;
  }
}
.calendar-day.other-month { color: #cbd5e1; cursor: default; }
.calendar-day.today {
  background: var(--primary); color: #fff; border-radius: 50%;
  font-weight: 700;
}
.calendar-day.has-lesson {
  background: #dbeafe; border-radius: 8px;
}
.calendar .calendar-day {
  font-size: 1rem; padding: 0.5rem; aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: #ef6b2f;
}
.calendar-day.has-lesson.today {
  background: var(--primary); border-radius: 50%;
}
.calendar-day a {
  color: inherit; text-decoration: none; font-weight: 700;
  display: block; text-align: center; width: 100%;
}
.calendar-day .lesson-link {
  font-size: 0.68rem; margin-top: 0.25rem; text-align: center;
  color: var(--primary); font-weight: 600; display: none;
}
.calendar-day.has-lesson .lesson-link { display: block; }

/* Homework Column */
.homework-column { display: flex; flex-direction: column; gap: 1rem; }
.homework-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.homework-item h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
.homework-item p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }
.homework-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--text-muted); font-weight: 600;
  margin-top: auto;
}
.submit-homework .form-note {
  font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem;
}

/* Footer */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 1.5rem 1rem; text-align: center;
  color: var(--text-muted); font-size: 0.38rem;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar { flex-direction: column; gap: 1rem; padding: 1rem; }
  .nav-links { gap: 1rem; position: static; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { width: 100%; display: block; }
  
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  
  .calendar { grid-template-columns: 1fr; }
  .calendar-weekday { display: none; }
  
  .lesson-grid { grid-template-columns: 1fr; }
  
  .homework-column { flex-direction: column; }
  
  .controls { flex-direction: column; align-items: stretch; }
  .controls .btn { width: 100%; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.875rem; }
  .hero .btn { display: block; width: 100%; margin: 0.5rem 0; }
  
  .lesson-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.lesson-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: #3a2e24;
}

.lesson-card:active {
  transform: translateY(2px);
}

/* Level tag colors */
.lesson-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.lesson-tag.beginner { background: #4a5d4a; color: #e8ddc7; }
.lesson-tag.elementary { background: #5c4a3a; color: #e8ddc7; }
.lesson-tag.intermediate { background: #7a6a4a; color: #e8ddc7; }
.lesson-tag.advanced { background: #6a2c3b; color: #e8ddc7; }

.lesson-card h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
  
  .about p { font-size: 0.95rem; }
  
  .calendar-day { aspect-ratio: 1; font-size: 0.55rem; padding: 0.3rem; }
  .calendar { max-width: 100%; grid-template-columns: repeat(7, 1fr); }
  .calendar-day .lesson-link { font-size: 0.5rem; }
}
