/* ===================== متغیرهای رنگ ===================== */
:root {
  --primary-dark: #003a45;
  --primary: #027373;
  --primary-light: #339498;
  --accent-green: #549173;
  --text-muted: #666;
  --radius-lg: 15px;
}

/* اسکرول نرم بین بخش‌های صفحه */
html {
  scroll-behavior: smooth;
}

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

/* ===================== فونت اختصاصی سایت ===================== */
@font-face {
  font-family: "IRANSansX";
  src: url("./font/IRANSansX-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansX";
  src: url("./font/IRANSansX-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===================== تنظیمات پایه ===================== */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "IRANSansX", "Tahoma", sans-serif;
}

/* کلاس کمکی برای مخفی‌کردن بصری ولی در دسترس بودن برای screen readerها */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===================== بخش هدر و بنر (.back) ===================== */

/* استایل بخش پس‌زمینه اصلی (بنر) */
.back {
  position: relative;
  width: 100%;
  height: 726px;
  background-image: url(./photo/back-1.webp);
  background-size: cover;
  background-position: center;
}

/* استایل هدر سایت (ثابت در بالای صفحه) */
header {
  width: 100%;
  height: 50px;
  top: 0;
  left: 0;
  position: fixed;
  z-index: 100;
  
}

/* استایل کانتینر اصلی هدر (چیدمان افقی و تراز کردن آیتم‌ها) */
.container {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 100px;
  background-color: white;
}

/* ----- دکمه‌های نوبت‌دهی و جستجو (به شکل قرصی، هم‌سبک با دکمه‌های بنر) ----- */
.dokme {
  display: flex;
  align-items: center;
  gap: 12px;
  
}

.nobat,
.serch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  
  
}

.nobat svg,
.serch svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
  
}

/* دکمه نوبت‌دهی: حالت پر رنگ (اقدام اصلی) */
.nobat {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(2, 115, 115, 0.25);
}

.nobat:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* دکمه جستجو: حالت outline */
.serch:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ----- منوی اصلی سایت ----- */
.titr {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  list-style-type: none;
  direction: rtl;
}

/* فاصله بین آیتم‌های منو */
.titr li {
  margin: 0 15px;
  
}

.titr li a {
  color: inherit;
  text-decoration: none;
}

/* افکت خط زیرین هنگام هاور روی آیتم‌های منو */
.titr li:hover {
  border-bottom: 2px solid black;
}

/* ----- بخش بنر اصلی ----- */

/* فاصله بالای تصویر بنر */
.photo {
  margin-top: 145px;
}

.banner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* فاصله سمت چپ بخش محتوای متنی (برای چیدمان LTR) */
.vorod {
  margin-left: 200px;
}

/* تنظیم رنگ و تراز متن برای تگ h1 */
h1 {
  color: var(--primary-dark);
  text-align: right;
  padding-right: 50px;
  font-size: 42px;
  padding-top: 100px;
}

/* تنظیم رنگ متن برای تگ h4 */
h4 {
  color: var(--primary);
  margin-top: 10px;
  line-height: 2;
  text-align: right;
  padding-right: 50px;
  direction: rtl;
}

/* بخش دکمه‌های اطلاعات و تماس */
.me {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  direction: rtl;
  padding-right: 50px;
}

.info,
.call {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid var(--primary);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.info svg,
.call svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  flex-shrink: 0;
}

/* دکمه اطلاعات: حالت outline */
.info {
  background: transparent;
  color: var(--primary);
}

.info:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

/* دکمه تماس: حالت پر رنگ */
.call {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(2, 115, 115, 0.25);
}

.call:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(2, 115, 115, 0.35);
}

