/*
 * APC Medical Design System Tokens (Portal Blue)
 */

:root {
  /* Primary Brand Blues */
  --blue-primary:  #1A8EC5; /* Main buttons, active tabs, accents */
  --blue-dark:     #0F6FA0; /* Gradients, secondary CTAs */
  --blue-deeper:   #0A4F75; /* Dark surfaces, brand badges, hero end */
  --blue-light:    #E6F4FB; /* Card backgrounds, tag pills, light surfaces */
  --blue-mid:      #A8D8EF; /* Borders, active indicators, scrollbars */
  --blue-card:     #1379AA; /* Gradient mid-stops */
  
  /* Neutral & Canvas Backgrounds */
  --bg-start:      #D9EEF8;
  --bg-end:        #E8F5FB;
  --white:         #FFFFFF;
  
  /* Typography Colors */
  --text-dark:     #0D2236; /* Headings and primary text */
  --text-mid:      #3A5268; /* Body text, descriptions */
  --text-light:    #7A9CB0; /* Meta info, timestamps, placeholders */
  --border:        #DAEAF4; /* Subtle dividers & card borders */
  
  /* Semantic & Alert Colors */
  --teal-accent:   #17A589; /* Success, confirmed appointments, checkmarks */
  --orange-accent: #E67E22; /* Warnings, pending appointments */
  --red-accent:    #E74C3C; /* Emergency alerts, end call, errors */
  --gold-star:     #F39C12; /* Star ratings only */
  
  /* Radii */
  --radius-sm:     12px;    /* Dropdown items, pills, sub-cards */
  --radius-md:     18px;    /* Action buttons, medium cards */
  --radius-lg:     24px;    /* Doctor cards, service panels */
  --radius-xl:     32px;    /* Hero cards, main modal dialogues */
  
  /* Shadows */
  --shadow-sm:     0 2px 14px rgba(26,142,197,0.09);
  --shadow-md:     0 8px 32px rgba(26,142,197,0.16);
  --shadow-lg:     0 16px 48px rgba(13,34,54,0.12);

  /* Typography */
  --font-heading:  'Cairo', sans-serif;
  --font-body:     'Tajawal', sans-serif;
}

/* Base RTL setup */
body {
  direction: rtl;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: linear-gradient(145deg, var(--bg-start) 0%, var(--bg-end) 100%);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.2;
}

