/* ================================================================
   CollegeDwar — Professional Design System v3.0
   Clean · Data-Forward · Modern Indian Education Portal
   ================================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:       #1B4FD8;
  --primary-hover: #1641B8;
  --primary-light: #EEF3FF;
  --primary-mid:   #2563EB;

  /* Dark accents */
  --navy:          #0F1F3D;
  --navy-soft:     #1a2e52;

  /* Amber – used sparingly for highlights only */
  --amber:         #F59E0B;
  --amber-pale:    #FFFBEB;

  /* Text scale */
  --text-dark:     #111827;
  --text-body:     #374151;
  --text-muted:    #6B7280;
  --text-faint:    #9CA3AF;
  --text-white:    #ffffff;

  /* Backgrounds */
  --bg:            #FFFFFF;
  --bg-soft:       #F8FAFF;
  --bg-grey:       #F3F4F6;
  --bg-dark:       #0F1F3D;

  /* Borders */
  --border:        #E5E7EB;
  --border-dark:   #D1D5DB;

  /* Semantic */
  --green:         #059669;
  --green-pale:    #ECFDF5;
  --red:           #DC2626;
  --red-pale:      #FEF2F2;
  --orange:        #EA580C;

  /* Shadows – very subtle */
  --shadow-xs:     0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:     0 1px 4px rgba(0,0,0,.08);
  --shadow-md:     0 4px 12px rgba(0,0,0,.09);
  --shadow-lg:     0 8px 24px rgba(0,0,0,.10);

  /* Radius */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 20px;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 220ms ease;

  /* Spacing */
  --section-py: 72px;
}

/* ── BASE ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  transition: color var(--t-fast);
}
a:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.page-title {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 600px;
}
.label-caps {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.section {
  padding: var(--section-py) 0;
}
.section-sm {
  padding: 48px 0;
}
.section-white  { background: var(--bg); }
.section-soft   { background: var(--bg-soft); }
.section-grey   { background: var(--bg-grey); }
.section-dark   { background: var(--bg-dark); }
.section-muted  { background: var(--bg-grey); }

@media (max-width: 767.98px) {
  :root { --section-py: 48px; }
}

/* ── BUTTONS ────────────────────────────────────────────────── */
/*
 * Button token: --r-btn controls all button border-radii.
 * Sizes: xs=6px  sm=8px  md/default=10px  lg/xl=10px
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4375rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 10px;
  border: 1.5px solid transparent;
  padding: .5rem 1.125rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast),
              transform var(--t-fast), opacity var(--t-fast);
  white-space: nowrap;
  font-family: inherit;
  vertical-align: middle;
  letter-spacing: -.01em;
}
.btn:hover  { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ── Variants ─────────────────────────────────────────────── */

/* Primary — blue fill */
.btn-primary {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(27,79,216,.3);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(27,79,216,.35);
  color: #fff !important;
}

/* Outline primary — bordered blue */
.btn-outline-primary {
  background: transparent;
  color: var(--primary) !important;
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary-light);
  color: var(--primary-hover) !important;
  border-color: var(--primary-hover);
}

/* Secondary ghost — grey bordered */
.btn-outline-secondary, .btn-ghost {
  background: transparent;
  color: var(--text-muted) !important;
  border-color: var(--border-dark);
}
.btn-outline-secondary:hover, .btn-ghost:hover {
  background: var(--bg-grey);
  color: var(--text-dark) !important;
  border-color: var(--border-dark);
}

/* Accent — amber fill (primary CTA on dark backgrounds) */
.btn-accent {
  background: var(--amber);
  color: #111827 !important;
  border-color: var(--amber);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(245,158,11,.25);
}
.btn-accent:hover {
  background: #E08D00;
  border-color: #E08D00;
  color: #111827 !important;
  box-shadow: 0 4px 14px rgba(245,158,11,.35);
}

/* Outline light — for dark background sections */
.btn-outline-light {
  background: transparent;
  color: rgba(255,255,255,.9) !important;
  border-color: rgba(255,255,255,.35);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
  color: #fff !important;
}

/* Ghost white — very subtle, for tertiary actions on dark bg */
.btn-ghost-white {
  background: transparent;
  color: rgba(255,255,255,.6) !important;
  border-color: rgba(255,255,255,.15);
}
.btn-ghost-white:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.35);
  color: rgba(255,255,255,.9) !important;
}

/* Success */
.btn-success {
  background: #059669;
  color: #fff !important;
  border-color: #059669;
  box-shadow: 0 1px 3px rgba(5,150,105,.25);
}
.btn-success:hover {
  background: #047857;
  border-color: #047857;
  color: #fff !important;
}

/* Form submit — full-width, gradient blue, used in all forms */
.btn-form {
  width: 100%;
  padding: .875rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff !important;
  border-color: transparent;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(27,79,216,.3);
  letter-spacing: -.015em;
}
.btn-form:hover {
  opacity: .92;
  box-shadow: 0 6px 20px rgba(27,79,216,.4);
  color: #fff !important;
}
.btn-form:active { opacity: 1; transform: translateY(0); }

/* Form submit amber — amber gradient, for counselling forms */
.btn-form-amber {
  width: 100%;
  padding: .875rem 1.5rem;
  background: linear-gradient(135deg, var(--amber) 0%, #E08D00 100%);
  color: #111827 !important;
  border-color: transparent;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245,158,11,.3);
  letter-spacing: -.015em;
}
.btn-form-amber:hover {
  opacity: .92;
  box-shadow: 0 6px 20px rgba(245,158,11,.4);
  color: #111827 !important;
}

