/* ================================================================
   COLLEGE COMPASS — Homepage v4.0
   Pixel-perfect match to reference design (Image 2)
   Tasks 1, 6, 7, 8, 9, 10 implemented
   ================================================================ */

/* ── RESET ── */
.cch-wrap *, .cch-wrap *::before, .cch-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.cch-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1a1d2e;
  width: 100%;
  overflow-x: hidden;
  background: #fff;
  line-height: 1.5;
}
.cch-container { width: 100%; max-width: 100%; padding: 0 40px; }
.cch-section { padding: 56px 40px; width: 100%; }
.cch-section-title { font-size: clamp(20px,2.5vw,26px); font-weight: 700; color: #1a1d2e; margin-bottom: 6px; }
.cch-section-sub { color: #64748b; font-size: 14px; margin-bottom: 32px; }
.cch-section-header-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.cch-hero {
  background: #ffffff;
  padding: 72px 40px 52px;
  text-align: center;
  border-bottom: 1px solid #f0f2f8;
  width: 100%;
}
.cch-hero-inner { max-width: 800px; margin: 0 auto; }
.cch-hero-title {
  font-size: clamp(28px,4.5vw,46px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #1a1d2e;
}
.cch-hero-sub { font-size: 16px; color: #64748b; margin-bottom: 36px; }

/* ── Search Bar ── */
.cch-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  max-width: 780px;
  margin: 0 auto 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,.10);
  border: 1px solid #e3e5eb;
  overflow: hidden;
  padding: 6px 6px 6px 16px;
  gap: 0;
  transition: box-shadow .2s;
}
.cch-search-bar:focus-within { box-shadow: 0 6px 28px rgba(62,100,222,.18); border-color: #3e64de; }

.cch-search-field { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px 14px; }
.cch-field-icon { font-size: 16px; flex-shrink: 0; color: #94a3b8; line-height: 1; }
.cch-field-inner { display: flex; flex-direction: column; min-width: 0; }
.cch-field-label { font-size: 10px; font-weight: 700; color: #94a3b8; letter-spacing: .7px; margin-bottom: 2px; text-transform: uppercase; }
.cch-text-input, .cch-select-input {
  border: none; outline: none; font-size: 14px; color: #1a1d2e;
  background: transparent; width: 100%; padding: 0; font-family: inherit;
}
.cch-select-input { cursor: pointer; -webkit-appearance: none; appearance: none; }
.cch-search-divider { width: 1px; height: 40px; background: #e3e5eb; flex-shrink: 0; }
.cch-search-btn {
  background: #3e64de; color: #fff; border: none; border-radius: 10px;
  padding: 13px 26px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .1s; white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 7px; font-family: inherit;
}
.cch-search-btn:hover { background: #2d4fc0; }
.cch-search-btn:active { transform: scale(.98); }

/* ── Trending ── */
.cch-trending {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px; font-size: 13px;
}
.cch-trending-label { color: #94a3b8; font-size: 13px; }
.cch-trend-tag {
  padding: 4px 14px; border-radius: 99px; border: 1px solid;
  font-size: 13px; font-weight: 500; text-decoration: none;
  transition: opacity .2s, transform .2s;
}
.cch-trend-tag:hover { opacity: .75; transform: translateY(-1px); }

/* ══════════════════════════════════════
   QUICK NAV — 4 CARDS
══════════════════════════════════════ */
.cch-quick-nav {
  background: #fff; padding: 28px 40px;
  border-bottom: 1px solid #e8ecf5; width: 100%;
}
.cch-quick-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
@media(max-width:900px){ .cch-quick-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:500px){ .cch-quick-grid{ grid-template-columns:1fr; } }

.cch-quick-card {
  background: #fff; border-radius: 14px; padding: 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  border: 1px solid #e3e5eb;
  text-decoration: none; color: inherit;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
}
.cch-quick-card:hover {
  box-shadow: 0 6px 24px rgba(62,100,222,.12);
  border-color: #c7d4f5; transform: translateY(-2px);
}

.cch-qc-header { display: flex; align-items: center; gap: 10px; }
.cch-qc-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.cch-qc-icon-blue   { background: #eef2ff; }
.cch-qc-icon-red    { background: #fff0f0; }
.cch-qc-icon-green  { background: #f0fdf4; }
.cch-qc-icon-orange { background: #fff7ed; }

.cch-qc-title { font-weight: 700; font-size: 14px; color: #1a1d2e; }

.cch-qc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cch-qc-tag {
  font-size: 12px; padding: 4px 11px; border-radius: 99px;
  background: #f0f4ff; color: #3e64de;
  text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s; cursor: pointer;
}
.cch-qc-tag:hover { background: #3e64de; color: #fff; }

/* ══════════════════════════════════════
   CAREER PATHS
══════════════════════════════════════ */
.cch-career { background: #fff; width: 100%; }
.cch-career-grid {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 16px;
  margin-bottom: 0; /* Alphabet browse removed */
}
@media(max-width:1100px){ .cch-career-grid{ grid-template-columns:repeat(4,1fr); } }
@media(max-width:700px){  .cch-career-grid{ grid-template-columns:repeat(3,1fr); } }
@media(max-width:450px){  .cch-career-grid{ grid-template-columns:repeat(2,1fr); } }

.cch-career-card {
  background: #fff; border: 1px solid #e8ecf5; border-radius: 16px;
  padding: 22px 12px 18px; text-align: center; text-decoration: none; color: #1a1d2e;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cch-career-card:hover {
  box-shadow: 0 6px 24px rgba(62,100,222,.12);
  border-color: #3e64de; transform: translateY(-3px);
}
.cch-career-icon-box {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; margin-bottom: 4px; flex-shrink: 0;
}
.icon-engineering  { background:#eef2ff; }
.icon-management   { background:#fff0f4; }
.icon-medical      { background:#f0fdf4; }
.icon-design       { background:#fff7ed; }
.icon-law          { background:#fdf4ff; }
.icon-commerce     { background:#f0f9ff; }
.icon-science      { background:#fefce8; }
.icon-arts         { background:#fff0f0; }
.icon-agriculture  { background:#f0fdf4; }
.icon-pharmacy     { background:#f0f9ff; }
.icon-architecture { background:#fdf4ff; }
.icon-education    { background:#eef2ff; }
.icon-nursing      { background:#fff0f4; }
.icon-default      { background:#f8faff; }

.cch-career-name  { font-size: 13px; font-weight: 600; color: #1a1d2e; }
.cch-career-count { font-size: 11px; color: #94a3b8; }

/* ══════════════════════════════════════
   CTA BANNER
══════════════════════════════════════ */
.cch-cta-banner {
  background: linear-gradient(135deg,#f0faf5 0%,#e8f8f0 100%);
  border-top: 1px solid #d1ead8; border-bottom: 1px solid #d1ead8; width: 100%;
}
.cch-cta-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
}
@media(max-width:700px){ .cch-cta-inner{ grid-template-columns:1fr; } }
.cch-cta-title { font-size: 22px; font-weight: 700; margin-bottom: 18px; color: #1a1d2e; }
.cch-cta-list { list-style: none; margin-bottom: 24px; display: flex; flex-direction: column; gap: 11px; }
.cch-cta-list li { font-size: 14px; color: #344060; display: flex; align-items: center; gap: 10px; }
.cch-cta-check {
  width: 22px; height: 22px; border-radius: 50%; background: #22c55e; color: #fff;
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cch-cta-visual {
  background: #fff; border-radius: 16px; padding: 28px 32px;
  border: 1px solid #d1ead8; min-width: 160px; text-align: center;
}
.cch-cta-img-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cch-cta-img-placeholder {
  width: 80px; height: 80px; background: #f0fdf4; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 40px;
}
.cch-cta-label { font-size: 12px; color: #94a3b8; }

/* ── CTA button — green ── */
.cch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 26px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all .2s;
  border: none; font-family: inherit;
}
.cch-btn-cta { background: #22c55e; color: #fff; }
.cch-btn-cta:hover { background: #16a34a; color: #fff; }
.cch-btn-outline { background: #fff; color: #3e64de; border: 1.5px solid #3e64de; }
.cch-btn-outline:hover { background: #3e64de; color: #fff; }
.cch-btn-primary { background: #3e64de; color: #fff; }
.cch-btn-primary:hover { background: #2d4fc0; color: #fff; }

/* ══════════════════════════════════════
   FEATURED COLLEGES — TASK 6
══════════════════════════════════════ */
.cch-featured { background: #fff; width: 100%; }
.cch-tab-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.cch-tab {
  padding: 7px 18px; border-radius: 99px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: #f0f2f8; color: #64748b; transition: all .2s; font-family: inherit;
}
.cch-tab.active { background: #1a1d2e; color: #fff; }
.cch-tab:hover:not(.active) { background: #e0e5f5; }

.cch-featured-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 20px;
  margin-bottom: 32px; min-height: 300px;
}
@media(max-width:1000px){ .cch-featured-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:600px){  .cch-featured-grid{ grid-template-columns:1fr; } }

.cch-featured-card {
  background: #fff; border-radius: 16px; border: 1px solid #e3e5eb; overflow: hidden;
  transition: box-shadow .25s, transform .25s; display: flex; flex-direction: column;
}
.cch-featured-card:hover { box-shadow: 0 8px 32px rgba(62,100,222,.13); transform: translateY(-4px); }

/* Card image area — TASK 6 */
.cch-featured-img {
  height: 150px;
  background: linear-gradient(135deg,#dce3f5 0%,#c8d3ee 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cch-featured-img img { width:100%; height:100%; object-fit:cover; display:block; }
.cch-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; color: #98a8cc;
}
.cch-featured-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.48); color: #fff;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 99px; backdrop-filter: blur(4px);
}

/* Card body — TASK 6 */
.cch-featured-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.cch-featured-name {
  font-size: 14px; font-weight: 700; margin-bottom: 5px;
  line-height: 1.3; color: #3e64de;
}
.cch-featured-loc {
  font-size: 12px; color: #64748b; margin-bottom: 12px;
  display: flex; align-items: center; gap: 4px;
}
.cch-featured-loc svg { flex-shrink: 0; }

.cch-featured-meta {
  display: flex; gap: 16px; margin-bottom: 14px;
  padding: 10px 0; border-top: 1px solid #f0f2f8; border-bottom: 1px solid #f0f2f8;
}
.cch-featured-stat { display: flex; flex-direction: column; gap: 2px; }
.cch-stat-value { font-size: 14px; font-weight: 700; color: #1a1d2e; display: flex; align-items: center; gap: 3px; }
.cch-stat-label { font-size: 10px; color: #94a3b8; font-weight: 400; }
.cch-star { color: #f59e0b; }

.cch-featured-actions { display: flex; gap: 8px; margin-top: auto; }
.cch-featured-actions .cch-btn { flex: 1; padding: 9px 12px; font-size: 12px; }

.cch-view-all-wrap { text-align: center; }
.cch-view-all-link {
  color: #3e64de; font-weight: 600; text-decoration: none; font-size: 14px;
  display: inline-flex; align-items: center; gap: 5px; transition: gap .2s;
}
.cch-view-all-link:hover { text-decoration: underline; gap: 8px; }

/* ══════════════════════════════════════
   TOP COLLEGES BY CITY — TASK 7
══════════════════════════════════════ */
.cch-by-city { background: #fafbff; width: 100%; }
.cch-city-block {
  background: #fff; border-radius: 14px; border: 1px solid #e3e5eb;
  margin-bottom: 20px; padding: 22px;
}
.cch-city-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f0f2f8;
}
.cch-city-pin { font-size: 15px; flex-shrink: 0; }
.cch-city-name { font-weight: 700; font-size: 15px; flex: 1; }
.cch-city-view-all { color: #3e64de; font-size: 13px; font-weight: 600; text-decoration: none; transition: opacity .2s; }
.cch-city-view-all:hover { opacity: .75; text-decoration: underline; }
.cch-city-colleges { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media(max-width:700px){ .cch-city-colleges{ grid-template-columns:1fr; } }
.cch-city-college-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid #e8ecf8; border-radius: 10px; gap: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.cch-city-college-item:hover { border-color: #c7d4f5; box-shadow: 0 2px 10px rgba(62,100,222,.07); }
.cch-city-college-info { min-width: 0; }
.cch-city-college-name { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cch-city-rating { font-size: 11px; color: #f59e0b; }
.cch-city-college-btn {
  background: #eef2ff; color: #3e64de; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; text-decoration: none; flex-shrink: 0;
  transition: background .2s, color .2s;
}
.cch-city-college-btn:hover { background: #3e64de; color: #fff; }

/* ══════════════════════════════════════
   COURSES & SPECIALIZATIONS — TASK 8
══════════════════════════════════════ */
.cch-courses-sec { background: #fff; width: 100%; }
.cch-courses-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 28px; }
@media(max-width:900px){ .cch-courses-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:500px){ .cch-courses-grid{ grid-template-columns:1fr; } }
.cch-courses-col-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 2px solid #f0f2f8;
}
.cch-courses-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cch-courses-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.cch-courses-list a { color: #475569; font-size: 13px; text-decoration: none; transition: color .15s; }
.cch-courses-list a:hover { color: #3e64de; padding-left: 4px; }

/* ══════════════════════════════════════
   TOP ENTRANCE EXAMS — TASK 3 (fixed)
══════════════════════════════════════ */
.cch-exams-sec { background: #fafbff; width: 100%; }
.cch-exams-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
@media(max-width:900px){ .cch-exams-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:500px){ .cch-exams-grid{ grid-template-columns:1fr; } }

/* Each exam = exactly ONE card */
.cch-exam-card {
  background: #fff; border-radius: 14px; border: 1px solid #e3e5eb;
  padding: 20px; transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column; gap: 0;
}
.cch-exam-card:hover { box-shadow: 0 6px 24px rgba(62,100,222,.11); transform: translateY(-2px); }
.cch-exam-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.cch-exam-name  { font-size: 15px; font-weight: 700; margin-bottom: 3px; color: #1a1d2e; }
.cch-exam-stream { font-size: 12px; color: #64748b; }

/* Badge styles — TASK 3 status colors */
.cch-exam-badge { padding: 3px 11px; border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.cch-badge-open     { background: #f0fdf4; color: #16a34a; }
.cch-badge-upcoming { background: #fff7ed; color: #ea580c; }
.cch-badge-declared { background: #fff0f0; color: #dc2626; }

.cch-exam-meta {
  display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; color: #64748b;
  margin-bottom: 16px; border-top: 1px solid #f0f2f8; padding-top: 12px;
}
.cch-exam-meta span { display: flex; align-items: center; gap: 4px; }

.cch-exam-actions { display: flex; gap: 8px; margin-top: auto; }
.cch-exam-btn {
  flex: 1; padding: 9px; text-align: center; border-radius: 8px;
  font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: all .2s; border: none; font-family: inherit; display: inline-block;
}
.cch-exam-btn-outline { background: #f5f7ff; color: #3e64de; border: 1px solid #dce6ff; }
.cch-exam-btn-outline:hover { background: #3e64de; color: #fff; }
.cch-exam-btn-filled  { background: #3e64de; color: #fff; }
.cch-exam-btn-filled:hover { background: #2d4fc0; }

/* ══════════════════════════════════════
   COMPARE MODAL
══════════════════════════════════════ */
.cch-compare-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.cch-compare-modal {
  background: #fff; border-radius: 18px; padding: 36px;
  max-width: 820px; width: 100%; max-height: 82vh; overflow-y: auto; position: relative;
}
.cch-compare-close {
  position: absolute; top: 16px; right: 18px; border: none; background: #f0f2f8;
  border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.cch-compare-close:hover { background: #e0e5f5; }
.cch-compare-title { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.cch-compare-table-wrap { overflow-x: auto; }
.cch-compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cch-compare-table th { background: #f0f4ff; color: #3e64de; padding: 11px 16px; text-align: left; }
.cch-compare-table td { padding: 11px 16px; border-bottom: 1px solid #f0f2f8; }
.cch-compare-table tr:hover td { background: #fafbff; }
.cch-compare-loading { text-align: center; padding: 40px; color: #64748b; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cch-compare-error { color: #dc2626; padding: 20px; }

/* ══════════════════════════════════════
   SPINNER — TASK 10
══════════════════════════════════════ */
.cch-spinner {
  width: 28px; height: 28px; border: 3px solid #e3e5eb;
  border-top-color: #3e64de; border-radius: 50%;
  animation: cch-spin .7s linear infinite;
}
@keyframes cch-spin { to { transform: rotate(360deg); } }

.cch-loading-spinner {
  text-align: center; padding: 60px 20px; color: #64748b; font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.cch-empty { text-align: center; padding: 48px; color: #94a3b8; font-size: 14px; }

/* ══════════════════════════════════════
   RESPONSIVE — TASK 10 mobile-first
══════════════════════════════════════ */
@media(max-width:768px) {
  .cch-hero, .cch-section, .cch-quick-nav, .cch-cta-banner { padding-left: 20px; padding-right: 20px; }
  .cch-container { padding: 0 20px; }
  .cch-hero { padding-top: 48px; padding-bottom: 40px; }
  .cch-section { padding-top: 40px; padding-bottom: 40px; }
  .cch-search-bar { flex-direction: column; border-radius: 14px; padding: 16px; gap: 12px; }
  .cch-search-divider { width: 100%; height: 1px; }
  .cch-search-btn { width: 100%; justify-content: center; padding: 14px; }
  .cch-cta-visual { display: none; }
  .cch-cta-inner { grid-template-columns: 1fr; }
  .cch-section-header-row { flex-direction: column; }
  .cch-tab-bar { gap: 6px; }
  .cch-featured-grid { min-height: auto; }
}

@media(max-width:480px) {
  .cch-hero-title { font-size: 26px; }
  .cch-tab { padding: 6px 12px; font-size: 12px; }
  .cch-exams-grid { grid-template-columns: 1fr; }
  .cch-quick-grid { grid-template-columns: 1fr; }
  .cch-city-colleges { grid-template-columns: 1fr; }
}
