/* ===========================
   RESET & BASE STYLES
   تنظیمات پایه و بازنشانی
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #e74c3c;
  --secondary: #2c3e50;
  --accent: #f1c40f;
  --light-bg: #f8f8f8;
  --text-dark: #333;
}

body {
  scroll-padding-top: 70px;
  font-family: 'Vazirmatn', sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--light-bg);
  direction: rtl;
}

html, body {
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ===========================
   NAVIGATION
   نوار ناوبری
=========================== */
.navbar {
  background-color: var(--secondary);
  color: #fff;
  padding: 0.6rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* منوی موبایل */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===========================
   HERO BANNER IMPROVEMENTS
   بهبود بخش بنر اصلی
=========================== */
.banner {
  position: relative;
  height: 100vh;
  overflow: hidden;
  width: 100%;
}

.banner, .section:first-of-type {
  padding-top: 70px;
}


.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

/* بهبود overlay برای خوانایی بهتر متن */
.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 3;
}

.banner-content {
  position: relative;
  z-index: 4;
  color: #fff;
  text-align: center;
  padding: 0 20px;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.banner h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  line-height: 1.2;
}

.banner p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
  line-height: 1.6;
}

.btn {
  background: linear-gradient(45deg, var(--primary), #c0392b);
  color: #fff;
  padding: 16px 35px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  display: inline-block;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn:hover {
  background: transparent;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* نقاط کنترل اسلایدر - بهبود یافته */
.slider-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 5;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.dot.active {
  background-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dot:hover {
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

/* ===========================
   SECTIONS STYLES
   استایل بخش‌های مختلف
=========================== */
.section {
  padding: 60px 0;
  text-align: center;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
}

.section p {
  max-width: 700px;
  margin: 0 auto 1rem;
  font-size: 1.1rem;
  color: #555;
}

/* ===========================
   ABOUT SECTION
   بخش درباره ما
=========================== */
.about {
  background-color: #fff;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.about-item {
  background: #fff;
  padding: 25px 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.about-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.about-item h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.about-item p {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
  margin: 0;
}

/* ===========================
   CLASSES SECTION
   بخش کلاس‌ها
=========================== */
.classes {
  background-color: #f0f0f0;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 20px;
  width: 280px;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-10px);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

/* ===========================
   BOOKS SECTION
   بخش کتاب‌ها
=========================== */
.books-section {
  background-color: #fff;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.work-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.work-item:hover {
  transform: translateY(-5px);
}

.work-item img {
  width: 100%;
  height: 350px;
  object-fit: contain;
  background-color: #f9f9f9;
  border-radius: 10px;
  margin-bottom: 15px;
}

/* عنوان کتاب‌ها - تغییر رنگ مانند فیلم‌ها */
.work-item h3 {
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.work-item p {
  color: #555;
  font-size: 1rem;
  line-height: 1.7;
}

/* ===========================
   FILMS SECTION
   بخش فیلم‌ها
=========================== */
.films-section {
  background-color: #fafafa;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.video-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.video-card:hover {
  transform: translateY(-6px);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
  object-fit: cover;
}

.video-card h3 {
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.video-card p {
  color: #555;
  font-size: 1rem;
  line-height: 1.7;
}

/* ===========================
   GALLERY SECTION
   بخش گالری
=========================== */
.gallery {
  background-color: #fff;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.image-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s;
  aspect-ratio: 4 / 3;
}

.image-grid img:hover {
  transform: scale(1.05);
}

/* ===========================
   LIGHTBOX
   لایت باکس برای نمایش تصاویر
=========================== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 80%;
  max-width: 1200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

#lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border: 3px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.caption {
  margin-top: 15px;
  color: #fff;
  font-size: 1.1rem;
  max-width: 800px;
}

/* دکمه‌های ناوبری */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 24px;
  transition: 0.3s ease;
  border-radius: 3px;
  user-select: none;
  background-color: rgba(0,0,0,0.5);
}

.next {
  right: 10px;
}

.prev {
  left: 10px;
}

.prev:hover,
.next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* دکمه بستن */
.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.close:hover {
  color: var(--primary);
}

/* ===========================
   FOOTER
   بخش فوتر
=========================== */
.footer {
  background-color: var(--secondary);
  color: #fff;
  padding: 20px 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.copyright {
  margin: 0;
  font-size: 1rem;
  text-align: right;
  flex: 1;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  display: inline-block;
  transition: transform 0.3s, opacity 0.3s;
}

.social-links a:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.social-text {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  background-color: var(--primary);
  transition: background 0.3s;
  font-size: 0.95rem;
}

.social-text:hover {
  background-color: #c0392b;
}

/* ===========================
   ANIMATIONS
   انیمیشن‌ها
=========================== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE BANNER IMPROVEMENTS
   بهبود واکنش‌گرایی بنر
=========================== */
@media (max-width: 1200px) {
  .banner h1 {
    font-size: 3rem;
  }
  
  .banner p {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .banner {
    height: 70vh;
    min-height: 500px;
  }
  
  .banner h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    padding: 0 10px;
  }
  
  .banner p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding: 0 15px;
    line-height: 1.5;
  }
  
  .btn {
    padding: 14px 30px;
    font-size: 0.95rem;
  }
  
  .slider-dots {
    bottom: 30px;
  }
  
  .dot {
    width: 12px;
    height: 12px;
  }
  
  /* بهبود overlay برای موبایل */
  .banner::before {
    background: linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0.7) 100%
    );
  }

  /* ناوبری موبایل */
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary);
    flex-direction: column;
    width: 100%;
    display: none;
    padding: 1rem 0;
    gap: 1rem;
	transition: max-height 0.4s ease;
    overflow: hidden;
	max-height: 0;
  }

  .nav-links.open {
    display: flex;
	max-height: 500px;
  }

  .menu-toggle {
    display: flex;
  }

  /* کارت‌ها */
  .card {
    width: 100%;
  }

  /* کتاب‌ها و فیلم‌ها */
  .work-item img {
    height: 280px;
  }
  .videos-grid {
    grid-template-columns: 1fr;
  }

  /* فوتر */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .copyright {
    text-align: center;
    order: 2;
    margin-top: 15px;
  }
  .social-links {
    order: 1;
  }

  /* لایت باکس */
  .lightbox-content {
    padding: 10px;
  }
  #lightbox-img {
    max-width: 95%;
    max-height: 70vh;
  }
  .prev, .next {
    font-size: 20px;
    padding: 10px;
  }

  /* بخش‌ها */
  .section {
    padding: 40px 0;
  }
  .section h2 {
    font-size: 2rem;
  }
  .btn {
    padding: 10px 20px;
  }

  /* ناوبری موبایل - بهبود */
  .navbar {
    padding: 0.5rem 0;
  }
}

@media (max-width: 480px) {
  .banner {
    height: 60vh;
    min-height: 400px;
  }
  
  .banner h1 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
  }
  
  .banner p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .btn {
    padding: 12px 25px;
    font-size: 0.9rem;
  }
  
  .banner-content {
    padding: 0 15px;
  }
  
  .slider-dots {
    bottom: 25px;
    gap: 10px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }
}

/* برای صفحات با ارتفاع کم */
@media (max-height: 600px) {
  .banner {
    height: 100vh;
    min-height: 400px;
  }
  
  .banner h1 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }
  
  .banner p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .banner-content {
    padding-top: 60px;
  }
}

/* بهبود برای حالت landscape در موبایل */
@media (max-width: 768px) and (orientation: landscape) {
  .banner {
    height: 100vh;
  }
  
  .banner-content {
    padding-top: 80px;
  }
  
  .banner h1 {
    font-size: 2rem;
  }
  
  .banner p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}