/* ==========================================================================
   Prof. Dr. Arif Riyaz Diabetes & Polyclinic - Master Stylesheet
   Fully Responsive, Mobile-First, Retina-Ready, Zero Overlaps
   ========================================================================== */

:root {
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary-color: #059669;
  --secondary-hover: #047857;
  --secondary-light: #d1fae5;
  --accent-color: #e11d48;
  --accent-hover: #be123c;
  --accent-light: #ffe4e6;
  
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 76px;
  --header-height: 64px;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

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

html {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body.lang-ur, [dir="rtl"] {
  font-family: 'Noto Nastaliq Urdu', 'Gulzar', 'Jameel Noori Nastaleeq', 'Segoe UI', Tahoma, sans-serif;
  direction: rtl;
  text-align: right;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* -------------------------------------------------------------
   Top Announcement Bar
   ------------------------------------------------------------- */
.top-announcement {
  background: var(--dark-bg);
  color: #cbd5e1;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-announcement a {
  color: #f1f5f9;
}

.top-announcement a:hover {
  color: #38bdf8;
}

.top-info-scroll::-webkit-scrollbar {
  display: none;
}
.top-info-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.lang-switch-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.lang-switch-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

/* -------------------------------------------------------------
   Public Navbar
   ------------------------------------------------------------- */
.public-navbar {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1020;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  max-width: 80%;
}

.brand-logo-wrap .brand-img {
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.brand-title-box {
  display: flex;
  flex-direction: column;
}

.brand-title-box .brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.15;
  white-space: nowrap;
}

.brand-title-box .brand-sub {
  font-size: 10px;
  color: var(--secondary-color);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.custom-nav-toggle {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-light);
  border: 1px solid var(--border-color) !important;
}
.custom-nav-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.nav-link-custom {
  font-weight: 600;
  font-size: 13.5px;
  color: #334155 !important;
  padding: 7px 10px !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: block;
  white-space: nowrap;
}

.nav-link-custom:hover, 
.nav-link-custom.active {
  color: var(--primary-color) !important;
  background-color: var(--primary-light);
}

.more-dots-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dropdown-more-menu .dropdown-menu {
  min-width: 260px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color) !important;
}

.dropdown-more-menu .dropdown-item {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  padding: 8px 16px;
  transition: all 0.15s ease;
}

.dropdown-more-menu .dropdown-item:hover,
.dropdown-more-menu .dropdown-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.footer-link {
  color: #ffffff !important;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-link:hover {
  color: #38bdf8 !important;
  transform: translateX(3px);
}

body.lang-ur .footer-link:hover, [dir="rtl"] .footer-link:hover {
  transform: translateX(-3px);
}

.btn-book-nav {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-book-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  color: #ffffff !important;
}

/* Mobile Collapsed Nav Styling */
@media (max-width: 991.98px) {
  .public-navbar .navbar-collapse {
    background: #ffffff;
    padding: 16px 12px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
  }
  .nav-link-custom {
    padding: 10px 14px !important;
    font-size: 15px;
    border-bottom: 1px solid #f1f5f9;
  }
  .nav-link-custom:last-child {
    border-bottom: none;
  }
  .brand-title-box .brand-name {
    font-size: 14.5px;
  }
}

/* -------------------------------------------------------------
   Hero Banner Section
   ------------------------------------------------------------- */
.hero-medical {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0369a1 100%);
  color: #ffffff;
  padding: 60px 0 70px 0;
  overflow: hidden;
}

.hero-medical::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.15), transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 18px;
  word-break: break-word;
}

.hero-p {
  font-size: clamp(15px, 2vw, 18px);
  color: #cbd5e1;
  margin-bottom: 25px;
  line-height: 1.6;
}

.hero-doc-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-doc-card img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
}

/* -------------------------------------------------------------
   Cards, Grid & Section Elements
   ------------------------------------------------------------- */
.section-title-wrap {
  text-align: center;
  margin-bottom: 40px;
}

.section-sub {
  color: var(--secondary-color);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.section-heading {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  color: #0f172a;
}

.section-desc {
  max-width: 650px;
  margin: 10px auto 0 auto;
  color: var(--text-muted);
  font-size: 15px;
}

.med-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.med-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.med-card-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: #f1f5f9;
}

