/*
Theme Name: Speech Clinic - کلینیک گفتاردرمانی
Theme URI: https://example.com
Author: Cheraq
Description: قالب راست‌چین و واکنش‌گرای وردپرس برای کلینیک گفتاردرمانی، با نوار شماره تلفن، اسلایدر تصاویر و بخش‌های خدمات.
Version: 1.0
Text Domain: speech-clinic
Requires at least: 5.8
Requires PHP: 7.4
*/

:root {
  --c-primary: #1fa5a0;
  --c-dark: #0f4c5c;
  --c-accent: #f4a259;
  --c-bg: #f4fafa;
  --c-text: #2b3a42;
  --c-muted: #6b7c85;
  --c-white: #ffffff;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(15, 76, 92, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  direction: rtl;
  text-align: right;
  font-family: "Vazirmatn", "Vazir", Tahoma, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.9;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: .2s; }
a:hover { color: var(--c-dark); }
ul { list-style: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== نوار بالایی: شماره تلفن ===== */
.topbar { background: var(--c-dark); color: #fff; font-size: 14px; }
.topbar-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 10px; padding: 10px 0;
}
.topbar a { color: #fff; }
.topbar-phone {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: bold; letter-spacing: 1px;
}
.topbar-phone .label { font-size: 13px; font-weight: normal; opacity: .85; }
.topbar-phone a { color: var(--c-accent); direction: ltr; unicode-bidi: embed; }
.topbar-info { display: flex; flex-wrap: wrap; gap: 18px; opacity: .92; }

/* ===== هدر و منو ===== */
.site-header {
  background: var(--c-white); box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.site-title { font-size: 24px; font-weight: bold; color: var(--c-dark); }
.site-title span { color: var(--c-primary); }
.main-nav ul { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 8px 14px; color: var(--c-text); border-radius: 10px; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--c-bg); color: var(--c-primary); }
.menu-toggle { display: none; background: var(--c-primary); color: #fff; border: 0; padding: 8px 14px; border-radius: 10px; font-family: inherit; font-size: 15px; cursor: pointer; }

/* ===== اسلایدر ===== */
.slider { position: relative; height: 520px; overflow: hidden; background: var(--c-dark); }
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .9s ease; background-size: cover; background-position: center;
  display: flex; align-items: center;
}
.slide.active { opacity: 1; visibility: visible; }
.slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(15,76,92,.88), rgba(15,76,92,.25)); }
.slide.no-img { background-image: linear-gradient(135deg, #0f4c5c, #1fa5a0); }
.slide-content { position: relative; color: #fff; max-width: 560px; }
.slide-content h2 { font-size: 38px; line-height: 1.5; margin-bottom: 14px; }
.slide-content p { font-size: 18px; opacity: .95; margin-bottom: 24px; }
.slider-dots { position: absolute; bottom: 20px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 5; }
.slider-dots button { width: 12px; height: 12px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.slider-dots button.active { background: var(--c-accent); width: 30px; border-radius: 8px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(255,255,255,.2); color: #fff; border: 0; width: 44px; height: 44px;
  border-radius: 50%; font-size: 22px; cursor: pointer;
}
.slider-arrow:hover { background: var(--c-accent); }
.slider-arrow.prev { right: 16px; }
.slider-arrow.next { left: 16px; }

/* ===== دکمه‌ها ===== */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 50px; font-weight: bold;
  background: var(--c-accent); color: #fff; border: 0; cursor: pointer; font-family: inherit; font-size: 16px;
}
.btn:hover { background: #e68a3a; color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid #fff; margin-right: 10px; }
.btn-primary { background: var(--c-primary); }
.btn-primary:hover { background: var(--c-dark); }

/* ===== بخش‌ها ===== */
.section { padding: 70px 0; }
.section.alt { background: var(--c-white); }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: 30px; color: var(--c-dark); margin-bottom: 8px; }
.section-title p { color: var(--c-muted); }
.section-title::after { content: ""; display: block; width: 70px; height: 4px; background: var(--c-accent); margin: 14px auto 0; border-radius: 4px; }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--c-white); padding: 30px 24px; border-radius: var(--radius);
  box-shadow: var(--shadow); text-align: center; transition: .25s; border-bottom: 4px solid transparent;
}
.service-card:hover { transform: translateY(-6px); border-bottom-color: var(--c-primary); }
.service-icon {
  width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--c-bg); display: flex; align-items: center; justify-content: center; font-size: 34px;
}
.service-card h3 { color: var(--c-dark); margin-bottom: 8px; font-size: 19px; }
.service-card p { color: var(--c-muted); font-size: 15px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.about-img { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: linear-gradient(135deg, #1fa5a0, #0f4c5c); min-height: 340px; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { color: var(--c-dark); font-size: 30px; margin-bottom: 14px; }
.about-text p { color: var(--c-muted); margin-bottom: 18px; }
.about-list li { padding-right: 28px; position: relative; margin-bottom: 8px; }
.about-list li::before { content: "✓"; position: absolute; right: 0; color: var(--c-primary); font-weight: bold; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--c-white); border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: var(--shadow); position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--c-primary); color: #fff; align-items: center; justify-content: center; font-weight: bold; font-size: 20px;
}
.step h3 { color: var(--c-dark); font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--c-muted); font-size: 14px; }

