/* ==========================================================================
   ۱. تنظیمات پایه و ریست عمومی (Base & Reset)
   توضیح: این کدهای پایه برای همه دستگاه‌ها یکسان است و چیدمان اصلی سایت را می‌سازد.
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory; /* قفل شدن اسکرول روی هر بخش */
}

/* ساختار عمومی بخش‌های Full-Screen (مشترک در موبایل و دسکتاپ) */
.main-background,
.page-section,
.courses-section,
.gallery-section,
.about-section,
.contact-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* کادر اصلی هدر (مشترک پایه) */
.header-container {
  position: fixed;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  z-index: 1000;
}

.site-logo a {
  display: flex;
  align-items: center;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 2px 3px 10px rgba(0, 0, 0, 0.85);
}

.logo-img {
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

/* استایل عمومی منو */
.site-menu ul {
  display: flex;
  list-style: none;
  gap: 35px;
}

.site-menu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  text-shadow: 2px 3px 10px rgba(0, 0, 0, 0.85);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.site-menu a:hover {
  color: #ffca28;
  text-shadow: 2px 3px 12px rgba(255, 202, 40, 0.5);
}

/* صفحه اول - خانه */
.main-background {
  background-image: url('../img/w4.jpg');
}

.site-title-box {
  text-align: center;
  padding: 20px;
}

.site-title {
  font-family: 'Playfair Display', serif;
  color: #000000;
  font-weight: 500;
  line-height: 1.2;
  text-shadow: 2px 4px 15px rgba(0, 0, 0, 0.6);
  position: relative;
  display: inline-block;
}

.site-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  border-radius: 2px;
}

.site-subtitle {
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  font-weight: 500;
  text-transform: uppercase;
  text-shadow: 2px 3px 10px rgba(0, 0, 0, 0.85);
}

.working-info {
  position: absolute;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  text-shadow: 2px 3px 10px rgba(0, 0, 0, 0.85);
  z-index: 10;
}

/* صفحه دوم - دوره‌ها */
.courses-section {
  background-image: url('../img/w2.jpg');
  flex-direction: column;
}

.section-title {
  font-family: 'Playfair Display', serif;
  color: #000000;
  font-weight: 500;
  line-height: 1.2;
  text-shadow: 2px 4px 15px rgba(255, 255, 255, 0.7);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.95), rgba(255, 255, 255, 0));
  border-radius: 2px;
}

.courses-grid {
  display: grid;
  max-width: 1100px;
  z-index: 5;
}

.course-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.course-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  border-color: rgba(255, 202, 40, 0.7);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.course-number {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #ffca28;
  letter-spacing: 1px;
}

.course-card h3 {
  font-family: 'Poppins', sans-serif;
  color: #000000;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.8);
}

/* صفحه سوم - گالری تصاویر */
.gallery-section {
  background-image: url('../img/w6.jpeg');
  flex-direction: column;
}

.gallery-grid {
  display: grid;
  max-width: 1100px;
  z-index: 5;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  border-color: rgba(255, 202, 40, 0.8);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  transform: translateY(-5px);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #ffffff;
  font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-btn-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.more-photos-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.eye-icon {
  stroke: #ffca28;
  transition: transform 0.3s ease;
}

.more-photos-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffca28;
  color: #ffca28;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
}

.more-photos-btn:hover .eye-icon {
  transform: scale(1.15);
}

/* مودال نمایش عکس بزرگ */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.image-modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 2001;
}

.modal-close:hover {
  color: #ffca28;
}

/* صفحه درباره ما */
.about-section {
  background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('../img/w aboute.jpg');
}

.about-container {
  margin: 0 auto;
  text-align: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.about-profile-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 20px auto;
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.about-profile-img:hover {
  transform: scale(1.05);
  border-color: #ffca28;
}

.about-description {
  font-family: 'Poppins', sans-serif;
  line-height: 1.8;
  color: #e0e0e0;
}

.about-highlights {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.highlight-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 25px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.highlight-item:hover {
  transform: translateY(-5px);
  background: rgba(0, 0, 0, 0.5);
}

.highlight-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #ffca28;
  margin-bottom: 10px;
}

.highlight-item p {
  font-size: 0.95rem;
  color: #cccccc;
  line-height: 1.5;
}

/* صفحه تماس با ما */
.contact-section {
  background-image: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url("../img/wallpapaer.png");
}

.contact-container {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #ffffff;
}

.contact-description {
  font-family: 'Poppins', sans-serif;
  color: #dddddd;
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #ffca28;
}

.file-label {
  text-align: right;
  font-size: 0.9rem;
  color: #ccc;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.submit-btn {
  background: #ffca28;
  color: #000;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-btn:hover {
  background: #e6b420;
}

.contact-cards {
  display: grid;
  gap: 15px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(0, 0, 0, 0.4);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: #ffffff;
  text-align: right;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  background: rgba(0, 0, 0, 0.65);
  border-color: #ffca28;
}

.card-icon {
  font-size: 1.8rem;
}

.card-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin: 0 0 3px 0;
  color: #ffca28;
}

.card-info p {
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  margin: 0;
  color: #cccccc;
}

.selectable-text {
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text;
}

/* منوی همبرگری (پایه) */
.menu-toggle {
  display: none;
}


/* ==========================================================================
   ۲. تنظیمات اختصاصی دسکتاپ (Desktop Mode - Above 768px)
   توضیح: تغییر مقادیر این بخش، به هیچ وجه روی موبایل تاثیر نخواهد داشت.
   ========================================================================== */
