/* ==========================================================================
   Al Hemaya Medical Administration Co. (Protection)
   Master Global Stylesheet - Bootstrap 5.3 Extension
   Consistent Typography, Colors, Header, Footer & UI Components
   ========================================================================== */

/* --- 1. LOCAL FONTS & FONT-FACE DEFINITIONS --- */
@font-face {
  font-family: 'Droid Arabic Kufi';
  font-style: normal;
  font-weight: 400;
  src: url('../../fonts/DroidKufi-Regular.woff2') format('woff2'),
       url('../../fonts/DroidKufi-Regular.woff') format('woff'),
       url('../../fonts/DroidKufi-Regular.ttf') format('truetype'),
       url('../fonts/DroidKufi-Regular.woff2') format('woff2'),
       url('/fonts/DroidKufi-Regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Droid Arabic Kufi';
  font-style: normal;
  font-weight: 700;
  src: url('../../fonts/DroidKufi-Bold.woff2') format('woff2'),
       url('../../fonts/DroidKufi-Bold.woff') format('woff'),
       url('../../fonts/DroidKufi-Bold.ttf') format('truetype'),
       url('../fonts/DroidKufi-Bold.woff2') format('woff2'),
       url('/fonts/DroidKufi-Bold.woff2') format('woff2');
  font-display: swap;
}

/* --- 2. CSS VARIABLES & COLOR PALETTE --- */
:root {
  --primary-green: #89c23f;
  --primary-green-dark: #74a832;
  --primary-green-light: #eaf5dc;
  --dark-forest: #143d22;
  --dark-forest-darker: #0d2816;
  --accent-light: #a4db60;
  --text-dark: #1e293b;
  --text-body: #334155;
  --text-muted: #64748b;
  --bg-page: #fafbfc;
  --border-light: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px -4px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 50rem;
}

/* --- 3. GLOBAL TYPOGRAPHY & BASE --- */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-body);
  background-color: var(--bg-page);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--primary-green-dark);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--primary-green);
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.text-primary-green { color: var(--primary-green) !important; }
.bg-primary-green { background-color: var(--primary-green) !important; }
.bg-dark-forest { background-color: var(--dark-forest) !important; }
.text-accent-light { color: var(--accent-light) !important; }
.text-white-70 { color: rgba(255, 255, 255, 0.75) !important; }
.text-white-90 { color: rgba(255, 255, 255, 0.9) !important; }

/* Buttons */
.btn-success {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #fff;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-success:hover, .btn-success:focus, .btn-success:active {
  background-color: var(--primary-green-dark) !important;
  border-color: var(--primary-green-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(137, 194, 63, 0.35);
}

.btn-outline-success {
  color: var(--primary-green-dark);
  border-color: var(--primary-green);
  font-weight: 600;
}

.btn-outline-success:hover, .btn-outline-success:focus {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #fff;
}

/* Form Controls */
.form-control:focus, .form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.25rem rgba(137, 194, 63, 0.25);
}

.form-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

/* --- 4. TOP UTILITY BAR --- */
.top-utility-bar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}

.top-utility-bar a {
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
}

.top-utility-bar a:hover {
  color: var(--primary-green-dark);
}

.top-utility-bar .divider {
  color: #cbd5e1;
}

/* --- 5. MAIN NAVBAR --- */
.navbar-main {
  background-color: #ffffff;
  border-bottom: 1px solid #eef2f6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  transition: all 0.3s ease;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--dark-forest);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-top: 2px;
}

/* Navigation Links */
.navbar-main .nav-link {
  font-size: 0.94rem;
  font-weight: 600;
  color: #334155;
  padding: 0.55rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
  position: relative;
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link:focus {
  color: var(--primary-green) !important;
}

.navbar-main .nav-link.active {
  color: var(--primary-green) !important;
  font-weight: 700;
}

@media (min-width: 992px) {
  .navbar-main .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.65rem;
    left: 0.85rem;
    right: 0.85rem;
    height: 3px;
    background-color: var(--primary-green);
    border-radius: 3px 3px 0 0;
  }
}

/* Sub-Menu Dropdowns */
.navbar-main .dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  min-width: 250px;
  animation: dropdownFadeIn 0.2s ease forwards;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.navbar-main .dropdown-item {
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.navbar-main .dropdown-item:hover,
.navbar-main .dropdown-item:focus {
  background-color: var(--primary-green-light);
  color: var(--dark-forest);
  font-weight: 600;
  padding-left: 1.1rem;
}

@media (min-width: 992px) {
  .navbar-main .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

/* --- 6. PAGE HERO / HEADER BANNER --- */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 7rem) 0;
  color: #ffffff;
  background:
    linear-gradient(110deg, rgba(13, 40, 22, 0.97), rgba(20, 61, 34, 0.94) 56%, rgba(32, 91, 48, 0.91)),
    url('../../images/slideshow/bg_slide1.jpg') center/cover no-repeat;
}

