/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.8;
    color: #3c2f2f; /* قهوه‌ای تیره برای متن */
    background: url('https://www.transparenttextures.com/patterns/old-wall.png') repeat, linear-gradient(to bottom, #f5e6cc, #e6d3a3); /* بافت کاغذ قدیمی با گرادیانت کرم */
    background-size: auto, cover;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 230, 204, 0.6); /* لایه کرم شفاف برای خوانایی */
    z-index: -1;
}













header {
    position: relative;
    background: #3c2f2f;
    color: #f5e6cc;
    padding: 0.6rem 1rem; /* کاهش ارتفاع */
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid #8a5522;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* سه بخش چپ، وسط، راست */
.header-left,
.header-center,
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* موقعیت‌های دقیق */
.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

/* لوگو */
.logo {
    height: 80px;
    width: 100px;
    object-fit: contain;
    align-items: center;
}

/* عنوان */
.header-right h1 {
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.home-icon i {
    font-size: 20px; /* یا هر مقدار دلخواه مثلاً 24px */
    color: #f5e6cc;
    transition: color 0.3s;
}

.home-icon i:hover {
    color: #3431b6;
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    header {
        padding: 0.3rem 0.5rem;
    }
    .logo {
    width: 60px; /* اندازه کوچکتر در موبایل */
    height: 50px;
    padding: 0;
    margin: 0;
    }

    .header-right h1 {
        font-size: 1rem;
    }

    .header-left a {
        font-size: 1.2rem;
    }
}










main {
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background: rgba(245, 230, 204, 0.9); /* کرم شفاف */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #8a5522; /* حاشیه قهوه‌ای */
}

.post-content h1 {
    font-size: 1.8rem;
    color: #3c2f2f;
    margin-bottom: 1rem;
    border-bottom: 2px solid #8a5522; /* خط زیر عنوان */
    padding-bottom: 0.5rem;
}

.post-content h2 {
    font-size: 1.4rem;
    color: #3c2f2f;
    margin: 1.2rem 0 0.8rem;
}

/* استایل تصاویر */
.post-content img {
    width: 100%; /* عرض کامل ظرف */
    height: auto; /* حفظ نسبت ابعاد */
    max-height: 400px;
    max-width: 270px; /* حداکثر عرض برای جلوگیری از بزرگ شدن بیش از حد */
    display: block;
    margin: 1rem auto; /* وسط‌چین و فاصله عمودی */
    border-radius: 8px; /* گوشه‌های نرم */
    border: 2px solid #8a5522; /* حاشیه قهوه‌ای */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* سایه ملایم */
}

.post-content p {
    font-size: 1rem;
    color: #4a3728; /* قهوه‌ای ملایم */
    margin-bottom: 1rem;
    text-align: justify;
}





/* ریست حاشیه‌ها و پدینگ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  
  /* استایل محتوای اصلی */
  .content {
    padding: 40px;
    text-align: center;
    min-height: 80vh; /* برای اطمینان از اینکه فوتر در پایین باشد */
  }
  
  /* استایل فوتر */
  .footer {

    text-align: center;
    padding: 1rem;
    background: #3c2f2f;
    color: #f5e6cc;
    position: relative;
    bottom: 0;
    width: 100%;
    border-top: 3px solid #8a5522;
  }
  
  /* محتوای فوتر */
  .footer-content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  /* دکمه درباره ما */
  .about-button .btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #05396d; /* آبی جذاب */
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 20px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  .about-button .btn:hover {
    background-color: #1678d6; /* تیره‌تر هنگام هاور */
    transform: translateY(-2px);
  }
  
  /* آیکون‌های شبکه‌های اجتماعی */
  .social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  .social-icons a {
    color: #ffffff;
    font-size: 28px;
    transition: color 0.3s ease, transform 0.2s ease;
  }
  
  .social-icons a:hover {
    color: #1e60b8; /* آبی هنگام هاور */
    transform: scale(1.1);
  }
  
  /* استایل ایمیل */
  .email p {
    font-size: 20px;
  }
  
  .email a {
    color: #3960bb;
    text-decoration: none;
  }
  
  .email a:hover {
    text-decoration: underline;
  }
  
  /* استایل کپی‌رایت */
  .copyright p {
    font-size: 20px;
    color: #ffffff;
    margin-top: 10px;
  }
  
  /* برای نمایش بهتر در موبایل */
  @media (max-width: 768px) {
    .footer {
        padding: 30px 15px;
    }
  
    .social-icons a {
        font-size: 24px;
        gap: 15px;
    }
  
    .about-button .btn {
        padding: 10px 20px;
        font-size: 17px;
    }
  
    .email p {
        font-size: 17px;
    }
  
    .copyright p {
        font-size: 17px;
    }
  }
  












/* ریسپانسیو برای گوشی‌ها */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .nav-menu li a {
        font-size: 1.3rem; /* اندازه آیکون خانه در گوشی */
    }

    main {
        margin: 1rem;
        padding: 1rem;
    }

    .post-content h1 {
        font-size: 1.5rem;
    }

    .post-content h2 {
        font-size: 1.2rem;
    }

    .post-content p {
        font-size: 0.95rem;
    }

    .post-content img {
        max-width: 100%; /* عرض کامل در گوشی */
        margin: 0.8rem auto;
    }
}

/* برای گوشی‌های خیلی کوچک */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }

    .nav-menu li a {
        font-size: 1.2rem;
    }

    main {
        margin: 0.5rem;
        padding: 0.8rem;
    }

    .post-content h1 {
        font-size: 1.3rem;
    }

    .post-content h2 {
        font-size: 1.1rem;
    }

    .post-content p {
        font-size: 0.9rem;
    }

    .post-content img {
        margin: 0.5rem auto;
    }

    footer {
        font-size: 0.85rem;
        padding: 0.8rem;
    }
}



