/* ===================================================================
   MEDEKS HEALTH TOURISM — Modern UI refresh (2026)
   Brand-preserving restyle. No build step: hand-written CSS layered
   over Bootstrap 5 + Poppins. All original class names kept so every
   page (home + inner pages) is modernized at once.
   =================================================================== */

/* === DESIGN TOKENS === */
:root {
  /* Brand palette (kept) */
  --primary-color: #1e88e5;
  --primary-600: #1976d2;
  --primary-700: #1565c0;
  --secondary-color: #0d47a1;
  --accent-color: #00acc1;
  --accent-2: #26c6da;

  /* Gradients */
  --grad: linear-gradient(135deg, #1e88e5 0%, #00acc1 100%);
  --grad-deep: linear-gradient(135deg, #0d47a1 0%, #1e88e5 55%, #00acc1 100%);

  /* Neutrals */
  --ink: #0f1e35;
  --text-dark: #1f2d45;
  --text-light: #5b6b82;
  --muted: #8493a8;
  --line: #e7eef6;
  --white: #ffffff;
  --bg-light: #f4f9fe;
  --success: #28a745;

  /* Shape & depth */
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-pill: 999px;
  --sh-sm: 0 2px 10px rgba(15, 30, 53, .06);
  --sh: 0 12px 34px rgba(15, 30, 53, .09);
  --sh-lg: 0 26px 64px rgba(15, 30, 53, .16);

  --transition: all .35s cubic-bezier(.2, .7, .2, 1);
  --nav-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  color: var(--text-dark);
  line-height: 1.75;
  overflow-x: hidden;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--ink);
  letter-spacing: -.02em;
  line-height: 1.2;
}

p { margin-bottom: 1rem; color: var(--text-light); }

::selection { background: rgba(30, 136, 229, .18); }

section { position: relative; }

/* === HEADER & NAVIGATION (glassy, shrinks on scroll) === */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(15, 30, 53, .06);
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 30px rgba(15, 30, 53, .10) !important;
}

.navbar { padding: .9rem 0; transition: var(--transition); }
.header.scrolled .navbar { padding: .55rem 0; }

.navbar-brand img { height: 48px; transition: var(--transition); }
.header.scrolled .navbar-brand img { height: 40px; }

.navbar-nav .nav-link {
  font-weight: 500;
  font-size: .98rem;
  color: var(--text-dark);
  padding: .5rem 1rem !important;
  margin: 0 .15rem;
  border-radius: var(--r-pill);
  position: relative;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover { color: var(--primary-color); background: rgba(30, 136, 229, .08); }

.navbar-nav .nav-link.active {
  color: var(--primary-color);
  background: rgba(30, 136, 229, .10);
}

/* Phone pill (desktop) */
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  color: var(--white);
  background: var(--grad);
  font-size: .98rem;
  margin-left: .75rem;
  padding: .6rem 1.25rem;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 20px rgba(30, 136, 229, .28);
}
.header-phone:hover { color: var(--white); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 136, 229, .38); }
.header-phone i { font-size: 1.05rem; }

/* Language dropdown */
.navbar-nav .dropdown-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.navbar-nav .dropdown-toggle::after { margin-left: .15rem; opacity: .6; }
.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--sh);
  padding: .4rem;
  margin-top: .6rem !important;
  min-width: 190px;
}
.dropdown-item {
  border-radius: 9px;
  padding: .55rem .8rem;
  font-weight: 500;
  font-size: .95rem;
  display: flex; align-items: center; gap: .6rem;
  transition: var(--transition);
}
.dropdown-item:hover { background: rgba(30, 136, 229, .08); color: var(--primary-color); }
.dropdown-item.active { background: rgba(30, 136, 229, .12); color: var(--primary-700); font-weight: 600; }
.dropdown-item .flag { font-size: 1.05rem; line-height: 1; }

.navbar-toggler { border: none; padding: .4rem; }
.navbar-toggler:focus { box-shadow: none; }

/* === FLOATING ACTION BUTTONS === */
/* Stacked ABOVE the stoaix chat bubble (which owns the bottom-right corner).
   So bottom-right shows: WhatsApp button on top + AI web chat bubble below. */