/* ----- واکنش‌گرا: هدر و بنر در موبایل ----- */
@media (max-width: 768px) {

  /* تغییر ارتفاع پس‌زمینه و اضافه کردن پدینگ پایین */
  .back {
    height: auto;
    padding-bottom: 40px;
  }

  /* تغییر هدر از حالت ثابت به نسبی و تنظیم ارتفاع خودکار */
  header {
    position: relative;
    height: auto;
    padding: 10px;
  }

  /* تغییر جهت چیدمان کانتینر و تنظیم ارتفاع */
  .container {
    flex-direction: row;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  /* تغییر چیدمان منو به ستونی و تراز کردن آیتم‌ها */
  .titr {
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  /* مخفی کردن آیتم‌های منو در حالت موبایل (نیاز به منوی همبرگری جداگانه دارد) */
  .titr li {
    display: none;
  }

  /* تغییر چیدمان بنر به ستونی و تراز کردن محتوا */
  .banner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  /* تنظیم فاصله و عرض تصویر بنر */
  .photo {
    margin-top: 30px;
    width: 90%;
    height: auto;
  }

  /* تنظیم فاصله و تراز متن ورودی */
  .vorod {
    margin-left: 0;
    text-align: center;
    padding: 0 20px;
  }

  /* تنظیم تراز و اندازه فونت برای h1 در موبایل */
  h1 {
    text-align: center;
    font-size: 22px;
  }

  /* تنظیم تراز و اندازه فونت برای h4 در موبایل */
  h4 {
    text-align: center;
    font-size: 14px;
  }

  /* تنظیم فاصله و نمایش دکمه‌های تماس و اطلاعات */
  .me {
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px auto 0;
  }
}

/* ===================== سکشن کارت‌های خدمات (زیر بنر) ===================== */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1400px;
  margin: 50px auto;
  padding: 0 20px;
  scroll-margin-top: 70px;
}

.service-card {
  flex: 1 1 calc((100% - 40px) / 3);
  max-width: calc((100% - 40px) / 3);
  direction: rtl;
  background: #eef1f1;
  border-radius: 14px;
  padding: 20px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  background: #f9fbfb;
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(2, 58, 69, 0.1);
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.service-card-top h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.service-card p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-muted);
}

/* آیکون دایره‌ای گرادیانتی، هم‌رنگ با بقیه‌ی سایت */
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), var(--primary-light));
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 900px) {
  .service-card {
    flex: 1 1 calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
  }
}

@media (max-width: 600px) {
  .service-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ===================== سکشن معرفی مرکز ===================== */
.about-section {
  display: flex;
  direction: rtl;
  align-items: center;
  gap: 40px;
  max-width: 1400px;
  margin: 50px auto;
  padding: 0 20px;
  direction: ltr;
  scroll-margin-top: 70px;
}

.about-text {
  flex: 1 1 55%;
  direction: rtl;
}

.about-text h2 {
  color: var(--primary-dark);
  font-size: 26px;
  margin-bottom: 20px;
}

.brand-accent {
  color: inherit;
}

.about-text p {
  color: var(--text-muted);
  line-height: 2;
  font-size: 15px;
  margin-bottom: 15px;
}

.about-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.about-images {
  position: relative;
  flex: 1 1 45%;
  min-height: 380px;
  overflow: hidden;
}

.hex-wrap {
  position: absolute;
  width: 58%;
  aspect-ratio: 1 / 0.92;
  background: #fff;
  padding: 6px;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
}

.hex-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
}

.hex-back {
  top: 0;
  right: 10%;
}

.hex-front {
  bottom: 0;
  left: 5%;
  z-index: 2;
}

@media (max-width: 900px) {
  .about-section {
    flex-direction: column;
  }

  .about-images {
    width: 100%;
    min-height: 320px;
  }
}

/* ===================== سکشن اخبار و مقالات ===================== */
.news-section {
  max-width: 1400px;
  margin: 50px auto;
  padding: 0 20px;
  direction: rtl;
  scroll-margin-top: 70px;
}

.news-title {
  color: var(--accent-green);
  font-size: 24px;
  font-weight: 700;
  text-align: right;
  margin-bottom: 25px;
}

/* ===================== main: کارت‌های مقالات ===================== */
.card-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-around;
  width: 100%;
}

.card {
  background-color: #fff;
  width: 250px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  margin-top: 50px;
  direction: rtl;
}

.card:hover {
  transform: translateY(-10px);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card-content {
  padding: 15px;
}

.card-content h3 {
  font-size: 16px;
  color: rgb(86, 165, 165);
  margin-bottom: 10px;
}

.card-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.date {
  font-size: 12px;
  color: #7e7e7e;
  display: block;
  margin-top: 10px;
}

/* ===================== جدول تعرفه خدمات ===================== */
.table-box{
  width: 95%;
  max-width: 1600px;
  margin: 80px auto;
  padding: 35px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(2, 58, 69, 0.12);
  direction: rtl;
}


/* نوار رنگی بالای باکس، هم‌رنگ با گرادیانت فوتر */
.table-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent-green), var(--primary-light));
}

.table-box h2 {
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

th {

  padding: 18px;
  font-size: 17px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
}

td {
  padding: 18px;
  font-size: 15px;
  border-bottom: 1px solid #ddd;
  
}

tr:hover {
  background: #eef6f4;
}

@media (max-width: 768px) {
  .table-box {
    margin: 20px;
    padding: 15px;
  }

  th, td {
    padding: 8px;
    font-size: 13px;
  }
}

/* ===================== ردیف مشترک: ویدیوی معرفی و فرم نوبت ===================== */
.media-form-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ----- باکس ویدیوی معرفی ----- */
.media-box {
  position: relative;
  flex: 1 1 50%;
  max-width: 600px;
  margin: 50px 0;
  padding: 20px;
  scroll-margin-top: 70px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(2, 58, 69, 0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* نوار رنگی بالای باکس، هم‌رنگ با گرادیانت فوتر */
.media-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent-green), var(--primary-light));
}

