/* OhCampus Homepage Redesign — CSS Overrides v2 */
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,700,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ohc-green: #2e7d32;
  --ohc-green-hover: #1b5e20;
  --ohc-green-light: #e8f5e9;
  --ohc-bg: #ffffff;
  --ohc-surface: #f8fafc;
  --ohc-text: #0f172a;
  --ohc-body: #334155;
  --ohc-muted: #64748b;
  --ohc-border: #e2e8f0;
  --ohc-radius: 8px;
}

body { font-family: 'Manrope', system-ui, sans-serif !important; -webkit-font-smoothing: antialiased; }

/* ─── HERO ─── */
.heroSection, .heroSection.relative {
  min-height: 520px !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Dark overlay so text + search are readable over the bright hero image */
.heroSection::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.7) 100%) !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.heroSection::after {
  content: '' !important;
  position: absolute !important;
  bottom: -2px !important;
  left: 0; right: 0 !important;
  height: 50px !important;
  background: linear-gradient(to top, white, transparent) !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* Hero text adjustments */
.heroSection .textset { position: relative !important; z-index: 3 !important; }

.heroSection h1, .heroSection [class*="text-8xl"], .heroSection [class*="text-7xl"], .heroSection [class*="text-3xl"] {
  font-family: 'Cabinet Grotesk', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: white !important;
  text-shadow: 0 2px 15px rgba(0,0,0,0.4) !important;
}

.heroSection p, .heroSection [class*="text-gray-300"] {
  color: rgba(255,255,255,0.9) !important;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3) !important;
}

/* Hide Angular's original hero search/tabs/stats */
.heroSection .textset > div:nth-child(n+3) { display: none !important; }
.heroSection .textset .mat-focus-indicator { display: none !important; }

/* Position the injected hero overlay */
#ohc-hero-enhanced {
  position: absolute !important;
  bottom: 60px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 90% !important;
  max-width: 700px !important;
  z-index: 10 !important;
  text-align: center !important;
}

/* ─── SEARCH BOX ─── */
.ohc-search-box {
  display: flex;
  background: white;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 20px 60px -12px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.15);
}
.ohc-search-box input {
  flex: 1; border: none; padding: 14px 18px; font-size: 1rem;
  font-family: 'Manrope', sans-serif; outline: none; color: var(--ohc-text);
  background: transparent; border-radius: 10px; min-width: 0;
}
.ohc-search-box input::placeholder { color: var(--ohc-muted); }
.ohc-search-btn {
  background: var(--ohc-green); color: white; border: none; padding: 12px 28px;
  border-radius: 10px; font-family: 'Manrope', sans-serif; font-weight: 700;
  font-size: 0.95rem; cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.ohc-search-btn:hover { background: var(--ohc-green-hover); }

/* ─── SEARCH DROPDOWN ─── */
.ohc-search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px;
  background: white; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  max-height: 350px; overflow-y: auto; z-index: 100;
}
.ohc-dd-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  text-decoration: none; color: var(--ohc-text); font-size: 0.9rem;
  transition: background 0.15s; border-bottom: 1px solid #f1f5f9;
}
.ohc-dd-item:last-child { border-bottom: none; }
.ohc-dd-item:hover { background: var(--ohc-green-light); }
.ohc-dd-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── SEARCH TAGS (Quick Links below search) ─── */
.ohc-search-tags {
  display: flex; gap: 8px; margin-top: 14px; justify-content: center; flex-wrap: wrap;
}
.ohc-search-tag {
  padding: 7px 16px; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px; color: white; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  backdrop-filter: blur(4px); text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.ohc-search-tag:hover { background: rgba(255,255,255,0.35); border-color: rgba(255,255,255,0.5); color: white; }

/* ─── TOP EXAMS SECTION ─── */
.ohc-top-exams { padding: 50px 20px; background: var(--ohc-surface); }
.ohc-top-exams .ohc-section-title {
  font-family: 'Cabinet Grotesk', sans-serif; font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; color: var(--ohc-text); text-align: center; margin-bottom: 8px; letter-spacing: -0.02em;
}
.ohc-top-exams .ohc-section-subtitle { text-align: center; color: var(--ohc-muted); font-size: 0.95rem; margin-bottom: 30px; }
.ohc-exams-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ohc-exam-card {
  background: white; border: 1px solid var(--ohc-border); border-radius: var(--ohc-radius);
  padding: 20px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; text-decoration: none; color: inherit;
}
.ohc-exam-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px -4px rgba(0,0,0,0.08); border-color: var(--ohc-green); }
.ohc-exam-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; color: white; flex-shrink: 0;
}
.ohc-exam-info h4 { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: var(--ohc-text); margin: 0 0 3px; }
.ohc-exam-info p { font-size: 0.8rem; color: var(--ohc-muted); margin: 0; line-height: 1.4; }
.ohc-exam-badge {
  margin-left: auto; padding: 3px 10px; border-radius: 12px; font-size: 0.7rem;
  font-weight: 600; background: #fef3c7; color: #92400e; white-space: nowrap;
}

