/* 
 * Arabian Island Heart for Medical Supplies 
 * Custom Styling & Healthcare Theme System 
 */

:root {
  --primary-red: #D32F2F;
  --primary-red-dark: #B71C1C;
  --primary-red-light: #FFEBEE;
  --deep-navy: #0F172A;
  --secondary-navy: #1E293B;
  --accent-cyan: #0284C7;
  --accent-teal: #0D9488;
  --accent-gold: #D97706;
  --bg-soft: #F8FAFC;
  --border-light: #E2E8F0;
}

/* Typography smoothing */
html {
  scroll-behavior: smooth;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: #334155;
  background-color: #FFFFFF;
  overflow-x: hidden;
}

/* RTL Specific Typography when Arabic is active */
html[dir="rtl"] body {
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ECG Rhythm Pulse Line Animation */
.ecg-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawEcg 3.5s linear infinite;
}

@keyframes drawEcg {
  0% {
    stroke-dashoffset: 1000;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -1000;
  }
}

/* Heartbeat Animation */
@keyframes heartPulse {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.18);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.12);
  }
  70% {
    transform: scale(1);
  }
}

.animate-heart-pulse {
  animation: heartPulse 1.8s ease-in-out infinite;
  transform-origin: center;
}

/* Subtle Shimmer for High-Tech Cards */
.shimmer-badge {
  position: relative;
  overflow: hidden;
}
.shimmer-badge::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 70%
  );
  transform: rotate(30deg);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% {
    transform: translate(-100%, -100%) rotate(30deg);
  }
  20%, 100% {
    transform: translate(100%, 100%) rotate(30deg);
  }
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Product Card Hover Effect */
.product-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 0 8px 16px -6px rgba(211, 47, 47, 0.08);
}

/* Brand Card Hover */
.brand-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -8px rgba(15, 23, 42, 0.1);
  border-color: #F87171;
}

/* Interactive Timeline Connectors */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 28px;
  bottom: -28px;
  width: 2px;
  background: #E2E8F0;
}
html[dir="ltr"] .timeline-item::before {
  left: 23px;
}
html[dir="rtl"] .timeline-item::before {
  right: 23px;
}
.timeline-item:last-child::before {
  display: none;
}

/* Floating WhatsApp Button Animation */
.floating-whatsapp {
  box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.5), 0 8px 10px -6px rgba(37, 211, 102, 0.3);
}

/* Category Filter Active Indicator */
.cat-pill.active {
  background-color: var(--primary-red);
  color: #FFFFFF;
  border-color: var(--primary-red);
  box-shadow: 0 4px 14px 0 rgba(211, 47, 47, 0.35);
}

/* Modal Transition */
.modal-enter {
  opacity: 0;
  transform: scale(0.95);
}
.modal-enter-active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
.modal-exit-active {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

/* Gradient Hero Background Overlay */
.hero-gradient {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.88) 55%, rgba(185, 28, 28, 0.82) 100%);
}