/* Load more button */
.btn-load-more {
  padding: .6875rem 2.25rem;
  background: #fff;
  color: var(--primary) !important;
  border-color: var(--primary);
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 600;
  min-width: 200px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.btn-load-more:hover {
  background: var(--primary-light);
  color: var(--primary-hover) !important;
  border-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(27,79,216,.18);
}
.btn-load-more.loading {
  opacity: .7;
  pointer-events: none;
}

/* ── Sizes ────────────────────────────────────────────────── */
.btn-xs  { padding: .3125rem .625rem; font-size: .8125rem; border-radius: 6px; }
.btn-sm  { padding: .4rem .875rem;  font-size: .8125rem; border-radius: 8px; }
.btn-lg  { padding: .6875rem 1.5rem; font-size: .9375rem; border-radius: 10px; }
.btn-xl  { padding: .875rem 1.875rem; font-size: 1rem; border-radius: 10px; }

.btn-full { width: 100%; justify-content: center; }
.btn-icon    { width: 36px; height: 36px; padding: 0; border-radius: 8px; }
.btn-icon-lg { width: 44px; height: 44px; padding: 0; border-radius: 10px; }

/* ── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.card-body { padding: 1.25rem; }

.card-hover:hover {
  border-color: #C7D7FA;
  box-shadow: var(--shadow-md);
}
.card-link-hover {
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.card-link-hover:hover {
  border-color: #C7D7FA;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .625rem;
  border-radius: var(--r-sm);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
}
.badge-blue    { background: var(--primary-light); color: var(--primary); }
.badge-green   { background: var(--green-pale); color: var(--green); }
.badge-amber   { background: var(--amber-pale); color: #92400E; }
.badge-grey    { background: var(--bg-grey); color: var(--text-muted); }
.badge-dark    { background: var(--navy); color: #fff; }

/* Pill variant */
.pill {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .1875rem .5625rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  border: 1px solid currentColor;
  opacity: .8;
}
.pill-blue   { color: var(--primary); background: var(--primary-light); border-color: #C7D7FA; }
.pill-green  { color: var(--green); background: var(--green-pale); border-color: #A7F3D0; }
.pill-amber  { color: #92400E; background: var(--amber-pale); border-color: #FDE68A; }

.badge-verified {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--green-pale);
  color: var(--green);
  font-size: .6875rem; font-weight: 600;
  padding: .1875rem .5rem;
  border-radius: var(--r-sm);
  border: 1px solid #A7F3D0;
}
.badge-featured {
  background: var(--primary); color: #fff;
  font-size: .6875rem; font-weight: 600;
  padding: .1875rem .5rem; border-radius: var(--r-sm);
}

/* ── FORMS ──────────────────────────────────────────────────── */
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: .5625rem .875rem;
  font-size: .9375rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--r-md);
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,79,216,.1);
}
.form-control::placeholder { color: var(--text-faint); }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-body);
  margin-bottom: .375rem;
}
.form-control-lg { padding: .6875rem 1rem; font-size: 1rem; }
.form-control.is-invalid { border-color: var(--red); }
.invalid-feedback { font-size: .8125rem; color: var(--red); margin-top: .25rem; }

/* Input groups */
.input-group {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  background: var(--bg);
}
.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,79,216,.1);
}
.input-group .input-group-text {
  padding: 0 .875rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: .9375rem;
  display: flex; align-items: center;
}
.input-group .form-control {
  border: none;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent;
  flex: 1;
}
.input-group .form-control:focus { border: none; box-shadow: none !important; }
.input-group .btn {
  border-radius: 0 var(--r-md) var(--r-md) 0;
  border: none;
  border-left: 1px solid var(--border-dark);
}

/* ── TABLE ──────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}
.table th {
  padding: .75rem 1rem;
  background: var(--bg-grey);
  color: var(--text-muted);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
}
.table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--bg-grey);
  color: var(--text-body);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-soft); }
.table-bordered { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }

@media (max-width: 767.98px) {
  .table-responsive-stack thead { display: none; }
  .table-responsive-stack tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    margin-bottom: .75rem;
    padding: .5rem;
  }
  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-grey);
    padding: .5rem .625rem;
  }
  .table-responsive-stack td:last-child { border-bottom: none; }
  .table-responsive-stack td::before {
    content: attr(data-label);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-muted);
    flex: 0 0 45%;
  }
}

/* ── ACCORDION ──────────────────────────────────────────────── */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--r-lg) !important;
  margin-bottom: .5rem;
  overflow: hidden;
}
.accordion-button {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg);
  padding: 1rem 1.125rem;
  box-shadow: none;
  border: none;
}
.accordion-button:not(.collapsed) {
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: none; }
.accordion-body {
  padding: 1rem 1.125rem;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--text-body);
  border-top: 1px solid var(--border);
}

/* ── RATING ─────────────────────────────────────────────────── */
.rating-stars { color: var(--amber); font-size: .875rem; }
.rating-number { font-weight: 700; color: var(--text-dark); font-size: .875rem; }

/* ── BREADCRUMBS ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: .25rem;
  list-style: none; padding: 0; margin: 0;
  font-size: .8125rem;
}
.breadcrumb-item a {
  color: var(--text-muted); text-decoration: none;
  transition: color var(--t-fast);
}
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-body); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  padding: 0 .25rem;
  color: var(--text-faint);
}

/* Dark-background breadcrumb */
.breadcrumb-dark .breadcrumb-item a {
  color: rgba(255,255,255,.5);
}
.breadcrumb-dark .breadcrumb-item a:hover {
  color: rgba(255,255,255,.9);
}
.breadcrumb-dark .breadcrumb-item.active {
  color: rgba(255,255,255,.75);
}
.breadcrumb-dark .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,.25);
}

/* ── SITE HEADER ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.site-header.header-hidden { transform: translateY(-100%); }
#mainHeader {
  position: sticky; top: 0; z-index: 1030;
  background: #fff !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  padding: 0 !important;
  transition: transform 220ms ease, box-shadow 220ms ease !important;
}
#mainHeader.scrolled { box-shadow: var(--shadow-sm) !important; }
#mainHeader.header-hidden { transform: translateY(-100%) !important; }

/* Header inner */
.header-inner {
  display: flex; align-items: center;
  height: 64px;
  gap: 1rem;
}
.header-logo img {
  height: 40px; width: auto; object-fit: contain;
}
.header-logo-mark {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.0625rem; font-weight: 800;
  color: var(--navy);
  letter-spacing: -.025em;
  text-decoration: none;
}
.header-logo-mark i {
  font-size: 1.375rem; color: var(--primary);
}
.header-logo-mark:hover { color: var(--navy); text-decoration: none; }

