/* Edu360 portal: page-level layout on top of design-tokens.css + components.css.
   Tokens only; no hard-coded colours except the documented image fallbacks. */

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.icon--lg { width: 24px; height: 24px; }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }
.stack > * + * { margin-top: var(--space-4); }
.row-wrap { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.link { color: var(--color-link); font-weight: var(--fw-semibold); text-decoration: underline; text-underline-offset: 3px; }
.section-head { margin-bottom: var(--space-5); }

/* logo: monogram svg + wordmark */
.logo img { width: 34px; height: 34px; border-radius: 9px; }

/* ── home hero with the illustration ── */
.hero--home { padding-block: var(--space-8) var(--space-12); }
.hero--home .hero__grid { display: grid; gap: var(--space-6); align-items: center; }
.hero--home h1 { font-size: var(--text-4xl); max-width: 16ch; }
.hero__img { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-xl); background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); }
.hero__img img { width: 100%; height: auto; aspect-ratio: 1672 / 941; object-fit: cover; object-position: right center; display: block; }
.hero__img figcaption, .img-caption { font-size: var(--text-xs); color: var(--color-muted); padding: 6px 10px; background: var(--color-surface); }
.hero .img-caption, .hero__img figcaption { background: rgb(15 41 66 / 0.85); color: var(--navy-100); }
@media (min-width: 1024px) {
  .hero--home { padding-block: var(--space-12) var(--space-20); }
  .hero--home .hero__grid { grid-template-columns: 1.05fr 1fr; }
}
.quick-chips { margin-top: var(--space-4); }
.quick-chips .chip { background: rgb(255 255 255 / 0.08); color: #fff; border-color: rgb(255 255 255 / 0.25); }
.quick-chips .chip:hover { background: rgb(255 255 255 / 0.16); }
.hero .search__list { color: var(--color-text); }

/* ── page hero (listing / detail / hubs) ── */
.page-hero { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: var(--navy-100); position: relative; overflow: hidden; padding-block: var(--space-8) var(--space-10); }
.page-hero h1 { color: #fff; font-size: var(--text-3xl); max-width: 26ch; }
.page-hero p { color: var(--navy-100); margin-top: var(--space-2); max-width: 60ch; }
.page-hero .breadcrumb a { color: #fff; }
.page-hero .breadcrumb li { color: var(--navy-200); }
.page-hero__grid { display: grid; gap: var(--space-6); align-items: center; position: relative; z-index: 1; }
.page-hero__art { position: absolute; right: -30px; bottom: -20px; width: 240px; opacity: 0.18; pointer-events: none; }
.page-hero__card { justify-self: start; width: min(100%, 520px); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--navy-800); }
.page-hero__card img { width: 100%; height: auto; display: block; object-fit: cover; }
.page-hero__photo { width: 200px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.page-hero__photo img { width: 100%; height: auto; display: block; }
.page-hero__photo .badge-icon { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: var(--shadow-md); }
.page-hero__city { width: min(100%, 420px); opacity: 0.95; }
.page-hero__city img { width: 100%; height: auto; display: block; }
@media (min-width: 768px) {
  .page-hero__grid { grid-template-columns: 1fr auto; }
  .page-hero__art { right: 3%; width: 320px; opacity: 0.9; }
  .page-hero--art .page-hero__grid { grid-template-columns: 1fr; padding-right: 340px; }
}
.page-hero .stats { margin-top: var(--space-6); color: var(--color-text); }

/* ── stream photo tiles ── */
.ptiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 640px) { .ptiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .ptiles { grid-template-columns: repeat(6, 1fr); gap: var(--space-4); } }
.ptile { position: relative; display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--color-text); transition: var(--transition-lift), var(--transition-colors); max-width: 240px; width: 100%; }
.ptile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--navy-200); }
.ptile__img { position: relative; aspect-ratio: 236 / 200; background: linear-gradient(135deg, var(--navy-100), var(--navy-50)); overflow: hidden; }
.ptile__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptile__badge { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 10px; background: #fff; padding: 5px; box-shadow: var(--shadow-sm); }
.ptile__body { padding: var(--space-3); display: grid; gap: 2px; }
.ptile__title { font-weight: var(--fw-bold); color: var(--navy-900); font-size: var(--text-sm); line-height: 1.25; }
.ptile__meta { font-family: var(--font-accent); font-size: var(--text-xs); color: var(--color-muted); }

/* ── city cards (3:2) ── */
.cities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 768px) { .cities { grid-template-columns: repeat(4, 1fr); gap: var(--space-4); } }
.citycard { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; background: var(--navy-800); max-width: 380px; box-shadow: var(--shadow-xs); transition: var(--transition-lift); }
.citycard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.citycard img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.citycard__label { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-6) var(--space-3) var(--space-3); background: linear-gradient(to top, rgb(15 41 66 / 0.92), rgb(15 41 66 / 0)); color: #fff; }
.citycard__label b { display: block; font-family: var(--font-display); font-size: var(--text-md); }
.citycard__label span { font-family: var(--font-accent); font-size: var(--text-xs); color: var(--navy-100); }
.citychips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ── link grids (city / state / course links) ── */
.linkgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); }
@media (min-width: 768px) { .linkgrid { grid-template-columns: repeat(4, 1fr); } }
.linkgrid a { color: var(--color-link); text-decoration: none; font-size: var(--text-sm); padding: 6px 0; border-bottom: 1px dashed var(--color-border); display: flex; justify-content: space-between; gap: 8px; }
.linkgrid a:hover { color: var(--coral-700); }
.linkgrid a small { color: var(--color-muted); font-family: var(--font-accent); }

