/* =========================
   Modern Hospital — Responsive Design
   ========================= */

/* =========================
   Contact Section
   ========================= */
.contact-section {
  padding: 80px 0;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/pattern.png') repeat;
  opacity: 0.03;
  pointer-events: none;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.2rem;
  color: #0e5b45;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  font-weight: 800;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #f2c300;
}

.section-header p {
  color: #666;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.contact-card {
  background: white;
  border-radius: 16px;
  padding: 30px 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: center;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0e5b45, #f2c300);
  transition: height 0.3s ease;
  z-index: -1;
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.contact-card:hover::before {
  height: 100%;
  opacity: 0.05;
}

.contact-icon {
  font-size: 2.8rem;
  color: #0e5b45;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
  transform: scale(1.1);
  color: #f2c300;
}

.contact-card h3 {
  color: #222;
  margin-bottom: 18px;
  font-size: 1.4rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.contact-card h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 0;
  width: 50px;
  height: 2px;
  background: #f2c300;
  transition: width 0.3s ease;
  left: 0;
  margin: 0 auto;
}

.contact-card:hover h3::after {
  width: 100%;
}

.contact-info {
  margin-bottom: 20px;
  line-height: 1.8;
  color: #555;
  font-size: 1.05rem;
}

.contact-link {
  color: #0e5b45;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 8px 0;
  position: relative;
  overflow: hidden;
  gap: 8px;
}

.contact-link i {
  transition: transform 0.3s ease;
}

.contact-link:hover {
  color: #f2c300;
  padding-right: 8px;
}

.contact-link:hover i {
  transform: translateX(5px);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .contact-cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
  }
  
  .contact-card {
    padding: 25px 20px;
  }
}

@media (max-width: 768px) {
  .contact-section {
    padding: 60px 0;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
  
  .contact-cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 40px auto 0;
  }
  
  .contact-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding: 50px 0;
  }
  
  .section-header h2 {
    font-size: 1.6rem;
  }
  
  .contact-card {
    padding: 22px 18px;
  }
  
  .contact-icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }
  
  .contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }
  
  .contact-info {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* ---------- Root & Base ---------- */
:root {
  /* Colors */
  --green: #0e5b45;
  --red: #d71920;
  --yellow: #f2c300;
  --text: #111;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --muted: #6c757d;
  
  /* Typography */
  --font-base: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.6;
  
  /* Spacing */
  --spacer: 1rem;
  --section-padding: 3rem 0;
  --container-padding: 1.5rem;
  --border-radius: 0.5rem;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  
  /* Breakpoints */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  
  /* Doctor Cards */
  --doc-avatar: 90px;
  --doc-avatar-offset: calc(var(--doc-avatar) / 2);
  --doc-row-gap: calc(var(--doc-avatar-offset) + 1.375rem);
  --doc-ring: 8px;
  --doc-white: 4px;
  
  /* Contact Cards */
  --contact-icon-size: 3.5rem;
  --contact-card-padding: 1.125rem 1rem;
}

*{ box-sizing:border-box }
/* Base Typography */
body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  margin: 0;
  padding: 0;
  text-align: right;
  direction: rtl;
}

/* Links */
a {
  color: var(--green);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  color: var(--yellow);
  text-decoration: none;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

/* Container */
.container {
  width: 100%;
  padding-right: var(--container-padding);
  padding-left: var(--container-padding);
  margin-right: auto;
  margin-left: auto;
}

/* Responsive Containers */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Sections */
section {
  padding: var(--section-padding);
  position: relative;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: var(--green);
  border-color: var(--green);
}

.btn-primary:hover {
  background-color: #0c4f3c;
  border-color: #0b4734;
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.card-body {
  flex: 1 1 auto;
  padding: 1.5rem;
}

/* Responsive Images */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Spacing Utilities */
.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pb-3 { padding-bottom: 1rem !important; }

/* Text Utilities */
.text-center { text-align: center !important; }
.text-right { text-align: left !important; }
.text-left { text-align: right !important; }

/* RTL Fixes */
[dir="rtl"] .text-right { text-align: right !important; }
[dir="rtl"] .text-left { text-align: left !important; }

/* Topbar & Footer */
.topbar{ background:var(--green) }
.footer{ background:var(--green); color:#fff }

/* ---------- Hero Section */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14,91,69,0.95) 0%, rgba(7,46,36,0.95) 100%);
  color: #fff;
  padding: 4rem 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(1000px 500px at 120% -20%, rgba(242,195,0,.12), transparent 60%),
    radial-gradient(800px 400px at -15% 110%, rgba(215,25,32,.12), transparent 60%);
  pointer-events: none;
}