.med-card-img-wrap img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.med-card:hover .med-card-img-wrap img {
  transform: scale(1.03);
}

.med-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.med-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.35;
}

.med-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.med-icon-box {
  width: 50px;
  height: 50px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.med-icon-box.green {
  background: var(--secondary-light);
  color: var(--secondary-color);
}
.med-icon-box.red {
  background: var(--accent-light);
  color: var(--accent-color);
}

/* -------------------------------------------------------------
   Doctor Profile Card
   ------------------------------------------------------------- */
.doctor-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

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

.doctor-img-wrap {
  position: relative;
  background: #0f172a;
  text-align: center;
  padding: 10px;
}

.doctor-img-wrap img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.doctor-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* -------------------------------------------------------------
   Mobile Bottom Navigation Bar (Native App Style)
   ------------------------------------------------------------- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 6px 12px 10px 12px;
  z-index: 1050;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.mobile-nav-tab i {
  font-size: 18px;
  margin-bottom: 2px;
}

.mobile-nav-tab.active {
  color: var(--primary-color);
  font-weight: 700;
}

.mobile-nav-tab.book-tab .book-tab-circle {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -20px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  border: 3px solid #ffffff;
}

.mobile-nav-tab.book-tab .book-tab-circle i {
  font-size: 18px;
  margin-bottom: 0;
}

/* Floating WhatsApp Desktop */
.floating-wa-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 1040;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-wa-btn:hover {
  transform: scale(1.1);
  color: #ffffff;
}

.floating-wa-btn .wa-tooltip {
  position: absolute;
  right: 70px;
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.floating-wa-btn:hover .wa-tooltip {
  opacity: 1;
}

/* -------------------------------------------------------------
   Admin / Doctor / Reception Portals Shared System (AdminLTE)
   ------------------------------------------------------------- */
.admin-wrapper, .portal-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
  overflow-x: hidden;
  width: 100%;
}

.admin-sidebar, .portal-sidebar {
  width: var(--sidebar-width);
  background: #0f172a;
  color: #94a3b8;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 18px 20px;
  background: #090e1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.sidebar-user-panel {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-user-info .user-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-user-info .user-role {
  font-size: 11px;
  margin-top: 2px;
}

.sidebar-menu {
  list-style: none;
  padding: 12px 10px;
  margin: 0;
  flex-grow: 1;
}

.sidebar-header-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  padding: 12px 14px 6px 14px;
  white-space: nowrap;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-bottom: 3px;
  white-space: nowrap;
}

.sidebar-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
  color: #ffffff;
  background: var(--primary-color);
  font-weight: 700;
}

.admin-main, .portal-main {
  flex-grow: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f8fafc;
}

.admin-navbar, .portal-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

.admin-content, .portal-content {
  padding: 24px;
  flex-grow: 1;
}

/* Collapsed Sidebar on Desktop */
body.sidebar-collapsed .admin-sidebar,
body.sidebar-collapsed .portal-sidebar {
  width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-brand .sidebar-brand-title,
body.sidebar-collapsed .sidebar-user-panel .sidebar-user-info,
body.sidebar-collapsed .sidebar-header-label,
body.sidebar-collapsed .sidebar-link span {
  display: none !important;
}

body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .sidebar-user-panel,
body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 12px;
}

body.sidebar-collapsed .sidebar-link i {
  margin: 0 !important;
  font-size: 18px;
}

body.sidebar-collapsed .admin-main,
body.sidebar-collapsed .portal-main {
  margin-left: var(--sidebar-collapsed-width);
}

/* Mobile Portals View (Drawer & Backdrop) */
@media (max-width: 991.98px) {
  .admin-sidebar, .portal-sidebar {
    transform: translateX(-100%);
    width: 270px !important;
  }
  
  body.sidebar-mobile-open .admin-sidebar,
  body.sidebar-mobile-open .portal-sidebar {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }
  
  body.sidebar-mobile-open #sidebarBackdrop {
    display: block !important;
  }
  
  .admin-main, .portal-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  .admin-content, .portal-content {
    padding: 16px 12px;
  }
}

