﻿/* ====================== ط§ظ„ظ…طھط؛ظٹط±ط§طھ ط§ظ„ط£ط³ط§ط³ظٹط© (Light Mode) ====================== */
:root {
  --primary: #004fff;
  --primary-dark: #003ecc;
  --primary-light: #3366ff;
  --success: #28a745;
  --text: #333;
  --text-light: #6c757d;
  --text-muted: #495057;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --border: #eee;
  --border-light: #dee2e6;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.05);
  --placeholder-bg: #e9ecef;
  --service-icon-bg: #e3f2fd;
  --cta-bg-start: #004fff;
  --cta-bg-end: #3366ff;
  --slot-bg: #e3f2fd;
  --slot-available: #d1ecf1;
  --danger-bg: #f8d7da;
  --danger-text: #721c24;
  --stars: #ffc107;
}

/* ====================== ط§ظ„ظ€ Dark Mode ====================== */
html[data-theme="dark"] {
  --primary: #3366ff;
  --primary-dark: #004fff;
  --primary-light: #6699ff;
  --success: #28a745;
  --text: #e0e0e0;
  --text-light: #adb5bd;
  --text-muted: #ced4da;
  --bg: #121212;
  --card-bg: #1e1e1e;
  --border: #333;
  --border-light: #444;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
  --placeholder-bg: #2d2d2d;
  --service-icon-bg: #1a3a5c;
  --cta-bg-start: #004fff;
  --cta-bg-end: #3366ff;
  --slot-bg: #1a3a5c;
  --slot-available: #2b5a6e;
  --danger-bg: #442726;
  --danger-text: #f5c6cb;
  --stars: #f39c12;
}

/* ====================== ط§ظ„ط£ط³ط§ط³ظٹط§طھ ====================== */
body {
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.clinic-toast {
  position: fixed;
  inset-inline-start: 24px;
  bottom: 24px;
  z-index: 9999;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(0, 79, 255, 0.2);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.clinic-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====================== Professional Home ====================== */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
  margin: 34px 0 24px;
}

.home-hero-content,
.home-doctor-panel,
.home-action-card,
.home-final-cta {
  border: 1px solid rgba(0, 79, 255, 0.16);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.home-hero-content {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 430px;
  padding: 34px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(0, 79, 255, 0.12), transparent 55%),
    var(--card-bg);
}

.home-hero-content h1 {
  margin: 0;
  color: var(--text);
  font-size: 42px;
  line-height: 1.2;
  text-align: start;
}

.home-hero-content p {
  max-width: 720px;
  margin: 0;
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.9;
}

.home-hero-actions,
.home-trust-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.home-hero-actions {
  margin-top: 8px;
}

.home-trust-row {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.home-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-trust-row i {
  color: var(--success);
}

.home-doctor-panel {
  display: grid;
  gap: 16px;
  align-content: center;
  padding: 24px;
  border-radius: 26px;
  text-align: center;
}

.home-doctor-visual {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  margin: 0 auto;
  border: 1px solid rgba(0, 79, 255, 0.18);
  border-radius: 36px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  font-size: 62px;
  box-shadow: 0 18px 46px rgba(0, 79, 255, 0.22);
}

.home-doctor-info {
  display: grid;
  gap: 4px;
}

.home-doctor-info strong {
  color: var(--text);
  font-size: 22px;
}

.home-doctor-info span {
  color: var(--text-light);
}

.home-doctor-info a {
  color: var(--primary);
  font-weight: 900;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.home-stats-grid div {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-radius: 18px;
  background: var(--bg);
}

.home-stats-grid strong {
  color: var(--primary);
  font-size: 24px;
}

.home-stats-grid span {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 800;
}

.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 48px;
}

.home-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 16px;
  border-radius: 20px;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-action-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.home-action-card > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 20px;
}

.home-action-card strong,
.home-action-card small {
  display: block;
}

.home-action-card strong {
  color: var(--text);
  font-size: 16px;
}

.home-action-card small {
  color: var(--text-light);
  line-height: 1.5;
}

.home-action-card > i {
  color: var(--primary);
}

.home-branches-grid,
.home-services-grid {
  margin-top: 0;
}

.home-branch-card,
.home-service-card {
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-branch-card:hover,
.home-service-card:hover {
  border-color: rgba(0, 79, 255, 0.28);
}

.home-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.home-card-head > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--service-icon-bg);
  flex: 0 0 auto;
}

.home-card-head h3,
.home-card-head p {
  margin: 0;
}

.home-card-head h3 {
  color: var(--text);
  font-size: 18px;
}

.home-card-head p {
  color: var(--text-light);
  line-height: 1.6;
}

.branch-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--primary);
  font-weight: 900;
}

.home-hours {
  display: grid;
  gap: 8px;
}

.home-hour-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg);
}

.home-hour-row strong {
  color: var(--text);
  font-size: 13px;
}

.home-hour-row span {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 800;
  text-align: end;
}

.home-reviews-section {
  display: grid;
  gap: 18px;
  margin: 48px 0;
  padding: 28px;
  border: 1px solid rgba(0, 79, 255, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(0, 79, 255, 0.08), transparent 50%),
    var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.home-reviews-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.home-reviews-head h2 {
  margin: 10px 0 4px;
  color: var(--text);
  font-size: 26px;
}

.home-reviews-head p {
  max-width: 680px;
  margin: 0;
  color: var(--text-light);
  line-height: 1.7;
}

.home-reviews-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(320px, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.home-review-summary,
.home-review-card,
.home-review-form {
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.home-review-summary {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 20px;
}

.summary-stars {
  color: var(--stars);
  font-size: 22px;
  letter-spacing: 1px;
}

.home-review-summary strong {
  color: var(--text);
  font-size: 22px;
}

.home-review-summary p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.summary-points {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.summary-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-points i {
  color: var(--success);
}

.home-review-form h3 {
  margin: 0;
  color: var(--text);
}

.home-review-form {
  margin: 0;
  padding: 18px;
}

.review-form-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.review-form-head > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--service-icon-bg);
  flex: 0 0 auto;
}

.review-form-head p {
  margin: 3px 0 0;
  color: var(--text-light);
  font-size: 13px;
}

.home-review-list {
  display: grid;
  gap: 12px;
}

.home-review-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  transition: 0.2s ease;
}

.home-review-card:hover {
  border-color: rgba(0, 79, 255, 0.28);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.review-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  font-weight: 900;
}

.review-card-top strong,
.review-card-top span {
  display: block;
}

.review-card-top strong {
  color: var(--text);
  font-size: 15px;
}

.review-card-top span {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 800;
}

.review-card-top .stars {
  font-size: 14px;
  white-space: nowrap;
}

.home-review-card p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.home-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 48px 0 20px;
  padding: 28px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(0, 79, 255, 0.12), transparent 54%),
    var(--card-bg);
}