.hero-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Hero Content */
.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Responsive Hero */
@media (max-width: 991.98px) {
  .hero {
    min-height: 50vh;
    padding: 3rem 0;
  }
  
  .hero-card {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 40vh;
    padding: 2rem 0;
  }
  
  .hero-card {
    padding: 1.25rem;
  }
}

/* ---------- Hero (MCH) مع تدرّج وشفافية ---------- */
.hero--mch{
  min-height:72vh; color:#fff; position:relative; overflow:hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 40%, rgba(14,91,69,0.95) 100%),
    linear-gradient(135deg, #0e5b45 0%, #093c2e 60%, #072e24 100%);
  background-blend-mode: screen;
}
.hero--mch::before{
  content:""; position:absolute; inset:0; pointer-events:none; opacity:.3;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size:28px 28px;
}

/* Logo + خلفية مبنى */
.logo-bg-wrap{ position:relative; display:inline-block }
.logo-bg{
  width:320px; height:320px; object-fit:cover; border-radius:50%;
  opacity:.6; filter: blur(1px) brightness(.9);
}
.logo-bg-wrap .hero-logo{
  position:absolute; inset:0; margin:auto; max-width:160px; z-index:2;
  filter:drop-shadow(0 10px 24px rgba(0,0,0,.25)); opacity:.98;
}

/* Typography داخل الـHero */
.hero-kicker {
  display: block;
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-kicker span {
  color: #fff;
  opacity: 0.95;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0.5rem 0;
  color: #fff;
}

.hero-title-accent {
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0.25rem 0 1rem;
}

.hero-title-accent .accent {
  color: var(--yellow);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.125rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 1rem 0 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Responsive Hero Typography */
@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-title-accent {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin: 0.75rem 0 1.25rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 2px solid transparent;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* Primary Button (Yellow) */
.btn-cta {
  background-color: var(--yellow);
  color: #111;
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(242, 195, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cta:hover, 
.btn-cta:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(242, 195, 0, 0.4);
  filter: brightness(1.05);
  color: #111;
}

.btn-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(242, 195, 0, 0.3);
}

/* Secondary Button (Outline) */
.btn-call {
  background-color: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.6rem 1.5rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-call i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.btn-call:hover,
.btn-call:focus {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-call:hover i {
  transform: translateX(3px);
}

.btn-call:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Button Sizes */
.btn-lg {
  padding: 0.8rem 2.2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.4rem 1.2rem;
  font-size: 0.875rem;
}

/* Button Group */
.btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

/* Responsive Buttons */
@media (max-width: 767.98px) {
  .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .btn-lg {
    padding: 0.7rem 1.8rem;
    font-size: 1.05rem;
  }
  
  .btn-group {
    gap: 0.75rem;
    margin: 1rem 0;
  }
  
  .btn-call i {
    margin-left: 6px;
  }
}

/* كشف/إخفاء الحجز */
.booking-collapsible{ transition:all .25s ease }
.is-hidden{ display:none !important }

/* ---------- Reveal عام (لأجزاء أخرى إن لزم) ---------- */
.reveal{ opacity:0; transform:translateY(14px); will-change:opacity, transform }
.revealed{ opacity:1; transform:none; transition:opacity .6s ease, transform .6s ease }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none }
  .revealed{ transition:none }
}

/* ---------- About + Hex ---------- */
.about-mch{ background:#fff; position:relative }
.about-title{
  color:var(--green); font-weight:800;
  line-height:1.25; position:relative; padding-bottom:8px;
}
.about-title::after{
  content:""; position:absolute; right:0; bottom:0; width:120px; height:4px;
  background:linear-gradient(90deg, var(--yellow), rgba(242,195,0,.25));
  border-radius:4px;
}
.about-list{ margin:0 0 8px 0; padding:0; list-style:none }
.about-list li{ position:relative; padding-right:22px; margin:8px 0 }
.about-list li::before{
  content:"✔"; position:absolute; right:0; top:0; color:var(--green); font-weight:800; opacity:.9;
}

.btn-outline-green{
  border:2px solid var(--green); color:var(--green); font-weight:700;
  border-radius:30px; padding:10px 18px;
}
.btn-outline-green:hover{ background:var(--green); color:#fff }

/* Hex visuals */
.hex-wrap{ position:relative; width:min(520px,100%); margin:0 auto }
.hex{
  position:relative; width:100%; aspect-ratio:1/1;
  clip-path:polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
  border:12px solid var(--yellow); background:#eee; border-radius:22px; overflow:hidden;
  box-shadow:0 16px 40px rgba(0,0,0,.12);
}
.hex img{ width:100%; height:100%; object-fit:cover; filter:saturate(1.02) }
.hex-sm{
  position:absolute; width:42%; right:-6%; top:-8%; border-width:8px; z-index:2;
}
.hex-outline{
  position:absolute; width:26%; aspect-ratio:1/1; border:3px solid rgba(14,91,69,.25);
  clip-path:polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0 50%);
  border-radius:18px;
}
.hex-outline.h1{ left:-6%; top:4% }
.hex-outline.h2{ left:14%; bottom:-6% }
.hex-outline.h3{ right:-10%; bottom:18%; border-color:rgba(242,195,0,.45) }

@media (max-width:991.98px){
  .hex-wrap{ width:min(420px,100%); margin-bottom:12px }
  .hex-sm{ right:-2%; top:-6%; width:46% }
}
@media (max-width:575.98px){
  .hex-wrap{ width:min(360px,100%) }
  .hex{ border-width:10px }
  .hex-sm{ border-width:7px }
}

/* تبديل اتجاه النص/الصورة داخل الـ About */
.about-mch .about-row{ display:flex; flex-wrap:wrap; transition:transform .25s ease }
.about-mch .about-visual{ order:1 }
.about-mch .about-text{ order:2 }
.about-mch.is-reversed .about-visual{ order:2 }
.about-mch.is-reversed .about-text{ order:1 }

/* حركات دخول خفيفة */
.about-mch .about-visual, .about-mch .about-text{
  will-change:transform, opacity; transition:transform .45s ease, opacity .45s ease;
}
.about-mch .about-visual{ transform:translateX(-18px); opacity:0 }
.about-mch .about-text{ transform:translateX(18px); opacity:0 }
.about-mch.in-view .about-visual, .about-mch.in-view .about-text{ transform:none; opacity:1 }
.about-mch.is-reversed .about-visual{ transform:translateX(18px) }
.about-mch.is-reversed .about-text{ transform:translateX(-18px) }
.about-mch.is-reversed.in-view .about-visual,
.about-mch.is-reversed.in-view .about-text{ transform:none }

.about-mch p{ font-size:16px; line-height:1.9 }

/* ---------- أقسام مختصرة (بطاقات) ---------- */
.mch-dept-card{
  display:block; text-decoration:none; color:var(--text);
  padding:14px; background:#fff; border-radius:20px;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
  transition:transform .25s ease, box-shadow .25s ease; text-align:center; min-width:220px;
}
.mch-dept-card:hover{ transform:translateY(-6px); box-shadow:0 12px 28px rgba(0,0,0,.1) }
.mch-dept-card .img-wrap{ position:relative; border-radius:18px; overflow:hidden; background:#f3f6f6 }
.mch-dept-card .img-wrap img{
  display:block; width:100%; height:160px;  /* ↓ صغّرنا ارتفاع صورة القسم */
  object-fit:cover; filter:saturate(1.02)
}
.mch-dept-card .bubble-tip{
  position:absolute; left:50%; transform:translateX(-50%); bottom:-12px; width:40px; height:24px;
  background:#fff; clip-path:polygon(50% 100%,0 0,100% 0); box-shadow:0 6px 10px rgba(0,0,0,.06);
  border-bottom-left-radius:10px; border-bottom-right-radius:10px;
}
.mch-dept-card .title{ margin:18px 0 6px; font-weight:800; color:var(--green) }
.mch-dept-card .subtitle{ color:#5f6b6b }
.mch-dept-card.is-featured .img-wrap{
  background:linear-gradient(180deg, rgba(14,91,69,.12), rgba(14,91,69,0))
}
.mch-dept-card.is-featured .bubble-tip{
  background:var(--yellow); box-shadow:0 8px 16px rgba(242,195,0,.25)
}

/* ---------- قسم تفصيلي (العظام كمثال) ---------- */
.dept-detail{ background:linear-gradient(180deg, #f8fbfb 0%, #f2f6f5 100%); position:relative }
.dept-box{
  background:linear-gradient(135deg, #0e5b45 0%, #093c2e 60%, #072e24 100%);
  color:#fff; border-radius:20px; padding:28px 24px; position:relative; overflow:hidden;
  box-shadow:0 16px 38px rgba(0,0,0,.12);
}
.dept-box::after{
  content:""; position:absolute; inset:-30% -10% auto -10%; height:140px;
  background:linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,0)); transform:rotate(8deg);
  pointer-events:none;
}
.dept-title{ margin:0 0 6px; font-weight:800; font-size:clamp(24px,3.8vw,28px) }
.dept-subtitle{ margin:0 0 14px; font-weight:700; color:var(--yellow) }
.dept-media img{
  display:block; width:100%; height:auto; border-radius:18px; object-fit:cover;
  box-shadow:0 12px 28px rgba(0,0,0,.12);
}

/* حركة الظهور أثناء التمرير للأقسام (نظام موحّد) */
.on-scroll{ opacity:0; transform:translateY(16px); will-change:opacity, transform; transition:opacity .7s ease, transform .7s ease }
.on-scroll.from-left{ transform:translateX(-28px) }
.on-scroll.from-right{ transform:translateX(28px) }
.observe.in-view .on-scroll{ opacity:1; transform:none }
@media (max-width:991.98px){ .dept-box{ padding:22px 18px } }

/* ---------- بطاقات الأطباء ---------- */
#homeDocs{ --bs-gutter-y: var(--doc-row-gap); }  /* شبكة مرنة */
#homeDocs .col{ padding-top: 0; }                /* إزالة التعارض القديم */

.doc-card{
  position:relative;
  background:linear-gradient(135deg,#0f6a52 0%,#0e5b45 40%,#0a3a2e 100%);
  color:#fff; border-radius:22px; padding:18px 16px 16px;
  padding-top: calc(var(--doc-avatar-offset) + 60px);
  box-shadow:0 14px 28px rgba(0,0,0,.14);
  text-align:center; isolation:isolate; overflow:visible;
  transition:transform .25s ease, box-shadow .25s ease;
  margin-bottom: var(--doc-row-gap);
}
.doc-card:hover{ transform:translateY(-6px); box-shadow:0 18px 36px rgba(0,0,0,.18) }

/* لمعة و ظل */
.doc-card::after{
  content:""; position:absolute; inset:-40% -20% auto -20%; height:160px; transform:rotate(10deg);
  background:linear-gradient(90deg,rgba(255,255,255,.22),rgba(255,255,255,0));
  pointer-events:none; z-index:0;
}
.doc-card::before{
  content:""; position:absolute; left:10%; right:10%; bottom:-8px; height:14px;
  background:radial-gradient(50% 70% at 50% 50%, rgba(0,0,0,.25), transparent 70%);
  filter:blur(4px); z-index:0;
}

/* الصورة الدائرية البارزة – «على قد الإطار» */
.doc-avatar{
  position:absolute;
  top: calc(-1 * var(--doc-avatar-offset));
  left:50%; transform:translateX(-50%);
  width:var(--doc-avatar); height:var(--doc-avatar);
  border-radius:50%;
  /* الإطار الأصفر الحقيقي عبر الـ padding */
  padding: var(--doc-ring);
  background: var(--yellow);
  overflow:hidden; z-index:2;

  /* ظل فقط (بدون حلقات box-shadow حول الصورة) */
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
}

/* الصورة داخل الدائرة (مع حلقة بيضاء داخلية) */
.doc-avatar img{
  width:100%; height:100%;
  object-fit:cover;
  object-position: top center; /* التركيز على الوجه */
  display:block; border-radius:50%;
  border: var(--doc-white) solid #fff; /* الحلقة البيضاء */
  box-sizing: border-box;
}

/* تأثير تفاعل بسيط على الحافة */
.doc-avatar:hover{
  box-shadow: 0 16px 30px rgba(0,0,0,.28);
}

/* نصوص وأزرار */
.doc-name{ font-weight:800; font-size:1.15rem; margin:6px 0 2px }
.doc-title{ color:#ffe89b; font-weight:700; margin-bottom:6px }
.doc-dept{ color:rgba(255,255,255,.9); font-size:.95rem }

.doc-social{ display:flex; justify-content:center; gap:10px; margin:10px 0 6px }
.doc-social a{
  width:34px; height:34px; border-radius:50%; display:grid; place-items:center;
  background:rgba(255,255,255,.12); color:#fff; text-decoration:none;
  transition:background .2s ease, transform .2s ease;
}
.doc-social a:hover{ background:#f2c300; color:#111; transform:translateY(-2px) }

.doc-cta{
  display:inline-block; margin-top:6px; font-weight:800;
  background:#f2c300; color:#111; border:0; padding:10px 18px;
  border-radius:32px; box-shadow:0 8px 16px rgba(242,195,0,.35);
}
.doc-cta:hover{ filter:brightness(.95); transform:translateY(-1px) }

.doc-card .tail{
  position:absolute; left:50%; transform:translateX(-50%);
  bottom:-10px; width:40px; height:24px; background:#0a3a2e;
  clip-path:polygon(50% 100%, 0 0, 100% 0);
  border-bottom-left-radius:10px; border-bottom-right-radius:10px;
}

/* أنيميشن بطاقات الأطباء (لن تُستخدم مع on-scroll على نفس العنصر) */
.doc-card{ opacity:0; transform:translateY(30px); will-change:opacity, transform }
.doc-card.in{ opacity:1; transform:none }
.doc-card.dir-from-bottom{ transform:translateY(40px) }
.doc-card.dir-from-top{ transform:translateY(-40px) }
.doc-card.dir-from-left{ transform:translateX(-40px) }
.doc-card.dir-from-right{ transform:translateX(40px) }

/* موبايل: تصغير الصورة أكثر */
@media (max-width:575.98px){
  :root{ --doc-avatar: 80px; } /* أصغر على الموبايل */
}

/* ---------- ترويسة الأقسام العامة ---------- */
.section-head{
  text-align:center;
  margin-bottom: var(--section-head-gap);
  position:relative; z-index:1;
}
.section-head h2{
  font-size:clamp(28px,4vw,38px); font-weight:800; position:relative;
  display:inline-block; padding-bottom:12px; letter-spacing:.5px;
  background:linear-gradient(90deg, var(--green), var(--yellow));
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  animation:fadeDown 1s ease forwards; opacity:0;
}
.section-head h2::after{
  content:""; position:absolute; left:50%; bottom:0; transform:translateX(-50%);
  width:80px; height:4px; border-radius:4px;
  background:linear-gradient(90deg, var(--yellow), var(--red));
  box-shadow:0 3px 8px rgba(0,0,0,.15);
}
.section-head p{
  margin-top:12px; font-size:1.05rem; color:rgba(0,0,0,.65); font-weight:500;
  animation:fadeUp 1s ease .2s forwards; opacity:0;
}
@keyframes fadeDown{ from{opacity:0;transform:translateY(-20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)}  to{opacity:1;transform:translateY(0)} }

/* ---------- شرائط/إحصائيات سريعة ---------- */
.stats-strip{ background:linear-gradient(90deg, var(--green), #0b4a38); color:#fff }
.stat{ display:flex; gap:10px; align-items:center; justify-content:center }
.stat i{ font-size:20px }
.stat span{ font-weight:800; font-size:18px }

/* ---------- بطاقات أقسام قديمة بسيطة ---------- */
.dept-card{
  display:block; padding:16px; border:1px solid rgba(0,0,0,.08);
  border-radius:14px; background:#fff; text-decoration:none; color:inherit;
  transition:transform .25s ease, box-shadow .25s ease;
}
.dept-card:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.06) }
.icon-wrap{
  width:56px; height:56px; border-radius:14px; display:flex; align-items:center; justify-content:center;
}
.icon-wrap i{ font-size:22px }
.bg-green{ background:rgba(14,91,69,.12) }
.bg-red{ background:rgba(215,25,32,.12) }
.bg-yellow{ background:rgba(242,195,0,.18) }

/* ===== Contact Cards – Look & Feel ===== */
.contact-cards .contact-card {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 18px 16px; border-radius: 18px; text-decoration: none;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(14,91,69,.06), transparent 40%),
    radial-gradient(120% 140% at 0% 100%, rgba(242,195,0,.07), transparent 40%),
    #ffffff;
  border: 1px solid rgba(14,91,69,.10);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  color: inherit; overflow: hidden; transform: translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  will-change: transform, box-shadow, opacity;
  min-height: 100px; opacity: 0; /* للحركة */
}

/* الأيقونة */
.contact-cards .contact-icon {
  flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green), #0a3a2e);
  color: #fff; font-size: 22px;
  box-shadow: 0 10px 20px rgba(14,91,69,.30);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

/* النص */
.contact-cards .contact-text {
  flex: 1 1 auto; font-weight: 700; color: #2b2b2b;
  line-height: 1.6; text-align: center; word-break: break-word;
}
.contact-cards .contact-text a {
  color: inherit; text-decoration: none; transition: color .2s ease;
}
.contact-cards .contact-text a:hover { color: var(--green); }

/* Hover */
.contact-cards .contact-card:hover,
.contact-cards .contact-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0,0,0,.10);
  border-color: rgba(14,91,69,.22);
  background: #f9fdfc;
}
.contact-cards .contact-card:hover .contact-icon,
.contact-cards .contact-card:focus-visible .contact-icon {
  transform: scale(1.06) rotate(-3deg);
  background: linear-gradient(135deg, var(--yellow), var(--green));
  color: #111;
  box-shadow: 0 14px 26px rgba(14,91,69,.35);
}

/* Touch */
@media (hover:none){
  .contact-cards .contact-card:active { transform: translateY(-2px) scale(.99); }
}

/* Mobile Optimizations */
@media (max-width: 767.98px) {
  .contact-cards .contact-card {
    padding: 12px 10px;
    gap: 10px;
    min-height: 80px;
  }
  
  .contact-cards .contact-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  
  .contact-cards .contact-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .contact-cards .contact-text a {
    padding: 4px 0;
    display: block;
  }
  
  /* Make phone numbers more tappable */
  a[href^="tel:"], 
  a[href^="https://wa.me/"] {
    display: block;
    padding: 8px 0;
    font-weight: 600;
  }
  
  /* Improve map link touch target */
  .contact-card[href^="https://www.google.com/maps"] .contact-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

/* ===== Reveal on Scroll (Stagger + Directions) ===== */
.contact-cards .contact-card.from-left   { transform: translateX(-26px); }
.contact-cards .contact-card.from-right  { transform: translateX(26px); }
.contact-cards .contact-card.from-top    { transform: translateY(-26px); }
.contact-cards .contact-card.from-bottom { transform: translateY(26px); }
.contact-cards .contact-card.in {
  opacity: 1; transform: none;
  transition: opacity .65s ease, transform .65s ease, box-shadow .25s ease;
}
@media (prefers-reduced-motion: reduce){
  .contact-cards .contact-card { opacity: 1; transform: none; transition: none; }
}

/* ===== Ripple effect ===== */
.contact-cards .contact-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(180px circle at var(--rx,50%) var(--ry,50%), rgba(14,91,69,.12), transparent 40%);
  opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.contact-cards .contact-card.is-rippling::after { opacity: 1; }

/* ===== Copy Toast ===== */
.copy-toast {
  position: fixed; right: 16px; bottom: 16px;
  background: #111; color: #fff; padding: 10px 14px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  font-weight: 700; font-size: .95rem;
  opacity: 0; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease; z-index: 9999;
}
.copy-toast.show { opacity: 1; transform: none; }

/* ===== Responsive Horizontal Scroll ===== */
@media (max-width: 767.98px){
  .contact-cards .row {
    flex-wrap: nowrap; 
    overflow-x: auto; 
    gap: 0.75rem;
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1rem 1rem;
    margin: 0 -1rem;
    width: calc(100% + 2rem);
  }
  .contact-cards .row::-webkit-scrollbar { height: 4px; }
  .contact-cards .row::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.15); 
    border-radius: 4px;
  }
  .contact-cards .row > [class*="col-"] {
    flex: 0 0 85%; 
    max-width: 85%; 
    scroll-snap-align: start; 
    display: flex;
    padding: 0 0.25rem;
  }
  /* Hide scrollbar on mobile when not scrolling */
  .contact-cards .row {
    scrollbar-width: none;
  }
  .contact-cards .row::-webkit-scrollbar {
    display: none;
  }
}

/* اجعل كل عمود مرنًا لتتمدد البطاقة داخله */
#contact .row > [class*="col-"]{ display: flex; }

/* خلي البطاقة تملأ ارتفاع العمود بالكامل وتكون نفس المقاس */
#contact .contact-card{
  width: 100%; height: 100%; min-height: 100px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 18px 16px;
}

/* النص يتمدد ويكسر الأسطر بشكل منضبط */
#contact .contact-text{
  flex: 1 1 auto; line-height: 1.6; text-align: center; word-break: break-word;
}

/* الأيقونة ثابتة المقاس */
#contact .contact-icon{
  flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
}

/* في الشاشات الصغيرة نصغّر الارتفاع الموحد */
@media (max-width: 575.98px){
  #contact .contact-card{ min-height: 88px; }
}
