/*
Theme Name:   MBBS Admission Child
Template:     generatepress
Description:  Editorial child theme for the MBBS admission site. Loads after the inlined critical CSS in mu-plugins/mbbs-seo/inc/performance.php, non-blocking.
Version:      2.0.0
*/

/* Below-the-fold and post-interaction styles. Above-the-fold is in
   assets/critical.css and is inlined. */

/* ---------- Sticky right rail ---------- */

.mbbs-rail { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.mbbs-rail__card { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: #fff; }
.mbbs-rail__title { color: var(--ink-faint); padding: 0.85rem 1rem 0.6rem; margin: 0; }
.mbbs-rail__card--dark .mbbs-rail__title { background: var(--navy); color: #fff; padding-block: 0.75rem; }

.mbbs-rail__toc ol { list-style: none; margin: 0; padding: 0 1rem 1rem; }
.mbbs-rail__toc li { border-left: 2px solid var(--rule); }
.mbbs-rail__toc a { display: block; padding: 0.4rem 0 0.4rem 0.75rem; font-size: 0.85rem; line-height: 1.4; color: var(--ink-soft); text-decoration: none; }
.mbbs-rail__toc a:hover { color: var(--rust); }
.mbbs-rail__toc li:first-child { border-left-color: var(--rust); }
.mbbs-rail__toc li:first-child a { color: var(--navy); font-weight: 600; }

.mbbs-rail__body { padding: 0.9rem 1rem 1rem; }
.mbbs-rail__links { list-style: none; margin: 0; padding: 0; }
.mbbs-rail__links li + li { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--rule-soft); }
.mbbs-rail__links a { font-size: 0.87rem; font-weight: 600; line-height: 1.4; color: var(--navy); text-decoration: none; display: block; }
.mbbs-rail__links a:hover { color: var(--rust); }

.mbbs-rail__figure { padding: 0.9rem 1rem; border-bottom: 1px solid var(--rule-soft); }
.mbbs-rail__figure strong { font-family: var(--serif); font-size: 1.5rem; color: var(--navy); display: block; line-height: 1.1; }
.mbbs-rail__rows { padding: 0.6rem 1rem 0.9rem; font-size: 0.83rem; }
.mbbs-rail__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.28rem 0; color: var(--ink-soft); }
.mbbs-rail__row.is-total { border-top: 1px solid var(--rule); margin-top: 0.35rem; padding-top: 0.5rem; font-weight: 700; color: var(--navy); }
.mbbs-rail__row.is-total span:last-child { color: var(--rust); }

/* On mobile the rail moves above the article so the contents list is useful, and
   the promo cards are suppressed — the [cta] block already sits in the article and
   the sticky bar covers the rest. Two CTAs stacked above the answer would push the
   thing the reader actually came for below the fold. */
.mbbs-rail { order: -1; }
.mbbs-rail__card--promo { display: none; }

@media (min-width: 1024px) {
	.mbbs-rail { order: 0; position: sticky; top: 1.5rem; }
	.mbbs-rail__card--promo { display: block; }
}

/* ---------- Home ---------- */

.mbbs-hero { border-bottom: 1px solid var(--rule); padding: 2.6rem 0 2.4rem; }
.mbbs-hero__inner { max-width: var(--wide); margin-inline: auto; padding-inline: 1.35rem; }
.mbbs-hero .mbbs-eyebrow { color: var(--rust); margin: 0 0 0.6rem; }
.mbbs-hero h1 { font-size: clamp(2rem, 5.2vw, 2.9rem); max-width: 22ch; }
.mbbs-hero__lede { font-size: 1.05rem; line-height: 1.6; color: var(--ink-soft); max-width: 42ch; margin: 0 0 1.5rem; }
.mbbs-hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0 0 1.4rem; }
.mbbs-hero__facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.mbbs-hero__facts strong { color: var(--navy); font-weight: 700; }