#scrollToTopBtn {
    display: none; 
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #04359e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    line-height: 50px;
    text-align: center;
    transition: all 0.3s ease;
    animation:pulse 3s infinite;
  }
  
  #scrollToTopBtn:hover {
    background-color: #a52a2a;
    transform: scale(1.2)
    rotate(360deg);
    box-shadow: 0 0 15px rgb(0, 0, 0,0.3);
  }
  @keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 #556b2f;
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}






































.podcast-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  direction: rtl;
  box-sizing: border-box;
}

.podcast-card {
  width: 50%;
  height: 60%;
  background: #443e3e;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

.podcast-card:hover {
  transform: translateY(-5px);
}

.podcast-card img {
  width: 100%;
  height: 80%;
  border-radius: 8px;
}

.podcast-card h3 {
  font-size: 16px;
  margin: 10px 0;
  color: #ffffff;
}

.podcast-card audio {
  width: 100%;
  margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 700px) {
  .podcast-card {
    width: 100%;
    height: 180;
  }
}
#searchInput {
  width: 60%; /* عرض پیش‌فرض 60% از کانتینر */
  max-width: 400px; /* حداکثر عرض 400px */
  min-width: 200px; /* حداقل عرض */
  padding: 0.625rem; /* معادل 10px */
  margin: 1.25rem auto; /* معادل 20px */
  display: block;
  border-radius: 8px;
  border: 1px solid #141313;
  font-size: clamp(14px, 2.5vw, 16px);
  direction: rtl;
  box-sizing: border-box;
}

/* Media Query برای صفحه‌نمایش‌های گوشی */
@media (max-width: 600px) {
  #searchInput {
    width: 70%; /* عرض کمتر در گوشی (مثلاً 70% به‌جای 80%) */
    max-width: 80%; /* حداکثر عرض 80% از صفحه */
    min-width: 120px; /* حداقل عرض کمتر برای گوشی */
    padding: 0.3rem;
    font-size: clamp(12px, 2.5vw, 14px);
  }
}











/* استایل کلی بخش */
.historical-section {
  background: linear-gradient(135deg, #e0e7ff 0%, #f5f5ff 100%); /* گرادیان ملایم */
  border: none;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  max-width: 70%;
  min-width: 50%;
  margin: 40px auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* افکت هاور برای بخش */
.historical-section:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* استایل متن توضیحات */
.historical-section .description {
  font-size: 24px;
  color: #1a1a1a;
  line-height: 1.9;
  font-family: 'Vazir', sans-serif; /* فونت زیبای فارسی، در صورت نیاز تغییر دهید */
  opacity: 0;
  animation: fadeInText 1.5s ease-in-out forwards;
  margin-bottom: 20px;
}

/* انیمیشن برای ورود متن */
@keyframes fadeInText {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* استایل لوگو */
.historical-section .logo {
  width: 100px; /* اندازه ثابت لوگو در همه دستگاه‌ها */
  height: auto; /* حفظ نسبت تصویر */
  margin-top: 20px;
}

/* افکت پس‌زمینه متحرک */
.historical-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  opacity: 0.5;
  z-index: -1;
  animation: pulseBackground 6s infinite ease-in-out;
}

/* انیمیشن پالس برای پس‌زمینه */
@keyframes pulseBackground {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

/* ریسپانسیو کردن برای موبایل */
@media (max-width: 768px) {
  .historical-section {
    max-width: 90%;
    padding: 20px;
  }

  .historical-section .description {
    font-size: 18px;
    line-height: 1.7;
  }

  /* لوگو در موبایل همان اندازه دسکتاپ */
  .historical-section .logo {
    width: 100px; /* اندازه ثابت */
    height: auto;
  }
}