/* Header search */
.header-search {
  flex: 1; max-width: 460px;
  position: relative;
}
.header-search-box {
  display: flex; align-items: center;
  height: 40px;
  background: var(--bg-grey);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.header-search-box:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,79,216,.1);
}
.header-search-box .search-icon {
  padding: 0 .75rem;
  color: var(--text-faint);
  font-size: .875rem;
  flex-shrink: 0;
}
.header-search-box input {
  flex: 1; height: 100%;
  border: none; background: transparent; outline: none;
  font-size: .9375rem; font-family: inherit;
  color: var(--text-dark);
  padding-right: .5rem;
}
.header-search-box input::placeholder { color: var(--text-faint); }
.header-search-box .search-submit {
  height: 100%; padding: 0 1rem;
  background: var(--primary); color: #fff;
  border: none; cursor: pointer;
  font-size: .8125rem; font-weight: 600;
  font-family: inherit;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.header-search-box .search-submit:hover { background: var(--primary-hover); }

/* Nav */
.header-nav {
  display: flex; align-items: center;
  gap: .125rem;
}
.header-nav .nav-item { position: relative; }
.header-nav .nav-link {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .5rem .6875rem;
  font-size: .875rem; font-weight: 500;
  color: var(--text-body) !important;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.header-nav .nav-link:hover { background: var(--bg-grey); color: var(--primary) !important; }
.header-nav .nav-link.active { color: var(--primary) !important; font-weight: 600; }
.header-nav .nav-link.active::after {
  content: '';
  position: absolute; bottom: -1px; left: .6875rem; right: .6875rem;
  height: 2px; background: var(--primary); border-radius: 2px 2px 0 0;
}

/* Dropdown */
.header-nav .dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  min-width: 220px;
  margin-top: .5rem;
}
.header-nav .dropdown-item {
  display: flex; align-items: center; gap: .625rem;
  padding: .5625rem .875rem;
  font-size: .875rem; font-weight: 500;
  color: var(--text-body);
  border-radius: var(--r-md);
  transition: background var(--t-fast), color var(--t-fast);
  text-decoration: none;
}
.header-nav .dropdown-item:hover { background: var(--bg-grey); color: var(--primary); }
.header-nav .dropdown-item i { color: var(--primary); font-size: .9375rem; }

/* Mobile header buttons */
.header-mobile-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: none; background: transparent;
  color: var(--text-body); font-size: 1.25rem;
  cursor: pointer; border-radius: var(--r-md);
  transition: background var(--t-fast), color var(--t-fast);
}
.header-mobile-btn:hover { background: var(--bg-grey); color: var(--primary); }

/* Mobile nav */
.mobile-nav {
  border-top: 1px solid var(--border);
  padding: .75rem 0;
  background: #fff;
}
.mobile-nav .nav-link {
  display: flex; align-items: center; gap: .625rem;
  padding: .625rem .875rem;
  font-size: .9375rem; font-weight: 500;
  color: var(--text-body);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.mobile-nav-divider {
  border-top: 1px solid var(--border);
  margin: .5rem 0;
}
.mobile-nav-section-title {
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-faint);
  padding: .375rem .875rem;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding-top: 56px;
  color: rgba(255,255,255,.72);
}
.footer-brand p {
  font-size: .9375rem;
  line-height: 1.7;
  color: rgba(255,255,255,.55);
  max-width: 300px;
  margin-top: .875rem;
}
.footer-col-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a {
  font-size: .9375rem;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color var(--t-fast);
}
.footer-links a:hover { color: #fff; }
.footer-contact-row {
  display: flex; align-items: flex-start; gap: .625rem;
  margin-bottom: .625rem;
  font-size: .9375rem;
  color: rgba(255,255,255,.6);
}
.footer-contact-row i { color: var(--amber); font-size: .9375rem; flex-shrink: 0; margin-top: 2px; }
.footer-contact-row a { color: rgba(255,255,255,.6); text-decoration: none; }
.footer-contact-row a:hover { color: #fff; }
.footer-social-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .875rem; }
.footer-social-row a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-md);
  color: rgba(255,255,255,.6);
  font-size: .9375rem;
  text-decoration: none;
  transition: all var(--t-base);
}
.footer-social-row a:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245,158,11,.08);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.125rem 0;
  margin-top: 48px;
  font-size: .8125rem;
  color: rgba(255,255,255,.35);
}
.footer-bottom a { color: rgba(255,255,255,.35); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.65); }

