/* assets/css/bento.css */
:root {
  /* Stony Brook Brand Colors */
  --b-brand: #990000;       /* SBU Red */
  --b-brand-dark: #7a0000; 
  --b-accent: #FFD100;      /* SBU Gold/Yellow (optional accent) */
  --b-ink: #1e1e1e;         /* SBU Black/Gray */
  --b-muted: #636363;
  --b-line: #e2e8f0; 
  --b-card: #fff; 
  --b-radius: 8px;
  
  /* Dark Overlay Panel */
  --b-panel-bg:rgba(10, 33, 65, .50); /* Deep Slate/Black */
  --b-panel-blur: blur(8px);
  --b-text-light: #ffffff;
}

.sbu-bento-wrapper { font-family: "Effra", "Inter", system-ui, sans-serif; }
.sbu-bento-wrapper * { box-sizing: border-box; }
.sbu-bento-wrapper a { color: inherit; text-decoration: none; }
.sbu-container { max-width: 1200px; margin-inline: auto; padding: 0 10px; }

/* --- GLASS PANEL CONTAINER --- */
.sbu-glass-panel {
  background: var(--b-panel-bg);
  backdrop-filter: var(--b-panel-blur);
  border-radius: 16px;
  padding: 30px 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  margin-bottom: 30px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* --- TABS --- */
.sbu-tabs-nav {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 25px;
}
.sbu-tab {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.sbu-tab:hover { color: #fff; }
.sbu-tab.active {
  color: #fff;
  border-bottom-color: #fff; /* or var(--b-brand) if you want red underline */
}

/* --- SEARCH INPUT --- */
.sbu-search-wrap {
  display: flex; 
  align-items: center; 
  /* gap: 10px; */
  background: #fff;
  border-radius: 50px;
  padding: 6px 6px 6px 24px;
  height: 64px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 20px; /* Spacing before chips */
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.sbu-search-wrap:focus-within { border-color: var(--b-brand); }

.sbu-search-input {
  flex: 1; border: 0; background: transparent; 
  color: var(--b-ink); font-size: 1.15rem; outline: 0; 
  height: 100%; font-weight: 500;
}

.sbu-search-btn {
  height: 52px; width: 80px;
  border-radius: 40px; border: none;
  background: var(--b-brand); /* SBU Red */
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s;
}
.sbu-search-btn:hover { background: var(--b-brand-dark); }

/* --- CONTEXT AREA (Chips & A-Z) --- */
.sbu-context-area {
  min-height: 30px;
  display: flex; justify-content: center; align-items: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}
.sbu-label { margin-right: 10px; font-weight: 500; opacity: 0.7; }

/* Helper Chips */
.sbu-chip {
  background: rgba(255,255,255,0.15);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px; padding: 4px 14px; margin: 0 4px;
  cursor: pointer; font-size: 0.9rem; transition: all 0.2s;
      margin-bottom: 10px;
}
.sbu-chip:hover { background: #fff; color: var(--b-brand); }

/* A-Z List */
.sbu-az-link {
  color: #fff; font-weight: 700; margin: 0 3px; 
  padding: 2px 4px; border-radius: 4px; transition: color 0.2s;
}
.sbu-az-link:hover { color: var(--b-accent); /* SBU Gold on hover */ text-decoration: underline; }
.sbu-sep { opacity: 0.4; font-size: 0.8em; margin: 0 1px; }

/* Utilities */
.sbu-hidden { display: none !important; }
.sbu-fade-in { animation: fadeIn 0.3s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- BENTO GRID (Existing styles cleaned up) --- */
.sbu-found-section {
  background: #f1f5f9; border-radius: 12px; padding: 12px 20px; 
  margin: 0 auto; border: 1px solid var(--b-line); display: none;
}
.sbu-found { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--b-muted); font-size: 0.9rem; }
.sbu-found a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: #fff; border-radius: 99px; border: 1px solid #cbd5e1; font-weight: 600; color: #1d4ed8; }
.sbu-found a:hover { border-color: var(--b-brand); color: var(--b-brand); }

.sbu-bento-grid { margin: 30px auto 64px; display: grid; gap: 24px; grid-template-columns: repeat(12, 1fr); }
.sbu-card {
  background: var(--b-card); 
  border: 1px solid var(--b-line); 
  border-radius: var(--b-radius);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); 
  padding: 24px; 
  display: flex; 
  flex-direction: column; 
  min-height: 220px;
  
  /* --- FIX: STICKY HEADER OFFSET --- */
  scroll-margin-top: 140px; /* Adjust this number to match your header height + 20px space */
}
.sbu-bento-grid.loading .sbu-card { opacity: 0.6; pointer-events: none; }

.sbu-card h2 { margin: 0 0 4px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--b-ink); font-weight: 800; }
.sbu-card .desc { margin: 0 0 16px; color: var(--b-muted); font-size: 0.9rem; line-height: 1.5; }
.sbu-card .count { margin-left: auto; font-weight: 700; color: var(--b-muted); font-size: 0.85rem; background: #f1f5f9; padding: 4px 10px; border-radius: 6px; }
.sbu-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sbu-list { display: grid; gap: 14px; margin: 12px 0; }
.sbu-item { padding-bottom: 12px; border-bottom: 1px dashed var(--b-line); }
.sbu-item:last-child { border-bottom: none; }
.sbu-item .title { display: block; font-weight: 700; line-height: 1.4; margin-bottom: 4px; color: var(--b-brand); font-size: 1.05rem; }
.sbu-subline { font-size: 0.92rem; color: var(--b-muted); line-height: 1.5; margin-top: 4px; }
.sbu-card-actions { margin-top: auto; padding-top: 15px; display: flex; gap: 8px; flex-wrap: wrap; }
.sbu-more { display: inline-flex; align-items: center; font-size: 0.85rem; font-weight: 600; color: var(--b-brand); background: #f8fafc; padding: 8px 12px; border-radius: 8px; }
.sbu-more:hover { background: #fee2e2; }

/* Responsive */
.col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-8 { grid-column: span 8; }
@media (max-width:1024px) { .col-8, .col-6 { grid-column: span 12; } .col-4 { grid-column: span 12; } }
@media (max-width:768px) {
    .sbu-glass-panel { padding: 20px; }
    .sbu-search-btn { width: 50px; }
    .sbu-context-area { flex-direction: column; gap: 10px; text-align: center; }
}
#sbu-loader { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(255,255,255,0.7); z-index: 9999; backdrop-filter: blur(2px); }
#sbu-loader img { width: 80px; height: 80px; object-fit: contain; }
.sr-only { position: absolute!important; clip: rect(1px,1px,1px,1px); }
/* Hero Context Override */
.sbu-hero-context .sbu-glass-panel {
    background: rgba(0, 0, 0, 0.3); /* Lighter, more transparent */
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: none; /* Remove heavy shadow for cleaner look */
}
/* Make tabs pop on the hero */
.sbu-hero-context .sbu-tab.active {
    background: #fff;
    color: #990000; /* SBU Red Text */
}
@media (max-width:1024px) { 
.sbu-tab {
      padding: 8px 8px;
}
#sbu-context-chips .sbu-chip:nth-of-type(3) {
  display: none;
}
.found-label{
  display: none;
}
}