.mbbs-section { padding-block: 2.6rem 0; }
.mbbs-section__sub { margin: 0 0 1.4rem; color: var(--ink-soft); font-size: 0.97rem; max-width: 52ch; }
.mbbs-intro { margin: 1.5rem 0 0; padding: 1.1rem 1.3rem; background: var(--cream); border-left: 3px solid var(--rust); font-size: 0.97rem; line-height: 1.65; color: var(--ink-soft); max-width: 52rem; }
.mbbs-muted { color: var(--ink-faint); font-size: 0.94rem; }

/* ---------- Buttons ---------- */

.mbbs-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 46px; padding: 0.7rem 1.3rem;
	font-size: 0.94rem; font-weight: 600;
	border-radius: var(--radius); text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease;
}
.mbbs-btn--primary { background: var(--navy); color: #fff; }
.mbbs-btn--primary:hover { background: var(--navy-deep); color: #fff; }
.mbbs-btn--ghost { background: #fff; color: var(--navy); border: 1px solid var(--rule); }
.mbbs-btn--ghost:hover { border-color: var(--navy); }
.mbbs-btn:focus-visible, .mbbs-form__submit:focus-visible, .mbbs-sticky__btn:focus-visible {
	outline: 3px solid var(--rust); outline-offset: 3px;
}

/* ---------- Score picker ---------- */

.mbbs-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.mbbs-score {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-height: 76px; padding: 0.6rem;
	border: 1px solid var(--rule); border-radius: var(--radius);
	text-decoration: none; transition: border-color .15s ease, background-color .15s ease;
}
.mbbs-score:hover { border-color: var(--navy); background: var(--surface); }
.mbbs-score strong { font-family: var(--serif); font-size: 1.4rem; color: var(--navy); line-height: 1.1; }
.mbbs-score span { font-size: 0.74rem; color: var(--ink-faint); }

/* ---------- Cards ---------- */

.mbbs-grid { display: grid; gap: 0.85rem; }
.mbbs-card {
	display: flex; flex-direction: column; gap: 0.35rem;
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--rule); border-radius: var(--radius);
	text-decoration: none; background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.mbbs-card:hover { border-color: var(--navy); box-shadow: 0 2px 12px rgba(22,56,92,.07); }
.mbbs-card__tag { color: var(--rust); }
.mbbs-card__title { font-family: var(--serif); font-size: 1.06rem; font-weight: 700; line-height: 1.3; color: var(--navy); }
.mbbs-card__excerpt { font-size: 0.88rem; line-height: 1.55; color: var(--ink-soft); }
.mbbs-card__more { margin-top: 0.2rem; font-size: 0.83rem; font-weight: 600; color: var(--rust); }

/* ---------- Trust columns ---------- */

.mbbs-trust { display: grid; gap: 1.3rem; }
.mbbs-trust h3 { font-family: var(--serif); font-size: 1.05rem; color: var(--navy); margin: 0 0 0.35rem; }
.mbbs-trust p { font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* ---------- Empty state, pagination ---------- */

.mbbs-empty { margin: 2rem 0; padding: 2.2rem 1.4rem; text-align: center; background: var(--surface); border-radius: var(--radius); }
.mbbs-empty h2 { font-family: var(--serif); margin: 0 0 0.5rem; font-size: 1.2rem; color: var(--navy); padding-top: 0; }
.mbbs-empty h2::before { display: none; }
.mbbs-empty p { color: var(--ink-soft); font-size: 0.96rem; max-width: 34rem; margin-inline: auto; }
.mbbs-empty__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.2rem; }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2rem 0; justify-content: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px; padding: 0 0.7rem;
	border: 1px solid var(--rule); border-radius: var(--radius);
	font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--navy); color: var(--navy); }
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- FAQ ---------- */

.mbbs-faq { margin: 2.8rem 0 0; }
.mbbs-qa { border-bottom: 1px solid var(--rule-soft); }
.mbbs-qa summary { cursor: pointer; font-weight: 600; line-height: 1.45; padding: 0.9rem 0; font-size: 0.97rem; color: var(--navy); list-style-position: outside; }
.mbbs-qa summary::marker { color: var(--rust); }
.mbbs-qa p { margin: 0 0 0.9rem; color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Related ---------- */

.mbbs-related { margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.mbbs-related h2 { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); margin: 0 0 1rem; padding-top: 0; }
.mbbs-related h2::before { display: none; }

/* ---------- CTA + form ---------- */

.mbbs-cta { margin: 3rem 0 0; padding: 1.7rem 1.5rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.mbbs-section .mbbs-cta { margin-top: 0; }
.mbbs-cta h2 { font-family: var(--serif); margin-top: 0; padding-top: 0; font-size: 1.22rem; line-height: 1.3; color: var(--navy); }
.mbbs-cta h2::before { display: none; }
.mbbs-cta > p { font-size: 0.94rem; color: var(--ink-soft); max-width: 46rem; }

.mbbs-form { max-width: 34rem; }
.mbbs-form__row { margin-bottom: 0.85rem; }
.mbbs-form label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.3rem; color: var(--ink); }
.mbbs-form input, .mbbs-form select, .mbbs-form textarea {
	width: 100%; padding: 0.7rem 0.85rem; font: inherit;
	/* 16px min stops iOS zooming the viewport on focus. */
	font-size: max(1rem, 16px);
	border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.mbbs-form input:focus-visible, .mbbs-form select:focus-visible, .mbbs-form textarea:focus-visible {
	outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,56,92,.13);
}
.mbbs-form__age { margin: 1.1rem 0; padding: 0.9rem 1rem; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.mbbs-form__age legend { font-weight: 700; font-size: 0.85rem; padding: 0 0.4rem; color: var(--navy); }
.mbbs-form__radio { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; font-size: 0.89rem; line-height: 1.45; padding: 0.4rem 0; cursor: pointer; }
.mbbs-form__consent input[type="checkbox"], .mbbs-form__radio input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); flex: none; }
.mbbs-form__guardian label span { font-weight: 400; color: var(--ink-faint); }
.mbbs-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mbbs-form__consent { font-size: 0.83rem; line-height: 1.5; color: var(--ink-soft); }
.mbbs-form__consent label { display: flex; gap: 0.6rem; font-weight: 400; padding: 0.35rem 0; }
.mbbs-form__consent input { width: auto; margin-top: 0.2rem; }
.mbbs-form__privacy { font-size: 0.79rem; color: var(--ink-faint); margin-top: 0.5rem; }
.mbbs-form__submit {
	width: 100%; min-height: 48px; padding: 0.8rem 1.2rem;
	font: inherit; font-weight: 600; font-size: 0.98rem;
	color: #fff; background: var(--navy); border: 0; border-radius: var(--radius); cursor: pointer;
}
.mbbs-form__submit:hover { background: var(--navy-deep); }
.mbbs-form__success { padding: 0.9rem 1.1rem; background: #e8f4ec; border-left: 3px solid var(--yes); margin-bottom: 1.25rem; font-size: 0.93rem; }

/* ---------- Sticky mobile CTA ---------- */

.mbbs-sticky {
	position: fixed; inset: auto 0 0 0; z-index: 90;
	display: flex; align-items: center; gap: 0.85rem;
	padding: 0.7rem 1rem; padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
	background: #fff; border-top: 1px solid var(--rule);
	box-shadow: 0 -2px 14px rgba(22,56,92,.1);
}
.mbbs-sticky[hidden] { display: none; }
.mbbs-sticky__text { flex: 1; min-width: 0; line-height: 1.3; }
.mbbs-sticky__text strong { display: block; font-size: 0.85rem; color: var(--navy); }
.mbbs-sticky__text span { font-size: 0.76rem; color: var(--ink-faint); }
.mbbs-sticky__btn {
	flex: none; min-height: 44px; display: inline-flex; align-items: center;
	padding: 0.6rem 1.1rem; font-size: 0.9rem; font-weight: 600;
	color: #fff; background: var(--navy); border-radius: var(--radius); text-decoration: none;
}
@media (min-width: 1024px) { .mbbs-sticky { display: none !important; } }

/* ---------- Author, disclaimer, legal ---------- */

.mbbs-author { display: flex; gap: 1rem; align-items: flex-start; margin: 2.5rem 0 0; padding: 1.15rem 1.25rem; background: var(--surface); border-radius: var(--radius); }
.mbbs-author img { border-radius: 50%; flex: none; }
.mbbs-author__name { margin: 0 0 0.2rem; font-weight: 700; font-size: 0.94rem; color: var(--navy); }
.mbbs-author__bio { margin: 0; font-size: 0.87rem; line-height: 1.55; color: var(--ink-soft); }

.mbbs-disclaimer { margin: 2.5rem 0 0; padding: 1rem 1.2rem; font-size: 0.83rem; line-height: 1.6; color: var(--ink-soft); background: var(--surface); border-left: 3px solid var(--rule); }
.mbbs-unset { background: #fdeaea; color: #8a1010; border: 1px dashed var(--no); padding: 0.1em 0.45em; font-weight: 700; font-size: 0.9em; }
.mbbs-legal__meta { font-size: 0.86rem; color: var(--ink-soft); padding: 0.9rem 1.1rem; background: var(--cream); border-left: 3px solid var(--rust); margin-bottom: 2rem; }
.mbbs-image-credit { font-size: 0.77rem; color: var(--ink-faint); margin: 0.5rem 0 1.25rem; }

/* ---------- HTML sitemap ---------- */

.mbbs-sitemap { max-width: 48rem; }
.mbbs-sitemap__group { margin-bottom: 2.4rem; }
.mbbs-sitemap__group h2 a { color: var(--navy); text-decoration: none; }
.mbbs-sitemap__group h2 a:hover { color: var(--rust); }
.mbbs-sitemap__desc { margin: 0 0 0.9rem; font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft); }
.mbbs-sitemap__group ul { list-style: none; margin: 0; padding: 0; }
.mbbs-sitemap__group li { border-bottom: 1px solid var(--rule-soft); }
.mbbs-sitemap__group li a { display: block; padding: 0.72rem 0.2rem; font-size: 0.94rem; line-height: 1.45; color: var(--ink); text-decoration: none; }
.mbbs-sitemap__group li a:hover { color: var(--rust); background: var(--surface); }
.mbbs-sitemap__xml { margin: 0 0 1rem; padding: 0.85rem 1rem; background: var(--surface); font-size: 0.87rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-info { max-width: var(--wide); margin-inline: auto; padding: 0 1.35rem 1.4rem; text-align: center; border-top: 0; }
.mbbs-copyright { margin: 0; font-size: 0.79rem; color: var(--ink-faint); }
.site-info .copyright-bar span.sep { display: none; }

.mbbs-footer-legal {
	max-width: var(--wide); margin: 2.5rem auto 0;
	padding: 1.5rem 1.35rem 2.5rem; border-top: 1px solid var(--rule);
	font-size: 0.83rem; text-align: center; color: var(--ink-faint);
}
.mbbs-footer-legal a { display: inline-block; padding: 0.55rem 0.4rem; min-height: 44px; line-height: 1.9; color: var(--ink-faint); text-decoration: none; }
.mbbs-footer-legal a:hover { color: var(--rust); }
.mbbs-footer-note { max-width: var(--measure); margin: 0.75rem auto 0; font-size: 0.78rem; line-height: 1.6; text-align: left; color: var(--ink-faint); }
@media (max-width: 1023px) { .mbbs-footer-legal { padding-bottom: 6rem; } }

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
	.mbbs-scores { grid-template-columns: repeat(6, 1fr); }
	.mbbs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.mbbs-grid { grid-template-columns: repeat(3, 1fr); }
	.mbbs-trust { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
	.mbbs-section { padding-block: 3rem 0; }
}
