/* ==========================================================================
   ALMISBAH MEDICAL CENTER - DESIGN SYSTEM & STYLES
   ========================================================================== */
:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --emerald: #059669;
  --dark: #0f172a;
  --dark-muted: #334155;
  --gray-light: #f8fafc;
  --gray-border: #e2e8f0;
  --white: #ffffff;
  
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 35px -10px rgba(2, 132, 199, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--gray-light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

/* 1. TOP UTILITY BAR */
.top-utility-bar {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 10px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.utility-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.utility-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.utility-links a:hover {
  color: var(--accent);
}

.accent-icon {
  color: var(--accent);
}

.utility-badge {
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid var(--primary);
  color: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* 2. HEADER & NAVIGATION */
.main-header {
  background: var(--white);
  padding: 18px 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.main-header.scrolled {
  padding: 12px 5%;
  box-shadow: var(--shadow-md);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.brand-text h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--dark);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
}

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

.nav-item {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark-muted);
  position: relative;
  padding: 8px 0;
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  color: var(--primary);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-action {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  border: none;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-emergency {
  background: #dc2626;
  color: var(--white);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-emergency:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

/* 3. HERO SECTION & HERO IMAGE STYLING */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 82vh;
  /* Medical Center High-Res Background Image */
  background-image: url('assets/images/hero 1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 5% 120px 5%;
  color: var(--white);
}

/* Dark Gradient Overlay for optimal legibility */
.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.45) 100%);
  z-index: 1;
}

.hero-content {
  max-width: 780px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* QUICK ACTION CARDS (OVERLAPPING HERO) */
.hero-quick-actions {
  position: absolute;
  bottom: -45px;
  left: 5%;
  right: 5%;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  overflow: hidden;
  border: 1px solid var(--gray-border);
  z-index: 20;
}

.action-card {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-right: 1px solid var(--gray-border);
  transition: var(--transition);
  cursor: pointer;
}

.action-card:last-child {
  border-right: none;
}

.action-card:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.action-card:hover .action-icon {
  background: var(--primary);
  color: var(--white);
}

.action-info h4 {
  font-size: 1.05rem;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 2px;
}

.action-info p {
  font-size: 0.82rem;
  color: var(--dark-muted);
}

/* 4. SEARCH BAR */
.search-bar-wrapper {
  margin-top: 100px;
  padding: 0 5%;
}

.search-container {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-border);
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.search-input-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
}

.search-input-group i {
  color: var(--primary);
  font-size: 1.2rem;
}

.search-input-group input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 1rem;
  font-family: var(--font-sans);
}

.search-btn {
  padding: 14px 28px;
}

/* 5. SERVICES SECTION */
.section-padding {
  padding: 90px 5%;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 55px auto;
}

.section-subtitle {
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--dark);
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.section-desc {
  color: var(--dark-muted);
  font-size: 1.05rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card .card-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 12px;
  font-weight: 700;
}

.service-card p {
  color: var(--dark-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-link {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.service-card:hover .card-link {
  gap: 10px;
  color: var(--primary-dark);
}

/* 6. STATS BANNER */
.stats-banner {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  box-shadow: var(--shadow-lg);
  margin: 40px 5%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* 7. CTA BANNER */
.cta-banner {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 60px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin: 60px 5%;
  box-shadow: var(--shadow-lg);
}

.cta-content h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

.btn-light {
  background: var(--white);
  color: var(--primary-dark);
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-light:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* 8. FOOTER */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 80px 5% 30px 5%;
  margin-top: 80px;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 22px;
  color: var(--white);
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.footer-text {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-contact-item {
  color: #94a3b8;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #94a3b8;
  transition: var(--transition);
  font-size: 0.92rem;
}

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

.copyright {
  text-align: center;
  border-top: 1px solid #1e293b;
  padding-top: 25px;
  font-size: 0.85rem;
  color: #64748b;
}

/* RESPONSIVE LAYOUT */
@media (max-width: 992px) {
  .hero-title { font-size: 2.6rem; }
  .mobile-toggle { display: block; }
  
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    display: flex;
  }

  .hero-quick-actions { 
    position: relative; 
    bottom: 0; 
    margin-top: 30px; 
    grid-template-columns: 1fr 1fr; 
  }
  
  .search-bar-wrapper { margin-top: 40px; }
  .cta-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
  .top-utility-bar { display: none; }
  .hero-quick-actions { grid-template-columns: 1fr; }
  .search-container { flex-direction: column; }
}