.home-hero::before,
.home-hero::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(164, 219, 96, 0.14);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.home-hero::before {
  width: 42rem;
  height: 42rem;
  inset-block-start: -27rem;
  inset-inline-end: -12rem;
}

.home-hero::after {
  width: 58rem;
  height: 58rem;
  inset-block-end: -47rem;
  inset-inline-start: -18rem;
}

.home-hero-glow {
  position: absolute;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: rgba(137, 194, 63, 0.15);
  filter: blur(70px);
  pointer-events: none;
}

.home-hero-glow-one {
  inset-block-start: -12rem;
  inset-inline-start: 28%;
}

.home-hero-glow-two {
  inset-block-end: -15rem;
  inset-inline-end: 8%;
  background: rgba(164, 219, 96, 0.12);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
}

.home-hero-copy {
  animation: hero-copy-enter 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.home-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(164, 219, 96, 0.35);
  border-radius: var(--radius-pill);
  color: var(--accent-light);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-hero-copy h1 {
  max-width: 700px;
  margin: 0 0 1.25rem;
  color: #ffffff;
  font-size: clamp(2.5rem, 5vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.home-hero-copy h1 span {
  display: block;
  color: var(--accent-light);
}

.home-hero-lead {
  max-width: 570px;
  margin-bottom: 1.75rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.8;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}

.home-hero-actions .btn-success {
  box-shadow: 0 12px 28px rgba(137, 194, 63, 0.2);
}

.home-hero-secondary {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.home-hero-secondary:hover,
.home-hero-secondary:focus-visible {
  color: var(--accent-light);
}

.home-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.home-hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.home-hero-proof i {
  color: var(--accent-light);
}

.hero-network {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  margin-inline: auto;
  animation: hero-visual-enter 900ms 120ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-network-orbit {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(164, 219, 96, 0.24);
  border-radius: 50%;
}

.hero-network-orbit-outer {
  animation: hero-orbit-spin 42s linear infinite;
}

.hero-network-orbit-outer::before,
.hero-network-orbit-outer::after {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid rgba(20, 61, 34, 0.8);
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 18px rgba(164, 219, 96, 0.75);
  content: '';
}

.hero-network-orbit-outer::before {
  inset-block-start: 17%;
  inset-inline-start: 11%;
}

.hero-network-orbit-outer::after {
  inset-block-end: 10%;
  inset-inline-end: 22%;
  width: 0.4rem;
  height: 0.4rem;
}

.hero-network-orbit-inner {
  inset: 21%;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  animation: hero-orbit-spin 55s linear infinite reverse;
}

.hero-network-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: 34%;
  aspect-ratio: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 32%;
  color: var(--dark-forest);
  background: linear-gradient(145deg, #ffffff, #eaf5dc);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.28), 0 0 0 12px rgba(255, 255, 255, 0.06);
  transform: translate(-50%, -50%) rotate(-6deg);
  animation: hero-core-float 5s ease-in-out infinite;
}

.hero-network-core i {
  color: var(--primary-green-dark);
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.hero-network-core span {
  font-size: clamp(0.52rem, 1vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero-network-node {
  position: absolute;
  z-index: 1;
  display: flex;
  min-width: 112px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 1rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
  font-size: 0.83rem;
  font-weight: 700;
  animation: hero-node-float 5s ease-in-out infinite;
}

.hero-network-node i {
  color: var(--accent-light);
  font-size: 1.1rem;
}

.hero-network-node-member {
  inset-block-start: 12%;
  inset-inline-start: 10%;
}

.hero-network-node-provider {
  inset-block-start: 43%;
  inset-inline-end: 0;
  animation-delay: -1.6s;
}

.hero-network-node-partner {
  inset-block-end: 12%;
  inset-inline-start: 15%;
  animation-delay: -3.1s;
}

.hero-network-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 55%;
  aspect-ratio: 1;
  border: 1px solid rgba(164, 219, 96, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: hero-pulse 3.8s ease-out infinite;
  pointer-events: none;
}

.hero-network-caption {
  position: absolute;
  inset-block-end: 1%;
  inset-inline-end: 2%;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.82);
  background: rgba(13, 40, 22, 0.52);
  font-size: 0.75rem;
}

.hero-network-caption-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(164, 219, 96, 0.15);
}

@keyframes hero-copy-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-visual-enter {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes hero-core-float {
  0%, 100% { transform: translate(-50%, -50%) rotate(-6deg) translateY(0); }
  50% { transform: translate(-50%, -50%) rotate(-3deg) translateY(-8px); }
}

@keyframes hero-node-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@keyframes hero-orbit-spin {
  to { rotate: 360deg; }
}

@keyframes hero-pulse {
  0% { opacity: 0.65; scale: 0.72; }
  100% { opacity: 0; scale: 1.35; }
}

@media (max-width: 991.98px) {
  .home-hero {
    padding-block: 4.25rem 3.25rem;
  }

  .home-hero-copy {
    text-align: center;
  }

  .home-hero-copy h1,
  .home-hero-lead {
    margin-inline: auto;
  }

  .home-hero-actions,
  .home-hero-proof {
    justify-content: center;
  }

  .hero-network {
    width: min(100%, 430px);
  }
}

@media (max-width: 575.98px) {
  .home-hero {
    padding-block: 3.5rem 2.5rem;
  }

  .home-hero-copy h1 {
    font-size: clamp(2.3rem, 10vw, 3.3rem);
  }

  .home-hero-actions {
    flex-direction: column;
  }

  .hero-network-node {
    min-width: 0;
    gap: 0.45rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.72rem;
  }

  .hero-network-node-member { inset-inline-start: 2%; }
  .hero-network-node-provider { inset-inline-end: -1%; }
  .hero-network-node-partner { inset-inline-start: 5%; }

  .hero-network-caption {
    inset-inline-end: 0;
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-copy,
  .hero-network,
  .hero-network-orbit-outer,
  .hero-network-orbit-inner,
  .hero-network-core,
  .hero-network-node,
  .hero-network-pulse {
    animation: none !important;
  }
}

.page-hero-banner {
  background: linear-gradient(135deg, rgba(20, 61, 34, 0.95), rgba(40, 130, 70, 0.88)), url('../../images/slideshow/bg_slide1.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 3.5rem 0 3rem 0;
  position: relative;
}

.page-hero-banner .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.page-hero-banner .breadcrumb-item a:hover {
  color: #ffffff;
}

.page-hero-banner .breadcrumb-item.active {
  color: var(--accent-light);
}

.page-hero-banner .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.4);
}

/* --- 7. CARDS & UI ELEMENTS --- */
.service-card {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  color: #ffffff;
  background-color: var(--primary-green);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.provider-card {
  border: 1px solid #eef2f6;
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.provider-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-green);
}

.provider-img-wrap {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: var(--radius-sm);
}

.provider-img-wrap img {
  max-height: 145px;
  max-width: 100%;
  width: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.provider-card:hover .provider-img-wrap img {
  transform: scale(1.05);
}

.provider-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0;
  line-height: 1.35;
}

/* Partner Card */
.partner-card {
  border: 1px solid #eef2f6;
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 2.25rem;
  text-align: center;
  transition: all 0.25s ease;
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-green);
}

.partner-img-wrap {
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: var(--radius-md);
}

.partner-img-wrap img {
  max-height: 180px;
  max-width: 100%;
  width: 100%;
  object-fit: contain;
}

.partner-img-wrap i {
  font-size: clamp(3.75rem, 6vw, 5rem);
}

@media (max-width: 575.98px) {
  .provider-img-wrap {
    height: 145px;
  }

  .provider-img-wrap img {
    max-height: 125px;
  }

  .partner-img-wrap {
    height: 185px;
  }

  .partner-img-wrap img {
    max-height: 160px;
  }
}

/* --- 8. FOOTER STYLING --- */
.footer-main {
  background-color: var(--dark-forest) !important;
  color: #e2e8f0;
  padding-top: 4rem;
  padding-bottom: 2rem;
  margin-top: auto;
  border-top: 4px solid var(--primary-green);
}

.footer-main h6 {
  color: var(--accent-light);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-nav-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.footer-nav-list li {
  margin-bottom: 0.6rem;
}

.footer-nav-list a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-nav-list a:hover {
  color: #ffffff !important;
  transform: translateX(3px);
}

/* App Store Download Badges */
.app-store-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: all 0.2s ease;
}

.app-store-badge-btn:hover {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.app-store-badge-btn img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* Social Buttons */
.footer-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-social-btn:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* --- 9. UTILITY CLASSES --- */
.ltr-text {
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
}
