/* ============================================================
   HADI-HMS | Global Stylesheet
   Hospital Management System – Clean & Professional Design
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
  /* Colors */
  --primary: #0b6fbf;
  --primary-dark: #084f8a;
  --primary-light: #1a8fe0;
  --secondary: #00b4a0;
  --secondary-dark: #008a7a;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #0b6fbf 0%, #00b4a0 100%);
  --grad-dark: linear-gradient(135deg, #0f172a 0%, #083d6e 100%);
  --grad-hero: linear-gradient(135deg, #061c38 0%, #0b4f85 50%, #00866e 100%);

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .14), 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, .18);
  --shadow-blue: 0 8px 32px rgba(11, 111, 191, .30);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.18s ease;

  /* Spacing */
  --section-py: 80px;
  --container-max: 1240px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(11, 111, 191, .40);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  background: var(--gray-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, .7);
}

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

.btn-sm {
  padding: 9px 20px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

/* ---------- Section Utilities ---------- */
.section {
  padding: var(--section-py) 0;
}

.section-alt {
  padding: var(--section-py) 0;
  background: var(--gray-50);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(11, 111, 191, .10), rgba(0, 180, 160, .10));
  color: var(--primary);
  border: 1px solid rgba(11, 111, 191, .20);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--primary);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 580px;
  line-height: 1.7;
}

.section-header {
  margin-bottom: 56px;
}

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

.section-header.center .section-subtitle {
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
}

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

/* ---------- Icon Box ---------- */
.icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(11, 111, 191, .12), rgba(0, 180, 160, .12));
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: rgba(11, 111, 191, .12);
  color: var(--primary);
}

.badge-success {
  background: rgba(34, 197, 94, .12);
  color: var(--success);
}

.badge-accent {
  background: rgba(245, 158, 11, .12);
  color: var(--accent);
}

.badge-danger {
  background: rgba(239, 68, 68, .12);
  color: var(--danger);
}

/* ---------- Accessibility: Screen-reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Divider ---------- */
.divider {
  width: 60px;
  height: 4px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  margin: 12px 0 24px;
}

.divider.center {
  margin: 12px auto 24px;
}

/* ---------- Stat Item ---------- */
.stat-item .stat-value {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, .7);
  margin-top: 4px;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition);
}

#site-header.scrolled {
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

/* Top bar */
.header-top {
  background: var(--grad-dark);
  color: rgba(255, 255, 255, .85);
  font-size: 0.82rem;
  padding: 7px 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.header-top-left,
.header-top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-top a {
  color: rgba(255, 255, 255, .85);
  transition: var(--transition-fast);
}

.header-top a:hover {
  color: var(--secondary);
}

.header-top-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-top-item i {
  color: var(--secondary);
  font-size: 0.85rem;
}

/* Main nav */
.header-main {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

#site-header.transparent .header-main {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, .15);
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  width: 46px;
  height: 46px;
  background: var(--grad-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--white);
  box-shadow: var(--shadow-blue);
}

.logo-text {
  line-height: 1.15;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#site-header.transparent .logo-name {
  color: var(--white);
}

#site-header.transparent .logo-tagline {
  color: rgba(255, 255, 255, .7);
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(11, 111, 191, .07);
}

.nav-link i {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.nav-item:hover .nav-link i {
  transform: rotate(180deg);
}

#site-header.transparent .nav-link {
  color: rgba(255, 255, 255, .88);
}

#site-header.transparent .nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, .12);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  z-index: 100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(11, 111, 191, .07);
  color: var(--primary);
}

.dropdown-item i {
  width: 32px;
  height: 32px;
  background: rgba(11, 111, 191, .08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Login button – outlined style */
.header-cta .btn-login {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  border: 2px solid var(--primary);
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.header-cta .btn-login i {
  font-size: 0.85rem;
}

.header-cta .btn-login:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

/* Transparent header override for login button */
#site-header.transparent .btn-login {
  color: rgba(255, 255, 255, .92);
  border-color: rgba(255, 255, 255, .55);
}

#site-header.transparent .btn-login:hover {
  background: rgba(255, 255, 255, .18);
  border-color: var(--white);
  color: var(--white);
  box-shadow: none;
}

.header-cta .btn-demo {
  background: var(--grad-primary);
  color: var(--white);
  padding: 9px 22px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-blue);
  transition: var(--transition);
}

.header-cta .btn-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(11, 111, 191, .40);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

#site-header.transparent .hamburger span {
  background: var(--white);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding: 16px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-nav.open {
  max-height: 600px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--primary);
  background: var(--gray-50);
}

.mobile-nav-group-title {
  padding: 10px 24px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

.mobile-nav-cta {
  padding: 16px 24px;
}

/* Mobile Login Link – pinned at top of mobile nav with accent styling */
.mobile-nav-login {
  background: linear-gradient(135deg, rgba(11, 111, 191, .07), rgba(0, 180, 160, .07)) !important;
  color: var(--primary) !important;
  font-weight: 600 !important;
  border-left: 3px solid var(--primary);
  border-bottom: 1px solid var(--gray-100);
}

.mobile-nav-login i {
  color: var(--primary);
}

.mobile-nav-login:hover {
  background: linear-gradient(135deg, rgba(11, 111, 191, .14), rgba(0, 180, 160, .14)) !important;
  color: var(--primary) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, .75);
  font-size: 0.9rem;
}

.footer-top {
  padding: 64px 0 48px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 48px;
}

.footer-brand .logo-name {
  color: var(--white);
}

.footer-brand .logo-tagline {
  color: rgba(255, 255, 255, .5);
}

.footer-brand p {
  margin-top: 16px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.7;
  font-size: 0.875rem;
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .7);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, .65);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a i {
  font-size: 0.7rem;
  color: var(--secondary);
}

.footer-links a:hover {
  color: var(--white);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(11, 111, 191, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-text strong {
  display: block;
  color: var(--white);
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.footer-contact-text span,
.footer-contact-text a {
  color: rgba(255, 255, 255, .6);
  font-size: 0.85rem;
}

.footer-contact-text a:hover {
  color: var(--secondary);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, .4);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, .4);
  transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--white);
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: var(--grad-hero);
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.page-hero p {
  color: rgba(255, 255, 255, .75);
  font-size: 1.05rem;
  max-width: 560px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, .65);
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb span {
  color: rgba(255, 255, 255, .4);
}

.breadcrumb .current {
  color: var(--secondary);
  font-weight: 600;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-fade-up {
  animation: fadeInUp 0.7s ease both;
}

.animate-fade-up-2 {
  animation: fadeInUp 0.7s ease 0.15s both;
}

.animate-fade-up-3 {
  animation: fadeInUp 0.7s ease 0.3s both;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: 56px;
  }

  .header-top {
    display: none;
  }

  .main-nav {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
}

.whatsapp-float a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.5rem;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .45);
  transition: var(--transition);
  position: relative;
}

.whatsapp-float a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: pulse-ring 2s ease-out infinite;
}

.whatsapp-float a:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(37, 211, 102, .6);
}