/* ============================================================
   BINA LLC — Resources & Blog Page Stylesheet
   ============================================================ */

/* ==============================
   HERO SEARCH BAR
   ============================== */
.resources-hero { padding-bottom: 72px !important; }

.search-bar {
  position:   relative;
  max-width:  600px;
  margin-top: 32px;
  display:    flex;
  align-items: center;
}
.search-icon {
  position:  absolute;
  left:      18px;
  color:     rgba(255,255,255,0.6);
  font-size: 15px;
  pointer-events: none;
}
.search-bar input {
  width:         100%;
  padding:       15px 48px 15px 46px;
  border:        2px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  background:    rgba(255,255,255,0.12);
  color:         #ffffff;
  font-size:     15px;
  font-family:   'Inter', sans-serif;
  backdrop-filter: blur(8px);
  transition:    all 0.3s ease;
  outline:       none;
}
.search-bar input::placeholder { color: rgba(255,255,255,0.55); }
.search-bar input:focus {
  border-color: var(--accent);
  background:   rgba(255,255,255,0.2);
}
.search-clear {
  position:   absolute;
  right:      16px;
  background: none;
  border:     none;
  color:      rgba(255,255,255,0.6);
  cursor:     pointer;
  font-size:  14px;
  padding:    4px;
  transition: color 0.2s;
}
.search-clear:hover { color: #ffffff; }

/* ==============================
   LAYOUT
   ============================== */
.resources-layout {
  display:               grid;
  grid-template-columns: 1fr 340px;
  gap:                   48px;
  align-items:           start;
}

/* ==============================
   CATEGORY FILTER TABS
   ============================== */
.cat-filter {
  display:    flex;
  gap:        8px;
  flex-wrap:  wrap;
  margin-bottom: 8px;
}
.cat-btn {
  display:       inline-flex;
  align-items:   center;
  gap:           7px;
  padding:       9px 18px;
  border:        2px solid #e5eaef;
  border-radius: 50px;
  background:    #ffffff;
  font-size:     13px;
  font-weight:   600;
  color:         var(--muted);
  font-family:   'Inter', sans-serif;
  cursor:        pointer;
  transition:    all 0.25s ease;
}
.cat-btn:hover {
  border-color: var(--primary);
  color:        var(--primary);
}
.cat-btn.active {
  background:   var(--primary);
  border-color: var(--primary);
  color:        #ffffff;
}
.cat-btn i { font-size: 12px; }

/* ==============================
   RESULTS META
   ============================== */
.results-meta {
  margin-bottom: 24px;
  font-size:     13px;
  color:         var(--muted);
  font-weight:   500;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--neutral);
}

/* ==============================
   ARTICLES GRID
   ============================== */
.articles-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  gap:                   26px;
}

