/* ==========================================================================
   Ali Healthcare Solution - Custom Stylesheet (Bootstrap 5 Extension)
   ========================================================================== */

:root {
  --ahs-primary-dark: #040d1a;
  --ahs-navy-card: #0c2340;
  --ahs-teal: #00a896;
  --ahs-teal-hover: #028090;
  --ahs-teal-light: #e6f6f5;
  --ahs-accent-cyan: #05b292;
  --ahs-gold: #d4af37;
  --ahs-gold-light: #fef08a;
  --ahs-gold-bright: #fbbf24;
  --ahs-text-dark: #111827;
  --ahs-text-muted: #4b5563;
  --ahs-bg-light: #f8fafc;
  --ahs-border-light: #e2e8f0;
  --ahs-shadow-sm: 0 2px 8px rgba(7, 22, 44, 0.06);
  --ahs-shadow-md: 0 8px 24px rgba(7, 22, 44, 0.08);
  --ahs-shadow-lg: 0 16px 40px rgba(7, 22, 44, 0.12);
  --ahs-font-main: 'Poppins', system-ui, -apple-system, sans-serif;
  --ahs-font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--ahs-font-main);
  font-size: 1rem;
  color: var(--ahs-text-dark);
  background-color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ahs-product-img-wrapper img,
.ahs-hero-img-card img,
.ahs-why-banner img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  transform: translateZ(0);
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .nav-link, .dropdown-item, .btn {
  font-family: var(--ahs-font-heading);
  letter-spacing: -0.01em;
}

/* --- Top Announcement Bar --- */
.ahs-topbar {
  background: #07162c;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--ahs-font-main);
  letter-spacing: 0.3px;
}

.ahs-topbar a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ahs-topbar a:hover {
  color: #00a896;
}

.ahs-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* --- Main Clean White Header (Medex Style) --- */
.ahs-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1040;
  background-color: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.ahs-navbar {
  padding: 10px 0;
  background: #ffffff !important;
}

.ahs-brand-logo-frame {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #d4af37;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  padding: 1px;
}

.ahs-brand-logo-frame:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  border-color: #f39c12;
}

.ahs-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.ahs-brand-title {
  font-family: var(--ahs-font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0c2340;
}

.ahs-brand-subtitle {
  font-family: var(--ahs-font-main);
  font-size: 0.75rem;
  font-weight: 600;
  color: #00a896;
  margin-top: 2px;
  margin-bottom: 0;
  letter-spacing: 0.2px;
}

.ahs-navbar .nav-link {
  color: #0f172a !important;
  font-family: var(--ahs-font-main);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 8px 10px !important;
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.ahs-navbar .dropdown-toggle::after {
  display: none !important;
}

.ahs-navbar .nav-link:hover {
  color: #00a896 !important;
}

.ahs-navbar .nav-link.active {
  color: #00a896 !important;
}

.ahs-navbar .nav-link.active::after,
.ahs-navbar .nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 3px;
  background-color: #00a896;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.ahs-navbar .dropdown-menu {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 8px;
  margin-top: 4px;
  transition: all 0.2s ease;
}

@media (min-width: 992px) {
  .ahs-navbar .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
    animation: ahsDropdownFade 0.2s ease forwards;
  }
}

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

.ahs-navbar .dropdown-item {
  color: #1e293b;
  font-family: var(--ahs-font-main);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.ahs-navbar .dropdown-item:hover {
  background-color: #f1f5f9;
  color: #00a896;
}

/* Contact Us Header Pill Button */
.btn-ahs-contact-btn {
  background: linear-gradient(135deg, #009688 0%, #00796b 100%);
  color: #ffffff !important;
  font-family: var(--ahs-font-main);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 18px !important;
  border-radius: 25px;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 150, 136, 0.22);
  transition: all 0.25s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

.btn-ahs-contact-btn::after {
  display: none !important;
}

.btn-ahs-contact-btn:hover {
  background: linear-gradient(135deg, #00897b 0%, #00695c 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 150, 136, 0.35);
}

/* Navbar Toggler for Mobile */
.ahs-navbar .navbar-toggler {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}

.ahs-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 23, 42, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Buttons --- */
.btn-ahs-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  color: #ffffff;
  font-family: var(--ahs-font-main);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid #fef08a;
  padding: 10px 22px;
  border-radius: 30px;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.4);
  transition: all 0.3s ease;
}

.btn-ahs-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #ffffff;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.6);
  border-color: #ffffff;
}

.btn-ahs-outline {
  border: 2px solid #ffffff;
  color: #ffffff;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 8px;
  background: transparent;
  transition: all 0.25s ease;
}

.btn-ahs-outline:hover {
  background: #ffffff;
  color: var(--ahs-primary-dark);
  transform: translateY(-2px);
}