/* ── HERO ────────────────────────────────────────────────────── */
.hero-wrap {
  background: linear-gradient(160deg, var(--navy) 0%, #1a2e52 60%, #1e3a6e 100%);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.024'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }

/* Homepage hero with optional background image */
.home-hero-with-bg .home-hero-bg-image { z-index: 0; }
.home-hero-with-bg .home-hero-bg-image + div { z-index: 1; }
.home-hero-with-bg .home-hero-bg-image + div + div { z-index: 2; }
.home-hero-with-bg .container { position: relative; z-index: 3; }

@media (max-width: 767.98px) {
  .hero-wrap { padding: 48px 0 40px; }
}

.hero-label {
  display: inline-flex; align-items: center; gap: .4375rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  padding: .3125rem .875rem;
  font-size: .8125rem; font-weight: 500;
  color: rgba(255,255,255,.8);
  margin-bottom: 1.25rem;
}
.hero-label i { color: var(--amber); }

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 1rem;
}
.hero-headline .mark {
  color: var(--amber);
}
.hero-desc {
  font-size: clamp(.9375rem, 1.75vw, 1.0625rem);
  color: rgba(255,255,255,.72);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 2rem;
}

/* Hero search */
.hero-search-bar {
  background: #fff;
  border-radius: var(--r-xl);
  overflow: visible;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.hero-search-inner {
  display: flex; align-items: stretch;
  min-height: 56px;
  border-radius: var(--r-xl);
  overflow: hidden;
}
.hero-search-field {
  flex: 1;
  display: flex; align-items: center;
  border-right: 1px solid var(--border);
  padding: 0 1rem;
  position: relative;
  min-width: 0;
}
.hero-search-field:last-of-type { border-right: none; }
.hero-search-field .field-icon {
  color: var(--text-faint); font-size: .9375rem; flex-shrink: 0; margin-right: .625rem;
}
.hero-search-field input {
  flex: 1; border: none; outline: none;
  font-size: .9375rem; font-family: inherit;
  color: var(--text-dark); background: transparent;
  min-width: 0;
}
.hero-search-field input::placeholder { color: var(--text-faint); }
.hero-search-submit {
  flex-shrink: 0;
  height: auto;
  padding: 0 1.75rem;
  background: var(--primary); color: #fff;
  border: none; cursor: pointer;
  font-size: .9375rem; font-weight: 700;
  font-family: inherit; letter-spacing: -.01em;
  border-radius: 0 10px 10px 0;
  transition: background var(--t-fast);
  display: flex; align-items: center; gap: .5rem;
}
.hero-search-submit:hover { background: var(--primary-hover); }

/* Popular tags below search */
.popular-tags {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .5rem; margin-top: 1rem;
}
.popular-tag-label {
  font-size: .8125rem; color: rgba(255,255,255,.5); font-weight: 500;
}
.popular-tag {
  display: inline-flex; align-items: center;
  padding: .25rem .6875rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font-size: .8125rem; color: rgba(255,255,255,.8);
  text-decoration: none;
  transition: all var(--t-base);
}
.popular-tag:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
  transform: translateY(-1px);
}

/* Hero stats */
.hero-stats {
  display: flex; flex-wrap: wrap;
  gap: 1.5rem; margin-top: 2rem;
}
.hero-stat { display: flex; align-items: center; gap: .625rem; }
.hero-stat-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber); font-size: .9375rem;
}
.hero-stat-val {
  font-size: 1.25rem; font-weight: 800;
  color: #fff; line-height: 1;
}
.hero-stat-lbl {
  font-size: .75rem; color: rgba(255,255,255,.5);
  margin-top: .1rem;
}

/* Hero trust */
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 1.75rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.hero-trust-item {
  display: flex; align-items: center; gap: .4375rem;
  font-size: .8125rem; color: rgba(255,255,255,.65);
}
.hero-trust-item i { color: var(--amber); font-size: .875rem; }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.sec-head {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.75rem;
}
.sec-head-left {}
.sec-head-eyebrow {
  font-size: .75rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .375rem;
}
.sec-head-title {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 0;
}
.sec-head-sub {
  font-size: .9375rem;
  color: var(--text-muted);
  margin-top: .375rem;
}

/* ── COLLEGE CARD ────────────────────────────────────────────── */
.college-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
  height: 100%;
}
.college-card:hover {
  border-color: #C7D7FA;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.college-card-thumb {
  height: 152px;
  background: var(--bg-grey);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.college-card-thumb img {
  max-width: 55%; max-height: 72%;
  object-fit: contain;
  transition: transform 300ms ease;
}
.college-card:hover .college-card-thumb img { transform: scale(1.04); }
.college-card-thumb .card-badge {
  position: absolute; top: .625rem; left: .625rem;
}
.college-card-thumb .card-rating {
  position: absolute; top: .625rem; right: .625rem;
  display: flex; align-items: center; gap: .25rem;
  background: rgba(255,255,255,.95);
  border-radius: var(--r-sm);
  padding: .2rem .5rem;
  font-size: .8125rem; font-weight: 700;
  color: var(--text-dark);
  box-shadow: var(--shadow-xs);
}
.college-card-thumb .card-rating i { color: var(--amber); font-size: .75rem; }

.college-card-body {
  padding: 1rem;
  display: flex; flex-direction: column;
  flex: 1;
}
.college-card-name {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: .375rem;
  text-decoration: none;
  display: block;
}
.college-card-name:hover { color: var(--primary); }
.college-card-meta {
  display: flex; flex-wrap: wrap;
  gap: .25rem .75rem;
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.college-card-meta span { display: flex; align-items: center; gap: .25rem; }
.college-card-meta i { font-size: .75rem; }

.college-card-divider {
  border-top: 1px solid var(--bg-grey);
  margin: .75rem 0;
}
.college-card-fee-row {
  display: flex; justify-content: space-between;
  align-items: center;
  font-size: .875rem;
}
.college-card-fee-val {
  font-weight: 700;
  color: var(--text-dark);
  font-size: .9375rem;
}
.college-card-fee-lbl { color: var(--text-faint); font-size: .75rem; margin-top: .1rem; }
.college-card-placement {
  text-align: right;
  font-size: .8125rem;
  color: var(--text-muted);
}
.college-card-placement strong { color: var(--green); }

.college-card-actions {
  display: flex; gap: .5rem;
  margin-top: auto; padding-top: .875rem;
}
.college-card-compare {
  display: flex; align-items: center; gap: .375rem;
  font-size: .8125rem; color: var(--text-muted);
  margin-top: .625rem;
  cursor: pointer;
}
.college-card-compare input { width: 14px; height: 14px; cursor: pointer; accent-color: var(--primary); }

/* ── STREAM CARDS ────────────────────────────────────────────── */
.stream-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem;
  display: flex; align-items: center; gap: .875rem;
  text-decoration: none;
  transition: all var(--t-base);
  height: 100%;
}
.stream-card:hover {
  border-color: #C7D7FA;
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.stream-card-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--primary-light);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.125rem;
  transition: all var(--t-base);
}
.stream-card:hover .stream-card-icon {
  background: var(--primary); color: #fff;
}
.stream-card-name {
  font-size: .9375rem; font-weight: 600;
  color: var(--text-dark); line-height: 1.3;
  margin-bottom: .125rem;
}
.stream-card:hover .stream-card-name { color: var(--primary); }
.stream-card-desc { font-size: .8125rem; color: var(--text-muted); }