.mobile-action-buttons {
  position: fixed; bottom: 96px; right: 22px;
  display: flex; flex-direction: column; gap: 14px;
  z-index: 999;
}
.mobile-action-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.5rem;
  box-shadow: var(--sh);
  transition: var(--transition);
  position: relative;
}
.mobile-action-btn.phone { background: var(--grad); }
.mobile-action-btn.whatsapp { background: #25d366; box-shadow: 0 10px 26px rgba(37, 211, 102, .45); }
.mobile-action-btn:hover { transform: translateY(-4px) scale(1.06); }
.mobile-action-btn.whatsapp::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
/* Floating phone hidden everywhere — bottom-right = WhatsApp + AI chat only
   (phone stays in header on desktop, in footer/contact everywhere). */
.mobile-action-buttons .phone { display: none; }
@media (max-width: 768px) { .header-phone { display: none; } }

/* === HERO SLIDER === */
.hero-slider { margin-top: var(--nav-h); position: relative; }
.carousel-item { height: clamp(540px, 82vh, 760px); position: relative; }
.carousel-item img { object-fit: cover; height: 100%; width: 100%; }

.carousel-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 30, 64, .35) 0%, rgba(9, 30, 64, .25) 35%, rgba(7, 24, 56, .82) 100%),
    linear-gradient(110deg, rgba(13, 71, 161, .55), rgba(0, 172, 193, .28));
  display: flex; align-items: center;
}
.carousel-content {
  text-align: left;
  color: var(--white);
  max-width: 760px;
  padding: 0 1rem;
  margin: 0 auto;
  width: 100%;
}
.carousel .container .carousel-content { padding: 0; }
.carousel-content .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
  color: #eaf4ff;
  padding: .45rem 1rem; border-radius: var(--r-pill);
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.carousel-content h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.7rem);
  font-weight: 800;
  margin-bottom: 1.1rem;
  color: var(--white);
  text-shadow: 0 4px 30px rgba(0, 0, 0, .25);
  animation: fadeInUp 1s ease;
}
.carousel-content p {
  font-size: clamp(1.02rem, 1.5vw, 1.3rem);
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, .92);
  max-width: 600px;
  animation: fadeInUp 1.2s ease;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; animation: fadeInUp 1.4s ease; }

/* Buttons */
.btn-primary-custom {
  background: var(--white); color: var(--primary-700);
  padding: .95rem 2.2rem; border-radius: var(--r-pill);
  font-weight: 600; border: none; transition: var(--transition);
  display: inline-flex; align-items: center; gap: .6rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.btn-primary-custom:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .26); color: var(--primary-700); }
.btn-gradient {
  background: var(--grad) !important; color: #fff !important;
  box-shadow: 0 12px 30px rgba(30, 136, 229, .4) !important;
}
.btn-ghost {
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .6);
  padding: .95rem 2rem; border-radius: var(--r-pill);
  font-weight: 600; display: inline-flex; align-items: center; gap: .6rem;
  backdrop-filter: blur(6px); transition: var(--transition);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; transform: translateY(-3px); }

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

/* === STATS BAND === */
.stats-band { margin-top: -60px; position: relative; z-index: 5; }
.stats-card {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 2rem 1rem;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat-item { text-align: center; padding: .5rem 1rem; position: relative; }
.stat-item + .stat-item::before {
  content: ''; position: absolute; left: 0; top: 15%; height: 70%; width: 1px;
  background: var(--line);
}
.stat-number {
  font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; line-height: 1;
}
.stat-label { color: var(--text-light); font-weight: 500; font-size: .95rem; margin: .4rem 0 0; }
@media (max-width: 768px) {
  .stats-band { margin-top: -40px; }
  .stats-card { grid-template-columns: repeat(2, 1fr); gap: 1rem .5rem; }
  .stat-item:nth-child(2)::before, .stat-item:nth-child(3)::before { display: none; }
}

/* === SECTIONS === */
.section { padding: 5.5rem 0; }
.section-title { text-align: center; margin-bottom: 3.2rem; }
.eyebrow {
  display: inline-block; color: var(--primary-color);
  font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: .8rem;
}
.section-title h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; color: var(--ink);
  display: inline-block; padding-bottom: 1rem; position: relative;
}
.section-title h2::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 70px; height: 4px; background: var(--grad); border-radius: 2px;
}
.section-title p { font-size: 1.1rem; color: var(--text-light); max-width: 680px; margin: .4rem auto 0; }