/* -------------------------------------------------------------
   Stat Boxes & CRUD Layouts
   ------------------------------------------------------------- */
.stat-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.crud-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.crud-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
}

.crud-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.crud-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.crud-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #ffffff;
  font-weight: 700;
  color: #0f172a;
}

/* Responsive Table Wrapper */
.table-responsive {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  margin-bottom: 0;
  white-space: nowrap;
}

/* General Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hover-white:hover {
  color: #ffffff !important;
}

/* Spacing above mobile bottom app bar */
@media (max-width: 991.98px) {
  .public-footer {
    padding-bottom: 80px !important;
  }
}


/* 2026 responsive layout and asset reliability fixes */
:root { color-scheme: light; }
html { min-width: 0; }
body, .admin-wrapper, .portal-wrapper { min-width: 0; }
.container, .container-fluid, .row, [class*="col-"] { min-width: 0; }
img { display: inline-block; }
img:not([width]):not([height]) { max-width: 100%; }
.public-navbar .container { min-width: 0; }
.public-navbar .navbar-brand { min-width: 0; margin-right: .75rem; }
.brand-logo-wrap { max-width: min(100%, 460px); min-width: 0; flex-shrink: 1; }
.brand-title-box { min-width: 0; max-width: 100%; }
.brand-title-box .brand-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; max-width: 330px; }
.brand-title-box .brand-sub { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hero-badge { max-width: 100%; white-space: normal; line-height: 1.45; }
.hero-badge span { min-width: 0; overflow-wrap: anywhere; }
.hero-title, .section-heading, .crud-title { overflow-wrap: anywhere; }
.med-card, .doctor-card, .crud-card, .stat-box, .card { min-width: 0; }
.med-card-img-wrap { width: 100%; }
.med-card-img-wrap img { display: block; max-width: 100%; }
iframe { max-width: 100%; border: 0; }
.admin-content .card-body, .portal-content .card-body { min-width: 0; }
.admin-content input, .admin-content select, .admin-content textarea,
.portal-content input, .portal-content select, .portal-content textarea { max-width: 100%; }
.admin-content .table-responsive, .portal-content .table-responsive { max-width: 100%; }
.admin-content .detail-table th, .portal-content .detail-table th { min-width: 120px; }
.admin-navbar .dropdown-toggle, .portal-header .dropdown-toggle { max-width: 100%; min-width: 0; }
.admin-navbar .dropdown-toggle span, .portal-header .dropdown-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-navbar > div, .portal-header > div { min-width: 0; }
.top-announcement .container, .top-announcement .row { min-width: 0; }
/* Tablet landscape needs collapsed nav: clinic name + all primary links cannot fit at 992px. */
@media (max-width: 1199.98px) {
  .public-navbar .navbar-collapse { background: #fff; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-md); margin-top: 12px; max-height: min(68vh, 540px); overflow-y: auto; }
  .public-navbar .nav-link-custom { padding: 11px 14px!important; white-space: normal; }
  .public-navbar .navbar-nav { align-items: stretch!important; }
  .public-navbar .nav-cta-box { margin-left: 0!important; }
  .public-navbar .nav-cta-box .btn-book-nav { width: 100%; justify-content: center; white-space: normal!important; }
  .public-footer { padding-bottom: 88px!important; }
}
@media (max-width: 991.98px) {
  /* Desktop collapse preference must not hide text in the mobile drawer. */
  body.sidebar-collapsed .admin-sidebar .sidebar-brand-title,
  body.sidebar-collapsed .portal-sidebar .sidebar-brand-title,
  body.sidebar-collapsed .admin-sidebar .sidebar-user-info,
  body.sidebar-collapsed .portal-sidebar .sidebar-user-info,
  body.sidebar-collapsed .admin-sidebar .sidebar-header-label,
  body.sidebar-collapsed .portal-sidebar .sidebar-header-label,
  body.sidebar-collapsed .admin-sidebar .sidebar-link span,
  body.sidebar-collapsed .portal-sidebar .sidebar-link span { display: initial!important; }
  body.sidebar-collapsed .admin-sidebar .sidebar-link,
  body.sidebar-collapsed .portal-sidebar .sidebar-link,
  body.sidebar-collapsed .admin-sidebar .sidebar-user-panel,
  body.sidebar-collapsed .portal-sidebar .sidebar-user-panel,
  body.sidebar-collapsed .admin-sidebar .sidebar-brand,
  body.sidebar-collapsed .portal-sidebar .sidebar-brand { justify-content: flex-start; }
  .admin-sidebar, .portal-sidebar { width: min(290px, 85vw)!important; }
  .admin-navbar, .portal-header { padding: 0 12px; gap: 8px; }
  .admin-navbar .dropdown-toggle, .portal-header .dropdown-toggle { max-width: 170px; }
  .admin-content, .portal-content { padding: 16px 12px; }
  .crud-card-header { padding: 14px; }
}
@media (max-width: 575.98px) {
  .brand-logo-wrap .brand-img { height: 39px; max-width: 43px; flex: 0 0 auto; }
  .brand-title-box .brand-name { font-size: 12px; max-width: min(59vw, 226px); line-height: 1.2; }
  .brand-title-box .brand-sub { font-size: 8px; letter-spacing: 0; }
  .public-navbar .navbar-brand { max-width: calc(100% - 56px); }
  .hero-medical { padding: 40px 0 48px; }
  .hero-medical .row { --bs-gutter-y: 1.75rem; }
  .hero-doc-card { padding: 14px; }
  .hero-doc-card img { max-height: 260px; }
  .hero-badge { padding: 7px 10px; font-size: 11px; }
  .med-card { padding: 16px; }
  .med-card-img-wrap img { height: 170px; }
  .doctor-content { padding: 16px; }
  .admin-content, .portal-content { padding: 12px 9px; }
  .crud-header { gap: 10px; }
  .crud-title { font-size: 20px; }
  .stat-box { padding: 14px; }
  .stat-number { font-size: 22px; }
  .admin-navbar .dropdown-toggle, .portal-header .dropdown-toggle { max-width: 132px; }
  .mobile-bottom-nav { padding: 6px 3px calc(8px + env(safe-area-inset-bottom)); gap: 2px; }
  .mobile-nav-tab { min-width: 0; flex: 1 1 20%; font-size: 10px; padding: 4px 1px; }
  .mobile-nav-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 365px) {
  .brand-logo-wrap { gap: 6px; }
  .brand-title-box .brand-name { font-size: 11px; max-width: 50vw; }
  .brand-logo-wrap .brand-img { height: 35px; width: 35px; }
  .admin-navbar .dropdown-toggle, .portal-header .dropdown-toggle { max-width: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; transition-duration: 0.01ms!important; animation-duration: 0.01ms!important; }
}


/* Official clinic photography & no-stock-media refresh 2026-10-15 */
.brand-logo-wrap .brand-img{width:76px;height:76px;max-width:76px;object-fit:contain;flex:0 0 76px;border-radius:50%;background:#fff;filter:drop-shadow(0 3px 7px rgba(8,39,73,.08))}
.brand-logo-wrap{max-width:min(100%,490px);gap:12px}
.brand-title-box{min-width:0}.brand-title-box .brand-name{white-space:normal;font-size:clamp(12px,1.2vw,16px);line-height:1.2}.brand-title-box .brand-sub{white-space:normal;font-size:10px;letter-spacing:.1px;line-height:1.4}
.public-navbar{padding:7px 0}.hero-medical{background:linear-gradient(121deg,#09264b 0%,#0b4975 55%,#087863 100%)}
.hero-doc-card img{object-fit:contain;object-position:center top;background:linear-gradient(150deg,#e2f6ff,#b9e7f5);height:295px;max-height:295px}
.premium-topic-panel{background:linear-gradient(125deg,#07305a,#0a7370);color:#fff;padding:clamp(22px,5vw,56px);display:flex;align-items:center;gap:28px;min-height:235px}
.premium-topic-symbol{width:105px;height:105px;min-width:105px;border-radius:25px;display:grid;place-items:center;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.32);font-size:50px;color:#def9f7}
.premium-topic-label{font-size:11px;letter-spacing:1.5px;font-weight:800;color:#bbf7d0}.premium-topic-heading{font-size:clamp(22px,3vw,36px);font-weight:800;line-height:1.25;margin:9px 0}
.premium-topic-thumbnail{height:185px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:linear-gradient(120deg,#0d3260,#076b76);color:#f8ffff;font-size:11px;letter-spacing:2px;font-weight:700}
.premium-topic-thumbnail i{font-size:61px;color:#7ae1b5}.diagnostic-test-visual{height:96px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;background:linear-gradient(130deg,#e6f4fc,#d8f5ec);color:#0b6684}.diagnostic-test-visual i{font-size:30px}.diagnostic-test-visual span{font-size:8px;letter-spacing:1.2px;font-weight:800}
@media(max-width:1199.98px){.brand-logo-wrap .brand-img{width:64px;height:64px;max-width:64px;flex-basis:64px}.brand-title-box .brand-name{font-size:14px}}
@media(max-width:575.98px){.brand-logo-wrap .brand-img{width:56px;height:56px;max-width:56px;flex-basis:56px}.brand-logo-wrap{gap:8px;max-width:calc(100% - 56px)}.brand-title-box .brand-name{font-size:12px;line-height:1.2}.brand-title-box .brand-sub{font-size:9px}.hero-doc-card img{height:245px;max-height:245px}.premium-topic-panel{flex-direction:column;text-align:center;gap:15px}.premium-topic-symbol{width:84px;height:84px;min-width:84px;font-size:40px}.top-info-scroll{max-width:100%}}

/* Client-source photographic treatment — no generated stock graphics */
.clinic-editorial-section{padding:clamp(26px,5vw,68px) 0;background:linear-gradient(135deg,#effaf7 0%,#f3f9ff 55%,#fff 100%);border-block:1px solid #d9e9ed}
.clinic-editorial-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);align-items:center;gap:clamp(20px,5vw,65px)}
.clinic-editorial-image{min-width:0;position:relative;overflow:hidden;border-radius:24px;border:5px solid white;box-shadow:0 20px 50px rgba(13,52,87,.12);background:#f0f8ff}
.clinic-editorial-image img{display:block;width:100%;height:clamp(230px,27vw,390px);object-fit:contain;background:#f0f8ff}
.clinic-editorial-photo-label{position:absolute;bottom:14px;left:14px;display:inline-block;background:rgba(8,40,75,.88);color:white;border-radius:99px;padding:7px 12px;font-size:11px;max-width:calc(100% - 28px)}
.clinic-editorial-overline{font-weight:800;font-size:11px;color:#087c66;letter-spacing:1.5px;margin-bottom:12px}
.clinic-editorial-content h2{font-size:clamp(26px,3.2vw,44px);font-weight:850;line-height:1.18;letter-spacing:-.5px;color:#12385f;margin-bottom:17px}
.clinic-editorial-content p{color:#506277;font-size:16px;line-height:1.8;max-width:580px}
.clinic-archive-note{background:#f8fbfd;border:1px solid #d9e7f0;border-radius:20px;padding:16px;max-width:750px;margin:auto}
.clinic-archive-portrait{object-fit:contain;background:#f0f8ff;width:102px;height:118px;flex:0 0 102px;border-radius:14px}
.brand-logo-wrap .brand-img{background:#fff;box-shadow:0 0 0 2px rgba(0,133,106,.10)}
.hero-medical{background:linear-gradient(110deg,rgba(5,28,59,.96),rgba(8,52,90,.94),rgba(4,94,79,.93)),url('/uploads/official/clinic-consultation.webp') center/cover no-repeat}
@media(max-width:767.98px){.clinic-editorial-grid{grid-template-columns:1fr}.clinic-editorial-image img{height:260px}.clinic-editorial-content h2{font-size:27px}.clinic-editorial-section{padding:30px 0}}
@media(max-width:575.98px){.clinic-editorial-photo-label{font-size:10px}.clinic-archive-portrait{width:88px;height:100px;flex-basis:88px}}
