@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Vivid Medical Palette */
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-glow: rgba(37, 99, 235, 0.15);
  --secondary: #0F172A;
  --accent: #06B6D4;
  --accent2: #8B5CF6;
  --danger: #EF4444;
  --success: #10B981;
  --muted: #64748B;
  --bg: #F0F4FF;
  --surface: #FFFFFF;
  --line: #E2E8F0;
  --radius: 20px;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(37, 99, 235, 0.06);
  --shadow-md: 0 8px 24px rgba(37, 99, 235, 0.1);
  --shadow-lg: 0 20px 50px rgba(37, 99, 235, 0.15);

  /* Transitions */
  --ts-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ts-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --ts-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Inter', system-ui, sans-serif;
  color: var(--secondary);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== AMBIENT BACKGROUND ORBS ===== */
body::before {
  content: "";
  position: fixed;
  top: -30vh;
  right: -15vw;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 55%);
  z-index: -1;
  pointer-events: none;
  animation: orbFloat 20s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: -30vh;
  left: -15vw;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06), transparent 55%);
  z-index: -1;
  pointer-events: none;
  animation: orbFloat 25s ease-in-out infinite reverse;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--ts-fast);
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--ts-fast);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  text-decoration: none;
}

.brand img {
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--ts-bounce);
}

.brand:hover img {
  transform: scale(1.1) rotate(-3deg);
}

.brand h1 {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.brand span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  direction: ltr;
  letter-spacing: 0.08em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  transition: all var(--ts-smooth);
}

nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow), rgba(6, 182, 212, 0.08));
  opacity: 0;
  transform: scale(.7);
  transition: all var(--ts-smooth);
  border-radius: 99px;
  z-index: -1;
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

nav a:hover::before {
  opacity: 1;
  transform: scale(1);
}

nav a.active::before {
  opacity: 1;
  transform: scale(1);
}

nav a.active {
  color: var(--primary-dark);
  font-weight: 800;
}

.cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: 15px;
  color: var(--secondary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--ts-bounce);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  color: var(--primary);
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn.primary:hover {
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
  transform: translateY(-3px) scale(1.03);
}

.btn.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--ts-fast);
}

.btn.primary:hover::after {
  opacity: 1;
}

.lang-btn {
  min-width: 42px;
  padding: 10px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
}

/* ===== HERO ===== */
.hero {
  padding: 60px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content {
  padding-right: 20px;
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 18px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--primary-glow), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.15);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 24px;
  animation: badgePulse 3s ease-in-out infinite;
}

.hero h2 {
  margin: 0 0 20px;
  font-size: 44px;
  line-height: 1.25;
  font-weight: 900;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

.hero p {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
  max-width: 90%;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== HERO SLIDESHOW ===== */
.hero-slideshow {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 420px;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.slide-track {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}

.slide.active img {
  transform: scale(1.1);
}

.slide-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slide-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: all var(--ts-bounce);
}

.slide-dots .dot.active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.slide-dots .dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* Floating Cards */
.floating-card {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  animation: float 4s ease-in-out infinite;
  z-index: 10;
}

.floating-card.top-left {
  bottom: auto;
  right: auto;
  top: 24px;
  left: 24px;
  animation-delay: 2s;
}

/* Static hero-image-wrap (for non-slideshow pages) */
.hero-image-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-image-wrap:hover img {
  transform: scale(1.05);
}

/* ===== SECTIONS & CARDS ===== */
section {
  padding: 70px 0;
}

section.bg-light {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 48px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 34px;
  font-weight: 900;
  color: var(--secondary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 12px auto 0;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--ts-bounce);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(6, 182, 212, 0.03));
  transition: opacity var(--ts-smooth);
  z-index: -1;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.25);
}

.card:hover::before {
  opacity: 1;
}

.card h4 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h4 .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-glow), rgba(6, 182, 212, 0.1));
  color: var(--primary);
  font-size: 20px;
  transition: all var(--ts-bounce);
}

.card:hover h4 .icon {
  transform: scale(1.15) rotate(-5deg);
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

.card.image-card {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.card.image-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card.image-card:hover img {
  transform: scale(1.08);
}

.card.image-card .card-content {
  padding: 24px;
  flex-grow: 1;
}

/* ===== FOOTER ===== */
footer {
  background: var(--secondary);
  color: #fff;
  padding: 50px 0 20px;
  margin-top: 0;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
  color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h5 {
  font-size: 18px;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 800;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 15px;
  transition: all var(--ts-fast);
}

.footer-col a:hover {
  padding-right: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

footer .brand h1 {
  color: #fff;
}

footer .brand span {
  -webkit-text-fill-color: var(--accent);
}

/* ===== ANIMATIONS ===== */

/* Scroll-triggered & entrance */
.fade-in {
  animation: fadeIn 1s ease-out forwards;
  opacity: 0;
}

.slide-up {
  animation: slideUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(40px);
}

.slide-up-delay-1 {
  animation-delay: 0.15s;
}

.slide-up-delay-2 {
  animation-delay: 0.3s;
}

.slide-up-delay-3 {
  animation-delay: 0.45s;
}

.slide-right {
  animation: slideRight 0.8s ease-out forwards;
  opacity: 0;
  transform: translateX(-40px);
}

.zoom-in {
  animation: zoomIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: scale(0.9);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(30px, -20px);
  }

  66% {
    transform: translate(-20px, 15px);
  }
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.15);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }

  100% {
    transform: scale(20);
    opacity: 0;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    padding-right: 0;
  }

  .hero h2 {
    font-size: 34px;
  }

  .hero p {
    max-width: 100%;
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-slideshow {
    min-height: 320px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .floating-card {
    display: none;
  }
}

@media (max-width: 768px) {
  nav {
    display: none;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero-slideshow {
    min-height: 260px;
  }

  .cta .btn:not(.lang-btn) {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  section {
    padding: 50px 0;
  }
}

/* LTR overrides */
[dir="ltr"] .footer-col a:hover {
  padding-right: 0;
  padding-left: 5px;
}

[dir="ltr"] .brand span {
  letter-spacing: 0.1em;
}