/* Visibility and alignment fixes for services section + medicine modal */

/* Hide only leftover floating theme toggles. Header/navbar Dark Mode / Bright Mode button remains. */
.theme-toggle-btn,
#themeFloatingLabel,
.aw-floating-theme-toggle,
#themeToggle,
#themeToggleBtn {
  display: none !important;
}

header .aw-theme-toggle,
.header-stats .aw-theme-toggle,
nav .aw-theme-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .48rem !important;
  min-height: 44px !important;
  padding: .65rem 1rem !important;
  border-radius: 999px !important;
  border: 1.5px solid var(--border-glass) !important;
  background: var(--bg-glass) !important;
  color: var(--text-primary) !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: .86rem !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.08) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease !important;
}
header .aw-theme-toggle:hover {
  transform: translateY(-1px) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 10px 26px rgba(201,168,76,.18) !important;
}
html[data-theme="bright"] header .aw-theme-toggle {
  background: #ffffff !important;
  color: #354052 !important;
  border-color: #e4eaf3 !important;
}
html[data-theme="bright"] header .aw-theme-toggle:hover {
  color: #1a56c4 !important;
  border-color: #c9a84c !important;
}
html[data-theme="dark"] header .aw-theme-toggle {
  background: rgba(255,255,255,.035) !important;
  color: #f5e6a3 !important;
  border-color: rgba(201,168,76,.24) !important;
}
header .aw-theme-toggle i {
  color: var(--gold) !important;
}

/* Section switcher should look clean and readable */
html[data-theme="dark"] .section-switcher {
  background: linear-gradient(180deg, rgba(8,12,24,0.96), rgba(11,16,30,0.92)) !important;
  border: 1.5px solid rgba(201,168,76,0.24) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,0.30) !important;
  backdrop-filter: blur(18px) !important;
}
html[data-theme="bright"] .section-switcher {
  background: rgba(255,255,255,0.96) !important;
  border: 1.5px solid rgba(26,86,196,0.12) !important;
  box-shadow: 0 16px 36px rgba(26,86,196,0.10) !important;
}
.section-switcher::before,
.section-switcher::after {
  display: none !important;
}
.section-tab {
  position: relative;
  z-index: 1;
}
html[data-theme="dark"] .section-tab {
  color: rgba(255,255,255,0.88) !important;
  border-color: rgba(201,168,76,0.22) !important;
  background: rgba(255,255,255,0.02) !important;
}
html[data-theme="dark"] .section-tab.active,
html[data-theme="dark"] .section-tab:hover {
  color: #f7e6a9 !important;
  background: linear-gradient(135deg, rgba(201,168,76,0.14), rgba(201,168,76,0.05)) !important;
}
html[data-theme="bright"] .section-tab {
  color: #274060 !important;
  border-color: rgba(26,86,196,0.12) !important;
  background: rgba(244,246,251,0.92) !important;
}
html[data-theme="bright"] .section-tab.active,
html[data-theme="bright"] .section-tab:hover {
  color: #1a56c4 !important;
  background: #ffffff !important;
}

/* Service cards: remove hazy stripe overlay and improve readability */
.service-card,
.vision-card,
.med-card,
.doctor-card,
.hospital-card,
.clinic-card {
  isolation: isolate;
}
.service-card::before,
.service-card::after,
.vision-card::before,
.vision-card::after {
  opacity: 0 !important;
  display: none !important;
}
html[data-theme="dark"] .service-card {
  background: linear-gradient(180deg, rgba(13,19,37,0.98), rgba(17,22,40,0.96)) !important;
  border: 1.5px solid rgba(201,168,76,0.20) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,0.26) !important;
}
html[data-theme="bright"] .service-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(26,86,196,0.12) !important;
  box-shadow: 0 14px 34px rgba(26,86,196,0.08) !important;
}
.service-card:hover {
  transform: translateY(-6px) !important;
}
.service-card-body,
.service-card-body * {
  position: relative;
  z-index: 1;
}
html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .service-card .service-card-title,
html[data-theme="dark"] .service-card .title {
  color: #ffffff !important;
  text-shadow: none !important;
}
html[data-theme="dark"] .service-card p,
html[data-theme="dark"] .service-card li,
html[data-theme="dark"] .service-card .muted,
html[data-theme="dark"] .service-card .desc,
html[data-theme="dark"] .service-card .service-meta,
html[data-theme="dark"] .service-card .svc-feature {
  color: rgba(239,244,255,0.86) !important;
}
html[data-theme="dark"] .service-card ul li::marker,
html[data-theme="dark"] .service-card .svc-feature i,
html[data-theme="dark"] .service-card .service-card-body ul li i {
  color: #d6b24d !important;
}
html[data-theme="bright"] .service-card h3 {
  color: #0f2747 !important;
}
html[data-theme="bright"] .service-card p,
html[data-theme="bright"] .service-card li,
html[data-theme="bright"] .service-card .svc-feature {
  color: #4f5f77 !important;
}