/* ── generic cards grid ── */
.grid3 { display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .grid3 { grid-template-columns: repeat(3, 1fr); } .grid2 { display: grid; gap: var(--space-5); grid-template-columns: 1fr 1fr; } }
.card--pad { padding: var(--space-5); }
.card h3 { font-size: var(--text-md); }
.infocard { display: block; text-decoration: none; color: var(--color-text); padding: var(--space-5); transition: var(--transition-lift); }
.infocard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.infocard .eyebrow { display: block; margin-bottom: 6px; }
/* minmax(0,1fr), not the implicit auto track: the campus figure holds an img with a 520px
   width attribute, and an auto track sizes to that min-content, which scrolled every college
   page sideways at 390px. */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; }
@media (min-width: 1024px) { .two-col { grid-template-columns: minmax(0, 1fr) 360px; } .two-col .sticky-rail { position: sticky; top: calc(var(--header-h) + var(--tabs-h) + var(--space-4)); } }

/* horizontal scroll on mobile for card rows */
.hscroll { display: grid; gap: var(--space-4); }
@media (max-width: 767.98px) { .hscroll { grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-2); } .hscroll > * { scroll-snap-align: start; } }
@media (min-width: 768px) { .hscroll { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .hscroll--3 { grid-template-columns: repeat(3, 1fr); } }

/* college card additions */
.college__main .college__loc { display: flex; gap: 4px; align-items: center; }
.facts dd.ask { font-family: var(--font-body); font-size: var(--text-xs); }
.facts dd.ask a { color: var(--coral-700); font-weight: var(--fw-semibold); }
.college__actions { flex-wrap: wrap; }
.college__actions .action-toggle.is-on, .action-toggle[aria-pressed="true"] { color: var(--coral-700); }
.college__src { font-size: var(--text-xs); color: var(--color-muted); grid-column: 1 / -1; }

/* ── CTA band on the image ── */
.cta-band { position: relative; border-radius: var(--radius-xl); overflow: hidden; color: #fff; padding: var(--space-8) var(--space-6); background: var(--navy-900); isolation: isolate; }
.cta-band__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(15 41 66 / 0.94) 0%, rgb(15 41 66 / 0.82) 55%, rgb(15 41 66 / 0.6) 100%); }
.cta-band h2 { color: #fff; font-size: var(--text-2xl); }
.cta-band p { color: var(--navy-100); margin-top: var(--space-2); max-width: 52ch; }
.cta-band .row-wrap { margin-top: var(--space-5); }
@media (min-width: 768px) { .cta-band { padding: var(--space-12) var(--space-10); } }

/* wave dividers */
.wave { display: block; width: 100%; height: auto; margin: 0; line-height: 0; }
.wave img { display: block; width: 100%; height: auto; }

/* pattern backgrounds (vector, low opacity) */
.bg-dots { background-color: var(--color-bg-alt); background-image: url("/assets/svg/patterns/dots.svg"); background-size: 32px 32px; }
.bg-grid { background-color: var(--color-bg-alt); background-image: url("/assets/svg/patterns/grid.svg"); background-size: 48px 48px; }
.bg-doodle { background-color: var(--color-bg); background-image: url("/assets/svg/patterns/edu-doodle.svg"); background-size: 200px 200px; }
.bg-lines { background-image: url("/assets/svg/patterns/diagonal-lines.svg"); background-size: 24px 24px; }
.bg-mesh { background-image: url("/assets/svg/patterns/hero-gradient-mesh.svg"); background-size: cover; background-position: center; }

/* steps */
.steps { display: grid; gap: var(--space-4); counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps--3 { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); position: relative; }
.step::before { counter-increment: step; content: counter(step); font-family: var(--font-accent); font-weight: var(--fw-bold); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--coral-50); color: var(--coral-700); margin-bottom: var(--space-3); }
.step h3 { font-size: var(--text-md); }
.step p { font-size: var(--text-sm); color: var(--color-muted); margin-top: 4px; }

