/* =========================================================
   MBBSPG PG COLLEGE FINDER — 100% EDITABLE CSS
   Change brand colours here only.
   ========================================================= */
:root {
  --navy: #0b2a5b;
  --maroon: #8a1f2d;
  --green: #1f9d55;
  --text: #172033;
  --muted: #667085;
  --line: #e5e9f0;
  --soft: #f6f8fb;
  --white: #fff;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #fff
}

button,
select {
  font: inherit
}

button {
  cursor: pointer
}

.college-finder {
  padding: 50px 20px 50px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%)
}

.finder-shell {
  max-width: 1280px;
  margin: 0 auto
}

.section-heading {
  max-width: 860px;
  margin-bottom: 26px
}

.eyebrow {
  display: inline-block;
  color: var(--maroon);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 9px
}

.section-heading h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65
}
#desktopBranch {
  transition: .3s;
}
#desktopBudget {
  transition: .3s;
}
#desktopType {
  transition: .3s;
}
#desktopSort {
  transition: .3s;
}
#desktopClear {
  transition: .3s;
}
#desktopClear:hover {
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
#desktopSort:hover {
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
#desktopType:hover {
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
#desktopBudget:hover {
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
#desktopBranch:hover {
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}
/* Desktop filters */
.desktop-filter-panel {
  position: sticky;
  top: 90px;
  z-index: 20;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px)
}

.desktop-state-tabs {
  display: flex;
  gap: 8px;
  padding: 13px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line)
}

.state-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 750;
  white-space: nowrap
}

.state-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff
}

.desktop-filter-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 13px
}

.desktop-filter-row label,
.filter-sheet-content label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  color: #536070
}

.desktop-filter-row select,
.filter-sheet-content select {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  font-size: 14px;
  font-weight: 650
}

.clear-btn {
  height: 44px;
  border: 1px solid #cfd6e2;
  background: #fff;
  color: #465367;
  border-radius: 10px;
  padding: 0 17px;
  font-weight: 800
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 2px 15px;
  color: #48566a
}

.results-bar strong {
  font-size: 19px;
  color: var(--navy)
}

.active-summary {
  font-size: 13px;
  color: var(--muted);
  text-align: right
}

.college-grid-pg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px
}

.college-card-pg {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease
}
 .college-card-pg:hover {
    transform: translateY(-3px);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  }
  .college-card-pg:hover .pill {
    background-color:#9b0027;
    color:#fff ;
  }
  .college-card-pg:hover .type-text {
    color: #9b0027;
  }
  .data-grid div {
    transition: .3s;
  }
  .data-grid div:hover {
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  }
  .college-card-pg:hover .data-grid div {
    border: 1px solid #9b0027;
  }
.college-thumb-pg {
  width: 100%;
  aspect-ratio: 14/8.4;
  object-fit: cover;
  background: #e9eef6;
  display: block
}

.college-content-pg {
  padding: 17px
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px
}

.pill {
  display: inline-flex;
  align-items: center;
  background: #eef4ff;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  transition: .3s;
}

.type-text {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  transition: .3;
}

.college-card-pg h3 {
  margin: 0 0 7px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--navy)
}

.location-line {
  margin: 0 0 7px;
  color: #6b7483;
  font-size: 13px
}

.branch-line {
  margin: 0 0 13px;
  color: #697589;
  font-size: 13px;
  line-height: 1.45;
  min-height: 38px
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px
}

.data-grid>div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdff;
  padding: 10px
}

.data-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 4px
}

.data-grid strong {
  display: block;
  color: #263244;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.btn-pg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  padding: 9px;
  text-align: center
}

.btn-outline-pg {
  border: 1px solid var(--navy);
  color: var(--navy);
  background: #fff;
  transition: .3s;
}

