
body {
  background:#f5f9fc;
   color: #3b4d58;
  font-family: 'IRANSans', sans-serif;
  margin: 0;
  padding: 0;
}
.subpage-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 20px;
  background-color: #ffffff;
border-bottom: 1px solid #ccc; /* ✅ خط زیر منو و لوگو */
  
  direction: ltr; /* مهم برای چپ‌چین شدن در سایت‌های فارسی */
}




.logo-box {
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}


.logo-box img {
  display: block;
  height: 20px; /* یا اندازه دلخواهت */
  border: none;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}



button {
  background-color: #4a6670; /* آبی بنفش تیره‌تر */
  color: white;
  font-family: 'Tahoma';
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #2e4b56; /* وقتی موس رفت روش */
}
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #f8f9fa;
  font-family: 'Vazir';
  margin-top: 20px;
}

th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}

th {
  background-color: #e3e7eb; 
}

tr:nth-child(even) {
  background-color: #f5f9fc;
}
header {
  background-color:  #ffffff;
 border-bottom: 1px solid #ccc; /* ✅ خط جداکننده */
  padding: 1em;
  text-align: right;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #267ca3;
}

nav ul {
  list-style-type: none;
  padding: 0;
}

nav ul li {
  display: inline;
  margin: 0 1em;
}

.hero {
  background-color: white;
  padding: 2em;
  text-align: center;
}

.cta {
  display: inline-block;
  padding: 1em 2em;
  margin-top: 1em;
  background-color: #3fb68b;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

section {
  padding: 2em;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1em;
}

.card {
  background-color: #e7f5f0;
  padding: 1em;
  border-radius: 10px;
  text-align: right;
}

form {
  max-width: 400px;
  margin: 0;
}

form input, form textarea, form button {
  width: 100%;
  padding: 1em;
  margin: 0.5em 0;
}

footer {
  text-align: center;
  padding: 2em;
  background-color: #e3e7eb;
}
.category-section {
  background: #dfeaf0;
  margin: 20px 0;
  padding: 15px;
  border-radius: 8px;
}

.category-section h3 {
  color: #444;
  font-size: 18px;
}

.category-section ul {
  list-style: none;
  padding: 0;
}

.category-section ul li {
  margin-bottom: 8px;
}

.category-section ul li a {
  color: #005baa;
  text-decoration: none;
}
.category-section ul li a:hover {
  text-decoration: underline;
}
 footer {
  background-color: #f4f4f4;
  padding: 30px;
  font-family: 'Vazir', sans-serif;
  direction: rtl;
  text-align: right;
}

footer h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

.useful-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.useful-links li a {
  text-decoration: none;
  color: #007b8f;
  font-size: 15px;
  transition: color 0.3s;
}

.useful-links li a:hover {
  color: #005e70;
  text-decoration: underline;
}
footer {
  background-color: #f4f4f4;
  padding: 30px 10%;
  font-family: 'Vazir', sans-serif;
  direction: rtl;
  color: #333;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-right,
.footer-left {
  flex: 1;
  min-width: 250px;
  margin: 10px;
}

.footer-right h4,
.footer-left h4 {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: bold;
}

.useful-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.useful-links li {
  margin-bottom: 8px;
}

.useful-links a,
.footer-left a {
  color: #007b8f;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s;
}

.useful-links a:hover,
.footer-left a:hover {
  color: #005e70;
  text-decoration: underline;
}
#videos {
  padding: 30px;
  background-color: #f9f9f9;
}

.video-block {
  margin-bottom: 40px;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.video-block h3 {
  margin-bottom: 10px;
}

.video-block a {
  display: inline-block;
  margin-top: 10px;
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}
/* ✅ استایل کارت‌ها در لیست فایل‌ها */
.card {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  margin: 15px;
  text-align: center;
  background-color: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.card:hover {
  background-color: #f0f0f0;
  transform: translateY(-3px);
}

.card img {
  width: 200px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* ✅ دکمه‌ها (دانلود، برگشت و ...) */
.btn, .back-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #ff4081;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
}

.btn:hover, .back-btn:hover {
  background-color: #e91e63;
}

/* ✅ بخش توضیح فایل */
.detail {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  text-align: center;
}

.detail img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}
.content h1 {
  font-size: 2rem;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.content h2 {
  font-size: 1.5rem;
  color: #006699;
}
.content {
  max-width: 800px;      /* عرض محدود برای خوانایی بهتر */
  margin: 0 auto;        /* وسط‌چین کردن محتوا */
  padding: 2rem 1rem;    /* فاصله از بالا/پایین و چپ/راست */
  direction: rtl;        /* متن از راست به چپ */
  line-height: 2;        /* فاصله خطوط */
  font-size: 1.1rem;     /* سایز متن مناسب */
  text-align: justify;   /* متن به صورت هم‌تراز دو طرف */
}

.content h1,
.content h2,
.content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #333;
  font-weight: bold;
}

.content p {
  margin-bottom: 1.5rem;
}
body {
  font-family: 'Vazir', sans-serif;
  background-color: #fff;
  color: #222;
  direction: rtl;
}

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  line-height: 2;
  font-size: 1.1rem;
  text-align: justify;
}

.content h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #004466;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
}