/* Ensure service buttons look strong and visible */
.service-card button,
.service-card .btn,
.service-card .book-btn,
.service-card .action-btn,
.service-card .primary-btn {
  box-shadow: none !important;
  font-weight: 800 !important;
}
html[data-theme="dark"] .service-card .btn,
html[data-theme="dark"] .service-card button {
  filter: none !important;
}

/* Medicine details modal visibility fix */
.awm-details-overlay {
  background: rgba(8,12,24,0.58) !important;
  backdrop-filter: blur(12px) !important;
}
html[data-theme="bright"] .awm-details-card,
html[data-theme="bright"] .awm-premium-card,
html[data-theme="bright"] .med-modal-box {
  background: linear-gradient(180deg, #fffdf9, #fffaf0) !important;
  border: 2px solid rgba(201,168,76,0.70) !important;
  box-shadow: 0 24px 70px rgba(22,31,56,0.18) !important;
  color: #20324e !important;
}
html[data-theme="bright"] .awm-med-visual-card {
  background: linear-gradient(160deg, #fffef9, #f9f3e5) !important;
  border: 1px solid rgba(201,168,76,0.34) !important;
}
html[data-theme="bright"] .awm-safety-strip {
  background: #f0ebe0 !important;
  color: #31435d !important;
}
html[data-theme="bright"] .awm-kicker {
  color: #b28a2c !important;
  opacity: 1 !important;
}
html[data-theme="bright"] .awm-med-info h2,
html[data-theme="bright"] .awm-med-info #awmMedTitle,
html[data-theme="bright"] .awm-sale-price {
  color: #102847 !important;
}
html[data-theme="bright"] .awm-med-desc,
html[data-theme="bright"] .awm-pin-card p,
html[data-theme="bright"] .awm-benefit small {
  color: #54657c !important;
}
html[data-theme="bright"] .awm-detail-grid > div,
html[data-theme="bright"] .awm-price-box,
html[data-theme="bright"] .awm-pin-card,
html[data-theme="bright"] .awm-benefit {
  background: #ffffff !important;
  border: 1px solid rgba(26,86,196,0.10) !important;
  box-shadow: 0 8px 20px rgba(26,86,196,0.05) !important;
}
html[data-theme="bright"] .awm-detail-grid small,
html[data-theme="bright"] .awm-price-grid small,
html[data-theme="bright"] .awm-pin-card b {
  color: #64748b !important;
}
html[data-theme="bright"] .awm-detail-grid b,
html[data-theme="bright"] .awm-price-grid b,
html[data-theme="bright"] .awm-benefit b,
html[data-theme="bright"] .awm-badge {
  color: #20324e !important;
}
html[data-theme="bright"] .awm-badge.success {
  background: rgba(22,163,74,0.12) !important;
  color: #15803d !important;
}
html[data-theme="bright"] .awm-badge.rx {
  background: rgba(201,168,76,0.18) !important;
  color: #8b6507 !important;
}
html[data-theme="bright"] .awm-pin-row input {
  background: #ffffff !important;
  color: #20324e !important;
  border: 1px solid rgba(26,86,196,0.14) !important;
}
html[data-theme="bright"] .awm-primary {
  background: linear-gradient(135deg, #d6b24d, #e8c95f) !important;
  color: #111628 !important;
}
html[data-theme="bright"] .awm-secondary {
  background: #eef2f8 !important;
  color: #1e4ed8 !important;
  border: 1px solid rgba(26,86,196,0.14) !important;
}
html[data-theme="bright"] .awm-x,
html[data-theme="bright"] .med-modal-close {
  background: #f1f5f9 !important;
  color: #6b7280 !important;
  border: 1px solid rgba(100,116,139,0.20) !important;
}
html[data-theme="bright"] .awm-details-footer {
  background: rgba(255,255,255,0.96) !important;
  border-top: 1px solid rgba(26,86,196,0.10) !important;
}

/* Dark modal polish too */
html[data-theme="dark"] .awm-details-card,
html[data-theme="dark"] .awm-premium-card {
  background: linear-gradient(180deg, #0d1325, #111628) !important;
  border: 1.5px solid rgba(201,168,76,0.24) !important;
}
html[data-theme="dark"] .awm-med-info h2,
html[data-theme="dark"] .awm-detail-grid b,
html[data-theme="dark"] .awm-benefit b {
  color: #ffffff !important;
}
html[data-theme="dark"] .awm-med-desc,
html[data-theme="dark"] .awm-detail-grid small,
html[data-theme="dark"] .awm-price-grid small,
html[data-theme="dark"] .awm-pin-card p,
html[data-theme="dark"] .awm-benefit small {
  color: rgba(229,236,248,0.80) !important;
}
html[data-theme="dark"] .awm-detail-grid > div,
html[data-theme="dark"] .awm-price-box,
html[data-theme="dark"] .awm-pin-card,
html[data-theme="dark"] .awm-benefit {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(201,168,76,0.14) !important;
}

/* Small responsive cleanup */
@media (max-width: 768px) {
  .section-switcher {
    padding: .55rem !important;
  }
  .service-card {
    min-height: auto !important;
  }
  .awm-details-body {
    gap: 1rem !important;
  }
}