.home-final-cta h2 {
  margin: 10px 0 6px;
  color: var(--text);
  font-size: 26px;
}

.home-final-cta p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.7;
}

/* ====================== Main Content ====================== */
main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
  margin: 85px 5px;
}

.clinic-card {
  width: 280px;
  height: 320px;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 6px solid var(--primary);
  border-radius: 24px;
  pointer-events: none;
}

.card-content {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.placeholder {
  width: 120px;
  height: 120px;
  background-color: var(--placeholder-bg);
  border-radius: 16px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  color: var(--primary);
  font-weight: 600;
}

/* ====================== Info Section ====================== */
.info-section {
  flex: 1;
}

.info-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 12px;
  text-align: right;
}

.info-subtitle {
  font-size: 16px;
  color: var(--primary-light);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-text {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.8;
}

.features-list {
  list-style: none;
  margin-bottom: 25px;
}

.features-list li {
  font-size: 15px;
  color: var(--success);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.features-list li span {
  font-size: 18px;
}

.action-btn {
  background-color: var(--primary);
  color: white;
  width: fit-content;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
  transition: all 0.2s;
}

.action-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* ====================== Page Title ====================== */
.page-title {
  margin: 50px 0;
  text-align: center;
}

.page-title h1 {
  font-size: 28px;
  font-weight: bold;
  color: var(--text);
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  text-align: center;
}

/* ====================== User Content Pages ====================== */
.user-page-hero {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 34px 0 26px;
  padding: 34px;
  border: 1px solid rgba(0, 79, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 79, 255, 0.11), transparent 58%), var(--card-bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.user-page-hero.compact-hero {
  margin-top: 28px;
}

.user-page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 13px;
  font-weight: 900;
}

.user-page-hero h1,
.article-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 34px;
  line-height: 1.25;
  text-align: start;
}

.user-page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.user-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  color: var(--primary);
  background: var(--card-bg);
  font-weight: 900;
}

.ghost-link:hover {
  border-color: var(--primary);
  background: var(--service-icon-bg);
}

.content-section {
  display: grid;
  gap: 18px;
  margin: 28px 0 70px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--text-light);
  line-height: 1.7;
}

.content-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.polished-grid {
  align-items: stretch;
}

.polished-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 270px;
  border: 1px solid var(--border-light);
  background: var(--card-bg);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.polished-card:hover,
.polished-review:hover {
  border-color: rgba(0, 79, 255, 0.28);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.article-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 20px;
}

.article-meta-row,
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 800;
}

.polished-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

.polished-card p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.polished-card .read-more {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 38px;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 900;
}

.polished-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.polished-tip {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-right: 4px solid var(--primary);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.polished-tip > span {
  color: var(--primary);
  font-size: 20px;
}

.polished-tip p {
  margin: 0;
  color: var(--text);
  line-height: 1.9;
  font-style: normal;
}

.polished-tip small {
  color: var(--text-light);
  font-weight: 800;
}

.polished-review {
  border: 1px solid var(--border-light);
  background: var(--card-bg);
}

.user-empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 42px 20px;
  border: 1px dashed var(--border-light);
  border-radius: 20px;
  background: var(--card-bg);
  text-align: center;
}

.user-empty-state > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 24px;
}

.user-empty-state h3,
.user-empty-state p {
  margin: 0;
}

.user-empty-state h3 {
  color: var(--text);
}

.user-empty-state p {
  color: var(--text-light);
}

.user-pagination {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.user-pagination nav {
  width: 100%;
}

.user-pagination .flex {
  gap: 6px;
}

.user-pagination a,
.user-pagination span {
  border-radius: 10px !important;
}

.user-breadcrumb {
  margin-inline: 0;
}

.polished-article {
  max-width: 900px;
  margin: 28px auto 70px;
}

.article-hero {
  display: grid;
  gap: 12px;
  padding: 30px;
  border: 1px solid rgba(0, 79, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 79, 255, 0.1), transparent 56%), var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.article-content {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 17px;
  line-height: 2.1;
  box-shadow: var(--shadow-sm);
}

.article-footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 20px;
  background: var(--service-icon-bg);
}

.article-footer-cta strong {
  color: var(--text);
  font-size: 18px;
}

.article-footer-cta p {
  margin: 4px 0 0;
  color: var(--text-light);
}

.user-footer {
  display: grid;
  gap: 18px;
  margin: 64px 0 14px;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent 42%),
    var(--card-bg);
  box-shadow: var(--shadow-md);
  text-align: start;
}