.content h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #006699;
}

.content ul {
  list-style: none;
  padding-right: 1rem;
}

.content ul li::before {
  content: "• ";
  color: #0088aa;
  font-weight: bold;
}


.midwifery-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: 'Vazirmatn', 'Vazir', sans-serif;
  font-size: 15px;
  direction: rtl;
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.midwifery-table th,
.midwifery-table td {
  border: 1px solid #ccc;
  padding: 10px 14px;
  text-align: right;
}

.midwifery-table th {
  background-color: #f3faff;
  color: #005c66;
  font-weight: bold;
}

.midwifery-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.midwifery-table tr:hover {
  background-color: #f1f1f1;
}




nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

nav ul li {
  position: relative;
}

nav ul li ul.submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  padding: 4px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-radius: 4px;
  min-width: 50px;
  z-index: 1000;
  flex-direction: column;
}




nav ul li:hover ul.submenu {
  display: flex;
  flex-direction: column;
}


nav ul li ul.submenu li {
  padding: 4px 10px !important;
  line-height: 1.6 !important;
}

nav ul li ul.submenu li {
  padding: 4px 10px !important;
  line-height: 1.6 !important;
}


nav ul li ul.submenu li a {
  color: #333;
  text-decoration: none;
}

nav ul li ul.submenu li:hover {
  background-color: #f0f0f0;
}



/* فونت فقط برای منو */
nav, nav * {
  font-family: 'Vazir', sans-serif;
}

/* تنظیمات کلی منو */
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color:  #ffffff;
}


nav > ul > li {
  display: inline-block;
  position: relative;
}

nav a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: #dcdcdc;
}

/* زیرمنو اصلی */
nav ul.submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 50px;
  background-color: #fff;
  box-shadow: 0 1px 1px rgba(0,0,0,0.15);
  z-index: 1000;
}

/* زیرمنو عمودی تو در تو */
nav li.has-sub:hover > .submenu-vertical {
  display: block;
  position: absolute;
  top: 0;
  right: 100%;
  min-width: 50px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* نمایش زیرمنو هنگام هاور */
nav li:hover > ul.submenu {
  display: block;
}

/* برای جلوگیری از در هم رفتگی */
nav ul.submenu li {
  position: relative;
}

nav ul.submenu li a {
  white-space: nowrap;
}

/* فلش کوچک برای منوهای دارای زیرمنو (اختیاری) */
.has-sub > a::after {
  content: ' ▼';
  font-size: 10px;
}



nav ul li, nav ul li a {
  margin: 0;
  padding: 0;
  line-height: 4;
  font-size: 15px;
}




.search-box {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 30px auto 0;
  gap: 1px;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: 'Vazir', sans-serif;
  direction: rtl;
  box-sizing: border-box;
  height: 50px;
  width: 600%;
}

.search-box button {
padding: 12px 16px;
  height:50px;
  background-color: #e3e7eb;
  color: #333;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  box-sizing: border-box;
}

.search-box button:hover {
  background-color: #d0d4d8;
}



.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 5px;
  z-index: 1000;
  padding: 10px;
  font-family: 'Vazir', sans-serif;
}

.search-results p {
  margin: 5px 0;
}

.search-results a {
  text-decoration: none;
  color: #007bff;
}

.search-results a:hover {
  text-decoration: underline;
}







براموبایله تو اونایی ک استایل جدا دارن بزارم و اکز اسم ملاس جدا دارن اضافه منم