@media screen and (min-width: 769px) {

  /* هدر دسکتاپ */
  .header-container {
    top: -60px; /* تنظیم موقعیت بالای هدر در دسکتاپ */
    padding: 25px 60px; /* تنظیم پدینگ هدر در دسکتاپ */
  }

  .logo-img {
    height: 200px; /* ارتفاع لوگو در دسکتاپ */
  }

  /* عنوان صفحه اصلی در دسکتاپ */
  .site-title {
    font-size: 5rem;
    letter-spacing: 4px;
    margin-top: -130px;
    padding-bottom: 20px;
  }

  .site-title::after {
    height: 4px;
  }

  .site-subtitle {
    font-size: 1.1rem;
    letter-spacing: 3px;
    margin-top: 15px;
  }

  .working-info {
    bottom: 35px;
    font-size: 0.95rem;
    letter-spacing: 2px;
  }

  .work-days { right: 60px; }
  .work-hours { left: 60px; }

  /* عناوین بخش‌ها در دسکتاپ */
  .section-title {
    font-size: 4.5rem;
    letter-spacing: 3px;
    padding-bottom: 15px;
    margin-top: -60px;
  }

  /* گرید ۴ ستونه دوره‌ها در دسکتاپ */
  .courses-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 90%;
    margin-top: 20px;
  }

  .course-card {
    padding: 22px 18px;
  }

  .course-number {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .course-card h3 {
    font-size: 1.05rem;
  }

  /* گرید ۳ ستونه گالری در دسکتاپ */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 90%;
    margin-top: 25px;
  }

  .gallery-item {
    height: 220px;
  }

  .gallery-btn-wrapper {
    margin-top: 30px;
  }

  .more-photos-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .eye-icon {
    width: 20px;
    height: 20px;
  }

  /* بخش درباره ما و تماس با ما در دسکتاپ */
  .about-section {
    padding: 80px 20px;
  }

  .about-container {
    max-width: 900px;
    width: 100%;
    padding: 40px 30px;
  }

  .about-section .section-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #ffffff;
  }

  .about-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
  }

  .about-highlights {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .contact-section {
    padding: 80px 20px;
  }

  .contact-container {
    max-width: 700px;
    width: 100%;
    padding: 40px 25px;
  }

  .contact-section .section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }

  .contact-description {
    font-size: 0.95rem;
  }

  .contact-cards {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  /* مودال عکس در دسکتاپ */
  .modal-content {
    max-width: 85%;
    max-height: 85vh;
  }

  .modal-close {
    top: 25px;
    right: 35px;
    font-size: 2.5rem;
  }
}


/* ==========================================================================
   ۳. تنظیمات اختصاصی موبایل و تبلت (Mobile Mode - Max 768px)
   توضیح: این کدها کاملاً جدا از دسکتاپ هستند و سایزها را برای گوشی تنظیم می‌کنند.
   ========================================================================== */
@media screen and (max-width: 768px) {

  /* هدر موبایل */
  .header-container {
    top: -30px; /* چسبیدن هدر به بالاترین نقطه گوشی */
    padding: 20px 25px; /* پدینگ مخصوص موبایل */
  }

  .logo-img {
    height: 100px; /* ارتفاع لوگو در موبایل */
  }

  /* منوی همبرگری موبایل */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
  }

  .menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  
  
  /* منوی کشویی شیشه‌ای و مات در موبایل */
  .site-menu {
    position: fixed;
    top: 0px;
    right: -100%;
    width: 75%;
    height: 100vh;
    
    /* تنظیم پس‌زمینه مشکیِ نیمه‌شفاف با درجه شیشه‌ای شدن */
    background: rgba(0, 0, 0, 0.45); /* مشکی کم‌رنگ و شفاف */
    backdrop-filter: blur(15px); /* افکت ماتی و تاری پس‌زمینه */
    -webkit-backdrop-filter: blur(15px); /* پشتیبانی برای مرورگرهای Safari و iOS */
    
    border-left: 1px solid rgba(255, 255, 255, 0.15); /* خط باریک تزیینی در لبه منو */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5); /* سایه ملایم پشت منو */
    
    display: flex;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }
  
  
  
  
  

  .site-menu.active {
    right: 0;
  }

  .site-menu ul {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  /* انیمیشن آیکون همبرگری */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* عنوان صفحه اصلی در موبایل */
  .site-title {
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-top: 0;
    padding-bottom: 8px;
    transform: translateY(-40px);
  }

  .site-title::after {
    height: 2px;
  }

  .site-subtitle {
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-top: 10px;
    transform: translateY(-40px);
  }

  .working-info {
    font-size: 0.75rem;
    letter-spacing: 1px;
    bottom: 20px;
  }

  .work-days { right: 25px; }
  .work-hours { left: 25px; }

  /* عناوین بخش‌ها در موبایل */
  .section-title {
    font-size: 2.2rem;
    letter-spacing: 2px;
    padding-bottom: 8px;
    margin-top: -30px;
  }

  /* گرید ۲ ستونه دوره‌ها در موبایل */
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 92%;
    margin-top: 10px;
  }

  .course-card {
    padding: 14px 10px;
  }

  .course-card h3 {
    font-size: 0.85rem;
  }

  /* گرید ۲ ستونه گالری در موبایل */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 92%;
    margin-top: 15px;
  }

  .gallery-item {
    height: 150px;
  }

  .gallery-btn-wrapper {
    margin-top: 18px;
  }

  .more-photos-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .eye-icon {
    width: 18px;
    height: 18px;
  }

  /* بخش درباره ما و تماس در موبایل */
  .about-section,
  .contact-section {
    padding: 60px 15px;
  }

  .about-container,
  .contact-container {
    width: 100%;
    padding: 25px 15px;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }

  /* مودال عکس در موبایل */
  .modal-content {
    max-width: 95%;
    max-height: 80vh;
  }

  .modal-close {
    top: 15px;
    right: 20px;
    font-size: 2rem;
  }
}
