/* 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-left: 30px;
    }

    .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);
    }
}