/* ── CITY CARDS ──────────────────────────────────────────────── */
.city-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem .75rem;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: all var(--t-base);
}
.city-card:hover {
  border-color: #C7D7FA;
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.city-icon {
  width: 44px; height: 44px;
  background: var(--primary-light);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .625rem;
  font-size: 1.125rem; color: var(--primary);
  transition: all var(--t-base);
}
.city-card:hover .city-icon { background: var(--primary); color: #fff; }
.city-name { font-size: .9375rem; font-weight: 600; color: var(--text-dark); margin-bottom: .125rem; }
.city-count { font-size: .8125rem; color: var(--text-muted); }

/* ── HOW IT WORKS ────────────────────────────────────────────── */
.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.75rem;
  transition: box-shadow var(--t-base), border-color var(--t-base);
  position: relative;
}
.step-card:hover { border-color: #C7D7FA; box-shadow: var(--shadow-md); }
.step-num {
  font-size: .75rem; font-weight: 800;
  letter-spacing: .05em;
  color: var(--primary); text-transform: uppercase;
  margin-bottom: .875rem;
}
.step-icon {
  width: 48px; height: 48px;
  background: var(--primary-light);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.25rem;
  margin-bottom: 1rem;
}
.step-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: .375rem;
}
.step-desc { font-size: .9375rem; color: var(--text-muted); line-height: 1.65; }

/* ── TOOL CARDS ──────────────────────────────────────────────── */
.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  text-decoration: none;
  display: flex; flex-direction: column;
  transition: all var(--t-base);
  height: 100%;
}
.tool-card:hover {
  border-color: #C7D7FA;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
}
.tool-card-icon {
  width: 48px; height: 48px;
  background: var(--primary-light);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.25rem;
  margin-bottom: 1rem;
  transition: all var(--t-base);
}
.tool-card:hover .tool-card-icon { background: var(--primary); color: #fff; }
.tool-card-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: .375rem;
}
.tool-card-desc {
  font-size: .9375rem; color: var(--text-muted);
  line-height: 1.65; flex: 1; margin-bottom: 1.25rem;
}

/* ── NEWS CARDS ──────────────────────────────────────────────── */
.news-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  text-decoration: none;
  display: flex; flex-direction: column;
  transition: all var(--t-base);
  height: 100%;
}
.news-card:hover {
  border-color: #C7D7FA;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
}
.news-card-img {
  height: 192px; overflow: hidden;
  background: var(--bg-grey); flex-shrink: 0;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.news-card-type {
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .5rem;
}
.news-card-title {
  font-size: .9375rem; font-weight: 700; color: var(--text-dark);
  line-height: 1.4; margin-bottom: .4rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover .news-card-title { color: var(--primary); }
.news-card-excerpt {
  font-size: .875rem; color: var(--text-muted); line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .875rem; padding-top: .75rem;
  border-top: 1px solid var(--bg-grey);
  font-size: .8125rem; color: var(--text-faint);
}

/* ── LEAD FORM ───────────────────────────────────────────────── */
.lead-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
}
.lead-form-privacy {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8125rem; color: var(--text-faint);
  margin-top: .875rem;
}
.lead-form-privacy i { color: var(--green); font-size: .875rem; }

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar-widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem;
}
.sidebar-widget + .sidebar-widget { margin-top: 1rem; }
.sidebar-sticky { position: sticky; top: 80px; }
.sidebar-widget-title {
  font-size: .9375rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 1rem;
}