/* ====================== Final public mobile content UX ====================== */
@media screen and (max-width: 760px) {
  main,
  .user-page,
  .booking-page,
  .track-page,
  .content-section,
  .article-content,
  .booking-shell,
  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .review-card,
  .article-card,
  .tip-quote {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  :where(.booking-page, .track-page, .user-page, .content-section, .article-content) :where(input, textarea, select) {
    min-height: 48px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
  }

  :where(.booking-page, .track-page, .user-page, .content-section, .article-content) :where(button, .btn, .slot-choice, .day-choice, .type-card, .payment-item, .nav-link) {
    min-height: 46px !important;
    touch-action: manipulation !important;
  }

  :where(.booking-actions, .form-actions, .track-actions, .hero-actions, .cta-actions, .content-header, .booking-card-header) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  :where(.booking-actions .btn, .form-actions .btn, .track-actions .btn, .hero-actions .btn, .cta-actions .btn, button[type="submit"]) {
    width: 100% !important;
    justify-content: center !important;
  }

  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .article-card,
  .review-card {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .booking-card-header h2,
  .content-header h1,
  .article-hero h1,
  .home-hero-content h1 {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.25 !important;
  }

  .booking-card-header p,
  .content-header p,
  .article-hero p,
  .home-hero-content p {
    font-size: 14px !important;
    line-height: 1.75 !important;
  }

  .slots-grid,
  .days-grid,
  .type-grid,
  .payment-grid,
  .articles-grid,
  .reviews-grid,
  .tips-grid,
  .services-grid,
  .branches-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .booking-step,
  .step-card,
  .track-step {
    min-width: 0 !important;
  }

  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media screen and (max-width: 430px) {
  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .article-card,
  .review-card {
    padding: 12px !important;
  }

  .home-hero-content,
  .article-hero,
  .content-section {
    padding-inline: 0 !important;
  }

  .whatsapp-float {
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}

:where(a, button, input, select, textarea, label):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 34%, transparent);
  outline-offset: 3px;
}

:where(button, .submit-btn, .btn-like-secondary, .ghost-link):disabled {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(320px, 1.45fr) minmax(210px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.footer-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 26%, transparent);
}

.footer-mark i {
  font-size: 20px;
}

.user-footer strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.user-footer p {
  margin: 3px 0 0;
  color: var(--text-light);
  line-height: 1.7;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.footer-links,
.footer-contact {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}

.footer-links span,
.footer-contact > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.user-footer nav a,
.footer-phone {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.user-footer nav a:hover,
.footer-phone:hover {
  color: var(--primary);
  transform: translateX(-3px);
}

.footer-phone {
  gap: 8px;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 62%, var(--card-bg));
  white-space: nowrap;
}

.footer-phone i {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 10px;
  background: var(--service-icon-bg);
  color: var(--primary);
}

.footer-phone.is-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.footer-phone.is-primary i {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.footer-bottom div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-bottom a {
  color: var(--text-light);
  font-weight: 900;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ====================== Branches Grid ====================== */
.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.branch-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
}

.branch-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.branch-info h3 {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 15px;
}

.branch-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-light);
}

.branch-detail span {
  font-size: 16px;
  color: var(--primary-light);
}

.branch-address {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.6;
}

.branch-phone {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.branch-phone span {
  font-size: 18px;
}

/* ====================== Services Grid ====================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 60px;
}

.service-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px 25px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.service-icon {
  width: 70px;
  height: 70px;
  background-color: var(--service-icon-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  color: var(--primary-light);
}

.service-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 15px;
}

.service-link {
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.service-link span {
  font-size: 16px;
}

/* ====================== Testimonials Section ====================== */
.testimonials {
  margin: 60px 0;
}

.testimonials-section .page-title h1 {
  font-size: 28px;
  margin-bottom: 40px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.testimonial {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  margin: 25px 0;
  box-shadow: var(--shadow-sm);
  border-right: 5px solid var(--primary);
  transition: all 0.3s ease;
}

.testimonial:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.testimonial .stars {
  color: var(--stars);
  font-size: 22px;
  margin-bottom: 20px;
}

.testimonial-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 25px;
}

.testimonial-author {
  font-weight: bold;
  font-size: 15px;
  color: var(--primary);
}

/* ====================== Working Hours Section ====================== */
.working-hours-section {
  margin: 60px 0;
}

.working-hours-section .page-title h1 {
  font-size: 28px;
  margin-bottom: 40px;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.day-row {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.day-row:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.day-name {
  font-weight: bold;
  font-size: 16px;
  color: var(--text);
}

.slots {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.slot {
  background: var(--slot-bg);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
}

.slot.available {
  color: var(--primary-dark);
  font-weight: 900;
}

.slot.closed {
  background: var(--danger-bg);
  color: var(--danger-text);
}

/* ====================== CTA Section ====================== */
.cta-section {
  background: linear-gradient(135deg, var(--cta-bg-start), var(--cta-bg-end));
  color: white;
  text-align: center;
  padding: 60px 20px;
  border-radius: 0 0 16px 16px;
  margin-top: -20px;
}

.cta-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
}

.cta-subtitle {
  font-size: 15px;
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.8;
  opacity: 0.9;
}

.cta-btn {
  background-color: white;
  color: var(--primary);
  padding: 14px 32px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background-color: #f8f9fa;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.cta-btn span {
  font-size: 18px;
}

/* ====================== Footer ====================== */
footer {
  text-align: center;
  padding: 30px 0;
  color: var(--text-light);
  font-size: 14px;
}

.footer-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-text {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.contact-section {
  text-align: center;
  padding: 50px 0;
}

.contact-title h2 {
  font-size: 28px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 15px;
}

.contact-subtitle {
  font-size: 15px;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ====================== Responsive ====================== */
@media (max-width: 768px) {
  main {
    flex-direction: column;
    text-align: center;
  }
  .clinic-card {
    width: 100%;
    max-width: 300px;
  }
  .info-section {
    margin-top: 30px;
  }
  .branches-grid,
  .services-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .branch-card {
    flex-direction: column;
    text-align: center;
  }
  .branch-info,
  .branch-details {
    width: 100%;
  }
  .cta-title {
    font-size: 24px;
  }

  .day-row {
    gap: 12px;
    text-align: center;
  }

  .slots {
    justify-content: center;
  }
}

/* =========================
   Review Section (Dark Mode Ready)
========================= */

.review-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin: auto;
}

/* ===== Title ===== */
.review-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
    text-align: center;
}

/* ===== Form Group ===== */
.review-group {
    margin-bottom: 18px;
}

/* ===== Label ===== */
.review-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}

/* ===== Inputs ===== */
.review-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease-in-out;
    background: var(--placeholder-bg);
    color: var(--text);
}

.review-input::placeholder {
    color: var(--text-light);
}

.review-input:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(0, 79, 255, 0.2);
}

/* ===== Textarea ===== */
.review-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== Rating Select ===== */
.review-select option {
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text);
}

/* ===== Submit Button ===== */
.review-submit {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(
        135deg,
        var(--cta-bg-start),
        var(--cta-bg-end)
    );
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 79, 255, 0.35);
}

.review-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .review-section {
        padding: 20px;
    }
    .review-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .review-section {
        padding: 16px;
    }
    .review-title {
        font-size: 18px;
    }
    .review-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    .review-submit {
        font-size: 15px;
        padding: 10px;
    }
}

/* ====================== Booking Experience ====================== */
.booking-shell {
  max-width: 1180px;
  margin: 0 auto 70px;
}

.booking-breadcrumb {
  margin: 24px 0;
}

.booking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: stretch;
  margin: 28px 0 24px;
  padding: 28px;
  border: 1px solid rgba(0, 79, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 79, 255, 0.12), transparent 46%), var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.booking-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-weight: 800;
  font-size: 13px;
}

.booking-hero h1 {
  margin: 14px 0 10px;
  color: var(--text);
  font-size: 34px;
  line-height: 1.25;
  text-align: start;
}

.booking-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.booking-doctor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.doctor-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  font-size: 26px;
}

.booking-doctor-card strong,
.booking-doctor-card span,
.booking-doctor-card a {
  display: block;
}

.booking-doctor-card strong {
  color: var(--text);
  font-size: 17px;
}

.booking-doctor-card span {
  color: var(--text-light);
  font-size: 14px;
}

.booking-doctor-card a {
  margin-top: 5px;
  color: var(--primary);
  font-weight: 800;
}

.booking-success,
.booking-errors {
  display: flex;
  gap: 14px;
  margin: 16px 0;
  padding: 18px;
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.booking-success {
  border: 1px solid rgba(40, 167, 69, 0.24);
  color: var(--success);
}

.success-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--success);
  flex: 0 0 auto;
}

.success-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--text);
}

.booking-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 800;
}

.booking-errors {
  display: block;
  border: 1px solid rgba(220, 53, 69, 0.24);
  color: var(--danger-text);
  background: var(--danger-bg);
}

.booking-errors ul {
  margin: 8px 20px 0 0;
}

.booking-form {
  display: grid;
  gap: 18px;
}

.booking-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.booking-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  color: var(--text-light);
  background: var(--card-bg);
  font-weight: 700;
}

.booking-steps b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--service-icon-bg);
}