/* ── ARTICLE CARD ── */
.article-card {
  background:    #ffffff;
  border-radius: var(--radius);
  box-shadow:    var(--shadow);
  overflow:      hidden;
  transition:    all 0.3s ease;
  display:       flex;
  flex-direction: column;
}
.article-card:hover {
  transform:  translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.article-card.hidden { display: none; }

/* Featured card spans full width */
.article-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.article-card.featured .article-image {
  width:      45%;
  flex-shrink: 0;
  height:     auto;
}
.article-card.featured .article-body { flex: 1; padding: 32px; }
.article-card.featured h2 { font-size: 22px; margin-bottom: 14px; }

/* Article image */
.article-image {
  position:   relative;
  height:     200px;
  overflow:   hidden;
}
.article-image img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.article-card:hover .article-image img { transform: scale(1.05); }

/* Badge */
.article-badge {
  position:      absolute;
  top:           14px;
  left:          14px;
  background:    var(--accent);
  color:         #ffffff;
  font-size:     11px;
  font-weight:   700;
  padding:       4px 12px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Article body */
.article-body {
  padding:        22px;
  flex:           1;
  display:        flex;
  flex-direction: column;
}

/* Meta row */
.article-meta {
  display:     flex;
  align-items: center;
  gap:         12px;
  flex-wrap:   wrap;
  margin-bottom: 12px;
}
.article-cat {
  font-size:    11px;
  font-weight:  700;
  padding:      3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-cat.compliance  { background: #dbeafe; color: #1d4ed8; }
.article-cat.operations  { background: #fef3c7; color: #92400e; }
.article-cat.staffing    { background: #f3e8ff; color: #6b21a8; }
.article-cat.medication  { background: #dcfce7; color: #166534; }
.article-cat.safety      { background: #fee2e2; color: #991b1b; }

.article-date, .article-read {
  font-size: 12px;
  color:     var(--muted);
  display:   flex;
  align-items: center;
  gap:       5px;
}

/* Title */
.article-body h2,
.article-body h3 {
  font-size:     17px;
  margin-bottom: 10px;
  line-height:   1.35;
  color:         var(--secondary);
  transition:    color 0.2s;
}
.article-card:hover .article-body h2,
.article-card:hover .article-body h3 { color: var(--primary); }

/* Excerpt */
.article-body p {
  font-size:   14px;
  color:       var(--muted);
  line-height: 1.7;
  flex:        1;
  margin-bottom: 18px;

  /* Clamp at 3 lines */
  display:            -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:           hidden;
}

/* Footer row */
.article-footer {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-top:      auto;
  padding-top:     16px;
  border-top:      1px solid var(--neutral);
}
.article-author {
  display:     flex;
  align-items: center;
  gap:         8px;
}
.article-author img {
  width:         30px;
  height:        30px;
  border-radius: 50%;
  object-fit:    cover;
}
.article-author span {
  font-size:   12px;
  font-weight: 600;
  color:       var(--text);
}

.article-link {
  font-size:   13px;
  font-weight: 700;
  color:       var(--primary);
  display:     flex;
  align-items: center;
  gap:         6px;
  transition:  all 0.2s;
  white-space: nowrap;
}
.article-link:hover { color: var(--accent); gap: 10px; }

/* ==============================
   NO RESULTS
   ============================== */
.no-results {
  text-align:  center;
  padding:     72px 24px;
  color:       var(--muted);
  grid-column: 1 / -1;
}
.no-results i    { font-size: 48px; color: #d1d5db; margin-bottom: 18px; display: block; }
.no-results h3   { font-size: 22px; margin-bottom: 8px; color: var(--secondary); }
.no-results p    { font-size: 15px; }
.link-btn {
  background:  none;
  border:      none;
  color:       var(--primary);
  font-weight: 600;
  cursor:      pointer;
  font-size:   inherit;
  padding:     0;
  text-decoration: underline;
}

/* ==============================
   LOAD MORE
   ============================== */
.load-more-wrap {
  text-align: center;
  margin-top: 40px;
}

/* ==============================
   SIDEBAR
   ============================== */
.resources-sidebar {
  position: sticky;
  top:      90px;
  display:  flex;
  flex-direction: column;
  gap:      24px;
}

/* CTA card */
.sidebar-cta {
  background:    linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border-radius: var(--radius);
  padding:       28px;
  text-align:    center;
  color:         #ffffff;
}
.sidebar-cta-icon {
  width:         56px;
  height:        56px;
  background:    rgba(255,255,255,0.15);
  border-radius: 50%;
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin:        0 auto 16px;
  font-size:     22px;
  color:         var(--accent);
}
.sidebar-cta h3 { color: #ffffff; font-size: 18px; margin-bottom: 10px; }
.sidebar-cta p  { color: rgba(255,255,255,0.78); font-size: 13px; line-height: 1.65; margin-bottom: 20px; }

/* Generic widget */
.sidebar-widget {
  background:    #ffffff;
  border-radius: var(--radius);
  padding:       24px;
  box-shadow:    var(--shadow);
}
.widget-title {
  font-family:    'Inter', sans-serif;
  font-size:      12px;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color:          var(--secondary);
  margin-bottom:  18px;
  padding-bottom: 12px;
  border-bottom:  2px solid var(--neutral);
}

/* Category list in sidebar */
.widget-cat-list { display: flex; flex-direction: column; gap: 4px; }
.widget-cat-btn {
  width:         100%;
  display:       flex;
  align-items:   center;
  justify-content: space-between;
  padding:       10px 12px;
  border:        none;
  border-radius: 8px;
  background:    transparent;
  font-size:     13px;
  font-weight:   500;
  color:         var(--text);
  font-family:   'Inter', sans-serif;
  cursor:        pointer;
  transition:    all 0.2s;
  text-align:    left;
}
.widget-cat-btn span:first-child { display: flex; align-items: center; gap: 9px; }
.widget-cat-btn i { color: var(--primary); font-size: 13px; }
.widget-cat-btn:hover { background: var(--neutral); color: var(--primary); }
.widget-cat-btn.active { background: var(--bg-teal); color: var(--primary); font-weight: 700; }

.cat-count {
  font-size:    11px;
  font-weight:  700;
  background:   var(--neutral);
  color:        var(--muted);
  padding:      2px 9px;
  border-radius: 50px;
}
.cat-count.compliance  { background: #dbeafe; color: #1d4ed8; }
.cat-count.operations  { background: #fef3c7; color: #92400e; }
.cat-count.staffing    { background: #f3e8ff; color: #6b21a8; }
.cat-count.medication  { background: #dcfce7; color: #166534; }
.cat-count.safety      { background: #fee2e2; color: #991b1b; }

/* Popular articles */
.popular-list { display: flex; flex-direction: column; gap: 14px; }
.popular-item { display: flex; gap: 12px; align-items: flex-start; }
.popular-item img {
  width:         52px;
  height:        52px;
  object-fit:    cover;
  border-radius: 8px;
  flex-shrink:   0;
}
.popular-item div { flex: 1; }
.popular-item a {
  font-size:   13px;
  font-weight: 600;
  color:       var(--text);
  line-height: 1.4;
  display:     block;
  margin-bottom: 4px;
  transition:  color 0.2s;
}
.popular-item a:hover    { color: var(--primary); }
.popular-item span {
  font-size:   11px;
  color:       var(--muted);
  display:     flex;
  align-items: center;
  gap:         4px;
}

/* Newsletter widget */
.newsletter-widget { background: var(--bg-teal) !important; }
.newsletter-icon {
  font-size:     28px;
  color:         var(--primary);
  margin-bottom: 12px;
}
.newsletter-widget h4 {
  font-family:    'Playfair Display', serif;
  font-size:      18px;
  color:          var(--secondary);
  font-weight:    700;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom:  8px;
  padding-bottom: 0;
  border:         none;
}
.newsletter-widget > p {
  font-size:     13px;
  color:         var(--muted);
  line-height:   1.65;
  margin-bottom: 16px;
}
.newsletter-form input {
  width:         100%;
  padding:       12px 14px;
  border:        2px solid rgba(0,124,138,0.2);
  border-radius: 8px;
  font-size:     13px;
  font-family:   'Inter', sans-serif;
  background:    #ffffff;
  color:         var(--text);
  transition:    border-color 0.3s;
  outline:       none;
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-note {
  font-size:   11px !important;
  color:       var(--muted) !important;
  text-align:  center;
  margin-top:  10px !important;
  margin-bottom: 0 !important;
}
.newsletter-note i { margin-right: 4px; }

/* Services quick list */
.services-quick-list { display: flex; flex-direction: column; gap: 2px; }
.services-quick-list li a {
  display:       flex;
  align-items:   center;
  gap:           10px;
  padding:       10px 12px;
  border-radius: 8px;
  font-size:     13px;
  font-weight:   500;
  color:         var(--text);
  transition:    all 0.2s;
}
.services-quick-list li a i    { color: var(--primary); font-size: 13px; width: 16px; }
.services-quick-list li a:hover { background: var(--neutral); color: var(--primary); padding-left: 16px; }

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1100px) {
  .resources-layout { grid-template-columns: 1fr 290px; gap: 32px; }
}

@media (max-width: 900px) {
  .resources-layout { grid-template-columns: 1fr; }
  .resources-sidebar { position: static; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-card.featured { flex-direction: column; }
  .article-card.featured .article-image { width: 100%; height: 220px; }
}

@media (max-width: 600px) {
  .cat-filter { gap: 6px; }
  .cat-btn    { padding: 7px 14px; font-size: 12px; }
  .search-bar input { font-size: 14px; }
  .article-body h2,
  .article-body h3 { font-size: 16px; }
}
