/* 
 * Arafel Main StyleSheet - Version 1.0.0
 * Focus: Mobile-First, RTL, Agriculture-Themed
 */

/* ==========================================================================
   1. تنظیمات پایه و متغیرها
   ========================================================================== */
:root {
    /* رنگ‌های اصلی برند (تم کشاورزی) */
    --primary-color: #2e7d32; /* سبز تیره */
    --primary-light: #4caf50;
    --secondary-color: #f59e0b; /* نارنجی زراعی */
    --accent-color: #1565c0;
    
    /* وضعیت‌ها */
    --success: #43a047;
    --danger: #e53935;
    --warning: #ffb300;
    --info: #0288d1;

    /* رنگ‌های گیمیفیکیشن (بر اساس سطوح) */
    --level-newbie: #9e9e9e;
    --level-growing: #8bc34a;
    --level-active: #4caf50;
    --level-advanced: #0288d1;
    --level-pro: #9c27b0;

    /* خاکستری‌ها و پس‌زمینه */
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
}

/* ==========================================================================
   2. ساختار اصلی (Layout)
   ========================================================================== */
.app-container {
    max-width: 600px; /* بهینه‌سازی برای موبایل */
    margin: 0 auto;
    padding-bottom: 80px; /* فضا برای نویگیشن پایین */
    min-height: 100vh;
}

.app-header {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-item.active {
    color: var(--primary-color);
}

/* ==========================================================================
   3. کامپوننت‌های عمومی (Cards, Buttons, Inputs)
   ========================================================================== */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    margin: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-secondary { background: var(--secondary-color); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-block { display: flex; width: 100%; }

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
}

/* ==========================================================================
   4. ماژول بازار و آگهی‌ها (Market)
   ========================================================================== */
.market-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #eee;
}

.price-tag {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* ==========================================================================
   5. کلینیک گیاه‌پزشکی و پرسش‌ها (Clinic)
   ========================================================================== */
.question-item {
    border-right: 4px solid var(--accent-color);
}

.expert-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* ==========================================================================
   6. گیمیفیکیشن و نشان‌ها (Gamification & Badges)
   ========================================================================== */
.user-level-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: white;
    font-weight: bold;
}

.level-newbie { background: var(--level-newbie); }
.level-growing { background: var(--level-growing); }
.level-active { background: var(--level-active); }
.level-advanced { background: var(--level-advanced); }
.level-pro { background: var(--level-pro); }

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid #eee;
}

/* ==========================================================================
   7. مودال‌ها و سیستم احراز هویت (Auth)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 20px;
    position: relative;
}

.login-reason {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-align: center;
}

/* ==========================================================================
   8. پنل اپراتور و بازخورد (Operator & Feedback)
   ========================================================================== */
.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-pending { color: var(--warning); background: rgba(255, 179, 0, 0.1); }
.status-approved { color: var(--success); background: rgba(67, 160, 71, 0.1); }
.status-rejected { color: var(--danger); background: rgba(229, 57, 53, 0.1); }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 12px 0;
    padding: 10px;
    background-color: #f8fafc;
    border-radius: 8px;
    font-size: 0.85rem;
}

.info-grid div {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 4px;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

/* ==========================================================================
   9. یوتیلیتی‌ها و انیمیشن
   ========================================================================== */
.text-center { text-align: center; }
.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.3s ease-out;
}

.clinic-upload-card {
  min-height: 156px;
  border: 1.5px dashed #7cb342;
  background:
    linear-gradient(135deg, rgba(124, 179, 66, 0.12), rgba(0, 150, 136, 0.08)),
    #fbfef9;
  border-radius: 18px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 22px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.clinic-upload-card:hover {
  border-color: #2e7d32;
  background:
    linear-gradient(135deg, rgba(124, 179, 66, 0.18), rgba(0, 150, 136, 0.13)),
    #ffffff;
  transform: translateY(-1px);
}

.clinic-upload-plus {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #2e7d32;
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  font-weight: 500;
  box-shadow: 0 10px 24px rgba(46, 125, 50, 0.22);
}

.clinic-upload-title {
  font-size: 15px;
  font-weight: 800;
  color: #16351f;
}

.clinic-upload-hint {
  font-size: 12px;
  color: #607466;
}

.clinic-media-preview,
.clinic-card-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.clinic-media-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #eef4ee;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(22, 53, 31, 0.08);
}