/* Default resets */
*, *::before, *::after {
  box-sizing: border-box;
}

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

    /* ===== DESIGN SYSTEM & TOKENS (Portal Blue Style) ===== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    
    :root {
      /* Primary Colors */
      --blue-primary:  #1A8EC5;
      --blue-dark:     #0F6FA0;
      --blue-deeper:   #0A4F75;
      --blue-light:    #E6F4FB;
      --blue-mid:      #A8D8EF;
      --blue-card:     #1379AA;
      --bg-start:      #D9EEF8;
      --bg-end:        #E8F5FB;
      --white:         #FFFFFF;
      --text-dark:     #0D2236;
      --text-mid:      #3A5268;
      --text-light:    #7A9CB0;
      --border:        #DAEAF4;
      
      /* Status & Accent Colors */
      --teal-accent:   #17A589;
      --orange-accent: #E67E22;
      --red-accent:    #E74C3C;
      --gold-star:     #F39C12;
      
      /* Shadows */
      --shadow-sm:     0 2px 14px rgba(26,142,197,0.09);
      --shadow-md:     0 8px 32px rgba(26,142,197,0.16);
      --shadow-lg:     0 16px 48px rgba(0,0,0,0.10);
      
      /* Radii */
      --radius-sm:     12px;
      --radius-md:     18px;
      --radius-lg:     24px;
      --radius-xl:     32px;
      
      /* Layout Dimensions */
      --sidebar-w:     270px;
      --font:          'Cairo', 'Tajawal', sans-serif;
    }

    html { scroll-behavior: smooth; }
    
    body {
      font-family: var(--font);
      background: linear-gradient(145deg, var(--bg-start) 0%, var(--bg-end) 100%);
      min-height: 100vh;
      color: var(--text-dark);
      direction: rtl;
      overflow-x: hidden;
    }

    /* Custom Scrollbar */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--blue-mid); border-radius: 10px; }

    /* Global Link Resets */
    a {
      text-decoration: none !important;
      color: inherit;
    }
    a:visited {
      color: inherit;
    }

    /* ===== MAIN HEADER & TOP NAVIGATION ===== */
    .main-header {
      position: sticky;
      top: 0;
      z-index: 900;
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
      box-shadow: 0 4px 20px rgba(15, 111, 160, 0.06);
    }

    .header-container {
      max-width: 1320px;
      margin: 0 auto;
      padding: 12px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }
    .brand-logo-wrap {
      display: flex;
      align-items: center;
    }
    .custom-logo-link {
      display: block;
      text-decoration: none;
    }
    .custom-logo-link img {
      max-height: 55px; /* Restrict height so the wide logo doesn't break header */
      width: auto;
      object-fit: contain;
    }

    .brand-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      cursor: pointer;
    }

    .brand-icon {
      width: 46px;
      height: 46px;
      background: linear-gradient(135deg, var(--blue-primary), var(--blue-deeper));
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 14px rgba(26, 142, 197, 0.3);
      flex-shrink: 0;
    }

    .brand-text h1 {
      font-size: 14px;
      font-weight: 900;
      color: var(--text-dark);
      line-height: 1.2;
    }

    .brand-text p {
      font-size: 10px;
      color: var(--text-light);
      font-weight: 600;
    }

    .brand-badge {
      background: var(--blue-light);
      color: var(--blue-dark);
      font-size: 10px;
      font-weight: 800;
      padding: 2px 8px;
      border-radius: 50px;
      border: 1px solid var(--blue-mid);
    }

    /* 6 Pillars Nav Menu */
    .nav-menus-wrapper {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
    }

    .nav-menus-wrapper .nav-menu + .nav-menu {
      margin-top: -8px; /* Pulls the second row closer */
    }

    .nav-menu {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 1fr;
      align-items: center;
      gap: 4px;
      list-style: none;
      margin: 0;
      padding: 0;
    }
    
    .nav-menu > li {
      display: flex;
      justify-content: center;
    }
    .nav-menu > li:first-child {
      justify-content: flex-start;
    }
    .nav-menu > li:last-child {
      justify-content: flex-end;
    }

    .nav-link {
      padding: 10px 16px;
      font-size: 14px;
      font-weight: 700;
      color: var(--text-mid);
      text-decoration: none;
      border-radius: 50px;
      transition: all 0.25s ease;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      position: relative;
    }

    .nav-link:hover {
      color: var(--blue-primary);
      background: var(--blue-light);
    }

    .nav-link.active {
      color: var(--white);
      background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
      box-shadow: 0 4px 14px rgba(26, 142, 197, 0.35);
    }

    /* Mega Menu Dropdown for Services */
    .has-megamenu {
      position: relative;
    }

    .megamenu {
      position: absolute;
      top: 100%;
      right: 50%;
      transform: translateX(50%) translateY(12px);
      width: 720px;
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 24px;
      box-shadow: var(--shadow-lg);
      border: 1px solid var(--border);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      pointer-events: none;
      z-index: 1000;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }

    .megamenu::before {
      content: '';
      position: absolute;
      top: -24px;
      left: 0;
      right: 0;
      height: 24px;
      background: transparent;
    }

    .has-megamenu:hover .megamenu,
    .megamenu.show {
      opacity: 1;
      visibility: visible;
      transform: translateX(50%) translateY(0px);
      pointer-events: auto;
    }

    .mega-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      border-radius: var(--radius-sm);
      text-decoration: none;
      transition: background 0.2s;
      cursor: pointer;
    }

    .mega-item:hover {
      background: var(--blue-light);
    }

    .mega-icon {
      width: 38px;
      height: 38px;
      background: var(--blue-light);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      flex-shrink: 0;
    }

    .mega-item:hover .mega-icon {
      background: var(--blue-primary);
      color: white;
    }

    .mega-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-dark);
    }

    .mega-desc {
      font-size: 11px;
      color: var(--text-light);
      margin-top: 2px;
    }

    /* Header Actions */
    .header-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .btn-portal {
      background: var(--blue-light);
      color: var(--blue-dark);
      border: 1.5px solid var(--blue-mid);
      padding: 9px 18px;
      border-radius: 50px;
      font-weight: 800;
      font-size: 13px;
      font-family: var(--font);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.25s;
    }

    .btn-portal:hover {
      background: var(--blue-mid);
      color: var(--blue-deeper);
      transform: translateY(-2px);
    }

    .btn-portal.active {
      background: var(--blue-deeper);
      color: white;
      border-color: var(--blue-deeper);
    }

    .btn-book-cta {
      background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
      color: white;
      border: none;
      padding: 10px 22px;
      border-radius: 50px;
      font-weight: 800;
      font-size: 13px;
      font-family: var(--font);
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(26, 142, 197, 0.35);
      transition: all 0.25s;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .btn-book-cta:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 22px rgba(26, 142, 197, 0.45);
    }

    .mobile-toggle {
      display: none;
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: var(--text-dark);
      padding: 4px;
    }

    /* ===== CONTENT WRAPPER & PAGE VIEWS ===== */
    .app-container {
      max-width: 1320px;
      margin: 0 auto;
      padding: 28px 24px;
      min-height: calc(100vh - 80px);
    }

    .page-view {
      display: none;
    }

    .page-view.active {
      display: block;
      animation: fadeUp 0.5s ease both;
    }

    /* ===== HERO SECTION ===== */
    .hero-grid {
      display: grid;
      grid-template-columns: 2.8fr 1fr;
      gap: 22px;
      align-items: stretch;
      margin-bottom: 28px;
    }

    .appt-card {
      background: linear-gradient(135deg, #1A8EC5 0%, #0F6FA0 45%, #0A4F75 100%);
      border-radius: var(--radius-xl);
      padding: 36px;
      position: relative;
      overflow: hidden;
      min-height: 270px;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      box-shadow: var(--shadow-md);
    }

    .dot-bg {
      position: absolute;
      inset: 0;
      background-image: radial-gradient(circle, rgba(255,255,255,0.13) 1.5px, transparent 1.5px);
      background-size: 22px 22px;
      pointer-events: none;
    }

    .appt-card::before {
      content: '';
      position: absolute;
      top: -50px;
      left: -50px;
      width: 220px;
      height: 220px;
      background: rgba(255,255,255,0.06);
      border-radius: 50%;
    }

    .hero-doc-badge {
      position: absolute;
      left: 30px;
      bottom: 20px;
      width: 180px;
      height: 220px;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1;
    }

    .hero-doc-avatar {
      width: 140px;
      height: 140px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.15);
      border: 4px solid rgba(255, 255, 255, 0.35);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 72px;
      box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    }

    .appt-tag {
      display: inline-block;
      background: rgba(255,255,255,0.18);
      color: rgba(255,255,255,0.95);
      font-size: 12px;
      font-weight: 700;
      padding: 4px 14px;
      border-radius: 50px;
      backdrop-filter: blur(10px);
      margin-bottom: 10px;
      width: fit-content;
    }

    .appt-name {
      font-size: 32px;
      font-weight: 900;
      color: white;
      line-height: 1.18;
      margin-bottom: 8px;
      position: relative;
      z-index: 1;
    }

    .appt-sub {
      font-size: 14px;
      font-weight: 600;
      color: rgba(255,255,255,0.85);
      margin-bottom: 18px;
      position: relative;
      z-index: 1;
    }

    .appt-details {
      background: rgba(0,0,0,0.22);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-radius: var(--radius-sm);
      padding: 14px 18px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      position: relative;
      z-index: 1;
      max-width: 82%;
    }

    .appt-row {
      display: flex;
      align-items: center;
      gap: 10px;
      color: rgba(255,255,255,0.92);
      font-size: 13px;
      font-weight: 500;
    }

    /* Stats Cards */
    .stats-col {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .stat-card {
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 24px;
      box-shadow: var(--shadow-sm);
      display: flex;
      align-items: center;
      gap: 24px;
      transition: all 0.3s ease;
      cursor: pointer;
      flex: 1;
      border: 1px solid transparent;
    }

    .stat-card:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow-md);
      border-color: var(--blue-mid);
    }

    .stat-icon {
      width: 76px;
      height: 76px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 40px;
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    
    .stat-card > div:not(.stat-icon) {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      text-align: center;
    }

    .si-blue   { 
      background: rgba(26, 142, 197, 0.12); 
      border: 1px solid rgba(26, 142, 197, 0.25);
      box-shadow: 0 8px 24px rgba(26, 142, 197, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.7);
    }
    .si-teal   { 
      background: rgba(23, 165, 137, 0.12); 
      border: 1px solid rgba(23, 165, 137, 0.25);
      box-shadow: 0 8px 24px rgba(23, 165, 137, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.7);
    }
    .si-orange { 
      background: rgba(230, 126, 34, 0.12); 
      border: 1px solid rgba(230, 126, 34, 0.25);
      box-shadow: 0 8px 24px rgba(230, 126, 34, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.7);
    }

    .stat-card h3 { font-size: 38px; font-weight: 900; color: var(--text-dark); line-height: 1; margin-bottom: 6px; }
    .stat-card p  { font-size: 13px; color: var(--text-light); margin-top: 0; font-weight: 700; }

    /* ===== QUICK ACTIONS ===== */
    .qa-sec { margin-bottom: 28px; }
    .sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
    .sec-title { font-size: 20px; font-weight: 800; color: var(--text-dark); }
    .see-all {
      font-size: 13px;
      font-weight: 700;
      color: var(--blue-primary);
      cursor: pointer;
      background: none;
      border: none;
      font-family: var(--font);
      padding: 6px 14px;
      border-radius: 50px;
      transition: background 0.2s;
    }
    .see-all:hover { background: var(--blue-light); }

    .qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
    .qa-btn {
      background: var(--white);
      border-radius: var(--radius-md);
      padding: 22px 16px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      border: none;
      box-shadow: var(--shadow-sm);
      transition: all 0.3s ease;
      font-family: var(--font);
    }
    .qa-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
    .qa-icon {
      width: 52px; height: 52px; 
      background: rgba(15, 111, 160, 0.06);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.8);
      box-shadow: 0 4px 15px rgba(15, 111, 160, 0.05), inset 0 2px 4px rgba(255, 255, 255, 0.9);
      border-radius: 16px; display: flex; align-items: center;
      justify-content: center; transition: all 0.3s; font-size: 24px;
    }
    .qa-btn:hover .qa-icon { 
      background: rgba(15, 111, 160, 0.12); 
      border-color: rgba(15, 111, 160, 0.3);
      box-shadow: 0 6px 20px rgba(15, 111, 160, 0.1), inset 0 2px 4px rgba(255, 255, 255, 0.9);
    }
    .qa-btn span { font-size: 13px; font-weight: 700; color: var(--text-dark); }

    /* ===== INSURANCE PARTNERS STRIP ===== */
    .partners-grid {
      display: grid;
      grid-template-columns: repeat(var(--partner-cols, 5), 1fr);
      gap: 14px;
    }
    .partner-card {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      background: white;
      border: 2px solid var(--blue-light);
      border-radius: var(--radius-md);
      padding: 0; 
      text-decoration: none;
      transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
      aspect-ratio: 4 / 3;
    }
    .partner-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-md);
      border-color: var(--blue-primary);
    }
    .partner-img-wrapper {
      position: absolute;
      inset: 0;
      border-radius: calc(var(--radius-md) - 2px);
      overflow: visible; /* allow bubble to pop out */
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .partner-img-wrapper img {
      max-width: 85%;
      max-height: 85%;
      object-fit: contain;
    }
    .partner-name-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0.9);
      background: var(--blue-light);
      color: var(--blue-primary);
      border: 2px solid var(--blue-primary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 15px;
      opacity: 0;
      transition: all 0.3s ease;
      text-align: center;
      padding: 8px 16px;
      border-radius: 50px;
      white-space: nowrap;
      pointer-events: none;
      box-shadow: var(--shadow-sm);
    }
    .partner-card:hover .partner-name-overlay {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }

    /* ===== SERVICES STRIP & GRID ===== */
    .services-strip {
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 24px;
      box-shadow: var(--shadow-sm);
      margin-bottom: 28px;
    }
    .services-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
    .service-card-item {
      background: var(--blue-light);
      border-radius: var(--radius-md);
      padding: 20px 14px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      transition: all 0.3s;
      text-align: center;
      border: 1.5px solid transparent;
      text-decoration: none;
    }
    .service-card-item:hover {
      background: var(--blue-primary);
      border-color: var(--blue-primary);
      transform: translateY(-4px);
      box-shadow: var(--shadow-md);
    }
    .service-card-item:hover .svc-title { color: white; }
    .service-card-item:hover .svc-desc { color: rgba(255,255,255,0.85); }
    .svc-icon {
      width: 50px; height: 50px; 
      background: rgba(255, 255, 255, 0.4);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.7);
      box-shadow: 0 4px 15px rgba(15, 111, 160, 0.06), inset 0 2px 4px rgba(255, 255, 255, 0.8);
      border-radius: 16px; display: flex; align-items: center;
      justify-content: center; font-size: 24px;
      transition: all 0.3s;
    }
    .svc-title { font-size: 13px; font-weight: 800; color: var(--text-dark); line-height: 1.3; }
    .svc-desc { font-size: 11px; color: var(--text-light); margin-top: 2px; }

    /* ===== DOCTORS SECTION & FILTER TABS ===== */
    .doctors-sec {
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 24px;
      box-shadow: var(--shadow-sm);
      margin-bottom: 28px;
    }
    .doctor-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }
    .filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
    .f-tab {
      padding: 8px 18px; border-radius: 50px; font-size: 13px; font-weight: 700;
      cursor: pointer; border: 1.5px solid var(--border);
      background: transparent; color: var(--text-mid);
      font-family: var(--font); transition: all 0.25s;
      display: flex; align-items: center; gap: 6px;
    }
    .f-tab .cnt {
      background: var(--blue-primary); color: white;
      font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 50px;
    }
    .f-tab.active { background: var(--text-dark); border-color: var(--text-dark); color: white; }
    .f-tab.active .cnt { background: rgba(255,255,255,0.25); }
    .f-tab:not(.active):hover { border-color: var(--blue-primary); color: var(--blue-primary); }

    .doc-search-box {
      position: relative;
      min-width: 280px;
    }
    .doc-search-box input {
      width: 100%;
      padding: 10px 42px 10px 16px;
      border: 1.5px solid var(--border);
      border-radius: 50px;
      font-family: var(--font);
      font-size: 13px;
      outline: none;
      transition: all 0.25s;
    }
    .doc-search-box input:focus {
      border-color: var(--blue-primary);
      box-shadow: 0 0 0 3px rgba(26,142,197,0.15);
    }
    .doc-search-box .s-icon {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-light);
      pointer-events: none;
    }

    .doctors-grid {
      display: grid;
      grid-template-columns: repeat(var(--doc-grid-cols, 3), 1fr);
      gap: 16px;
    }

    /* New Doctor Card Design (Archive) */
    .doc-card-archive {
      display: flex;
      flex-direction: column;
      background: var(--white);
      border-radius: var(--radius-md);
      border: 1.5px solid var(--border);
      overflow: hidden;
      transition: all 0.3s ease;
      position: relative;
    }
    .doc-card-archive:hover {
      border-color: var(--blue-primary);
      box-shadow: var(--shadow-md);
      transform: translateY(-3px);
    }
    
    .doc-photo-wrapper {
      position: relative;
      width: 100%;
      aspect-ratio: 1 / 1;
      background: var(--bg-alt);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .doc-photo-wrapper img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    .doc-hover-overlay {
      position: absolute;
      inset: 0;
      background: rgba(13, 34, 54, 0.85); /* Brand dark blue, transparent */
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 16px;
      opacity: 0;
      transition: opacity 0.3s ease;
      backdrop-filter: blur(2px);
    }
    .doc-card-archive:hover .doc-hover-overlay {
      opacity: 1;
    }
    
    .doc-actions {
      display: flex;
      gap: 10px;
    }
    .doc-actions .action-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--white);
      color: var(--blue-primary);
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      transition: all 0.3s ease;
      cursor: pointer;
      transform: translateY(15px);
      opacity: 0;
      position: relative;
    }
    .doc-card-archive:hover .doc-actions .action-btn {
      transform: translateY(0);
      opacity: 1;
    }
    .doc-card-archive:hover .doc-actions .action-btn:nth-child(1) { transition-delay: 0.05s; }
    .doc-card-archive:hover .doc-actions .action-btn:nth-child(2) { transition-delay: 0.1s; }
    .doc-card-archive:hover .doc-actions .action-btn:nth-child(3) { transition-delay: 0.15s; }
    
    .doc-actions .action-btn:hover {
      background: #4facfe; /* Lighter blue */
      color: var(--white);
      transform: scale(1.1);
    }

    /* Tooltip Bubble */
    .doc-actions .action-btn::before {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 15px);
      left: 50%;
      transform: translateX(-50%) translateY(5px);
      background: #eef7fb; /* Very soft blue */
      color: var(--blue-dark);
      font-size: 14px;
      font-weight: 800;
      padding: 8px 18px;
      border-radius: 50px; /* Pill shape */
      border: 2px solid #9dcbe4; /* Light blue border */
      white-space: nowrap;
      opacity: 0;
      visibility: hidden;
      transition: all 0.2s ease;
      font-family: var(--font);
      pointer-events: none;
      box-shadow: 0 4px 12px rgba(10, 79, 117, 0.1);
    }
    .doc-actions .action-btn:hover::before {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }
    
    .doc-hover-rating {
      display: flex;
      gap: 4px;
      transform: translateY(15px);
      opacity: 0;
      transition: all 0.3s ease 0.2s;
    }
    .doc-card-archive:hover .doc-hover-rating {
      transform: translateY(0);
      opacity: 1;
    }
    .doc-hover-rating .star {
      font-size: 16px;
      color: rgba(255, 255, 255, 0.3);
      cursor: pointer;
      transition: color 0.2s ease;
    }
    .doc-hover-rating .star.filled {
      color: #ffb800; /* Gold */
    }
    .doc-hover-rating .star.hover-active {
      color: #ffd700; /* Bright gold on hover */
    }
    
    .doc-info-bottom {
      padding: 16px;
      text-align: center;
    }
    .doc-info-bottom h3 {
      font-size: 16px;
      font-weight: 800;
      color: var(--text-dark);
      margin-bottom: 4px;
    }
    .doc-info-bottom h3 a {
      color: inherit;
      text-decoration: none;
    }
    .doc-info-bottom h3 a:hover {
      color: var(--blue-primary);
    }
    .doc-info-bottom .doc-spec {
      font-size: 13px;
      color: var(--text-light);
      font-weight: 600;
      margin: 0;
    }

    /* Original Doctor Card Design (Front Page) */
    .doc-card {
      display: flex; align-items: center; gap: 15px;
      padding: 12px 16px; border-radius: var(--radius-md);
      border: 1.5px solid var(--border);
      background: var(--white);
      transition: all 0.3s; cursor: pointer;
      min-width: 0;
    }
    .doc-card:hover { border-color: var(--blue-primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
    .doc-avatar {
      width: 64px; height: 64px; border-radius: 18px;
      flex-shrink: 0; background: var(--blue-light);
      display: flex; align-items: center; justify-content: center; font-size: 32px;
      border: 1px solid var(--blue-mid);
      overflow: hidden;
    }
    .doc-avatar-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .doc-info { flex: 1; min-width: 0; }
    .doc-info h3 { font-size: 15px; font-weight: 800; color: var(--text-dark); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .doc-spec { font-size: 12px; color: var(--text-light); margin-bottom: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .doc-meta { display: flex; align-items: center; gap: 12px; }
    .doc-price { font-size: 12px; font-weight: 800; color: var(--blue-primary); }
    .doc-rating { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-mid); }

    .doc-actions-col {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex-shrink: 0;
    }
    .action-circle-btn {
      width: 32px; height: 32px;
      background: #fff;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      border: 1px solid var(--border);
      box-shadow: 0 2px 6px rgba(0,0,0,0.05);
      color: var(--blue-primary);
      font-size: 14px;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    .action-circle-btn:hover {
      transform: scale(1.1) translateY(-2px);
      box-shadow: 0 4px 12px rgba(26,142,197,0.2);
      border-color: var(--blue-mid);
      color: var(--blue-dark);
    }

    /* ===== CONTENT GRID (DOCTORS + SUMMARY / TIPS) ===== */
    .content-grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; margin-bottom: 28px; }

    /* Summary Panel */
    .summary-panel {
      background: var(--white); border-radius: var(--radius-lg);
      padding: 24px; box-shadow: var(--shadow-sm);
    }
    .sum-doc-card {
      background: var(--blue-light); border-radius: var(--radius-md);
      padding: 16px; display: flex; align-items: center;
      gap: 14px; margin-bottom: 20px;
    }
    .sum-doc-avatar {
      width: 56px; height: 56px; border-radius: 14px;
      background: var(--white); display: flex; align-items: center; justify-content: center;
      font-size: 28px; flex-shrink: 0; box-shadow: var(--shadow-sm);
    }
    .sum-doc-card h4 { font-size: 14px; font-weight: 800; color: var(--text-dark); }
    .sum-doc-card .spec { font-size: 12px; color: var(--text-light); margin: 2px 0 6px 0; font-weight: 600; }
    .time-badge {
      display: inline-flex; align-items: center; gap: 5px;
      background: var(--blue-mid); color: var(--blue-deeper);
      font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 50px;
    }
    .diag-sec { margin-bottom: 18px; }
    .diag-sec h4 {
      display: flex; align-items: center; gap: 8px;
      font-size: 14px; font-weight: 800; color: var(--text-dark); margin-bottom: 8px;
    }
    .sdot { width: 10px; height: 10px; background: var(--blue-primary); border-radius: 50%; display: inline-block; }
    .diag-sec p { font-size: 13px; color: var(--text-mid); line-height: 1.7; font-weight: 500; }
    .rx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
    .rx-item { background: var(--blue-light); border-radius: var(--radius-sm); padding: 12px; }
    .rx-name { font-size: 11px; color: var(--text-light); margin-bottom: 4px; font-weight: 600; }
    .rx-dose { font-size: 13px; font-weight: 800; color: var(--text-dark); line-height: 1.3; }
    .wave-div {
      height: 12px; margin-top: 12px;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 14'%3E%3Cpath d='M0 7 Q12.5 0 25 7 Q37.5 14 50 7 Q62.5 0 75 7 Q87.5 14 100 7 L100 14 L0 14 Z' fill='%23A8D8EF'/%3E%3C/svg%3E") repeat-x;
      background-size: 100px 12px;
    }
    .sum-actions {
      display: flex; gap: 10px; margin-top: 16px;
      padding-top: 14px; border-top: 1px solid var(--border);
    }
    .action-btn {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; gap: 6px; padding: 12px;
      border-radius: var(--radius-sm); border: none;
      background: transparent; cursor: pointer;
      font-family: var(--font); font-size: 12px; font-weight: 700;
      color: var(--text-mid); transition: all 0.25s;
    }
    .action-btn:hover { background: var(--blue-light); color: var(--blue-primary); }
    .ab-icon {
      width: 36px; height: 36px; background: var(--blue-light);
      border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px;
    }

    /* ===== TIPS & CONTENT CARDS ===== */
    .tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
    .tip-card {
      background: var(--white); border-radius: var(--radius-lg);
      overflow: hidden; box-shadow: var(--shadow-sm);
      transition: all 0.3s; cursor: pointer; border: 1px solid transparent;
      display: flex; flex-direction: column;
    }
    .tip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-mid); }
    .tip-banner {
      width: 100%; height: 140px;
      background: linear-gradient(135deg, var(--blue-primary), var(--blue-deeper));
      display: flex; align-items: center; justify-content: center;
      color: white; font-size: 42px; position: relative;
    }
    .tip-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
    .tip-tag {
      display: inline-block; font-size: 11px; font-weight: 800;
      padding: 4px 12px; border-radius: 50px; margin-bottom: 10px; width: fit-content;
    }
    .tag-article { background: var(--blue-light); color: var(--blue-dark); }
    .tag-tips    { background: #E8F8F5; color: #17A589; }
    .tag-news    { background: #FFF3E0; color: #E65100; }
    .tip-body h3 { font-size: 15px; font-weight: 800; color: var(--text-dark); margin-bottom: 8px; line-height: 1.4; }
    .tip-body p  { font-size: 12px; color: var(--text-light); line-height: 1.65; margin-bottom: 14px; flex: 1; }
    .tip-meta    { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-light); font-weight: 600; border-top: 1px solid var(--border); padding-top: 10px; }

    /* ===== PATIENT PORTAL (MY APC) SPECIFIC STYLES ===== */
    .portal-layout {
      display: flex;
      gap: 24px;
      min-height: calc(100vh - 120px);
    }

    .portal-sidebar {
      width: var(--sidebar-w);
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 20px 16px;
      box-shadow: var(--shadow-sm);
      display: flex;
      flex-direction: column;
      gap: 16px;
      flex-shrink: 0;
    }

    .portal-sidebar-logo {
      background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-deeper) 100%);
      padding: 18px;
      border-radius: var(--radius-md);
      display: flex; align-items: center; gap: 12px;
    }

    .portal-sidebar-logo .logo-icon {
      width: 44px; height: 44px;
      background: rgba(255,255,255,0.2);
      border: 2px solid rgba(255,255,255,0.4);
      border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      color: white; font-weight: 900; font-size: 20px;
    }

    .portal-sidebar-logo h2 { font-size: 13px; font-weight: 900; color: white; line-height: 1.2; }
    .portal-sidebar-logo p { font-size: 10px; color: rgba(255,255,255,0.8); }

    .portal-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
    .portal-nav-label { font-size: 10px; font-weight: 800; color: var(--text-light); padding: 8px 10px 4px 10px; letter-spacing: 0.05em; text-transform: uppercase; }
    .portal-nav-item {
      display: flex; align-items: center; gap: 12px;
      padding: 11px 14px; border-radius: var(--radius-sm);
      cursor: pointer; transition: all 0.25s;
      color: var(--text-mid); font-size: 13px; font-weight: 600;
      text-decoration: none;
    }
    .portal-nav-item:hover { background: var(--blue-light); color: var(--blue-primary); }
    .portal-nav-item.active {
      background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
      color: white;
      box-shadow: 0 4px 16px rgba(26,142,197,0.35);
    }

    .user-mini {
      display: flex; align-items: center; gap: 12px;
      padding: 12px; border-radius: var(--radius-sm);
      background: var(--blue-light);
      margin-top: auto;
    }
    .user-avatar {
      width: 42px; height: 42px; border-radius: 50%;
      background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
      display: flex; align-items: center; justify-content: center;
      color: white; font-weight: 800; font-size: 16px; flex-shrink: 0;
    }
    .user-mini h4 { font-size: 13px; font-weight: 800; color: var(--text-dark); }
    .user-mini p  { font-size: 11px; color: var(--text-light); font-weight: 600; }

    .portal-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 22px;
    }

    /* Topbar search & user greeting */
    .portal-topbar {
      display: flex; align-items: center; gap: 16px;
    }
    .greeting { font-size: 14px; color: var(--text-mid); white-space: nowrap; }
    .greeting strong { color: var(--text-dark); font-weight: 900; }
    
    .topbar-search {
      flex: 1; max-width: 480px; position: relative; margin-right: auto;
    }
    .topbar-search input {
      width: 100%; padding: 12px 46px 12px 20px;
      border: none; border-radius: 50px;
      background: var(--white); font-family: var(--font);
      font-size: 13px; color: var(--text-dark);
      box-shadow: var(--shadow-sm); outline: none; direction: rtl;
    }
    .topbar-search .si { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-light); }

    .hbtns { display: flex; gap: 10px; }
    .icon-btn {
      width: 44px; height: 44px; border-radius: 50%;
      background: var(--white); border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      box-shadow: var(--shadow-sm); transition: all 0.25s; position: relative; font-size: 18px;
    }
    .icon-btn:hover { background: var(--blue-light); transform: translateY(-2px); }
    .notif-dot {
      position: absolute; top: 8px; right: 8px;
      width: 8px; height: 8px; background: var(--red-accent);
      border-radius: 50%; border: 2px solid white;
    }

    /* Right column in portal layout (Upcoming & Video Call) */
    .portal-right-col { display: flex; flex-direction: column; gap: 20px; }

    .upcoming-sec {
      background: var(--white); border-radius: var(--radius-lg);
      padding: 22px; box-shadow: var(--shadow-sm);
    }
    .upcoming-item {
      display: flex; align-items: center; gap: 14px;
      padding: 12px 0; border-bottom: 1px solid var(--border);
    }
    .upcoming-item:last-child { border-bottom: none; padding-bottom: 0; }
    .udate {
      background: var(--blue-light); border-radius: var(--radius-sm);
      padding: 10px 14px; text-align: center; min-width: 54px; flex-shrink: 0;
    }
    .udate .day { font-size: 18px; font-weight: 900; color: var(--blue-dark); line-height: 1; }
    .udate .mon { font-size: 10px; font-weight: 700; color: var(--text-light); margin-top: 2px; }
    .uinfo { flex: 1; }
    .uinfo h4 { font-size: 13px; font-weight: 800; color: var(--text-dark); margin-bottom: 3px; }
    .uinfo p  { font-size: 11px; color: var(--text-light); font-weight: 600; }
    .ustatus { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 50px; }
    .confirmed { background: var(--blue-light); color: var(--blue-dark); }
    .pending   { background: #FFF3E0; color: #E65100; }

    /* Video Call Card */
    .video-card {
      background: linear-gradient(135deg, #0D2236, #1A3A5C);
      border-radius: var(--radius-lg); padding: 22px;
      position: relative; overflow: hidden;
      display: flex; flex-direction: column; gap: 14px;
      box-shadow: var(--shadow-md);
    }
    .vid-hdr { display: flex; align-items: center; justify-content: space-between; }
    .vid-hdr h3 { font-size: 16px; font-weight: 800; color: white; }
    .live-badge {
      display: flex; align-items: center; gap: 6px;
      background: rgba(168,216,239,0.18);
      border: 1px solid rgba(168,216,239,0.4);
      color: var(--blue-mid); font-size: 11px; font-weight: 800;
      padding: 4px 12px; border-radius: 50px;
    }
    .live-dot { width: 6px; height: 6px; background: var(--blue-mid); border-radius: 50%; animation: pulse 1.5s infinite; }

    .vid-doc { display: flex; align-items: center; gap: 14px; }
    .vid-doc-img {
      width: 54px; height: 54px; border-radius: 50%;
      background: rgba(255,255,255,0.15); border: 2px solid rgba(26,142,197,0.6);
      display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0;
    }
    .vid-doc h4 { font-size: 15px; font-weight: 800; color: white; }
    .vid-doc p  { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 2px; }

    .call-timer { font-size: 26px; font-weight: 900; color: white; letter-spacing: 0.05em; text-align: center; }
    .call-ctrls { display: flex; gap: 12px; justify-content: center; }
    .ctrl-btn {
      width: 46px; height: 46px; border-radius: 50%; border: none;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: all 0.25s; background: rgba(255,255,255,0.12); color: white; font-size: 18px;
    }
    .ctrl-btn:hover { transform: scale(1.08); background: rgba(255,255,255,0.22); }
    .ctrl-btn.end { background: var(--red-accent); }
    .ctrl-btn.end:hover { background: #c0392b; }

    @keyframes auroraMove1 {
      0% { transform: translate(-10%, -10%) scale(1) rotate(0deg); }
      50% { transform: translate(10%, 10%) scale(1.5) rotate(180deg); }
      100% { transform: translate(-10%, -10%) scale(1) rotate(360deg); }
    }
    @keyframes auroraMove2 {
      0% { transform: translate(10%, 10%) scale(1) rotate(0deg); }
      50% { transform: translate(-10%, -10%) scale(1.5) rotate(-180deg); }
      100% { transform: translate(10%, 10%) scale(1) rotate(-360deg); }
    }
    @keyframes shineSweep {
      0% { left: -50%; opacity: 0; }
      50% { opacity: 1; }
      100% { left: 150%; opacity: 0; }
    }

    /* ===== UNIFIED BOTTOM CONTACT BAR ===== */
    .contact-bar {
      background-color: var(--blue-dark);
      border-radius: 0 0 var(--radius-lg) var(--radius-lg); 
      padding: 16px 32px;
      display: flex; align-items: center; justify-content: space-between;
      gap: 20px; color: white; margin: 0 auto 28px; max-width: 1320px;
      box-shadow: inset 0 2px 15px rgba(255,255,255,0.2), inset 0 -2px 10px rgba(0,0,0,0.1), 0 10px 24px rgba(15,111,160,0.15);
      flex-wrap: wrap;
      position: relative;
      z-index: 90;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.1);
    }
    
    .contact-bar > *:not(.aurora-bg) {
      position: relative;
      z-index: 2;
    }

    .aurora-bg {
      position: absolute;
      inset: 0;
      z-index: 0;
      overflow: hidden;
      pointer-events: none;
    }

    .aurora-bg::before,
    .aurora-bg::after {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      pointer-events: none;
    }

    .aurora-bg::before {
      background: radial-gradient(ellipse at 50% 50%, rgba(26, 142, 197, 0.9) 0%, rgba(26, 142, 197, 0) 70%);
      animation: auroraMove1 15s ease-in-out infinite alternate;
      opacity: 1;
    }

    .aurora-bg::after {
      background: radial-gradient(ellipse at 30% 70%, rgba(43, 195, 255, 0.7) 0%, rgba(43, 195, 255, 0) 75%);
      animation: auroraMove2 20s ease-in-out infinite alternate-reverse;
      opacity: 0.8;
    }
    .contact-bar::before {
      content: '';
      position: absolute;
      top: 0; left: -50%;
      width: 40%;
      height: 100%;
      background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
      transform: skewX(-25deg);
      pointer-events: none;
      z-index: 1;
      opacity: 0;
    }
    .contact-bar:hover::before {
      animation: shineSweep 1.2s ease-in-out;
    }
    .contact-bar .info { display: flex; align-items: center; gap: 14px; }
    .contact-bar .ci-icon {
      width: 44px; height: 44px; 
      background: rgba(255,255,255,0.1);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(255,255,255,0.05);
      border-radius: 14px; display: flex; align-items: center; justify-content: center;
      font-size: 20px; flex-shrink: 0;
      box-shadow: inset 0 2px 4px rgba(255,255,255,0.05);
      transition: all 0.3s;
    }
    .contact-bar .ci-icon:hover {
      background: rgba(255,255,255,0.18);
    }
    .contact-bar h4 { font-size: 12px; color: rgba(255,255,255,0.8); font-weight: 600; }
    .contact-bar p  { font-size: 15px; color: white; font-weight: 800; }
    .social-icons {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .social-icon {
      width: 44px; height: 44px;
      background: rgba(255,255,255,0.1);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(255,255,255,0.05);
      border-radius: 50%; display: flex; align-items: center; justify-content: center;
      color: white; flex-shrink: 0;
      box-shadow: inset 0 2px 4px rgba(255,255,255,0.05);
      transition: all 0.3s;
      text-decoration: none;
    }
    .social-icon:hover {
      background: rgba(255,255,255,0.25);
      transform: translateY(-2px);
    }

    /* FOOTER */
    footer {
      background: var(--text-dark);
      color: rgba(255,255,255,0.7);
      padding: 40px 24px 20px 24px;
      margin-top: 40px;
    }
    .footer-grid {
      max-width: 1320px; margin: 0 auto;
      display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 30px;
      margin-bottom: 30px;
    }
    .footer-col h3 { color: white; font-size: 15px; font-weight: 800; margin-bottom: 16px; }
    .footer-col p { font-size: 12px; line-height: 1.8; }
    .footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
    .footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 12px; font-weight: 600; transition: color 0.2s; cursor: pointer; }
    .footer-links a:hover { color: var(--blue-mid); }
    .footer-bottom {
      max-width: 1320px; margin: 0 auto;
      border-top: 1px solid rgba(255,255,255,0.1);
      padding-top: 20px; display: flex; align-items: center; justify-content: space-between;
      font-size: 11px; font-weight: 600;
    }

    /* ===== FOOTER OFFERS SLIDER ===== */
    .offers-slider {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: calc((100% - (14px * (var(--offer-cols) - 1))) / var(--offer-cols));
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      gap: 14px;
      padding-bottom: 10px;
      scrollbar-width: thin;
      scrollbar-color: var(--blue-mid) transparent;
    }
    .offers-slider::-webkit-scrollbar { height: 6px; }
    .offers-slider::-webkit-scrollbar-track { background: transparent; }
    .offers-slider::-webkit-scrollbar-thumb { background: var(--blue-mid); border-radius: 10px; }
    
    .offer-item {
      scroll-snap-align: start;
      border-radius: var(--radius-md);
      overflow: hidden;
      display: block;
      position: relative;
      background: var(--blue-light);
    }
    .offer-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      aspect-ratio: 3/2;
      transition: transform 0.3s ease;
    }
    a.offer-item:hover img {
      transform: scale(1.05);
    }
    
    /* ===== FLOATING WHATSAPP ===== */
    .float-notif {
      position: fixed; bottom: 28px; left: 32px;
      background: white; border-radius: var(--radius-md);
      padding: 16px 20px; box-shadow: var(--shadow-lg);
      display: flex; align-items: center; gap: 14px;
      z-index: 999; border-right: 4px solid var(--blue-primary);
      max-width: 380px;
      animation: slideUp 0.5s 1s both ease;
    }
    @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
    .fn-icon {
      width: 42px; height: 42px; background: var(--blue-light);
      border-radius: 12px; display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; font-size: 20px; animation: pulse 2s infinite;
    }
    .fn-text h5 { font-size: 13px; font-weight: 800; color: var(--text-dark); }
    .fn-text p  { font-size: 11px; color: var(--text-light); margin-top: 2px; font-weight: 600; }
    .fn-close {
      position: absolute; top: 8px; left: 8px;
      width: 22px; height: 22px; background: none; border: none;
      cursor: pointer; color: var(--text-light); font-size: 14px;
      display: flex; align-items: center; justify-content: center; border-radius: 50%;
    }
    .fn-close:hover { background: var(--border); }

    /* ===== MODAL SYSTEM ===== */
    .modal-overlay {
      position: fixed; inset: 0;
      background: rgba(13, 34, 54, 0.6);
      backdrop-filter: blur(6px);
      z-index: 2000;
      display: flex; align-items: center; justify-content: center;
      padding: 20px;
      opacity: 0; visibility: hidden; transition: all 0.3s;
    }
    .modal-overlay.active { opacity: 1; visibility: visible; }
    .modal-card {
      background: white; border-radius: var(--radius-xl);
      padding: 32px; width: 100%; max-width: 520px;
      box-shadow: var(--shadow-lg); position: relative;
      transform: scale(0.95); transition: transform 0.3s;
    }
    .modal-overlay.active .modal-card { transform: scale(1); }
    .modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
    .modal-header h3 { font-size: 18px; font-weight: 800; color: var(--text-dark); }
    .modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light); }
    
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
    .form-group input, .form-group select, .form-group textarea {
      width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
      border-radius: var(--radius-sm); font-family: var(--font); font-size: 13px;
      outline: none; transition: border 0.25s;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
      border-color: var(--blue-primary);
    }
    .btn-submit {
      width: 100%; padding: 14px; background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
      color: white; border: none; border-radius: 50px; font-weight: 800; font-size: 14px;
      cursor: pointer; font-family: var(--font); box-shadow: 0 4px 16px rgba(26,142,197,0.3);
      transition: all 0.25s;
    }
    .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(26,142,197,0.4); }

    /* ===== ANIMATIONS ===== */
    @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
    @keyframes slideR { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
    @keyframes pulse  { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.4); } }
    
    .fade-up { animation: fadeUp 0.6s ease both; }
    .slide-r { animation: slideR 0.6s ease both; }

    /* SLIDER TEXT ANIMATIONS */
    .hero-slide .slide-anim-1,
    .hero-slide .slide-anim-2,
    .hero-slide .slide-anim-3,
    .hero-slide .slide-anim-4 {
      opacity: 0;
      transform: translateY(20px);
      transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }
    
    .hero-slide.active .slide-anim-1 { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
    .hero-slide.active .slide-anim-2 { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
    .hero-slide.active .slide-anim-3 { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
    .hero-slide.active .slide-anim-4 { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }

    /* SLIDER BACKGROUND ZOOM (Ken Burns Effect) */
    @keyframes kenBurns {
      0% { transform: scale(1); }
      100% { transform: scale(1.1); }
    }
    .hero-slide .slide-bg {
      transform: scale(1);
    }
    .hero-slide.active .slide-bg {
      animation: kenBurns 12s linear forwards;
    }

    .hero-arrow:hover { background: white !important; color: var(--blue-primary) !important; transform: translateY(-50%) scale(1.1) !important; }

    /* Floating WhatsApp Button */
    .float-wa-btn {
      position: fixed; bottom: 28px; right: 32px; width: 60px; height: 60px;
      background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
      color: white !important; border-radius: 50%; display: flex; align-items: center; justify-content: center;
      font-size: 34px; box-shadow: 0 4px 14px rgba(26,142,197,0.4); z-index: 9999;
      transition: transform 0.3s ease; text-decoration: none;
    }
    .float-wa-btn i { color: white !important; }
    .float-wa-btn:hover { transform: scale(1.1); color: white !important; }

    /* ===== RESPONSIVE BREAKPOINTS ===== */
    @media (max-width: 1024px) {
      .hero-grid, .content-grid-2 { grid-template-columns: 1fr; }
      .stats-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
      .doctors-grid { grid-template-columns: repeat(2, 1fr); }
      .services-grid { grid-template-columns: repeat(3, 1fr); }
      .qa-grid { grid-template-columns: repeat(2, 1fr); }
      .tips-grid { grid-template-columns: repeat(2, 1fr); }
      .footer-grid { grid-template-columns: 1fr 1fr; }
      .megamenu { width: 90vw; right: 5vw; transform: none; }
      .portal-layout { flex-direction: column; }
      .portal-sidebar { width: 100%; }
      .app-container { padding: 24px 16px; }
      
      /* Tablet Header Adjustments */
      .contact-bar { padding: 16px; gap: 12px; flex-wrap: nowrap; }
      .contact-bar .info { flex-direction: row; gap: 8px; }
      .contact-bar .ci-icon { width: 36px; height: 36px; }
      .contact-bar h4 { font-size: 10px; }
      .contact-bar p { font-size: 12px; white-space: nowrap; }
      .social-icons { gap: 8px; flex-wrap: nowrap; }
      .social-icon { width: 36px; height: 36px; }
    }

    @media (max-width: 768px) {
      .nav-menus-wrapper { display: none; }
      .nav-menus-wrapper.show-mobile {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 1000;
        max-height: 80vh;
        overflow-y: auto;
      }
      .nav-menu { display: flex; flex-direction: column; width: 100%; }
      .nav-menu > li { justify-content: center !important; flex-wrap: wrap; }
      
      /* Fix submenus overflowing on mobile */
      .has-megamenu .megamenu, .sub-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(0,0,0,0.02);
        margin-top: 10px;
        display: none !important;
        opacity: 1 !important; 
        visibility: visible !important;
        pointer-events: auto !important;
      }
      .has-megamenu:hover .megamenu,
      .has-megamenu:focus-within .megamenu,
      .megamenu.show,
      .menu-item-has-children:hover .sub-menu,
      .menu-item-has-children:focus-within .sub-menu {
        display: block !important;
      }

      .mobile-toggle { display: block; }
      
      .float-wa-btn { width: 44px; height: 44px; font-size: 24px; bottom: 16px; right: 16px; z-index: 800; }
      
      /* Header Adjustments */
      .header-container { padding: 12px 16px; gap: 10px; }
      /* .btn-portal and .btn-book-cta both show full text on tablet */
      .brand-text h1 { font-size: 13px; }
      .brand-text p { font-size: 10px; }
      .brand-badge { display: none; }
      
      /* Hero Adjustments */
      .appt-card { padding: 24px 20px; min-height: 220px; }
      .hero-doc-badge { display: none; }
      .appt-name { font-size: 24px; }
      .appt-details { max-width: 100%; }
      
      /* Grids */
      .stats-col { grid-template-columns: 1fr; }
      .doctors-grid, .tips-grid, .services-grid, .partners-grid { grid-template-columns: 1fr; }
      .qa-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
      .service-card-item { padding: 14px 10px; }
      .svc-icon { width: 40px; height: 40px; font-size: 20px; }
      
      .offers-slider {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        gap: 16px;
        overflow-x: hidden;
      }
      .offer-item img { width: 100%; height: auto; border-radius: 8px; }
      
      /* Footer */
      .contact-bar { flex-direction: row; flex-wrap: nowrap; padding: 12px 8px; gap: 8px; justify-content: space-between; }
      .contact-bar .info { flex-direction: row; gap: 6px; }
      .contact-bar .ci-icon { width: 24px; height: 24px; }
      .contact-bar .ci-icon svg { width: 14px; height: 14px; }
      .contact-bar h4 { font-size: 8px; }
      .contact-bar p { font-size: 9px; white-space: nowrap; }
      .social-icons { gap: 4px; flex-wrap: nowrap; }
      .social-icon { width: 24px; height: 24px; }
      .social-icon svg { width: 12px; height: 12px; }
      .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    }

    @media (max-width: 600px) {
      .contact-bar .email-info { display: none !important; }
      .contact-bar .social-icons { display: none !important; }
      
      /* Mobile header buttons: replace booking with bawabti */
      .btn-book-cta { display: none !important; }
      .btn-portal { padding: 6px 10px; font-size: 11px; white-space: nowrap; flex-shrink: 0; }
      
      /* Show Extras in Mobile Menu */
      .mobile-only-extras { display: block !important; }
    }

    /* ===== DOCTOR PROFILE PILL BUTTONS ===== */
    .btn-pill-blue {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
      color: #fff;
      font-weight: 700;
      font-size: 18px;
      padding: 0 20px;
      width: 240px;
      height: 56px;
      box-sizing: border-box;
      border-radius: 50px;
      border: none;
      text-decoration: none;
      transition: all 0.3s ease;
      cursor: pointer;
      box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
      position: relative;
      overflow: hidden;
    }
    .btn-pill-blue::after {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 50%;
      height: 100%;
      background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
      transform: skewX(-25deg);
      transition: left 0.5s ease;
    }
    .btn-pill-blue:hover {
      background: var(--blue-dark);
      color: #fff;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5), inset 0 2px 4px rgba(255,255,255,0.3);
    }
    .btn-pill-blue:hover::after {
      left: 150%;
    }
    .btn-pill-blue i {
      font-size: 20px;
    }

/* Fix for top gap caused by WordPress admin bar or plugin injection */
html {
    margin-top: 0 !important;
}
body {
    margin-top: 0 !important;
}