@media screen and (max-width: 768px) {

  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul li {
    display: block;
    margin: 5px 0;
  }

  .subpage-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-box img,
  header img {
    height: 48px;
  }

  .category-grid, .article-list, .feedback-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .card, article, .feedback-item, .box {
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-box input,
  .search-box button {
    width: 100%;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

}



footer {
  background: linear-gradient(to left, #ffffff, #d6eaff, #c3f5e6, #ffe1f0) !important;
}

nav > ul {
  background: linear-gradient(
    to right,
    #ffffff 0%,     /* سفید در ابتدای منو */
    #ffffff 20%,    /* سفید ادامه‌دار برای زیر لوگو */
    #ffe1f0 45%,    /* صورتی */
    #c3f5e6 70%,    /* سبزآبی */
    #d6eaff 85%,    /* آبی */
    #ffffff 100%    /* سفید در انتهای منو */
  ) !important;
}


/* حذف کادر و خط دور منو، هدر و لوگو */
header,
.subpage-header,
nav > ul {
  border: none !important;
  box-shadow: none !important;
}





.custom-search-wrapper {
  position: relative;
  width: 60%;
  margin: 30px auto 20px;
  text-align: center;
  z-index: 1000;
}

.custom-search-wrapper input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-family: 'Vazir', sans-serif;
  font-size: 14px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  text-align: right;
  padding: 10px;
  display: none;
  z-index: 1001;
  border-radius: 0 0 10px 10px;
}

.search-results p {
  margin: 8px 0;
}

.search-results a {
  color: #005c66;
  text-decoration: none;
  display: block;
  padding: 5px 10px;
  border-radius: 4px;
}

.search-results a:hover {
  background-color: #eef4ff;
}


#searchInput {
  width: 500px; /* یا هر عرض دلخواه، مثل 250px یا 50% */
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.search-box {
  position: relative;  /* اضافه کن */
  z-index: 1;          /* مقدار کم‌تر */
}

nav ul li ul.submenu {
  position: absolute;
  z-index: 1100;       /* بیشتر از جستجو */
}





a {
  color: black;        /* رنگ مشکی */
  text-decoration: none; /* حذف خط زیر */
}



@media (max-width: 768px) {
  .menu { flex-direction: column; }
}





/* همه لینک‌های <a> رنگ بنفش پاستلی تیره */
a {
  color: #6A5ACD;  /* رنگ بنفش پاستلی تیره */
  text-decoration: none;
}

/* لینک‌های داخل منو رنگشون تغییر نکنه */
#menu a {
  color: initial; /* یا رنگ دلخواه منو */
}







.menu-toggle {
  display: none;
}
@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
}



/* ✅ آیکن منوی موبایل */
.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 24px;
  padding: 10px;
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 2000;
  color: #333;
}

@media screen and (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background-color: white;
    position: absolute;
    top: 60px;
    right: 10px;
    width: 80%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1500;
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .subpage-header {
    flex-direction: column-reverse;
    align-items: stretch;
    position: relative;
  }

  .logo-box {
    align-self: flex-start;
    margin-bottom: 10px;
  }
}
@media screen and (max-width: 768px) {
  .category-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

  }

  .card {
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
  }
}






@media screen and (max-width: 768px) {
  nav ul li {
    width: 100%;
  }

  nav ul li ul.submenu {
    position: static;
    box-shadow: none;
    background-color: #f9f9f9;
    display: none;
    width: 100%;
  }

  nav ul li:hover ul.submenu {
    display: block;
  }

  nav ul li ul.submenu li {
    width: 100%;
    padding: 10px;
    border-top: 1px solid #ddd;
  }

  nav ul li ul.submenu li a {
    display: block;
    width: 100%;
  }
}







/* پایه - برای همه دستگاه‌ها */
.custom-search-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.custom-search-wrapper input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: 'Vazir', sans-serif;
  direction: auto;
  box-sizing: border-box;
}

/* نتایج جستجو */
.search-results {
  margin-top: 10px;
  direction: rtl;
}

/* برای جلوگیری از کشیدگی صفحه در موبایل */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* واکنش‌گرایی برای موبایل */
@media screen and (max-width: 768px) {
  .custom-search-wrapper {
    width: 60%;
    padding: 0 10px;
  }

  .custom-search-wrapper input[type="text"] {
    font-size: 13px;
    height: 48px;
  }
}




.custom-search-wrapper {
  display: flex;
  justify-content: center;
  aligen-items: center;
  padding: 1 rem ;
  }



.custom-search-wrapper input {
  width: 90%;
  max-width: 500px;
   padding: 12px 16px;
font-size: 13px;
border: 1px solid #ccc;

border-radius: 8px;
direction:rtl;
text-algin: right;

}








