.clinic-media-item img,
.clinic-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.clinic-media-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 11px;
}

.clinic-archive-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.clinic-search-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7faf7;
  border: 1px solid #dfe8df;
  border-radius: 14px;
  padding: 0 12px;
}

.clinic-search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
}

.clinic-search-icon {
  color: #2e7d32;
  font-size: 18px;
}

.clinic-answer-card {
  border: 1px solid rgba(46, 125, 50, 0.14);
  background: #ffffff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(18, 38, 24, 0.07);
}

.clinic-answer-card.is-answered {
  border-color: rgba(46, 125, 50, 0.28);
}

.clinic-card-body {
  display: grid;
  gap: 12px;
}

.clinic-answer-box {
  background: #f2f8f2;
  border-right: 4px solid #2e7d32;
  border-radius: 14px;
  padding: 12px;
}

@media (max-width: 720px) {
  .clinic-archive-toolbar {
    grid-template-columns: 1fr;
  }

  .clinic-media-preview,
  .clinic-card-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.home-body {
  background: #f4f7f2;
  color: #17231a;
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(244, 247, 242, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(23, 35, 26, 0.08);
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #1f7a3a;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(31, 122, 58, 0.22);
}

.home-brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.home-brand p {
  margin: 0;
  color: #66736a;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.home-login-button {
  border: 0;
  background: #ffffff;
  color: #1f7a3a;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(23, 35, 26, 0.08);
}

.home-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 14px 14px 84px;
}

.home-section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-section-title-row h2 {
  margin: 0;
  font-size: 17px;
}

.home-section-title-row p {
  margin: 3px 0 0;
  color: #6c766f;
  font-size: 12px;
}

.home-stories-section {
  margin-bottom: 14px;
}

.home-stories-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.home-stories-strip::-webkit-scrollbar {
  display: none;
}

.home-story-add,
.home-story-card {
  width: 76px;
  flex: 0 0 76px;
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #26352a;
  font-size: 11px;
  text-align: center;
}

.home-story-add-circle,
.home-story-ring {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.home-story-add-circle {
  background: #ffffff;
  border: 2px dashed #1f7a3a;
  color: #1f7a3a;
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(23, 35, 26, 0.08);
}

.home-story-ring {
  padding: 3px;
  background: conic-gradient(#1f7a3a, #f5b942, #159c8c, #1f7a3a);
}

.home-story-thumb {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  object-fit: cover;
  background: #dfe8df;
  border: 2px solid #ffffff;
}

.home-story-gradient.clinic {
  background: linear-gradient(135deg, #1f7a3a, #71b84f);
}

.home-story-gradient.farm {
  background: linear-gradient(135deg, #9a6a1f, #f0c45a);
}

.home-story-gradient.market {
  background: linear-gradient(135deg, #176b87, #53b7a8);
}

.home-hero-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border-radius: 26px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(12, 42, 20, 0.84), rgba(31, 122, 58, 0.72)),
    url("assets/images/farm-hero.jpg");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 18px;
  box-shadow: 0 18px 40px rgba(23, 35, 26, 0.18);
}

.home-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #f5ffe9;
  font-size: 12px;
  font-weight: 800;
}

.home-hero-content h2 {
  margin: 14px 0 8px;
  max-width: 470px;
  font-size: 30px;
  line-height: 1.45;
}

.home-hero-content p {
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.9;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-primary-action,
.home-secondary-action {
  min-height: 44px;
  border-radius: 14px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
}

.home-primary-action {
  background: #ffffff;
  color: #1f7a3a;
}

.home-secondary-action {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.home-hero-visual {
  display: grid;
  align-content: end;
  gap: 10px;
}

.home-weather-pill,
.home-hero-metric {
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 14px;
  backdrop-filter: blur(12px);
}

.home-weather-pill span,
.home-hero-metric span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.home-weather-pill strong,
.home-hero-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.home-service-card {
  min-height: 152px;
  background: #ffffff;
  border: 1px solid rgba(23, 35, 26, 0.07);
  border-radius: 22px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 26px rgba(23, 35, 26, 0.06);
}

.home-service-card.highlighted {
  border-color: rgba(31, 122, 58, 0.28);
  box-shadow: 0 14px 30px rgba(31, 122, 58, 0.12);
}

.home-service-icon {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 15px;
  margin-bottom: 12px;
}

.crop-icon {
  background: linear-gradient(135deg, #7da33a, #d8bd54);
}

.clinic-icon {
  background: linear-gradient(135deg, #1f7a3a, #58c27d);
}

.market-icon {
  background: linear-gradient(135deg, #176b87, #55b6a4);
}

.score-icon {
  background: linear-gradient(135deg, #8a6330, #f0bd52);
}

.home-service-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.home-service-card p {
  margin: 0;
  color: #6b756e;
  font-size: 12px;
  line-height: 1.8;
}

.home-clinic-section,
.home-feed-section,
.home-date-card {
  margin-top: 16px;
}

.home-clinic-compose {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(31, 122, 58, 0.14);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 26px rgba(23, 35, 26, 0.06);
}

.home-question-plus {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #1f7a3a;
  color: #ffffff;
  text-decoration: none;
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(31, 122, 58, 0.24);
}

.home-clinic-compose h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.home-clinic-compose p {
  margin: 0;
  color: #6b756e;
  font-size: 12px;
}

.home-see-all {
  color: #1f7a3a;
  font-weight: 900;
  text-decoration: none;
  font-size: 13px;
}

.home-clinic-list {
  display: grid;
  gap: 10px;
}

.home-clinic-question-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(23, 35, 26, 0.07);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(23, 35, 26, 0.055);
}

.home-clinic-media {
  width: 92px;
  aspect-ratio: 1;
  border-radius: 17px;
  overflow: hidden;
  background: #e8efe8;
}

.home-clinic-media img,
.home-clinic-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-clinic-media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #1f7a3a;
  font-size: 30px;
  background: linear-gradient(135deg, #eef8ee, #dfeee2);
}

.home-clinic-question-body {
  min-width: 0;
}

.home-clinic-question-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b756e;
  font-size: 11px;
  margin-bottom: 5px;
}

.home-status {
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
}

.home-status.answered {
  background: #e6f4e9;
  color: #1f7a3a;
}

.home-status.open {
  background: #fff4da;
  color: #8a5c00;
}

.home-clinic-question-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-clinic-question-card p {
  margin: 0;
  color: #59655d;
  font-size: 12px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-clinic-empty {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  color: #6b756e;
  border: 1px dashed rgba(23, 35, 26, 0.16);
}

.home-feed-list {
  display: grid;
  gap: 10px;
}

.home-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(23, 35, 26, 0.07);
  border-radius: 18px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(23, 35, 26, 0.05);
}

.home-feed-dot {
  width: 12px;
  height: 44px;
  border-radius: 999px;
  flex: 0 0 12px;
}

.home-feed-dot.operator {
  background: #176b87;
}

.home-feed-dot.clinic {
  background: #1f7a3a;
}

.home-feed-dot.farm {
  background: #d49a25;
}

.home-feed-item h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.home-feed-item p {
  margin: 0;
  color: #6b756e;
  font-size: 12px;
}

.home-floating-question {
  position: fixed;
  left: 18px;
  bottom: 20px;
  z-index: 25;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #1f7a3a;
  color: #ffffff;
  text-decoration: none;
  font-size: 42px;
  line-height: 1;
  box-shadow: 0 16px 34px rgba(31, 122, 58, 0.34);
}

@media (max-width: 820px) {
  .home-topbar {
    padding: 10px 12px;
  }

  .home-brand p {
    max-width: 165px;
  }

  .home-shell {
    padding: 12px 12px 88px;
  }

  .home-hero-card {
    grid-template-columns: 1fr;
    min-height: 280px;
    padding: 18px;
    border-radius: 24px;
  }

  .home-hero-content h2 {
    font-size: 24px;
  }

  .home-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-service-card {
    min-height: 142px;
    padding: 14px;
    border-radius: 20px;
  }

  .home-clinic-question-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .home-clinic-media {
    width: 84px;
  }
}

@media (max-width: 420px) {
  .home-login-button {
    padding: 8px 11px;
    font-size: 12px;
  }

  .home-brand-logo {
    width: 38px;
    height: 38px;
  }

  .home-brand h1 {
    font-size: 16px;
  }

  .home-brand p {
    max-width: 140px;
  }

  .home-hero-actions {
    display: grid;
  }

  .home-service-card h3,
  .home-clinic-compose h3,
  .home-clinic-question-card h3 {
    font-size: 14px;
  }
}
/* استایل نوار کارشناسان */
.home-experts-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.home-expert-card {
  flex: 0 0 80px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.home-expert-card img {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid #1f7a3a;
}

.home-expert-card span {
  font-size: 11px;
  font-weight: 700;
  color: #17231a;
}

/* حذف حاشیه‌های اضافی استوری */
.home-stories-section { margin-bottom: 24px; }

.home-experts-section {
  margin-top: 16px;
}

.home-experts-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}

.home-experts-strip::-webkit-scrollbar {
  display: none;
}

.home-expert-card {
  flex: 0 0 92px;
  min-height: 128px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 7px;
  padding: 10px 8px;
  background: #ffffff;
  border: 1px solid rgba(23, 35, 26, 0.07);
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(23, 35, 26, 0.05);
}

.home-expert-avatar {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(31, 122, 58, 0.24);
  background: #e6f4e9;
}

.home-expert-avatar-fallback {
  display: grid;
  place-items: center;
  color: #1f7a3a;
  font-size: 24px;
  font-weight: 900;
}

.home-expert-card strong {
  max-width: 78px;
  color: #17231a;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-expert-card span {
  color: #6b756e;
  font-size: 11px;
}
/* ==========================================================================
   10. تکمیل صفحه اصلی و بخش احراز هویت
   ========================================================================== */

/* جلوگیری از نمایش عناصر دارای hidden */
[hidden] {
  display: none !important;
}

/* تنظیمات عمومی لینک‌ها و دکمه‌های صفحه اصلی */
.home-body a,
.home-body button,
.home-body input,
.home-body select,
.home-body textarea {
  font-family: inherit;
}

.home-body button {
  cursor: pointer;
}

.home-body a {
  -webkit-tap-highlight-color: transparent;
}

.home-body svg {
  display: block;
  flex: 0 0 auto;
}

/* ==========================================================================
   برند آرافل
   ========================================================================== */

.home-brand {
  color: inherit;
  text-decoration: none;
}

.home-brand:hover,
.home-brand:focus {
  color: inherit;
  text-decoration: none;
}

.home-brand-text {
  min-width: 0;
  display: grid;
  align-content: center;
  line-height: 1.4;
}

.home-brand-title {
  display: block;
  margin: 0;
  color: #17231a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
}

.home-brand-text small {
  display: block;
  max-width: 210px;
  margin: 0;
  color: #66736a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* پشتیبانی از ساختار قدیمی برند */
.home-brand-text h1 {
  margin: 0;
  color: #17231a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
}

.home-brand-text p {
  margin: 0;
  color: #66736a;
  font-size: 12px;
  line-height: 1.6;
}

/* ==========================================================================
   محدوده احراز هویت هدر
   ========================================================================== */

.home-auth-area {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

/* دکمه ورود کاربر مهمان */
.home-login-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid rgba(31, 122, 58, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #1f7a3a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 8px 20px rgba(23, 35, 26, 0.08),
    0 1px 2px rgba(23, 35, 26, 0.04);
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.home-login-button:hover {
  color: #ffffff;
  background: #1f7a3a;
  border-color: #1f7a3a;
  box-shadow: 0 12px 26px rgba(31, 122, 58, 0.22);
  transform: translateY(-1px);
}

.home-login-button:active {
  transform: translateY(0);
}

.home-login-button:focus-visible {
  outline: 3px solid rgba(31, 122, 58, 0.2);
  outline-offset: 3px;
}

.home-login-icon {
  display: grid;
  place-items: center;
}

/* ==========================================================================
   دکمه کاربر واردشده
   ========================================================================== */

.home-user-menu {
  position: relative;
  min-width: 0;
}

.home-user-button {
  min-height: 48px;
  max-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(23, 35, 26, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #17231a;
  font-family: inherit;
  text-align: right;
  box-shadow:
    0 9px 24px rgba(23, 35, 26, 0.09),
    0 1px 2px rgba(23, 35, 26, 0.04);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.home-user-button:hover {
  background: #ffffff;
  border-color: rgba(31, 122, 58, 0.22);
  box-shadow: 0 12px 28px rgba(23, 35, 26, 0.12);
  transform: translateY(-1px);
}

.home-user-button:active {
  transform: translateY(0);
}

.home-user-button:focus-visible {
  outline: 3px solid rgba(31, 122, 58, 0.18);
  outline-offset: 3px;
}

.home-user-button[aria-expanded="true"] {
  background: #ffffff;
  border-color: rgba(31, 122, 58, 0.3);
  box-shadow: 0 12px 30px rgba(23, 35, 26, 0.13);
}

/* آواتار اصلی */
.home-user-avatar,
.home-user-dropdown-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent),
    linear-gradient(135deg, #1f7a3a, #48a35f);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(31, 122, 58, 0.16),
    0 6px 15px rgba(31, 122, 58, 0.2);
  font-weight: 900;
}

.home-user-avatar {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.home-user-dropdown-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.home-user-avatar img,
.home-user-dropdown-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

/* نقطه آنلاین کنار آواتار */
.home-user-avatar::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #48b45f;
  box-shadow: 0 0 0 1px rgba(23, 35, 26, 0.05);
}

/* اطلاعات نام و نقش */
.home-user-meta {
  min-width: 0;
  max-width: 150px;
  display: grid;
  align-content: center;
  gap: 1px;
}

.home-user-meta strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #17231a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-user-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #68756c;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-user-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #758078;
  transition: transform 0.2s ease;
}

.home-user-button[aria-expanded="true"] .home-user-chevron {
  color: #1f7a3a;
  transform: rotate(180deg);
}

/* ==========================================================================
   منوی کشویی پروفایل
   ========================================================================== */

.home-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1000;
  width: min(290px, calc(100vw - 24px));
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(23, 35, 26, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 24px 60px rgba(23, 35, 26, 0.18),
    0 4px 12px rgba(23, 35, 26, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform-origin: top left;
  animation: homeDropdownOpen 0.18s ease-out;
}

@keyframes homeDropdownOpen {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.home-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 8px 11px;
}

.home-user-dropdown-header > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.home-user-dropdown-header strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #17231a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-user-dropdown-header small {
  display: block;
  min-height: 17px;
  color: #738077;
  direction: ltr;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
  unicode-bidi: plaintext;
}

.home-user-dropdown-divider {
  height: 1px;
  margin: 4px 8px;
  background: rgba(23, 35, 26, 0.08);
}

/* لینک‌های داخل منو */
.home-user-dropdown-link {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #28362c;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.home-user-dropdown-link > span:first-child {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 10px;
  background: #eef7ef;
  color: #1f7a3a;
}

.home-user-dropdown-link:hover,
.home-user-dropdown-link:focus-visible {
  color: #155e2d;
  background: #f1f8f2;
  outline: none;
}

.home-user-dropdown-link:hover {
  transform: translateX(-2px);
}

/* دکمه خروج */
.home-logout-button {
  color: #c52c2c;
}

.home-logout-button > span:first-child {
  background: #fff0f0;
  color: #d33a3a;
}

.home-logout-button:hover,
.home-logout-button:focus-visible {
  color: #b42323;
  background: #fff2f2;
}

/* ==========================================================================
   پیام وضعیت احراز هویت
   ========================================================================== */

.home-auth-status {
  position: fixed;
  top: 76px;
  left: 16px;
  z-index: 2200;
  max-width: min(340px, calc(100vw - 32px));
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(23, 35, 26, 0.08);
  border-radius: 13px;
  background: #ffffff;
  color: #26352a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  box-shadow: 0 14px 34px rgba(23, 35, 26, 0.14);
  animation: homeStatusShow 0.25s ease-out;
}

.home-auth-status.is-success {
  border-color: rgba(31, 122, 58, 0.2);
  background: #eff9f1;
  color: #17612e;
}

.home-auth-status.is-error {
  border-color: rgba(211, 58, 58, 0.2);
  background: #fff2f2;
  color: #b42323;
}

.home-auth-status.is-loading {
  border-color: rgba(23, 107, 135, 0.2);
  background: #eff8fb;
  color: #176b87;
}

@keyframes homeStatusShow {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   اصلاح عنوان اصلی هیرو
   ========================================================================== */

.home-hero-content h1,
.home-hero-content h2 {
  max-width: 470px;
  margin: 14px 0 8px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.45;
}

/* ==========================================================================
   تعامل‌ها و حالت‌های Hover
   ========================================================================== */

.home-brand-logo,
.home-service-card,
.home-feed-item,
.home-clinic-compose,
.home-primary-action,
.home-secondary-action,
.home-floating-question,
.home-question-plus {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.home-service-card:hover {
  border-color: rgba(31, 122, 58, 0.2);
  box-shadow: 0 16px 34px rgba(23, 35, 26, 0.1);
  transform: translateY(-3px);
}

.home-feed-item:hover {
  border-color: rgba(31, 122, 58, 0.16);
  box-shadow: 0 13px 28px rgba(23, 35, 26, 0.09);
  transform: translateY(-2px);
}

.home-primary-action:hover {
  color: #155e2d;
  box-shadow: 0 10px 24px rgba(9, 34, 17, 0.18);
  transform: translateY(-2px);
}

.home-secondary-action:hover {
  background: rgba(255, 255, 255, 0.21);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.home-question-plus:hover,
.home-floating-question:hover {
  background: #17662f;
  box-shadow: 0 18px 38px rgba(31, 122, 58, 0.4);
  transform: translateY(-2px) scale(1.02);
}

.home-story-add:focus-visible,
.home-user-button:focus-visible,
.home-login-button:focus-visible,
.home-primary-action:focus-visible,
.home-secondary-action:focus-visible,
.home-service-card:focus-visible,
.home-feed-item:focus-visible,
.home-see-all:focus-visible,
.home-question-plus:focus-visible,
.home-floating-question:focus-visible {
  outline: 3px solid rgba(31, 122, 58, 0.24);
  outline-offset: 3px;
}

/* ==========================================================================
   اصلاح کارت‌های سرویس برای ساختار h2 یا h3
   ========================================================================== */

.home-service-card h2,
.home-service-card h3 {
  margin: 0 0 6px;
  color: #17231a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.6;
}

/* ==========================================================================
   وضعیت بارگذاری اطلاعات کاربر
   ========================================================================== */

.home-auth-area.is-loading {
  pointer-events: none;
}

.home-auth-area.is-loading .home-login-button,
.home-auth-area.is-loading .home-user-button {
  opacity: 0.65;
}

.home-auth-area.is-loading .home-user-avatar {
  animation: homeAvatarPulse 1s ease-in-out infinite alternate;
}

@keyframes homeAvatarPulse {
  from {
    opacity: 0.55;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   حالت باز بودن منوی پروفایل
   ========================================================================== */

body.home-user-menu-open {
  overflow-x: hidden;
}

/* ==========================================================================
   دسکتاپ
   ========================================================================== */

@media (min-width: 821px) {
  .home-topbar {
    padding-right: max(16px, calc((100vw - 1120px) / 2));
    padding-left: max(16px, calc((100vw - 1120px) / 2));
  }

  .home-user-button {
    min-width: 180px;
  }

  .home-user-dropdown {
    width: 290px;
  }
}

/* ==========================================================================
   تبلت و موبایل
   ========================================================================== */

@media (max-width: 820px) {
  .home-topbar {
    gap: 10px;
  }

  .home-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .home-brand-title,
  .home-brand-text h1 {
    font-size: 16px;
  }

  .home-brand-text small,
  .home-brand-text p {
    max-width: 165px;
  }

  .home-user-button {
    max-width: 220px;
  }

  .home-user-meta {
    max-width: 115px;
  }

  .home-user-dropdown {
    left: 0;
  }

  .home-hero-content h1,
  .home-hero-content h2 {
    font-size: 24px;
  }
}

/* ==========================================================================
   موبایل کوچک
   ========================================================================== */

@media (max-width: 520px) {
  .home-topbar {
    min-height: 62px;
    padding: 9px 10px;
  }

  .home-brand {
    gap: 8px;
  }

  .home-brand-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    font-size: 19px;
  }

  .home-brand-title,
  .home-brand-text h1 {
    font-size: 15px;
  }

  .home-brand-text small,
  .home-brand-text p {
    max-width: 125px;
    font-size: 10px;
  }

  .home-login-button {
    min-height: 39px;
    gap: 5px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .home-login-icon svg {
    width: 18px;
    height: 18px;
  }

  .home-user-button {
    min-height: 44px;
    max-width: 172px;
    gap: 7px;
    padding: 4px 5px 4px 7px;
  }

  .home-user-avatar {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .home-user-avatar svg {
    width: 21px;
    height: 21px;
  }

  .home-user-meta {
    max-width: 92px;
  }

  .home-user-meta strong {
    font-size: 11px;
  }

  .home-user-meta small {
    font-size: 9px;
  }

  .home-user-chevron svg {
    width: 15px;
    height: 15px;
  }

  .home-user-dropdown {
    position: fixed;
    top: 67px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    border-radius: 18px;
    transform-origin: top center;
  }

  .home-user-dropdown-header {
    padding: 8px 7px 10px;
  }

  .home-user-dropdown-link {
    min-height: 44px;
  }

  .home-auth-status {
    top: 70px;
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
  }

  .home-hero-content h1,
  .home-hero-content h2 {
    font-size: 22px;
  }
}

/* ==========================================================================
   گوشی‌های بسیار کوچک
   ========================================================================== */

@media (max-width: 370px) {
  .home-brand-text small,
  .home-brand-text p {
    display: none;
  }

  .home-user-button {
    max-width: 144px;
  }

  .home-user-meta {
    max-width: 70px;
  }

  .home-user-chevron {
    display: none;
  }

  .home-login-button span:last-child {
    font-size: 11px;
  }
}

/* ==========================================================================
   کاهش حرکت برای دسترس‌پذیری
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