.booking-steps .active {
  color: var(--primary);
  border-color: rgba(0, 79, 255, 0.26);
  box-shadow: var(--shadow-sm);
}

.booking-card,
.booking-summary-card {
  padding: 22px;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.booking-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.booking-card-header > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--service-icon-bg);
  flex: 0 0 auto;
}

.booking-card-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.booking-card-header p {
  margin: 2px 0 0;
  color: var(--text-light);
  font-size: 14px;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.booking-field {
  display: grid;
  gap: 8px;
}

.booking-field label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
}

.booking-field input,
.booking-field select,
.booking-field textarea,
.booking-card input,
.booking-card select,
.booking-card textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  color: var(--text);
  outline: 0;
  background: var(--card-bg);
}

.booking-field textarea {
  min-height: 110px;
  resize: vertical;
}

.field-hint {
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.5;
}

.booking-field input:focus,
.booking-field select:focus,
.booking-field textarea:focus,
.booking-card input:focus,
.booking-card select:focus,
.booking-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 79, 255, 0.14);
}

.booking-date-grid {
  grid-template-columns: minmax(280px, 1.15fr) minmax(220px, 0.85fr);
  align-items: start;
}

.date-input-shell {
  position: relative;
}

.date-input-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--service-icon-bg);
  transform: translateY(-50%);
  pointer-events: none;
}

.date-input-shell input[type="date"],
.date-input-shell input[type="time"] {
  min-height: 58px;
  padding-inline-start: 60px;
  border-radius: 18px;
  border-color: rgba(0, 79, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(0, 79, 255, 0.08), transparent 52%),
    var(--card-bg);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.date-input-shell input[type="date"]:hover,
.date-input-shell input[type="time"]:hover {
  border-color: rgba(0, 79, 255, 0.42);
}

.date-input-shell input[type="date"]:focus,
.date-input-shell input[type="time"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 79, 255, 0.14);
}

.date-input-shell input[type="date"]::-webkit-calendar-picker-indicator,
.date-input-shell input[type="time"]::-webkit-calendar-picker-indicator {
  width: 26px;
  height: 26px;
  padding: 6px;
  border-radius: 10px;
  background-color: var(--service-icon-bg);
  cursor: pointer;
  opacity: 0.9;
}

.date-input-shell input[type="date"]::-webkit-calendar-picker-indicator:hover,
.date-input-shell input[type="time"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(0, 79, 255, 0.18);
}

.date-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.date-shortcuts button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(0, 79, 255, 0.18);
  border-radius: 999px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.date-shortcuts button:hover,
.date-shortcuts button.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
  transform: translateY(-1px);
}

.availability-planner {
  display: grid;
  gap: 16px;
}

.availability-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 79, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 79, 255, 0.05), transparent 48%), var(--bg);
}

.availability-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.availability-panel-head label {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.availability-panel-head small {
  color: var(--text-light);
  line-height: 1.5;
}

.availability-panel-head > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--service-icon-bg);
  flex: 0 0 auto;
}

.availability-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.day-choice {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 118px;
  padding: 10px 8px;
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  color: var(--text);
  background: var(--card-bg);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.day-choice:hover:not(:disabled),
.day-choice.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.day-choice.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.day-choice:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  background: var(--placeholder-bg);
}

.day-choice-label,
.day-choice span {
  font-size: 12px;
  font-weight: 800;
}

.day-choice strong {
  font-size: 26px;
  line-height: 1;
}

.day-choice small {
  color: var(--text-light);
  font-size: 11px;
  font-weight: 800;
}

.day-choice.active small,
.day-choice.active span {
  color: rgba(255, 255, 255, 0.88);
}

.availability-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.slot-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  color: var(--text);
  background: var(--card-bg);
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.slot-choice i {
  color: var(--primary);
}

.slot-choice:hover,
.slot-choice.active {
  border-color: var(--primary);
  background: var(--service-icon-bg);
  transform: translateY(-1px);
}

.slot-choice.active {
  color: #fff;
  background: var(--primary);
}

.slot-choice.active i {
  color: #fff;
}

.availability-empty {
  display: none;
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--border-light);
  border-radius: 14px;
  color: var(--text-light);
  background: var(--card-bg);
  text-align: center;
}

.availability-empty.active {
  display: block;
}

.selected-appointment-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--card-bg);
}

.selected-appointment-summary > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--text-light);
  background: var(--placeholder-bg);
  flex: 0 0 auto;
}

.selected-appointment-summary strong,
.selected-appointment-summary small {
  display: block;
}

.selected-appointment-summary strong {
  color: var(--text);
  font-size: 15px;
}

.selected-appointment-summary small {
  color: var(--text-light);
  margin-top: 2px;
}

.selected-appointment-summary.ready {
  border-color: rgba(40, 167, 69, 0.32);
}

.selected-appointment-summary.ready > span {
  color: #fff;
  background: var(--success);
}

.selected-appointment-summary.needs-attention {
  border-color: rgba(220, 53, 69, 0.45);
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.choice-grid,
.consultation-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.choice-card,
.type-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 128px;
  padding: 16px;
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  background: var(--card-bg);
  cursor: pointer;
  transition: 0.2s ease;
}

.choice-card input,
.type-card input {
  position: absolute;
  opacity: 0;
}

.choice-card span,
.type-card span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--service-icon-bg);
}

.choice-card strong,
.type-card strong {
  color: var(--text);
  font-size: 16px;
}

.choice-card small,
.type-card small {
  color: var(--text-light);
  line-height: 1.5;
}

.choice-card:has(input:checked),
.type-card:has(input:checked) {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  background: color-mix(in srgb, var(--service-icon-bg) 42%, var(--card-bg));
}

.choice-card:has(input:disabled) {
  opacity: 0.58;
  cursor: not-allowed;
}

.branch-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.branch-preview-list div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--bg);
}

.branch-preview-list strong {
  color: var(--text);
}

.branch-preview-list span {
  color: var(--text-light);
  font-size: 13px;
}

.booking-payment-panel {
  margin: 0 0 16px;
}

.booking-payment-panel .payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 0;
}

.booking-payment-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  background: var(--card-bg);
  cursor: pointer;
  transition: 0.2s ease;
}

.booking-payment-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.booking-payment-choice:hover,
.booking-payment-choice:has(input:checked) {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.booking-payment-choice:has(input:checked) {
  background: color-mix(in srgb, var(--service-icon-bg) 42%, var(--card-bg));
}

.booking-payment-choice:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.payment-logo,
.payment-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #fff;
  object-fit: contain;
  flex: 0 0 auto;
}

.payment-logo {
  padding: 6px;
  border: 1px solid var(--border-light);
}

.payment-icon {
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 20px;
}

.payment-info {
  display: grid;
  gap: 3px;
}