/* === FEATURE CARDS === */
.feature-card {
  background: var(--white); border-radius: var(--r);
  padding: 2.4rem 1.8rem; text-align: center;
  box-shadow: var(--sh-sm); transition: var(--transition);
  height: 100%; border: 1px solid var(--line);
}
.feature-card:hover { transform: translateY(-10px); box-shadow: var(--sh-lg); border-color: transparent; }
.feature-icon {
  width: 76px; height: 76px; background: var(--grad);
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.4rem; color: var(--white); font-size: 1.9rem;
  box-shadow: 0 12px 26px rgba(30, 136, 229, .3);
  transition: var(--transition);
}
.feature-card:hover .feature-icon { transform: rotate(-6deg) scale(1.06); }
.feature-card h3 { font-size: 1.3rem; margin-bottom: .7rem; }
.feature-card p { color: var(--text-light); line-height: 1.7; margin: 0; }

/* === SERVICE & TREATMENT CARDS === */
.service-card, .treatment-card {
  background: var(--white); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-sm); border: 1px solid var(--line);
  transition: var(--transition); height: 100%; display: flex; flex-direction: column;
}
.service-card:hover, .treatment-card:hover { transform: translateY(-8px); box-shadow: var(--sh-lg); border-color: transparent; }
.card-image { position: relative; overflow: hidden; height: 240px; }
.card-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 24, 56, .35));
  opacity: 0; transition: var(--transition);
}
.service-card:hover .card-image::after, .treatment-card:hover .card-image::after { opacity: 1; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.service-card:hover .card-image img, .treatment-card:hover .card-image img { transform: scale(1.08); }
.card-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(255, 255, 255, .92); color: var(--primary-700);
  padding: .4rem .95rem; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 700; box-shadow: var(--sh-sm);
}
.card-content { padding: 1.8rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { font-size: 1.35rem; margin-bottom: .7rem; }
.card-content p { color: var(--text-light); margin-bottom: 1.2rem; flex-grow: 1; }
.card-link {
  color: var(--primary-color); font-weight: 600;
  display: inline-flex; align-items: center; gap: .5rem; transition: var(--transition);
}
.card-link:hover { gap: .9rem; color: var(--primary-700); }

/* === CTA SECTION === */
.cta-section {
  background: var(--grad-deep); color: #fff; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: -40%; right: -10%; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
}
.cta-section h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.cta-section p { color: rgba(255, 255, 255, .9); }

/* === DETAIL / INNER PAGES === */
.page-header {
  background: var(--grad-deep); color: var(--white);
  padding: calc(var(--nav-h) + 4rem) 0 4rem; margin-top: 0; text-align: center;
  position: relative; overflow: hidden;
}
.page-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 60px;
  background: linear-gradient(180deg, transparent, var(--white));
}
.page-header h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--white); position: relative; z-index: 2; }
.page-header p { font-size: 1.15rem; color: rgba(255, 255, 255, .92); position: relative; z-index: 2; }
.breadcrumb-custom { background: transparent; padding: 0; margin-top: 1rem; justify-content: center; position: relative; z-index: 2; }
.breadcrumb-custom .breadcrumb-item { color: rgba(255, 255, 255, .85); }
.breadcrumb-custom .breadcrumb-item a { color: var(--white); font-weight: 600; }
.breadcrumb-custom .breadcrumb-item.active { color: var(--white); }

.content-section { padding: 4.5rem 0; }
.content-image { border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); margin-bottom: 2rem; }
.content-image img { width: 100%; height: auto; }

.category-section { margin-bottom: 4rem; }
.category-title {
  font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 800; color: var(--ink);
  margin-bottom: 2rem; padding-bottom: .8rem; position: relative;
}
.category-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 64px; height: 4px; background: var(--grad); border-radius: 2px; }