.btn-ahs-dark {
  background-color: var(--ahs-primary-dark);
  color: #ffffff;
  font-weight: 700;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.btn-ahs-dark:hover {
  background-color: #0f2c4d;
  color: #ffffff;
  transform: translateY(-2px);
}

/* --- Hero Section --- */
.ahs-hero {
  background: radial-gradient(circle at 80% 20%, #0d2f54 0%, var(--ahs-primary-dark) 70%);
  color: #ffffff;
  padding: 40px 0 55px 0;
  position: relative;
  overflow: hidden;
}

.ahs-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 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='%2300a896' fill-opacity='0.04' fill-rule='evenodd'%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/svg%3E");
  pointer-events: none;
}

.ahs-hero-badge {
  background: rgba(0, 168, 150, 0.15);
  border: 1px solid rgba(0, 168, 150, 0.4);
  color: #38bdf8;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.ahs-hero-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ahs-hero-text {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 600px;
  margin-bottom: 22px;
}

.ahs-hero-img-wrapper {
  position: relative;
  z-index: 2;
}

.ahs-hero-img-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.ahs-hero-img-card img {
  border-radius: 12px;
  width: 100%;
  max-height: 350px;
  object-fit: cover;
}

.ahs-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.ahs-trust-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.825rem;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- Floating Stats Bar --- */
.ahs-stats-wrapper {
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.ahs-stats-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--ahs-shadow-lg);
  padding: 28px 20px;
  border: 1px solid var(--ahs-border-light);
}

.ahs-stat-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 15px;
}

.ahs-stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background-color: var(--ahs-teal-light);
  color: var(--ahs-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.ahs-stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ahs-primary-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.ahs-stat-label {
  font-size: 0.85rem;
  color: var(--ahs-text-muted);
  font-weight: 600;
  margin: 0;
}

/* --- Section Title --- */
.ahs-section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px auto;
}

.ahs-section-subtitle {
  color: var(--ahs-teal);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.ahs-section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ahs-primary-dark);
  margin-bottom: 12px;
}

.ahs-section-desc {
  color: var(--ahs-text-muted);
  font-size: 1rem;
}

/* --- Category Cards --- */
.ahs-cat-card {
  background: #ffffff;
  border: 1px solid var(--ahs-border-light);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ahs-cat-card:hover {
  transform: translateY(-6px);
  border-color: var(--ahs-teal);
  box-shadow: var(--ahs-shadow-md);
}

.ahs-cat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background-color: var(--ahs-teal-light);
  color: var(--ahs-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.ahs-cat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ahs-primary-dark);
  margin-bottom: 8px;
}

.ahs-cat-link {
  color: var(--ahs-teal);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

.ahs-cat-link:hover {
  color: var(--ahs-teal-hover);
  gap: 8px;
}

/* --- Product Cards --- */
.ahs-product-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--ahs-border-light);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ahs-product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--ahs-shadow-lg);
  border-color: rgba(0, 168, 150, 0.3);
}

.ahs-product-img-wrapper {
  position: relative;
  background: #f1f5f9;
  height: 220px;
  overflow: hidden;
}

.ahs-product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ahs-product-card:hover .ahs-product-img-wrapper img {
  transform: scale(1.06);
}

.ahs-product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(7, 22, 44, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.ahs-product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ahs-product-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ahs-primary-dark);
  margin-bottom: 8px;
}

.ahs-product-desc {
  font-size: 0.875rem;
  color: var(--ahs-text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

/* --- Why Choose Us Banner (Dark Navy/Teal Card) --- */
.ahs-why-banner {
  background: linear-gradient(135deg, #07162c 0%, #0d2d4a 100%);
  border-radius: 20px;
  padding: 50px 40px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--ahs-shadow-lg);
}

.ahs-why-banner img {
  border-radius: 14px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ahs-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ahs-check-list li {
  font-size: 0.95rem;
  color: #e2e8f0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ahs-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ahs-teal);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* --- Brand Logos Section --- */
.ahs-brand-logo {
  background: #ffffff;
  border: 1px solid var(--ahs-border-light);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #475569;
  transition: all 0.25s ease;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ahs-brand-logo:hover {
  border-color: var(--ahs-teal);
  color: var(--ahs-teal);
  transform: translateY(-3px);
  box-shadow: var(--ahs-shadow-sm);
}

/* --- Testimonials --- */
.ahs-testimonial-card {
  background: #ffffff;
  border: 1px solid var(--ahs-border-light);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--ahs-shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ahs-quote-icon {
  color: var(--ahs-teal);
  font-size: 2rem;
  opacity: 0.4;
}

/* --- Pre-Footer Call to Action Banner --- */
.ahs-cta-banner {
  background: linear-gradient(135deg, var(--ahs-teal) 0%, #07162c 100%);
  border-radius: 20px;
  padding: 40px 30px;
  color: #ffffff;
  margin-bottom: -50px;
  position: relative;
  z-index: 20;
  box-shadow: var(--ahs-shadow-lg);
}

/* --- Footer --- */
.ahs-footer {
  background-color: #040b14;
  color: #94a3b8;
  padding-top: 90px;
  padding-bottom: 30px;
  font-size: 0.9rem;
}

.ahs-footer-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.ahs-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.ahs-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ahs-footer-links a:hover {
  color: var(--ahs-teal);
}

.ahs-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  margin-top: 40px;
  font-size: 0.85rem;
}

/* --- Dynamic View Navigation / Page Views --- */
.page-view {
  display: none;
}

.page-view.active-view {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

/* --- Custom Toast Notification --- */
.ahs-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1090;
  min-width: 320px;
  max-width: 420px;
  box-shadow: var(--ahs-shadow-lg);
  border-radius: 12px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
  .ahs-hero {
    padding: 50px 0 80px 0;
  }
  .ahs-hero-title {
    font-size: 2.2rem;
  }
  .ahs-stats-wrapper {
    margin-top: 20px;
  }
  .ahs-why-banner {
    padding: 30px 20px;
  }
}