.payment-label {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.payment-number {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.payment-info small {
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.4;
}

.booking-upload {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 178px;
  margin: 12px 0 18px;
  padding: 24px;
  border: 2px dashed rgba(0, 79, 255, 0.32);
  border-radius: 22px;
  color: var(--text);
  background: var(--bg);
  text-align: center;
  cursor: pointer;
}

.booking-upload input {
  display: none;
}

.booking-upload span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  color: var(--primary);
  background: var(--service-icon-bg);
  font-size: 26px;
}

.booking-upload small {
  color: var(--text-light);
}

.booking-upload.uploaded {
  border-color: var(--success);
}

.booking-upload.optional {
  border-color: rgba(40, 167, 69, 0.34);
}

.booking-confirmation-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.booking-confirmation-modal.is-visible {
  display: flex;
}

.booking-confirmation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.booking-confirmation-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  color: var(--text);
  background: var(--card-bg);
  cursor: pointer;
}

.confirmation-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 40px 20px;
  text-align: center;
}

.confirmation-hero > span {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--success), #12b981);
  font-size: 30px;
  box-shadow: 0 14px 34px rgba(40, 167, 69, 0.25);
}

.confirmation-hero small {
  color: var(--success);
  font-weight: 900;
}

.confirmation-hero h2 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.25;
}

.confirmation-hero p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.7;
}

.confirmation-ticket {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--bg);
}

.confirmation-ticket div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: var(--card-bg);
}

.confirmation-ticket span {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 800;
}

.confirmation-ticket strong {
  color: var(--text);
  font-size: 15px;
}

.confirmation-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.modal-whatsapp,
.btn-like-secondary {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 14px;
  text-decoration: none;
}

.modal-whatsapp {
  color: #fff;
  background: #16a34a;
}

.btn-like-secondary {
  border: 1px solid var(--border-light);
  color: var(--text);
  background: var(--card-bg);
  font-weight: 900;
  cursor: pointer;
}

.booking-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.booking-summary-card strong {
  color: var(--text);
  font-size: 18px;
}

.booking-summary-card p {
  margin: 4px 0 0;
  color: var(--text-light);
}