/* Partner / contact (kept) */
.partner-card { background: var(--white); border-radius: var(--r); padding: 2rem; box-shadow: var(--sh-sm); border: 1px solid var(--line); transition: var(--transition); text-align: center; }
.partner-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.partner-logo { height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.partner-logo img { max-height: 100%; max-width: 100%; object-fit: contain; }

.contact-info { background: var(--white); border-radius: var(--r); padding: 2.5rem; box-shadow: var(--sh-sm); border: 1px solid var(--line); height: 100%; }
.contact-item { display: flex; align-items: start; gap: 1.3rem; margin-bottom: 1.8rem; }
.contact-icon { width: 50px; height: 50px; background: var(--grad); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 1.3rem; flex-shrink: 0; box-shadow: 0 8px 18px rgba(30,136,229,.28); }
.contact-details h4 { font-size: 1.15rem; margin-bottom: .35rem; }
.contact-details p { color: var(--text-light); margin: 0; }
.contact-details a { color: var(--primary-color); font-weight: 600; }
.map-container { border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-sm); height: 450px; border: 1px solid var(--line); }
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* Forms (contact) */
.form-control, .form-select {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem 1rem; transition: var(--transition);
}
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(30,136,229,.12); }

/* === FOOTER === */
.footer { background: linear-gradient(135deg, #08193a 0%, #0d47a1 100%); color: var(--white); padding: 4.5rem 0 2rem; }
.footer h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.4rem; color: var(--white); }
.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: .75rem; }
.footer ul li a { color: rgba(255, 255, 255, .78); transition: var(--transition); display: inline-flex; align-items: center; gap: .5rem; }
.footer ul li a:hover { color: var(--white); transform: translateX(4px); }
.footer-info p { color: rgba(255, 255, 255, .8); margin-bottom: .9rem; display: flex; align-items: start; gap: .6rem; }
.footer-info i { margin-top: .3rem; color: var(--accent-2); }
.footer-social { display: flex; gap: .7rem; margin-top: 1.2rem; }
.footer-social a {
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem;
}
.footer-social a:hover { background: var(--grad); transform: translateY(-3px); }
.footer-bottom { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid rgba(255, 255, 255, .15); text-align: center; }
.footer-bottom p { color: rgba(255, 255, 255, .7); margin: 0; font-size: .92rem; }

/* === UTILITIES === */
.bg-light-custom { background: var(--bg-light); }
.text-primary-custom { color: var(--primary-color); }
.btn-outline-custom {
  border: 2px solid var(--primary-color); color: var(--primary-color);
  padding: .8rem 2rem; border-radius: var(--r-pill); font-weight: 600;
  transition: var(--transition); display: inline-flex; align-items: center; gap: .5rem;
}
.btn-outline-custom:hover { background: var(--grad); border-color: transparent; color: var(--white); transform: translateY(-2px); }

/* Scroll reveal (driven by existing main.js .animate-fade-in) */
.animate-fade-in { animation: fadeInUp .8s ease forwards; }

/* === RTL SUPPORT (Arabic) === */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .carousel-content { text-align: right; }
[dir="rtl"] .header-phone { margin-left: 0; margin-right: .75rem; }
[dir="rtl"] .footer ul li a:hover { transform: translateX(-4px); }
[dir="rtl"] .category-title::after,
[dir="rtl"] .stat-item + .stat-item::before { left: auto; right: 0; }
[dir="rtl"] .mobile-action-buttons { right: auto; left: 22px; }
[dir="rtl"] .dropdown-menu { text-align: right; }

/* === RESPONSIVE === */
@media (max-width: 991px) {
  .navbar-collapse { background: rgba(255,255,255,.98); border-radius: var(--r); margin-top: .8rem; padding: 1rem; box-shadow: var(--sh); }
  .header-phone { margin: .6rem 0 0; justify-content: center; }
  .section { padding: 3.5rem 0; }
}
@media (max-width: 768px) {
  .carousel-content { text-align: center; }
  .hero-actions { justify-content: center; }
  .page-header { padding: calc(var(--nav-h) + 2.5rem) 0 3rem; }
}