.btn-outline-pg:hover {
  background-color: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-whatsapp-pg {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff
}

.empty-state {
  margin: 22px 0;
  padding: 28px;
  border: 1px dashed #cfd6e2;
  border-radius: 14px;
  text-align: center;
  background: #fff
}

.empty-state strong,
.empty-state span {
  display: block;
  margin-bottom: 8px
}

.empty-state span {
  color: var(--muted)
}

.empty-state button {
  border: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 9px;
  padding: 10px 16px;
  font-weight: 800
}

.disclaimer-box {
  margin-top: 24px;
  padding: 15px 17px;
  border-left: 4px solid var(--maroon);
  background: #fff7f8;
  color: #65323a;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6
}

/* Mobile bar & sheets hidden on desktop */
.mobile-filter-bar,
.bottom-sheet,
.sheet-backdrop {
  display: none
}

@media(max-width:1024px) {
  .college-grid-pg {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .desktop-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .clear-btn {
    width: 100%
  }
}

/* =========================================================
   MOBILE EXPERIENCE — 2 COLLEGES PER ROW + BOTTOM FILTER BAR
   ========================================================= */
@media(max-width:700px) {
  body.sheet-open {
    overflow: hidden
  }

  .college-finder {
    padding: 34px 8px 110px
  }

  .section-heading {
    padding: 0 4px;
    margin-bottom: 15px
  }

  .section-heading h2 {
    font-size: 27px
  }

  .section-heading p {
    font-size: 13px;
    line-height: 1.55
  }

  /* Hide bulky desktop filters on mobile */
  .desktop-filter-panel {
    display: none
  }

  .results-bar {
    margin: 15px 4px 10px;
    display: block
  }

  .results-bar strong {
    font-size: 16px
  }

  .active-summary {
    margin-top: 3px;
    text-align: left;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
  }

  /* Exactly 2 cards per row */
  .college-grid-pg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px
  }

  .college-card-pg {
    border-radius: 11px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .07)
  }

  .college-thumb-pg {
    aspect-ratio: 1.23/1;
  }

  .college-content-pg {
    padding: 9px
  }

  .card-topline {
    margin-bottom: 5px;
    gap: 4px
  }

  .pill {
    padding: 3px 5px;
    font-size: 8.5px;
    max-width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
  }

  .type-text {
    font-size: 8.5px;
    white-space: nowrap
  }

  .college-card-pg h3 {
    font-size: 13px;
    line-height: 1.22;
    margin-bottom: 4px;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
  }

  .location-line {
    font-size: 9.5px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .branch-line {
    font-size: 9.5px;
    line-height: 1.35;
    min-height: 26px;
    margin-bottom: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
  }

  .data-grid {
    gap: 4px;
    margin-bottom: 7px
  }

  .data-grid>div {
    padding: 6px;
    border-radius: 7px
  }

  .data-grid span {
    font-size: 7.5px;
    margin-bottom: 2px
  }

  .data-grid strong {
    font-size: 9px;
    line-height: 1.2
  }

  .card-actions {
    gap: 4px
  }

  .btn-pg {
    min-height: 34px;
    padding: 6px 3px;
    border-radius: 7px;
    font-size: 9.5px
  }

  .disclaimer-box {
    margin-top: 16px;
    font-size: 10.5px;
    padding: 12px
  }

  /* Ecommerce-style fixed mobile actions */
  .mobile-filter-bar {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    border-top: 1px solid #dfe4ec;
    box-shadow: 0 -8px 25px rgba(15, 23, 42, .10);
    padding: max(7px, env(safe-area-inset-bottom)) 8px calc(7px + env(safe-area-inset-bottom));
  }

  .mobile-filter-bar button {
    position: relative;
    border: 0;
    background: #fff;
    color: #283548;
    min-height: 52px;
    padding: 4px 3px;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-content: center;
    column-gap: 6px;
    border-right: 1px solid #e7eaf0;
    font-weight: 800
  }

  .mobile-filter-bar button:last-child {
    border-right: 0
  }

  .bar-icon {
    font-size: 18px;
    grid-row: 1/3;
    align-self: center
  }

  .mobile-filter-bar button>span:not(.bar-icon) {
    font-size: 13px;
    line-height: 1
  }

  .mobile-filter-bar small {
    font-size: 9px;
    color: var(--maroon);
    font-weight: 700;
    max-width: 82px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .filter-badge {
    position: absolute;
    top: 2px;
    right: 22%;
    background: var(--maroon);
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px
  }

  /* Backdrop */
  .sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .44);
    z-index: 70
  }

  .sheet-backdrop:not([hidden]) {
    display: block
  }

  /* Bottom sheet */
  .bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -14px 40px rgba(15, 23, 42, .2);
    max-height: 78vh;
    overflow: auto;
    padding-bottom: env(safe-area-inset-bottom)
  }

  .bottom-sheet:not([hidden]) {
    display: block;
    animation: sheetUp .18s ease-out
  }

  @keyframes sheetUp {
    from {
      transform: translateY(12px);
      opacity: .7
    }

    to {
      transform: translateY(0);
      opacity: 1
    }
  }

  .sheet-handle {
    width: 44px;
    height: 4px;
    background: #d9dee7;
    border-radius: 99px;
    margin: 9px auto 5px
  }

  .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line)
  }

  .sheet-header h3 {
    margin: 0;
    color: var(--navy);
    font-size: 18px
  }

  .sheet-close {
    border: 0;
    background: #f0f3f7;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #475569
  }

  .sheet-content {
    padding: 14px 16px
  }

  .sheet-footer {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 9px;
    padding: 11px 16px;
    background: #fff;
    border-top: 1px solid var(--line)
  }

  .primary-action,
  .secondary-action {
    height: 46px;
    border-radius: 10px;
    font-weight: 850
  }

  .primary-action {
    border: 0;
    background: var(--navy);
    color: #fff
  }

  .secondary-action {
    border: 1px solid #ccd4df;
    background: #fff;
    color: #415066
  }

  .state-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .state-option,
  .sort-option {
    width: 100%;
    border: 1px solid #dce2ea;
    background: #fff;
    color: #354156;
    border-radius: 10px;
    min-height: 44px;
    padding: 9px 10px;
    text-align: left;
    font-weight: 700
  }

  .state-option.selected,
  .sort-option.selected {
    border-color: var(--navy);
    background: #eef4ff;
    color: var(--navy)
  }

  .filter-sheet-content {
    display: grid;
    gap: 14px
  }

  .filter-sheet-content label {
    font-size: 11px
  }

  .filter-sheet-content select {
    height: 48px;
    font-size: 16px
  }

  .sort-options {
    display: grid;
    gap: 8px
  }
}

