/* ============================================================
   CORPORATE CARE — FINAL "EQUAL HEIGHTS" FIX
   ============================================================ */

/* --- 1. CORE SETTINGS --- */
:root {
  --cc-navy:   #1E3A5F;
  --cc-teal:   #0D9488;
  --cc-bg:     #F8FAFC;
  --border:    #E2E8F0;
  --text:      #334155;
  --radius:    8px;
}

* { box-sizing: border-box !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background-color: var(--cc-bg) !important;
  color: var(--text) !important;
  margin: 0 !important;
}

/* ============================================================
   2. HEADER: LOGO LEFT / MENU RIGHT
   ============================================================ */
/* Navy Background */
body .navbar .navbar-inner {
  background: var(--cc-navy) !important;
  padding: 15px 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Flex Container */
body .navbar .container-fluid {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 30px !important;
  display: flex !important;
  flex-wrap: wrap !important; /* Wraps if screen is tight */
  align-items: center !important;
  justify-content: space-between !important; /* KEY: Pushes Logo Left, Menu Right */
}

/* Logo */
body .navbar .brand {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}
body .navbar .brand img {
  height: 45px !important;
  width: auto !important;
  display: block !important;
}

/* Menu */
body .navbar .nav {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  float: none !important;
}
body .navbar .nav > li {
  display: block !important;
  float: none !important;
}
body .navbar .nav > li > a {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-shadow: none !important;
  padding: 8px 14px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}
body .navbar .nav > li > a:hover {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
}
body .btn-navbar { display: none !important; }

/* Mobile Stack */
@media (max-width: 900px) {
  body .navbar .container-fluid {
    justify-content: center !important;
    flex-direction: column !important;
    gap: 15px !important;
  }
}

/* ============================================================
   3. SEARCH AREA
   ============================================================ */
body #docsSearch {
  background: #fff !important;
  padding: 80px 20px !important;
  border-bottom: 1px solid var(--border) !important;
  text-align: center !important;
}
body #docsSearch h1 {
  color: var(--cc-navy) !important;
  font-weight: 800 !important;
  font-size: 2.5rem !important;
  margin-bottom: 30px !important;
}
body #searchBar {
  max-width: 600px !important;
  margin: 0 auto !important;
  position: relative !important;
}
body #searchBar .search-query {
  width: 100% !important;
  height: 60px !important;
  padding: 0 24px !important;
  border: 2px solid var(--border) !important;
  border-radius: 50px !important;
  font-size: 16px !important;
}
body #searchBar .search-query:focus {
  border-color: var(--cc-teal) !important;
  outline: none !important;
}
body #searchBar button {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  height: 48px !important;
  background: var(--cc-teal) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 0 30px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 13px !important;
  cursor: pointer !important;
}
body #searchBar button i { display: none !important; }

/* ============================================================
   4. THE GRID & EQUAL HEIGHTS
   ============================================================ */
body .container-fluid { max-width: 1200px !important; }

/* Titles */
body h2.category-title {
  font-size: 14px !important;
  color: #64748B !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-weight: 700 !important;
  margin: 60px 0 20px !important;
  border-bottom: 1px solid var(--border) !important;
  padding-bottom: 10px !important;
}

/* THE MAGIC FIX: CSS Grid with auto-rows 
   This forces every row to share the exact same height.
*/
body .category-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  grid-auto-rows: 1fr !important; /* <--- THIS IS THE FIX */
  gap: 25px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* THE CARD: Height 100% 
   This forces the card to stretch to the full height of the grid cell.
*/
body .category-list .category {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  height: 100% !important; /* <--- CRITICAL */
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.2s !important;
  
  /* Resetting legacy junk */
  width: auto !important; float: none !important; margin: 0 !important;
}

/* Link inside card stretches too */
body .category-list a {
  padding: 30px !important;
  flex-grow: 1 !important; /* Fills the space */
  display: flex !important;
  flex-direction: column !important;
  text-decoration: none !important;
}

/* Hover */
body .category-list .category:hover {
  transform: translateY(-3px) !important;
  border-color: var(--cc-teal) !important;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1) !important;
}

/* Typography */
body .category-list h3 {
  color: var(--cc-navy) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.4 !important;
}

/* Count */
body .category-list .article-count {
  margin-top: auto !important; /* Pushes to bottom */
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #64748B !important;
  background: var(--cc-bg) !important;
  display: inline-block !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  align-self: flex-start !important;
}

/* --- ICONS --- */
/* Hide old images */
body .category-list img { display: none !important; }

/* New Icon Badge */
body .category-list a::before {
  font-size: 26px !important;
  margin-bottom: 20px !important;
  width: 50px !important;
  height: 50px !important;
  background: #F1F5F9 !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body .category-list .category:hover a::before {
  background: #E2E8F0 !important;
}

/* MAPPING ICONS (Resets per section usually, so we use a safe pattern) */
/* 1st card in any list = Calendar */
body .category-list li:nth-child(1) a::before { content: '📅' !important; background: #EFF6FF !important; }
/* 2nd card in any list = Question */
body .category-list li:nth-child(2) a::before { content: '❓' !important; background: #FAF5FF !important; }
/* 3rd card = Document */
body .category-list li:nth-child(3) a::before { content: '📄' !important; background: #ECFCCB !important; }
/* 4th card = Nurse */
body .category-list li:nth-child(4) a::before { content: '👩‍⚕️' !important; background: #FFF1F2 !important; }
/* 5th card = Handshake */
body .category-list li:nth-child(5) a::before { content: '🤝' !important; background: #FFFBEB !important; }

/* ============================================================
   5. ARTICLE LISTS
   ============================================================ */
body .article-list {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  margin-top: 20px !important;
}
body .article-list li {
  border-bottom: 1px solid #F1F5F9 !important;
  margin: 0 !important;
}
body .article-list a {
  display: block !important;
  padding: 18px 24px !important;
  color: var(--text) !important;
}
body .article-list a:hover {
  color: var(--cc-teal) !important;
  background: #F0FDFA !important;
  padding-left: 30px !important;
}