/* ── PLACEMENT STATS ─────────────────────────────────────────── */
.stat-box {
  background: var(--bg-grey);
  border-radius: var(--r-lg);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--t-base);
}
.stat-box:hover { background: var(--primary-light); border-color: #C7D7FA; }
.stat-box-val {
  font-size: 1.25rem; font-weight: 800;
  color: var(--primary); line-height: 1; margin-bottom: .25rem;
}
.stat-box-lbl {
  font-size: .75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}

/* ── RANKING CHIP ────────────────────────────────────────────── */
.ranking-chip {
  background: var(--bg-grey);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem;
  transition: all var(--t-base);
}
.ranking-chip:hover { background: var(--primary-light); border-color: #C7D7FA; }
.ranking-rank {
  font-size: 1.75rem; font-weight: 900;
  color: var(--primary); line-height: 1;
}
.ranking-source { font-weight: 600; color: var(--text-dark); font-size: .9375rem; }
.ranking-meta { font-size: .8125rem; color: var(--text-muted); }

/* ── CTA BANNER ──────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-radius: var(--r-2xl);
  padding: 3rem 2.5rem;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.cta-banner::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(27,79,216,.3);
}
@media (max-width: 767.98px) {
  .cta-banner { padding: 2rem 1.5rem; border-radius: var(--r-xl); }
}
.cta-banner-title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 800; color: #fff; letter-spacing: -.025em;
  line-height: 1.2; margin-bottom: .75rem;
}
.cta-banner-desc {
  font-size: .9375rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7; margin-bottom: 1.5rem;
}

/* ── AUTOCOMPLETE ────────────────────────────────────────────── */
.autocomplete-dropdown {
  position: absolute; top: calc(100% + 6px);
  left: 0; right: 0; z-index: 9999;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  max-height: 360px; overflow-y: auto;
}
.autocomplete-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--bg-grey);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-dark);
  transition: background var(--t-fast);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active {
  background: var(--bg-soft);
}
.autocomplete-item-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; flex-shrink: 0;
}
.autocomplete-item-icon.college  { background: var(--primary-light); color: var(--primary); }
.autocomplete-item-icon.course   { background: var(--green-pale); color: var(--green); }
.autocomplete-item-icon.exam     { background: var(--amber-pale); color: #92400E; }
.autocomplete-item-icon.city     { background: #F5F3FF; color: #7C3AED; }
.autocomplete-item-icon.stream   { background: #E0F2FE; color: #0284C7; }
.autocomplete-item-content { flex: 1; min-width: 0; }
.autocomplete-item-name { font-size: .9375rem; font-weight: 600; color: var(--text-dark); }
.autocomplete-item-subtitle { font-size: .8125rem; color: var(--text-muted); margin-top: .0625rem; }
.autocomplete-item-type {
  font-size: .6875rem; font-weight: 600; letter-spacing: .03em;
  background: var(--bg-grey); color: var(--text-muted);
  padding: .2rem .5rem; border-radius: var(--r-sm);
  flex-shrink: 0;
}
.autocomplete-empty, .autocomplete-loading {
  padding: 1.25rem; text-align: center;
  color: var(--text-muted); font-size: .875rem;
}

/* ── PAGINATION ──────────────────────────────────────────────── */
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: .375rem; flex-wrap: wrap;
}
.pager-btn, .pager-num {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; min-width: 38px; padding: 0 .75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .875rem; font-weight: 600;
  color: var(--text-body);
  background: var(--bg); text-decoration: none;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.pager-btn:hover, .pager-num:hover {
  border-color: var(--primary); color: var(--primary); background: var(--primary-light);
}
.pager-num-active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.pager-disabled { opacity: .4; pointer-events: none; }
.pager-info { font-size: .875rem; color: var(--text-muted); text-align: center; margin-bottom: .75rem; }

/* ── FILTER CHIPS ────────────────────────────────────────────── */
.filter-chip {
  display: inline-flex; align-items: center; gap: .375rem;
  background: var(--primary-light);
  border: 1px solid #C7D7FA;
  color: var(--primary);
  padding: .3125rem .75rem; border-radius: 999px;
  font-size: .8125rem; font-weight: 500;
}
.filter-chip .remove {
  display: flex; align-items: center;
  color: var(--primary); font-size: .875rem; opacity: .7;
  text-decoration: none; transition: opacity var(--t-fast);
}
.filter-chip .remove:hover { opacity: 1; }

/* ── MOBILE STICKY CTA ───────────────────────────────────────── */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 1040;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 8px rgba(0,0,0,.07);
}
@media (min-width: 768px) { .sticky-cta { display: none !important; } }

/* ── BACK TO TOP ─────────────────────────────────────────────── */
.back-to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 1020;
  width: 44px; height: 44px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--t-base);
}
.back-to-top.visible, .back-to-top.show {
  opacity: 1 !important; visibility: visible !important; transform: translateY(0) !important;
}
.back-to-top:hover { background: var(--primary); color: #fff; transform: translateY(-2px) !important; }
@media (max-width: 767.98px) { .back-to-top { bottom: 20px; right: 12px; } }

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert {
  padding: .875rem 1rem;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  font-size: .9375rem;
  margin-bottom: 1rem;
}
.alert-success { background: var(--green-pale); border-color: #A7F3D0; color: var(--green); }
.alert-danger   { background: var(--red-pale); border-color: #FECACA; color: var(--red); }
.alert-info     { background: var(--primary-light); border-color: #C7D7FA; color: var(--primary); }

/* ── MISC UTILITIES ──────────────────────────────────────────── */
.text-primary   { color: var(--primary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-dark      { color: var(--text-dark) !important; }
.text-amber     { color: var(--amber) !important; }
.text-green     { color: var(--green) !important; }
.bg-primary-light { background: var(--primary-light) !important; }
.bg-soft        { background: var(--bg-soft) !important; }
.bg-grey        { background: var(--bg-grey) !important; }
.bg-dark-navy   { background: var(--navy) !important; }
.border-top-primary { border-top: 3px solid var(--primary) !important; }
.fw-bold        { font-weight: 700 !important; }
.fw-semibold    { font-weight: 600 !important; }
.rounded-xl     { border-radius: var(--r-xl) !important; }
.rounded-2xl    { border-radius: var(--r-2xl) !important; }
.shadow-soft    { box-shadow: var(--shadow-sm) !important; }

/* Divider */
.divider { border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* Scroll container */
.scroll-x {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.scroll-x::-webkit-scrollbar { height: 4px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 2px; }

/* Card-clickable */
.card-clickable { cursor: pointer; }

/* ── REVEAL ANIMATION ────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ── LEGACY COMPAT ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%) !important;
  color: #fff;
}
.section-muted  { background: var(--bg-grey) !important; }
.footer, .site-footer { background: var(--navy) !important; }

/* Override Bootstrap's btn defaults to use our design system */
.btn { border-radius: 10px !important; }
.btn-sm { border-radius: 8px !important; }
.btn-xs { border-radius: 6px !important; }
.btn.btn-primary { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; box-shadow: 0 1px 3px rgba(27,79,216,.3) !important; }
.btn.btn-primary:hover { background: var(--primary-hover) !important; border-color: var(--primary-hover) !important; box-shadow: 0 4px 14px rgba(27,79,216,.35) !important; }
.btn.btn-outline-primary { background: transparent !important; color: var(--primary) !important; border-color: var(--primary) !important; }
.btn.btn-outline-primary:hover { background: var(--primary-light) !important; border-color: var(--primary-hover) !important; }
.btn.btn-outline-secondary { background: transparent !important; color: var(--text-muted) !important; border-color: var(--border-dark) !important; }
.btn.btn-outline-secondary:hover { background: var(--bg-grey) !important; color: var(--text-dark) !important; }
.btn.btn-accent { background: var(--amber) !important; border-color: var(--amber) !important; color: #111827 !important; font-weight: 700 !important; }
.btn.btn-accent:hover { background: #E08D00 !important; border-color: #E08D00 !important; }

/* Table responsive */
.table-responsive { border-radius: var(--r-lg); overflow: hidden; }

/* Logo placeholder */
.logo-placeholder {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 800; font-size: 1.125rem;
  color: var(--navy); letter-spacing: -.025em;
  text-decoration: none;
}
.logo-placeholder i { color: var(--primary); font-size: 1.375rem; }
.logo-text { font-size: 1.125rem; font-weight: 800; }

/* Section headings compat */
.page-title, .section-title { color: var(--text-dark); }

/* Old card-img-wrapper compat */
.card-img-wrapper {
  height: 152px; background: var(--bg-grey);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-img-wrapper img { max-width: 55%; max-height: 72%; object-fit: contain; }

/* Rating */
.rating { display: inline-flex; align-items: center; gap: .25rem; color: var(--amber); font-weight: 700; font-size: .875rem; }
.rating-stars { color: var(--amber); }
.rating-stars i { font-size: .875rem; }

/* Badge verified */
.badge-verified { display: inline-flex; align-items: center; gap: .25rem; background: var(--green-pale); color: var(--green); font-size: .6875rem; font-weight: 600; padding: .2rem .5rem; border-radius: var(--r-sm); border: 1px solid #A7F3D0; }
.badge-featured { background: var(--primary); color: #fff; font-size: .6875rem; font-weight: 600; padding: .2rem .5rem; border-radius: var(--r-sm); }

/* Autocomplete item structure */
.autocomplete-item-content { flex: 1; min-width: 0; }
.autocomplete-item-text { flex: 1; overflow: hidden; }
.autocomplete-item-subtitle { font-size: .8125rem; color: var(--text-muted); }

/* Tag */
.tag { display: inline-flex; align-items: center; gap: .25rem; background: var(--primary-light); color: var(--primary); font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; border: 1px solid #C7D7FA; }

/* ── GLOBAL OVERFLOW PREVENTION ─────────────────────────────── */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden !important;
  max-width: 100%;
  position: relative;
}
/* Prevent flex/grid children from overflowing */
.container, .container-fluid, .row > * { min-width: 0; }
img, video, canvas, svg { max-width: 100%; height: auto; }

/* ── RESPONSIVE SECTION PADDING ─────────────────────────────── */
.section-pad    { padding: 72px 0; }
.section-pad-sm { padding: 48px 0; }
/* Base section spacing (used by .sp-72 on homepage etc.); desktop gets larger gap below */
.sp-72   { padding-top: 72px; padding-bottom: 72px; }
.sp-72-t { padding-top: 72px; }
.sp-72-b { padding-bottom: 72px; }

/* ── RESPONSIVE HERO SEARCH ──────────────────────────────────── */
/* Hero search wrapper needs overflow:visible so autocomplete can show */
.hero-search-card {
  overflow: visible !important;
  position: relative;
}
.hero-search-card form {
  border-radius: 14px;
  overflow: hidden;
}

/* Pill-style hero search: single input + blue Search button, flush */
.hero-search-pill {
  max-width: 640px;
}
.hero-search-pill form {
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
}
.hero-search-pill-inner {
  display: flex;
  align-items: stretch;
  min-height: 56px;
  background: #fff;
  border: 1px solid #E8EAED;
  border-radius: 999px;
  overflow: hidden;
}
.hero-search-pill .hero-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 1rem 0 1.25rem;
  min-width: 0;
  background: #fff;
  border: none;
  border-right: none;
  position: relative;
}
.hero-search-pill .hero-search-icon {
  color: #9CA3AF;
  font-size: 1.0625rem;
  flex-shrink: 0;
  margin-right: .75rem;
}
.hero-search-pill .search-autocomplete-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: .9375rem;
  font-family: inherit;
  color: #111827;
  background: transparent;
  min-width: 0;
}
.hero-search-pill .search-autocomplete-input::placeholder {
  color: #6B7280;
}
.hero-search-pill .hero-search-btn {
  flex-shrink: 0;
  padding: 0 1.75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: .9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t-fast);
  border-radius: 0 999px 999px 0;
  white-space: nowrap;
}
.hero-search-pill .hero-search-btn:hover {
  background: var(--primary-hover);
}

/* Hero search on mobile: same design as header search bar (gray bar, 10px radius, 44px height) */
@media (max-width: 767.98px) {
  .hero-search-pill form {
    border-radius: 10px;
    box-shadow: none;
  }
  .hero-search-pill-inner {
    min-height: 44px;
    height: 44px;
    background: #F3F4F6 !important;
    border: 1.5px solid #E5E7EB !important;
    border-radius: 10px !important;
  }
  .hero-search-pill .hero-search-input-wrap {
    padding: 0 .75rem 0 .75rem;
    background: transparent !important;
    border: none !important;
  }
  .hero-search-pill .hero-search-icon {
    color: #9CA3AF;
    font-size: .875rem;
    margin-right: 0;
  }
  .hero-search-pill .hero-search-btn {
    padding: 0 1rem;
    font-size: .8125rem;
    font-weight: 600;
    border-radius: 0 10px 10px 0 !important;
  }
}

@media (max-width: 575.98px) {
  .hero-search-pill-inner {
    min-height: 44px;
    height: 44px;
  }
  .hero-search-pill .hero-search-input-wrap {
    padding: 0 .75rem;
  }
  .hero-search-pill .hero-search-btn {
    padding: 0 1rem;
  }
}

/* ── RESPONSIVE SECTIONS ─────────────────────────────────────── */
@media (max-width: 767.98px) {
  /* Section spacing */
  .sp-72 { padding-top: 44px !important; padding-bottom: 44px !important; }
  .sp-72-t { padding-top: 44px !important; }
  .sp-72-b { padding-bottom: 44px !important; }

  /* Hero */
  .hero-wrap-mobile,
  .sp-hero { padding: 40px 0 36px !important; }

  /* Section headers */
  .sec-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .625rem !important;
  }

  /* Footer */
  .site-footer { padding-top: 36px !important; }
  .footer-bottom-bar { margin-top: 28px !important; }
  .footer-grid { --bs-gutter-x: 1rem; --bs-gutter-y: 1.5rem; }

  /* CTA banner */
  .cta-banner-inner { padding: 1.75rem 1.25rem !important; }

  /* Back to top */
  .back-to-top { bottom: 20px !important; right: 12px !important; }

  /* Autocomplete — keep absolute but ensure parent is not overflow:hidden */
  .autocomplete-dropdown {
    position: absolute !important;
    left: -8px !important;
    right: -8px !important;
    z-index: 9999 !important;
    max-height: 55vh !important;
  }

  /* College cards actions */
  .college-card-action-btn { font-size: .8125rem !important; padding: .375rem .5rem !important; }

  /* Tables */
  .table-mobile-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }

  /* Page header */
  .page-hero-inner { padding: 16px 0 20px !important; }

  /* College detail header */
  .college-detail-header { flex-direction: column !important; align-items: flex-start !important; }
  .college-logo-box { width: 64px !important; height: 64px !important; }

  /* Streams grid: 3 per row on landscape mobile */
  .streams-grid .col { flex: 0 0 50% !important; max-width: 50% !important; }

  /* Stat items in hero */
  .hero-stat-val { font-size: 1.125rem !important; }

  /* Filter panel */
  .filter-panel { padding: 1rem !important; }

  /* Form elements full width in filters */
  .filter-form-row .col-6 { flex: 0 0 50%; max-width: 50%; }

  /* Sidebar stacking */
  .detail-sidebar-mobile { margin-top: 1rem; }
}

@media (max-width: 575.98px) {
  /* Very small screens (≤575px) */
  body { font-size: 14px; }

  /* Container horizontal padding */
  .container { padding-left: 14px !important; padding-right: 14px !important; }

  /* Hero headline line break */
  .hero-headline-mobile { font-size: 1.875rem !important; }

  /* Section padding tighter */
  .sp-72 { padding-top: 36px !important; padding-bottom: 36px !important; }

  /* Cards 1-col on xs */
  .card-col-xs { flex: 0 0 100% !important; max-width: 100% !important; }

  /* College card fee row stack */
  .college-fee-row-xs {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .25rem !important;
  }

  /* Buttons in pairs */
  .btn-pair-xs .btn { font-size: .8125rem !important; padding: .4rem .75rem !important; }

  /* Logo text truncate */
  .logo-text-xs {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

  /* Hide non-essential trust items on xs */
  .trust-item-xs:nth-child(n+3) { display: none !important; }

  /* Popular tags overflow */
  .popular-tags-scroll {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .popular-tags-scroll::-webkit-scrollbar { display: none; }

  /* Pagination numbers — hide middle on xs */
  .pager-num:not(:first-child):not(:last-child) { display: none; }
}

/* ── TABLET (576–991px) ──────────────────────────────────────── */
@media (min-width: 576px) and (max-width: 991.98px) {
  :root { --section-py: 56px; }

  /* Hero section */
  .sp-hero { padding: 56px 0 48px !important; }

  /* Hide city input on tablet too (not enough space) */
  .hero-search-responsive .hs-city { display: none !important; }

  /* Section */
  .sp-72 { padding-top: 56px !important; padding-bottom: 56px !important; }
  .sp-72-b { padding-bottom: 56px !important; }

  .cta-banner-inner { padding: 2rem 2rem !important; }

  /* Sidebar to full width on tablet */
  .sidebar-sticky { position: static !important; }
}

/* ── DESKTOP CLAMP ───────────────────────────────────────────── */
@media (min-width: 992px) {
  :root { --section-py: 72px; }
  .sp-72   { padding-top: 72px !important; padding-bottom: 72px !important; }
  .sp-72-t { padding-top: 72px !important; }
  .sp-72-b { padding-bottom: 72px !important; }
}

/* ── FIX BOOTSTRAP CONTAINER ON SMALL SCREENS ───────────────── */
@media (max-width: 374.98px) {
  .container { padding-left: 12px !important; padding-right: 12px !important; }
  body { font-size: 13.5px; }
  .hero-headline-mobile { font-size: 1.625rem !important; }
}

/* ── PREVENT INLINE OVERFLOW ─────────────────────────────────── */
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.no-wrap         { white-space: nowrap; }
.text-truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── LEGACY CLASS COMPAT (old class names from previous design) ────── */
.section-tag {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .375rem;
}
.badge-pill {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .25rem .625rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  border: 1px solid currentColor;
}
.badge-brand  { background: var(--primary-light); color: var(--primary); }
.badge-muted  { background: var(--bg-grey); color: var(--text-muted); border-color: var(--border-dark); }
.badge-accent { background: var(--amber-pale); color: #92400E; border-color: #FDE68A; }

.icon-badge {
  width: 40px; height: 40px;
  border-radius: var(--r-lg); display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 1.125rem; flex-shrink: 0;
}
.icon-badge-sm  { width: 32px; height: 32px; font-size: .9375rem; }
.icon-badge-lg  { width: 56px; height: 56px; font-size: 1.5rem; border-radius: var(--r-xl); }
.icon-badge-brand { background: var(--primary-light); color: var(--primary); }

.placement-stat {
  background: var(--bg-grey);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem; text-align: center;
  transition: all var(--t-base);
}
.placement-stat:hover { background: var(--primary-light); border-color: #C7D7FA; }
.placement-stat-val {
  font-size: 1.25rem; font-weight: 900; color: var(--primary);
  line-height: 1; margin-bottom: .25rem;
}
.placement-stat-lbl {
  font-size: .75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}

.ranking-card {
  background: var(--bg-grey);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1rem;
  transition: all var(--t-base);
}
.ranking-card:hover { background: var(--primary-light); border-color: #C7D7FA; }
.ranking-number { font-size: 1.5rem; font-weight: 900; color: var(--primary); }

.detail-sidebar-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* Legacy section/bg classes */
.section-light    { background: var(--bg-soft) !important; }
.section-alt      { background: var(--bg-grey) !important; }
.bg-alt           { background: var(--bg-grey) !important; }
.ink              { color: var(--text-dark) !important; }
.text-brand       { color: var(--primary) !important; }
.text-ink         { color: var(--text-dark) !important; }
.text-success     { color: var(--green) !important; }
.badge-muted-soft { background: var(--bg-grey); color: var(--text-muted); border-radius: var(--r-sm); padding: .2rem .5rem; font-size: .75rem; font-weight: 600; }

/* Old card classes from prior design */
.card-rank {
  position: absolute; top: .625rem; left: .625rem;
  background: var(--primary-light); color: var(--primary);
  font-size: .6875rem; font-weight: 700;
  padding: .2rem .5rem; border-radius: 6px; border: 1px solid #C7D7FA;
}
.college-card-fees { font-size: .875rem; color: var(--text-muted); }
.college-card-fees strong { color: var(--text-dark); font-size: .9375rem; }

/* Section header flex */
.section-header-flex {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.75rem;
}

/* Compat: muted vars */
:root {
  --muted: #6B7280;
  --muted-light: #9CA3AF;
  --ink: #111827;
  --ink-soft: #374151;
  --bg-alt: #F3F4F6;
  --success: #059669;
  --success-pale: #ECFDF5;
  --accent-light: #34D399;
  --accent-dark: #F59E0B;
  --brand: #1B4FD8;
  --r-2xl: 20px;
}
.lead-form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem;
}
.label-text { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