.booking-submit {
  width: auto;
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .home-hero,
  .home-reviews-layout,
  .home-final-cta {
    grid-template-columns: 1fr;
  }

  .home-reviews-section {
    padding: 20px;
  }

  .home-reviews-head {
    display: grid;
  }

  .review-card-top {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .review-card-top .stars {
    grid-column: 1 / -1;
  }

  .home-hero {
    display: grid;
  }

  .home-hero-content {
    min-height: auto;
    padding: 24px;
  }

  .home-hero-content h1 {
    font-size: 30px;
  }

  .home-quick-actions {
    grid-template-columns: 1fr;
    margin-bottom: 34px;
  }

  .home-final-cta {
    display: grid;
  }

  .booking-hero,
  .booking-summary-card {
    grid-template-columns: 1fr;
  }

  .booking-hero {
    padding: 22px;
  }

  .booking-hero h1 {
    font-size: 28px;
  }

  .user-page-hero,
  .article-hero,
  .article-content {
    padding: 22px;
  }

  .user-page-hero h1,
  .article-hero h1 {
    font-size: 26px;
  }

  .section-heading,
  .article-footer-cta {
    display: grid;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-contact > span {
    grid-column: 1 / -1;
  }

  .polished-tips,
  .articles-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .booking-steps {
    grid-template-columns: 1fr;
  }

  .booking-date-grid {
    grid-template-columns: 1fr;
  }

  .availability-calendar {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 96px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .day-choice {
    min-height: 112px;
    scroll-snap-align: start;
  }

  .availability-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .confirmation-ticket {
    grid-template-columns: 1fr;
  }

  .confirmation-hero {
    padding-inline: 24px;
  }

  .confirmation-hero h2 {
    font-size: 24px;
  }

  .booking-summary-card {
    display: grid;
  }

  .booking-submit {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .container {
    padding-inline: 10px;
  }

  .home-hero,
  .booking-hero,
  .user-page-hero,
  .home-reviews-section,
  .booking-card,
  .booking-summary-card,
  .article-hero,
  .article-content,
  .home-final-cta {
    border-radius: 18px;
  }

  .home-hero-content,
  .home-doctor-panel,
  .booking-hero,
  .user-page-hero,
  .home-reviews-section,
  .booking-card,
  .booking-summary-card,
  .article-hero,
  .article-content,
  .home-final-cta {
    padding: 18px;
  }

  .home-hero-content h1,
  .booking-hero h1,
  .user-page-hero h1,
  .article-hero h1 {
    font-size: 24px;
    line-height: 1.35;
  }

  .home-doctor-visual {
    width: 104px;
    height: 104px;
    border-radius: 28px;
  }

  .home-doctor-visual i {
    font-size: 46px;
  }

  .home-action-card,
  .home-hour-row,
  .review-card-top,
  .booking-success,
  .booking-errors,
  .selected-appointment-summary {
    align-items: flex-start;
  }

  .home-action-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .home-action-card > i {
    display: none;
  }

  .home-hour-row,
  .booking-success,
  .booking-errors,
  .selected-appointment-summary {
    display: grid;
  }

  .choice-grid,
  .consultation-types,
  .booking-payment-panel .payment-grid,
  .booking-grid,
  .branches-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .availability-slots {
    grid-template-columns: 1fr;
  }

  .slot-choice {
    min-height: 46px;
  }

  .confirmation-dialog,
  .booking-confirmation-dialog {
    padding: 18px;
    border-radius: 18px;
  }
}

/* ====================== Icon Polish Layer ====================== */
.action-btn i,
.ghost-link i,
.cta-btn i,
.service-link i,
.booking-whatsapp i,
.footer-phone i,
.branch-contact i,
.article-meta i,
.home-trust-row i,
.success-details i,
.branch-preview-list i,
.slot-choice i {
  font-size: 1em;
}

.user-page-eyebrow i,
.booking-eyebrow i,
.home-action-card > i,
.service-link i,
.read-more i {
  color: currentColor;
}

.home-doctor-visual i {
  font-size: 58px;
}

.home-action-card > span,
.home-card-head > span,
.article-icon,
.user-empty-state > span,
.service-icon,
.doctor-avatar,
.booking-card-header > span,
.availability-panel-head > span,
.choice-card span,
.type-card span,
.date-input-icon,
.selected-appointment-summary > span,
.payment-icon,
.booking-upload span,
.confirmation-hero > span,
.success-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.home-action-card > span i,
.home-card-head > span i,
.article-icon i,
.user-empty-state > span i,
.service-icon i,
.booking-card-header > span i,
.availability-panel-head > span i,
.choice-card span i,
.type-card span i,
.date-input-icon i,
.selected-appointment-summary > span i,
.payment-icon i,
.success-icon i {
  font-size: 18px;
}

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: var(--primary);
}

.service-icon i {
  font-size: 25px;
}

.doctor-avatar {
  width: 56px;
  height: 56px;
}

.doctor-avatar i {
  font-size: 24px;
}

.booking-upload span i {
  font-size: 25px;
}

.confirmation-hero > span i {
  font-size: 30px;
}

.modal-close-btn i,
.btn-like-secondary i {
  font-size: 15px;
}

.day-choice i,
.payment-info i {
  color: currentColor;
}

.stars,
.testimonial .stars {
  color: var(--stars);
  letter-spacing: 1px;
}

.slot-choice.active i,
.day-choice.active i,
.choice-card:has(input:checked) span i,
.type-card:has(input:checked) span i {
  color: currentColor;
}

.choice-card:has(input:checked) span,
.type-card:has(input:checked) span {
  color: #fff;
  background: var(--primary);
}

.payment-icon {
  color: var(--primary);
}

.booking-payment-choice:has(input:checked) .payment-icon {
  color: #fff;
  background: var(--primary);
}

.booking-payment-choice:has(input:disabled) .payment-icon,
.booking-payment-choice:has(input:disabled) .payment-logo {
  filter: grayscale(1);
}

.alert i,
.booking-errors i {
  color: currentColor;
}

/* ====================== Home Reviews Layout Fix ====================== */
.home-reviews-section {
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 30px);
}

.home-reviews-head {
  align-items: center;
}

.home-reviews-layout {
  direction: ltr;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, 0.68fr);
  grid-template-areas:
    "reviews summary"
    "reviews form";
  gap: 18px;
  align-items: start;
}

.home-review-summary,
.home-review-list,
.home-review-form {
  direction: rtl;
}

.home-review-summary {
  grid-area: summary;
  align-self: stretch;
  min-height: 236px;
}

.home-review-list {
  grid-area: reviews;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.home-review-form {
  grid-area: form;
  width: 100%;
  align-self: start;
  margin: 0 !important;
  padding: 18px !important;
}

.home-review-summary,
.home-review-form,
.home-review-card {
  box-sizing: border-box;
  min-width: 0;
}

.home-review-card {
  min-height: 176px;
}

.home-review-card:first-child {
  grid-column: 1 / -1;
  min-height: 188px;
}

.home-review-list > .user-empty-state {
  grid-column: 1 / -1;
  min-height: 280px;
}

.review-card-top {
  grid-template-columns: 44px minmax(0, 1fr) minmax(76px, auto);
}

.review-card-top > div:nth-child(2) {
  min-width: 0;
}

.review-card-top strong,
.review-card-top span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-card-top .stars {
  justify-self: end;
}

.home-review-card p {
  display: -webkit-box;
  min-height: calc(1.8em * 3);
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.home-review-card:first-child p {
  -webkit-line-clamp: 5;
}

.home-review-form .review-group {
  margin-bottom: 12px;
}

.home-review-form .review-input,
.home-review-form textarea.review-input {
  margin: 0 !important;
}

.home-review-form .review-textarea {
  min-height: 104px;
}

.home-review-form .review-submit {
  min-height: 48px;
  margin-top: 2px;
}

@media (max-width: 980px) {
  .home-reviews-layout {
    direction: rtl;
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "reviews"
      "form";
  }

  .home-review-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-reviews-head {
    align-items: flex-start;
  }

  .home-review-list {
    grid-template-columns: 1fr;
  }

  .home-review-card:first-child {
    grid-column: auto;
  }

  .home-reviews-section {
    padding: 16px;
  }

  .home-review-summary,
  .home-review-form,
  .home-review-card {
    border-radius: 16px;
    padding: 16px !important;
  }

  .review-card-top {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .review-card-top .stars {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .home-review-card,
  .home-review-card:first-child,
  .home-review-list > .user-empty-state {
    min-height: 0;
  }
}

.booking-payment-choice[hidden] {
  display: none !important;
}

/* ====================== Booking Page Repair & UX Polish ====================== */
.booking-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 1180px);
}

.booking-form {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.booking-card,
.booking-summary-card,
.waitlist-card,
.availability-panel,
.booking-hero,
.booking-doctor-card {
  box-sizing: border-box;
  min-width: 0;
}

.booking-card-header,
.availability-panel-head,
.selected-appointment-summary,
.booking-success,
.booking-errors {
  min-width: 0;
}

.booking-card-header > div,
.availability-panel-head > div,
.selected-appointment-summary > div,
.booking-doctor-info {
  min-width: 0;
}

.booking-card-header h2,
.booking-card-header p,
.availability-panel-head label,
.availability-panel-head small,
.booking-doctor-info strong,
.booking-doctor-info span,
.booking-doctor-info a {
  overflow-wrap: anywhere;
}

.choice-grid,
.consultation-types,
.booking-grid,
.booking-payment-panel .payment-grid,
.availability-planner {
  min-width: 0;
}

.branch-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.branch-preview-list > div,
.branch-preview-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--card-bg);
  color: inherit;
  text-align: start;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.branch-preview-card:hover,
.branch-preview-card.active {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--service-icon-bg) 34%, var(--card-bg));
  box-shadow: var(--shadow-sm);
}

.branch-preview-card strong,
.branch-preview-list strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.branch-preview-card span,
.branch-preview-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.5;
}

.branch-preview-card i,
.branch-preview-list i {
  display: inline-flex;
  width: 18px;
  min-width: 18px;
  justify-content: center;
  color: var(--primary);
}

.dynamic-section.needs-attention {
  border-radius: 18px;
  outline: 2px solid color-mix(in srgb, var(--danger) 55%, transparent);
  outline-offset: 5px;
}

.booking-live-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.booking-live-summary span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 72%, var(--card-bg));
  color: var(--text-light);
}

.booking-live-summary i {
  display: inline-flex;
  width: 28px;
  height: 28px;
  min-width: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--service-icon-bg);
  color: var(--primary);
  font-size: 13px;
}

.booking-live-summary b {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-summary-card {
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 16px;
}

.waitlist-card {
  margin-top: 4px;
}

.booking-upload.uploaded {
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, var(--card-bg));
}

.booking-upload.optional {
  border-style: solid;
}

/* Booking page focused UX layer */
.booking-helper-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.booking-helper-strip div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 3px 11px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.booking-helper-strip i {
  grid-row: span 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--service-icon-bg);
  color: var(--primary);
  font-size: 17px;
}

.booking-helper-strip strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.booking-helper-strip span {
  min-width: 0;
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.55;
}

.booking-steps span.done {
  border-color: color-mix(in srgb, var(--success) 42%, var(--border-light));
  background: color-mix(in srgb, var(--success) 8%, var(--card-bg));
  color: var(--success);
}

.booking-steps span.done b {
  background: var(--success);
  color: #fff;
  font-size: 0;
}

.booking-steps span.done b::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-size: 12px;
  font-weight: 900;
}