.media-box h2 {
  margin-bottom: 20px;
  color: #024440;
}

.media-box video {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .media-form-row {
    flex-direction: column;
    padding: 0;
  }

  .media-box {
    margin: 20px;
    padding: 15px;
  }

  .media-box h2 {
    font-size: 18px;
  }
}

/* ----- باکس فرم ثبت نوبت ----- */
.appointment-box {
  position: relative;
  flex: 1 1 50%;
  max-width: 600px;
  margin: 50px 0;
  background: #ffffff;
  padding: 25px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(2, 58, 69, 0.12);
  scroll-margin-top: 70px;
}

/* نوار رنگی بالای باکس، هم‌رنگ با گرادیانت فوتر */
.appointment-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent-green), var(--primary-light));
}

.appointment-box h2 {
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

/* استایل ورودی‌ها، لیست‌ها و متن‌های باکس (چک‌باکس و رادیو مستثنی شدند) */
.appointment-box input:not([type="checkbox"]):not([type="radio"]),
.appointment-box select,
.appointment-box textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #d5dede;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  text-align: right;
  direction: rtl;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.appointment-box select,
.appointment-box option {
  direction: rtl;
  text-align: right;
}

textarea {
  resize: none;
}

/* استایل چک‌باکس و رادیو (اندازه طبیعی، نه عرض کامل) */
.appointment-box input[type="checkbox"],
.appointment-box input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* استایل فوکوس اینپوت‌ها هم‌رنگ با تم سایت */
.appointment-box input:not([type="checkbox"]):not([type="radio"]):focus,
.appointment-box select:focus,
.appointment-box textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 115, 115, 0.15);
}

/* گروه گزینه‌های جنسیت: دو کارت کنار هم با عرض مساوی */
.gender-group {
  display: flex;
  align-items: stretch;
  gap: 15px;
  margin-bottom: 15px;
}

/* هر کارت جنسیت (رادیو + متن + آیکون) */
.jens {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid #e2e8e8;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.jens input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* متن وسط کارت */
.jens-label {
  flex: 1;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
}

/* آیکون سمت دیگر کارت، هم‌سبک با بقیه آیکون‌های سایت */
.jens-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jens-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--primary);
}

/* حالت انتخاب‌شده‌ی کارت جنسیت */
.jens:has(input:checked) {
  border-color: var(--primary);
  background: rgba(2, 115, 115, 0.06);
}

@media (max-width: 480px) {
  .gender-group {
    flex-direction: column;
  }
}

/* ردیف به‌خاطر بسپار */
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  direction: rtl;
}

/* استایل دکمه ارسال (هم‌شکل با دکمه‌های info/call بالای صفحه) */
.appointment-box button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 20px rgba(2, 115, 115, 0.25);
}

.appointment-box button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .appointment-box {
    margin: 20px;
    padding: 15px;
  }
}

/* ===================== فوتر ===================== */
.footer {
  background-image: linear-gradient(170deg, var(--accent-green) 50%, var(--primary-light) 100%);
  color: white;
  padding: 40px 20px;
  text-align: right;
  width: 100%;
  direction: rtl;
  scroll-margin-top: 70px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-section {
  width: 30%;
}

.footer-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.footer-section p {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-section a {
  color: white;
  text-decoration: none;
}

.footer-section a:hover {
  text-decoration: underline;
}

/* دایره‌ی رنگی دور آیکون‌های SVG بخش تماس */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
  flex-shrink: 0;
}

.icon-badge svg {
  width: 15px;
  height: 15px;
  fill: white;
}

/* چیدمان فلکس برای کانتینر ساعت کاری */
.foo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* استایل لینک‌های شبکه‌های اجتماعی */
.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-start;
}

.social-icons a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.social-icons img {
  border-radius: 10px;
  width: 30px;
  height: 30px;
  transition: all 0.5s ease-in;
  animation: wiggle 2s infinite ease-in-out;
}

@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(8deg); }
  50% { transform: rotate(-8deg); }
  75% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

.social-icons img:hover {
  transform: scale(0.8);
}

@media screen and (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-section {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }

  .footer-section p,
  .foo {
    justify-content: center;
  }

  .social-icons {
    justify-content: center;
  }
}

/* ===================== دکمه شناور بازگشت به بالا ===================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(2, 115, 115, 0.35);
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 200;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
  }
}