@media(max-width:360px) {
  .college-finder {
    padding-left: 6px;
    padding-right: 6px
  }

  .college-grid-pg {
    gap: 6px
  }

  .college-content-pg {
    padding: 7px
  }

  .college-card-pg h3 {
    font-size: 12px
  }

  .btn {
    font-size: 8.8px
  }
}

/* =========================================================
   RESPONSIVE REFINEMENT — DESKTOP / TABLET / MOBILE
   Keeps the original visual language with readable mobile cards.
   ========================================================= */
.card-actions-single {
  grid-template-columns: 1fr;
}

@media (min-width: 1025px) {
  .college-grid-pg {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .college-grid-pg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 700px) {
  .college-finder {
    padding: 40px 14px 92px;
  }

  .section-heading {
    padding: 0;
    margin-bottom: 20px;
  }

  .section-heading h2 {
    font-size: 28px;
    line-height: 1.2;
  }

  .section-heading p {
    font-size: 14px;
    line-height: 1.6;
  }

  .results-bar {
    margin: 18px 0 14px;
  }

  .results-bar strong {
    font-size: 17px;
  }

  .active-summary {
    font-size: 12px;
    white-space: normal;
  }

  .college-grid-pg {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .college-card-pg {
    border-radius: 15px;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .09);
  }

  .college-thumb-pg {
    aspect-ratio: 16 / 9;
  }

  .college-content-pg {
    padding: 16px;
  }

  .card-topline {
    margin-bottom: 10px;
    gap: 8px;
  }

  .pill {
    max-width: none;
    padding: 5px 8px;
    font-size: 11px;
  }

  .type-text {
    font-size: 11px;
  }

  .college-card-pg h3 {
    min-height: 0;
    margin-bottom: 7px;
    display: block;
    overflow: visible;
    font-size: 20px;
    line-height: 1.28;
  }

  .location-line {
    margin-bottom: 8px;
    white-space: normal;
    overflow: visible;
    font-size: 13px;
  }

  .branch-line {
    min-height: 0;
    margin-bottom: 14px;
    display: block;
    overflow: visible;
    font-size: 13px;
    line-height: 1.55;
  }

  .data-grid {
    gap: 8px;
    margin-bottom: 14px;
  }

  .data-grid > div {
    padding: 11px;
    border-radius: 10px;
  }

  .data-grid span {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .data-grid strong {
    font-size: 13px;
    line-height: 1.35;
  }

  .card-actions {
    gap: 8px;
  }

  .btn-pg {
    min-height: 46px;
    padding: 10px 8px;
    border-radius: 9px;
    font-size: 13px;
  }

  .mobile-filter-bar {
    display: none;
  }

  body.mobile-college-filters-active .mobile-filter-bar {
    display: grid;
  }

  body.mobile-college-filters-active .floating-call,
  body.mobile-college-filters-active .floating-whatsapp {
    display: none;
  }

  .disclaimer-box {
    margin-top: 20px;
    padding: 14px;
    font-size: 12px;
    line-height: 1.65;
  }
}

@media (max-width: 360px) {
  .college-finder {
    padding-left: 12px;
    padding-right: 12px;
  }

  .college-content-pg {
    padding: 14px;
  }

  .college-card-pg h3 {
    font-size: 18px;
  }

  .btn-pg {
    font-size: 12px;
  }
}