[data-booking-step] {
  scroll-margin-top: 96px;
}

[data-booking-step]:focus-within {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border-light));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 10%, transparent);
}

.payment-assist,
.availability-waitlist-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border-light));
  border-radius: 16px;
  background: color-mix(in srgb, var(--service-icon-bg) 30%, var(--card-bg));
  color: var(--text-light);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.payment-assist i,
.availability-waitlist-link i {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--primary);
}

.availability-waitlist-link {
  display: none;
  width: fit-content;
  margin: 12px 0 0;
  color: var(--primary);
  text-decoration: none;
}

.availability-waitlist-link.active {
  display: inline-flex;
}

.booking-submit:disabled,
.booking-submit.is-loading {
  cursor: wait;
  opacity: 0.78;
}

.booking-submit.is-loading i {
  animation: clinic-spin 0.8s linear infinite;
}

@keyframes clinic-spin {
  to {
    transform: rotate(360deg);
  }
}

.track-lookup-card {
  position: relative;
  overflow: hidden;
}

.track-lookup-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--success));
}

.track-lookup-form {
  align-items: end;
}

.track-lookup-submit {
  min-height: 54px;
}

.track-card {
  display: grid;
  gap: 18px;
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border-light));
}

.track-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.track-head h2 {
  margin: 8px 0 4px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}

.track-head p {
  margin: 0;
  color: var(--text-light);
  line-height: 1.8;
}

.track-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--service-icon-bg);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.track-status.confirmed,
.track-status.completed {
  background: rgba(40, 167, 69, 0.12);
  color: var(--success);
}

.track-status.reschedule {
  background: rgba(245, 158, 11, 0.12);
  color: #b7791f;
}

.track-status.cancelled,
.track-status.no_show {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

.track-progress {
  overflow: hidden;
  height: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border-light) 72%, var(--bg));
}

.track-progress span {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
  box-shadow: 0 0 16px color-mix(in srgb, var(--primary) 28%, transparent);
}

.track-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.track-step {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 65%, var(--card-bg));
  color: var(--text-light);
  text-align: center;
}

.track-step span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--card-bg);
  color: var(--text-light);
}

.track-step strong {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.track-step.done {
  border-color: color-mix(in srgb, var(--success) 42%, var(--border-light));
  background: rgba(40, 167, 69, 0.08);
  color: var(--success);
}

.track-step.done span {
  background: var(--success);
  color: #fff;
}

.track-summary {
  margin-top: 0;
}

.track-summary span {
  min-height: 58px;
}

.track-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.track-policy-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 58%, var(--card-bg));
}

.track-policy-item > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
}

.track-policy-item.available {
  border-color: color-mix(in srgb, var(--success) 32%, var(--border-light));
  background: rgba(40, 167, 69, 0.08);
}

.track-policy-item.available > span {
  background: var(--success);
  color: #fff;
}

.track-policy-item.locked > span {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.track-policy-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.track-policy-item p {
  margin: 0;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.7;
}

.track-action-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 14px;
  align-items: stretch;
}

.track-action-panel > form,
.track-action-panel > span,
.track-action-panel > div {
  min-width: 0;
}

.track-action-panel .booking-submit,
.track-action-panel .btn-like-secondary {
  width: 100%;
  min-height: 52px;
}

.track-disabled-action,
.track-readonly-note,
.track-notice {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 68%, var(--card-bg));
  color: var(--text-light);
  line-height: 1.7;
}

.track-disabled-action {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  font-weight: 800;
}

.track-disabled-action i,
.track-notice > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: var(--service-icon-bg);
  color: var(--primary);
}

.track-disabled-action.success i {
  background: var(--success);
  color: #fff;
}

.track-readonly-note strong,
.track-notice strong {
  color: var(--text);
}

.track-readonly-note span,
.track-notice p {
  margin: 0;
  color: var(--text-light);
}

.track-notice {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
}

.track-notice.pending {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.08);
}

.track-notice.pending > span {
  background: rgba(245, 158, 11, 0.16);
  color: #b7791f;
}

.track-reschedule-form {
  display: grid;
  gap: 10px;
}

.track-reschedule-form textarea {
  width: 100%;
  min-height: 96px;
  padding: 13px 14px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
}

.track-cancel-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border-light));
  border-radius: 16px;
  background: color-mix(in srgb, var(--danger-bg) 55%, var(--card-bg));
}

.track-cancel-zone > div {
  display: grid;
  gap: 5px;
}

.track-cancel-zone strong {
  color: var(--danger-text);
}

.track-cancel-zone span {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.7;
}