.cta { background: linear-gradient(135deg, var(--c-primary), var(--c-dark)); color: #fff; text-align: center; padding: 60px 20px; }
.cta h2 { font-size: 30px; margin-bottom: 10px; }
.cta p { margin-bottom: 24px; opacity: .92; }
.cta .phone-number { display: block; font-size: 34px; font-weight: bold; color: var(--c-accent); direction: ltr; margin-bottom: 20px; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: var(--c-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-thumb { height: 190px; background: linear-gradient(135deg, #bfe8e6, #1fa5a0); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 20px; }
.post-body h3 { font-size: 18px; margin-bottom: 8px; }
.post-body h3 a { color: var(--c-dark); }
.post-meta { font-size: 13px; color: var(--c-muted); margin-bottom: 8px; }
.post-body p { color: var(--c-muted); font-size: 15px; }

/* ===== صفحه‌های داخلی ===== */
.page-wrap { padding: 50px 0; }
.content-box { background: var(--c-white); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.content-box h1 { color: var(--c-dark); margin-bottom: 16px; }
.content-box h2, .content-box h3 { color: var(--c-dark); margin: 20px 0 10px; }
.content-box p { margin-bottom: 14px; }
.content-box ul { list-style: disc; padding-right: 24px; margin-bottom: 14px; }
.pagination { margin-top: 30px; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 6px 14px; background: #fff; border-radius: 8px; margin: 0 3px; }
.pagination .current { background: var(--c-primary); color: #fff; }

/* ===== فوتر ===== */
.site-footer { background: var(--c-dark); color: #d4e6ea; padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 36px; padding-bottom: 36px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 18px; }
.site-footer a { color: #d4e6ea; }
.site-footer a:hover { color: var(--c-accent); }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px 0; font-size: 14px; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

.wa-float {
  position: fixed; bottom: 22px; left: 22px; background: #25d366; color: #fff;
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 60;
}
.wa-float:hover { color: #fff; transform: scale(1.08); }

/* ===== واکنش‌گرا ===== */
@media (max-width: 900px) {
  .services-grid, .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .footer-grid { grid-template-columns: 1fr; }
  .slider { height: 460px; }
  .slide-content h2 { font-size: 28px; }
}
@media (max-width: 640px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .main-nav ul { flex-direction: column; margin-top: 10px; }
  .services-grid, .posts-grid, .steps { grid-template-columns: 1fr; }
  .topbar-inner { justify-content: center; text-align: center; }
  .slider-arrow { display: none; }
  .section { padding: 46px 0; }
}
