:root {
  --primary: #2fa1c5;
  --primary-dark: #1f8faf;
  --primary-light: #4cc2e4;
  --primary-lighter: #6ccde9;
  --primary-bg: #edf9fc;

  --text-main: #1d1f2c;
  --text-dark: #101828;
  --text-sub: #495565;
  --text-muted: #99a1ae;

  --bg-page: #f8f8f8;
  --bg-white: #ffffff;

  --success-bg: #dcfce7;
  --success-text: #008235;
  --danger-bg: #ffe2e2;
  --danger-text: #c10007;
  --warning-text: #fdc700;

  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0px 4px 6px -4px rgba(0, 0, 0, 0.10);
  --shadow-md: 0px 4px 16px 0px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0px 8px 10px -6px rgba(0, 0, 0, 0.10);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --container-max: 1320px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: min(100% - 32px, var(--container-max));
  margin-inline: auto;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-1 {
  flex: 1;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.gap-8 {
  gap: 32px;
}

.gap-12 {
  gap: 48px;
}

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

.text-xl {
  font-size: 20px;
}

.text-2xl {
  font-size: 24px;
}

.text-3xl {
  font-size: 30px;
}

.text-4xl {
  font-size: 36px;
  line-height: 48px;
}

.text-5xl {
  font-size: 48px;
  line-height: 60px;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--text-muted);
}

.text-sub {
  color: var(--text-sub);
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  transition: height 0.2s ease;
  z-index: -1;
}

.btn:hover::before {
  height: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-white);
}

.btn-primary::before {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--bg-white);
  color: var(--primary);
  outline: 1px solid var(--primary);
  outline-offset: -1px;
}

.btn-secondary::before {
  background-color: var(--primary-bg);
}

.badge {
  padding: 8px 16px;
  align-self: flex-start;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success-text);
}

.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
}

.card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  border: 2px solid transparent;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  padding: 16px 0;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-sub);
}

.nav a.active {
  background-color: var(--primary);
  color: var(--bg-white);
}

.nav a:hover:not(.active) {
  background-color: var(--primary-bg);
  color: var(--primary);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.section-desc {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 1050px;
  color: var(--text-sub);
  font-size: 20px;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 24px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Footer */
.site-footer {
  background-color: var(--text-dark);
  color: var(--text-muted);
  padding: 64px 0 24px;
}

.footer-title {
  color: var(--bg-white);
  margin-bottom: 24px;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

/* Responsive */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-main);
}

@media (max-width: 1024px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-sm);
  }

  .nav.open {
    display: flex;
  }

  .section {
    padding: 48px 0;
  }

  /* ── Hero: center text column on mobile ── */
  .hero-text {
    align-items: center;
    text-align: center;
  }
  .hero-text .badge {
    align-self: center;
  }
  .hero-text .flex-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* ── Footer: center every column on mobile ── */
  .footer-top > div {
    align-items: center;
    text-align: center;
  }
  .footer-top .footer-list {
    align-items: center;
  }
  /* social icons row */
  .footer-top .flex-row {
    justify-content: center;
  }
  /* branch cards */
  .branch-card {
    text-align: center;
  }
  .branch-content {
    align-items: center;
  }
  .info-row {
    justify-content: center;
    text-align: center;
  }
  .whatsapp-pill {
    align-self: center;
  }
}

.branch-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  color: #364153;
  padding: 16px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  box-shadow: 0px 2px 4px -2px rgba(0, 0, 0, 0.10);
  transition: all 0.3s ease;
  min-width: 171px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.branch-btn::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: #f3f4f6;
  transition: height 0.2s ease;
  z-index: -1;
}

.branch-btn:hover::before {
  height: 100%;
}

/* Slider Styles */
.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.slider-dot.active {
  width: 32px;
  background: white;
}






/* Footer Layout Fix */
.footer-top {
  align-items: start;
}

.footer-branches {
  gap: 24px;
  margin-top: 8px;
}

/* Branch Cards */
.branch-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.3s ease;
}

.branch-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.branch-title {
  color: var(--primary-light);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.branch-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}

/* Reusable Icon Masks (matches your existing style) */
.icon-mask {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  background-color: var(--primary-light);
  margin-top: 3px;
}

.icon-mask.location {
  -webkit-mask: url('assets/images/location.svg') no-repeat center / contain;
  mask: url('assets/images/location.svg') no-repeat center / contain;
}

.icon-mask.phone {
  -webkit-mask: url('assets/images/phone.svg') no-repeat center / contain;
  mask: url('assets/images/phone.svg') no-repeat center / contain;
}

/* Compact WhatsApp Pill */
.whatsapp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: var(--radius-full);
  color: #25D366;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
  margin-top: 4px;
  width: fit-content;
}

.whatsapp-pill:hover {
  background: rgba(37, 211, 102, 0.25);
  border-color: #25D366;
  transform: translateY(-1px);
}

.whatsapp-pill img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

/* Social Icons (cleaned up) */
.social-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-icon:hover {
  transform: scale(1.05);
  background: var(--primary-light);
}

.social-icon img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

/* Responsive Balance */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .footer-branches { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; }
  .branch-card { padding: 20px; }
  .whatsapp-pill { width: 100%; justify-content: center; }
}



/* Service Card Customization */
.service-card,
.doctor-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover,
.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-light) !important;
}

/* Ensure title inherits proper font from your system */
.service-card .text-xl.font-bold {
  font-family: inherit;
}

/* Fix for benefits list alignment on mobile */
@media (max-width: 480px) {
  .service-card .flex-row.justify-between {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }
}


/* ============================================================
   Gallery Page
   ============================================================ */
@media (max-width: 768px) {
  #gallery-grid .gallery-item {
    width: calc(50% - 12px) !important;
    min-width: 0 !important;
  }
}
@media (max-width: 480px) {
  #gallery-grid .gallery-item {
    width: 100% !important;
  }
}