/* detail page */
.dhead { display: grid; gap: var(--space-4); }
.dhead__top { display: flex; gap: var(--space-4); align-items: flex-start; }
.dhead__top h1 { font-size: var(--text-2xl); color: #fff; max-width: none; }
.dhead .college__badges .badge { background: rgb(255 255 255 / 0.12); color: #fff; }
.dhead .college__badges .badge--nirf { background: var(--amber-400); color: var(--navy-900); }
.dhead .facts { background: rgb(255 255 255 / 0.08); color: #fff; }
.dhead .facts dt { color: var(--navy-200); }
.dhead .facts dd { color: #fff; }
.dhead .facts dd.ask a { color: var(--amber-300); }
.dhead__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dhead__actions .action-toggle { color: #fff; border-color: rgb(255 255 255 / 0.35); }
.panel { padding-block: var(--space-6); border-bottom: 1px solid var(--color-border); scroll-margin-top: calc(var(--header-h) + var(--tabs-h) + 8px); }
.panel:last-child { border-bottom: 0; }
.panel h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.panel p + p { margin-top: var(--space-3); }
.figure { margin: var(--space-4) 0; border-radius: var(--radius-lg); overflow: hidden; max-width: 520px; background: var(--grey-50); border: 1px solid var(--color-border); }
.figure img { display: block; width: 100%; height: auto; object-fit: cover; }
.figure figcaption { font-size: var(--text-xs); color: var(--color-muted); padding: 6px 10px; }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; font-size: var(--text-sm); }
.kv dt { color: var(--color-muted); }
.kv dd { color: var(--color-text-strong); margin: 0; }
.ask-inline { display: inline-flex; gap: 6px; align-items: center; color: var(--coral-700); font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.src-note { font-size: var(--text-xs); color: var(--color-muted); margin-top: var(--space-2); }
.disclaimer-line { font-size: var(--text-xs); color: var(--color-muted); background: var(--grey-50); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin-top: var(--space-6); display: flex; gap: 8px; }

/* compare */
.compare-picker { display: grid; gap: var(--space-3); }
@media (min-width: 768px) { .compare-picker { grid-template-columns: repeat(3, 1fr); } }
.slot { border: 2px dashed var(--color-border-strong); border-radius: var(--radius-lg); padding: var(--space-4); background: var(--color-surface); position: relative; min-height: 96px; }
.slot.is-filled { border-style: solid; border-color: var(--navy-200); }
.slot__remove { position: absolute; top: 8px; right: 8px; }
.table--compare th[scope="row"] { position: sticky; left: 0; background: var(--color-surface); z-index: 1; min-width: 130px; }
.empty img { width: min(280px, 70%); height: auto; margin-inline: auto; }

/* tray (compare) */
.tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-bar-h) + 10px + env(safe-area-inset-bottom)); z-index: var(--z-sticky); background: var(--navy-900); color: #fff; border-radius: var(--radius-full); padding: 8px 8px 8px 16px; display: none; gap: 10px; align-items: center; box-shadow: var(--shadow-xl); font-size: var(--text-sm); }
.tray.is-visible { display: flex; }
@media (min-width: 1024px) { .tray { bottom: 24px; } }

/* floating call + WhatsApp (desktop) */
.fab { position: fixed; right: 18px; bottom: 96px; z-index: var(--z-sticky); display: none; flex-direction: column; gap: 10px; }
.fab a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-lg); }
.fab .fab__wa { background: var(--whatsapp); }
.fab .fab__call { background: var(--navy-800); }
.fab svg { width: 24px; height: 24px; }
@media (min-width: 1024px) { .fab { display: flex; } }
/* chatbot toggle sits above the action bar on mobile */
@media (max-width: 1023.98px) { #chatbotToggle { bottom: calc(var(--bottom-bar-h) + 14px) !important; } }

/* lead success */
.lead__ok { text-align: center; display: grid; gap: var(--space-3); justify-items: center; }
.lead__ok img { width: 160px; height: auto; }
.lead__fail { background: var(--color-danger-soft); border: 1px solid var(--color-danger); border-radius: var(--radius-md); padding: var(--space-3); font-size: var(--text-sm); }
.lead--wide { display: grid; gap: var(--space-5); }
@media (min-width: 768px) { .lead--wide { grid-template-columns: 1fr 1.1fr; align-items: center; } }
.lead-art img { width: 100%; max-width: 360px; height: auto; }
.lead select, .field select { width: 100%; min-height: var(--tap); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 0 var(--space-3); font-size: 16px; background: var(--color-surface); }

/* pagination */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: var(--space-6); }
.pager button, .pager a { min-width: 40px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font-family: var(--font-accent); cursor: pointer; display: inline-grid; place-items: center; padding: 0 10px; text-decoration: none; }
.pager .is-current { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-3); }
.active-filters .chip { font-size: var(--text-xs); }
.listing__bar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.filters__opts--scroll { max-height: 240px; overflow-y: auto; }
.filters__search { width: 100%; min-height: 38px; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0 10px; margin-bottom: 8px; font-size: 14px; }
.is-loading { opacity: 0.55; pointer-events: none; }

