/* ===== Font Loading ===== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

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

/* ===== جلوگیری از اسکرول افقی ===== */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* ===== CSS Variables ===== */
:root {
  --green: #2E7D32;
  --green-light: #4CAF50;
  --green-dark: #1B5E20;
  --red: #C62828;
  --red-light: #E53935;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #222222;
  --text-muted: #666666;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: 0.3s ease;
}

/* ===== Base Elements ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--green);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ===== Header ===== */
.header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.logo-text {
  font-size: 1.75rem;
  font-weight: 900;
}

.logo-text .green { color: var(--green); }
.logo-text .red { color: var(--red); }

.logo-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-top: -4px;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-weight: 500;
  color: var(--text);
  padding: 0.5rem 0;
  position: relative;
}

.nav a:hover {
  color: var(--green);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: var(--transition);
}

.nav a:hover::after {
  width: 100%;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: white;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding-top: 3rem;
    gap: 2rem;
    transition: 0.4s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav.open {
    left: 0;
  }
  .menu-toggle {
    display: block;
  }
}

/* ===== Hero Slider ===== */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #BFDDE6;
  color: var(--text);
  display: flex;
  align-items: center;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.slide.active {
  display: flex;
}

/* رنگ‌های اختصاصی هر اسلاید */
.slide-1 { background: #BFDDE6; }
.slide-2 { background: #F6CBDD; }
.slide-3 { background: #FAE7A1; }
.slide-4 { background: #CDE8D3; }
.slide-5 { background: #EBD9B5; }

.slide-content {
  max-width: 700px;
}

.slide h1 {
  font-size: 3.2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #222222;
}

.slide p {
  font-size: 1.35rem;
  opacity: 0.95;
  color: #333333;
}

.slider-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: #222222;
  transform: scale(1.2);
}

/* ===== Social Section ===== */
.social-section {
  background: white;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.2rem 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  color: var(--text);
}

.social-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.social-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.social-icon.aparat-icon {
  width: 36px;
  height: 36px;
}

/* ===== Section General ===== */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--green);
  margin: 12px auto;
  border-radius: 2px;
}

/* ===== Books Grid ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.book-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.book-cover {
  height: 260px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* رنگ اختصاصی کتاب تعطیلات - آبی روشن */
.book-cover.book-vacation {
  background: #BFDDE6;
}

/* رنگ اختصاصی کتاب نقاشی مرموز - صورتی */
.book-cover.book-mystery {
  background: #F6CBDD;
}

.book-cover-content {
  text-align: center;
  padding: 2rem;
  color: #222222;
}

.en-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  opacity: 0.95;
  color: #222222;
}

.fa-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #1a1a1a;
}

.book-info {
  padding: 1.5rem;
}

.book-info h3 {
  margin-bottom: 0.8rem;
  color: var(--green);
}

.book-meta {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge.level {
  background: #e8f5e9;
  color: var(--green-dark);
}

.badge.audio {
  background: #e3f2fd;
  color: #1976d2;
}

/* ===== Courses ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.course-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.course-card:hover {
  transform: translateY(-8px);
}

.course-thumb {
  height: 220px;
  background: linear-gradient(135deg, #2E7D32, #4CAF50);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* رنگ اختصاصی دوره متن‌های کوتاه - زرد */
.course-thumb.course-short {
  background: #FAE7A1;
}

/* رنگ اختصاصی دوره ۵۰۴ واژه - سبز روشن */
.course-thumb.course-vocab {
  background: #CDE8D3;
}

.play-icon {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.play-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--green);
  margin-left: 4px;
}

.course-info {
  padding: 1.8rem;
}

.course-info h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.course-target {
  margin: 1.2rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* ===== About Section ===== */
.about-content p {
  font-size: 1.15rem;
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
}

.feature {
  text-align: center;
  padding: 2rem 1rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ===== Contact Section ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  color: var(--green);
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  align-items: center;
  justify-content: center;
  text-align: right;
  background: var(--card-bg);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contact-item-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f5e9;
  border-radius: 50%;
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
}

.contact-item-icon.telegram-icon {
  background: #e3f2fd;
}

.contact-item-icon.instagram-icon {
  background: #fce4ec;
}

.contact-item-icon.email-icon {
  background: #e3f2fd;
}

.contact-item a {
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.contact-item a:hover {
  color: var(--green);
}

/* ===== Footer ===== */
.footer {
  background: #222;
  color: #ddd;
  padding: 3rem 0 1.5rem;
  text-align: center;
}

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

.footer-nav a {
  color: #bbb;
}

.footer-nav a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 1.5rem;
  color: #888;
  font-size: 0.95rem;
}

/* ===== Utilities ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
}

.btn:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  color: white;
}

.btn-red {
  background: var(--red);
}

.btn-red:hover {
  background: #b71c1c;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .slide h1 {
    font-size: 2.6rem;
  }
}

@media (max-width: 576px) {
  .section {
    padding: 3.5rem 0;
  }
  .section-title {
    font-size: 2rem;
  }
  .contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  /* Audio Panel Styles */
.audio-panel {
  margin-top: 1rem;
  padding: 1.2rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.audio-item {
  margin-bottom: 1rem;
}

.audio-item:last-child {
  margin-bottom: 0;
}

.audio-item audio {
  width: 100%;
  margin-top: 8px;
}

/* Button Hover */
.btn:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}
}