.track-cancel-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.track-cancel-form textarea {
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  padding: 11px 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.btn-like-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  border-radius: 12px;
  background: var(--danger);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.btn-like-danger:hover {
  filter: brightness(0.94);
}

@media (max-width: 760px) {
  .track-policy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .track-cancel-zone,
  .track-cancel-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn-like-danger {
    width: 100%;
  }
}

.booking-success.compact {
  padding: 14px;
  border-radius: 16px;
}

.payment-item:has(input:disabled) {
  opacity: 0.54;
  cursor: not-allowed;
}

.payment-item:has(input:disabled) * {
  pointer-events: none;
}

@media (max-width: 900px) {
  .booking-helper-strip {
    grid-template-columns: 1fr;
  }

  .booking-summary-card {
    grid-template-columns: 1fr;
  }

  .track-head,
  .track-action-panel {
    grid-template-columns: 1fr;
  }

  .track-status {
    justify-self: start;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .booking-live-summary,
  .branch-preview-list {
    grid-template-columns: 1fr;
  }

  .branch-preview-card {
    padding: 12px;
  }

  .track-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .booking-shell {
    gap: 14px;
  }

  .booking-helper-strip div {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px;
  }

  .booking-helper-strip i {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .booking-card,
  .booking-summary-card,
  .waitlist-card {
    padding: 16px;
  }

  .user-footer {
    margin-top: 42px;
    padding: 18px;
    border-radius: 18px;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-links-grid,
  .footer-contact {
    grid-template-columns: 1fr;
  }

  .footer-phone {
    width: 100%;
    white-space: normal;
  }

  .footer-bottom {
    display: grid;
    justify-items: start;
  }

  .booking-live-summary b {
    white-space: normal;
  }

  .track-step {
    padding: 12px 8px;
  }

  .track-lookup-submit {
    width: 100%;
  }
}

/* ====================== Mobile Production Readiness Layer ====================== */
main,
.hero,
.hero-content,
.booking-shell,
.booking-card,
.booking-summary-card,
.waitlist-card,
.track-card,
.service-card,
.article-card,
.review-card {
  min-width: 0;
}

:where(.home-grid, .services-grid, .articles-grid, .reviews-grid, .booking-grid, .booking-layout, .booking-shell, .booking-form-grid, .booking-live-summary, .payment-grid, .track-grid, .footer-links-grid) {
  max-width: 100%;
}

:where(.booking-card, .booking-summary-card, .waitlist-card, .track-card, .service-card, .article-card, .review-card, .branch-preview-card) {
  overflow: hidden;
}

:where(.booking-card, .booking-summary-card, .waitlist-card, .track-card, .service-card, .article-card, .review-card, .branch-preview-card) :where(h1, h2, h3, p, a, span, strong, small, label, button) {
  overflow-wrap: anywhere;
}

:where(.choice-card, .type-card, .day-choice, .slot-choice, .payment-item, .booking-payment-choice, .track-step) {
  min-height: 48px;
}

:where(.booking-confirmation-dialog, .booking-modal-dialog, .confirmation-dialog) {
  width: min(100vw - 18px, 760px);
  max-height: calc(100dvh - 18px);
  overflow: auto;
}

@media (max-width: 980px) {
  .hero,
  .home-hero,
  .hero-grid,
  .home-grid,
  .booking-grid,
  .booking-layout,
  .track-grid,
  .contact-grid,
  .about-grid,
  .payment-grid,
  .features-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .booking-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .booking-summary-card {
    position: static;
    top: auto;
  }
}

@media (max-width: 760px) {
  .hero,
  .home-hero {
    min-height: auto;
    padding-block: 28px;
  }

  .hero-content,
  .home-hero-content,
  .section-head,
  .booking-head,
  .track-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .hero h1,
  .home-hero h1,
  .booking-head h1,
  .track-head h1 {
    font-size: clamp(28px, 8vw, 42px);
    line-height: 1.18;
  }

  .section-head :where(.btn, button, a),
  .booking-head :where(.btn, button, a),
  .track-head :where(.btn, button, a) {
    width: 100%;
    justify-content: center;
  }

  .booking-steps,
  .steps-list,
  .track-steps {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
  }

  .booking-steps > *,
  .steps-list > *,
  .track-steps > * {
    flex: 0 0 min(78vw, 220px);
    scroll-snap-align: start;
  }

  .form-grid,
  .booking-form-grid,
  .patient-form-grid,
  .payment-grid,
  .availability-grid,
  .booking-live-summary,
  .branch-preview-list,
  .footer-links-grid,
  .footer-contact {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .availability-calendar,
  .days-grid,
  .slots-grid,
  .time-slots,
  .choice-grid,
  .type-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  .booking-actions,
  .form-actions,
  .track-actions,
  .modal-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .booking-actions :where(.btn, button, a),
  .form-actions :where(.btn, button, a),
  .track-actions :where(.btn, button, a),
  .modal-actions :where(.btn, button, a) {
    width: 100%;
    justify-content: center;
  }

  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .service-card,
  .article-card,
  .review-card {
    border-radius: 16px;
    padding: 16px;
  }

  .user-footer {
    border-radius: 18px;
  }
}

@media (max-width: 520px) {
  main {
    padding-inline: 0;
  }

  .hero,
  .home-hero {
    padding-block: 22px;
  }

  .hero h1,
  .home-hero h1,
  .booking-head h1,
  .track-head h1 {
    font-size: clamp(26px, 9vw, 36px);
  }

  .hero-actions,
  .home-hero-actions,
  .cta-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .hero-actions :where(.btn, button, a),
  .home-hero-actions :where(.btn, button, a),
  .cta-actions :where(.btn, button, a) {
    width: 100%;
    justify-content: center;
  }

  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .service-card,
  .article-card,
  .review-card,
  .branch-preview-card {
    padding: 14px;
  }

  .booking-confirmation-dialog,
  .booking-modal-dialog,
  .confirmation-dialog {
    width: calc(100vw - 14px);
    border-radius: 18px;
  }

  .track-steps > * {
    flex-basis: min(82vw, 240px);
  }

  .footer-bottom {
    gap: 8px;
  }
}

@media (max-width: 390px) {
  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .service-card,
  .article-card,
  .review-card,
  .branch-preview-card {
    padding: 12px;
  }

  .booking-steps > *,
  .steps-list > *,
  .track-steps > * {
    flex-basis: 86vw;
  }
}

/* Final mobile hardening for public patient pages */
main,
.user-page,
.booking-page,
.track-page,
.booking-shell,
.booking-card,
.booking-summary-card,
.waitlist-card,
.track-card {
  min-width: 0;
  max-width: 100%;
}

:where(.booking-page, .track-page, .user-page) :where(p, span, strong, small, h1, h2, h3, label, button, a, input, textarea, select) {
  overflow-wrap: anywhere;
}

:where(.booking-page, .track-page, .user-page) :where(button, .btn, .slot-choice, .day-choice, .type-card, .payment-item) {
  min-height: 44px;
}

@media (max-width: 640px) {
  :where(.booking-page, .track-page, .user-page) :where(input, textarea, select) {
    font-size: 16px;
  }

  :where(.booking-page, .track-page, .user-page) :where(.booking-actions, .form-actions, .track-actions, .hero-actions, .cta-actions) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  :where(.booking-page, .track-page, .user-page) :where(.booking-actions .btn, .form-actions .btn, .track-actions .btn, .hero-actions .btn, .cta-actions .btn, button[type="submit"]) {
    width: 100%;
    justify-content: center;
  }
}

/* Final public mobile content override */
@media screen and (max-width: 760px) {
  main,
  .user-page,
  .booking-page,
  .track-page,
  .content-section,
  .article-content,
  .booking-shell,
  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .review-card,
  .article-card,
  .tip-quote {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  :where(.booking-page, .track-page, .user-page, .content-section, .article-content) :where(input, textarea, select) {
    min-height: 48px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
  }

  :where(.booking-page, .track-page, .user-page, .content-section, .article-content) :where(button, .btn, .slot-choice, .day-choice, .type-card, .payment-item) {
    min-height: 46px !important;
    touch-action: manipulation !important;
  }

  :where(.booking-actions, .form-actions, .track-actions, .hero-actions, .cta-actions, .content-header, .booking-card-header) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  :where(.booking-actions .btn, .form-actions .btn, .track-actions .btn, .hero-actions .btn, .cta-actions .btn, button[type="submit"]) {
    width: 100% !important;
    justify-content: center !important;
  }

  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .article-card,
  .review-card {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .slots-grid,
  .days-grid,
  .type-grid,
  .payment-grid,
  .articles-grid,
  .reviews-grid,
  .tips-grid,
  .services-grid,
  .branches-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .booking-card-header h2,
  .content-header h1,
  .article-hero h1,
  .home-hero-content h1 {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.25 !important;
  }

  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media screen and (max-width: 430px) {
  .booking-card,
  .booking-summary-card,
  .waitlist-card,
  .track-card,
  .article-card,
  .review-card {
    padding: 12px !important;
  }

  .home-hero-content,
  .article-hero,
  .content-section {
    padding-inline: 0 !important;
  }
}