/* search page groups */
.results-group + .results-group { margin-top: var(--space-8); }
.rowlink { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); text-decoration: none; color: var(--color-text); }
.rowlink + .rowlink { margin-top: 8px; }
.rowlink:hover { border-color: var(--navy-300); }
.rowlink small { color: var(--color-muted); }

/* news cards */
.news-card { overflow: hidden; display: flex; flex-direction: column; }
.news-card img { width: 100%; height: auto; aspect-ratio: 387 / 260; object-fit: cover; display: block; }
.news-card .news-card__body { padding: var(--space-4); display: grid; gap: 6px; }

/* exam banner */
.exam-banner { max-width: 520px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.exam-banner img { width: 100%; height: auto; display: block; }

/* rank table */
.table td.rank, .table th.rank { font-family: var(--font-accent); font-weight: var(--fw-bold); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .ptile, .citycard, .infocard { transition: none; }
  .ptile:hover, .citycard:hover, .infocard:hover { transform: none; }
}

/* header search panel */
.header-search { background: var(--navy-900); padding: var(--space-3) 0 var(--space-4); border-top: 1px solid rgb(255 255 255 / 0.12); }
.header-search .search__list { color: var(--color-text); }
.logo span em { font-style: normal; color: var(--coral-400); }

/* two-up grid on mobile collapses */
.grid2 { display: grid; gap: var(--space-5); }

/* compare slots */
.slot__filled .college__name { font-size: var(--text-md); font-weight: var(--fw-bold); padding-right: 36px; }
.slot .search__list { position: absolute; left: 0; right: 0; z-index: var(--z-dropdown); }
.slot .search { position: relative; }

/* legacy content pages inside the new shell */
.legacy { background: var(--color-bg); }
.legacy .hero { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; }
.legacy .hero h1, .legacy .hero p { color: #fff; }
.legacy .status-bar[hidden] { display: none; }
.legacy .float-contact { display: none; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ptile__img .ptile__badge { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; object-fit: contain; }
[hidden] { display: none !important; }
.dhead__actions .action-toggle { background: transparent; }
.dhead__actions .action-toggle[aria-pressed="true"] { background: #fff; color: var(--navy-900); border-color: #fff; }
/* chat assistant open: keep the compare tray out of its way; sit above the mobile action bar */
body:has(.chatbot-panel.open) .tray { display: none !important; }
@media (max-width: 1023.98px) { .chatbot-panel { bottom: calc(var(--bottom-bar-h) + 76px) !important; max-height: calc(100dvh - var(--bottom-bar-h) - 150px) !important; } }
.legacy p.lead { background: none; border: 0; box-shadow: none; padding: 0; margin-top: var(--space-3); color: var(--navy-100); font-size: var(--text-md); }