/* ─── CATEGORY PILLS ─── */
.ohc-categories { padding: 35px 20px; background: white; border-bottom: 1px solid var(--ohc-border); }
.ohc-categories-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ohc-cat-pill {
  padding: 10px 22px; border-radius: 24px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.25s; text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; border: 1.5px solid var(--ohc-border); background: white; color: var(--ohc-body);
}
.ohc-cat-pill:hover { background: var(--ohc-green); color: white; border-color: var(--ohc-green); transform: translateY(-2px); }
.ohc-cat-pill i { font-size: 1rem; }

/* ─── CARD HOVER EFFECTS FOR EXISTING SECTIONS ─── */
.bg-card.rounded-lg, .bg-card.rounded, mat-card, .mat-card {
  border-radius: var(--ohc-radius) !important; border: 1px solid var(--ohc-border) !important;
  box-shadow: none !important; transition: transform 0.3s, box-shadow 0.3s !important; overflow: hidden !important;
}
.bg-card.rounded-lg:hover, .bg-card.rounded:hover, mat-card:hover, .mat-card:hover {
  transform: translateY(-4px) !important; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1) !important;
}

/* Trending college chips */
.mat-chip, [class*="mat-chip"] {
  font-family: 'Manrope', sans-serif !important; font-size: 0.85rem !important; font-weight: 500 !important;
  border-radius: 20px !important; border: 1px solid var(--ohc-border) !important; background: white !important; transition: all 0.2s !important;
}
.mat-chip:hover, [class*="mat-chip"]:hover { background: var(--ohc-green-light) !important; border-color: var(--ohc-green) !important; color: var(--ohc-green) !important; }

/* Mat tabs */
.mat-ink-bar { background-color: var(--ohc-green) !important; }

/* Predictor section */
.predictor-section { background: var(--ohc-surface) !important; }
.predictor-card { border: 1px solid var(--ohc-border) !important; box-shadow: none !important; }
.predictor-card:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1) !important; }

/* Footer */
.bg-gray-900 { font-family: 'Manrope', sans-serif !important; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .heroSection { min-height: 420px !important; }
  .ohc-search-box { flex-direction: column; }
  .ohc-search-btn { width: 100%; justify-content: center; }
  .ohc-exams-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ohc-exam-badge { display: none; }
  .ohc-cat-pill { padding: 8px 16px; font-size: 0.8rem; }
  #ohc-hero-enhanced { bottom: 40px !important; width: 95% !important; }
}
@media (max-width: 480px) {
  .ohc-exams-grid { grid-template-columns: 1fr; }
}


/* Ensure the dark overlay renders ABOVE the hero image */
.heroSection > img,
.heroSection > .herosecimg {
  /* overlay handles darkening */
}

/* Remove the ::before overlay since we darken the image directly */
.heroSection::before {
  display: none !important;
}

/* Make sure the hero title text stays visible */
.heroSection .textset {
  position: relative !important;
  z-index: 5 !important;
}

/* Search dropdown - ensure it's on top and scrollable */
.ohc-search-dropdown {
  border: 1px solid var(--ohc-border) !important;
}


/* Dark overlay must be above the hero image but below text */
#ohc-hero-dark-overlay {
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  background: rgba(0,0,0,0.5) !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* Hero image must have lower z-index */
.heroSection > img.herosecimg,
.heroSection > .herosecimg {
  z-index: 1 !important;
}

/* Hero text content above overlay */
.heroSection .textset,
.heroSection > div:not(#ohc-hero-dark-overlay):not(:first-child) {
  position: relative !important;
  z-index: 3 !important;
}

/* Hero enhanced search above everything */
#ohc-hero-enhanced {
  z-index: 10 !important;
}
