/* ==========================================================================
   Madhav College of Pharmacy — Admission Partnership 2027–29 (/partnership2027/)
   Page-specific additions only. The shared design system (colours, type,
   buttons, cards, forms, header, footer) lives in styles.css and is unchanged.
   ========================================================================== */

/* ---------- Accessibility on this page ----------
   White on the shared WhatsApp green (#1b8f47) is 4.1:1, below WCAG AA for
   button-size text, so this page uses a darker step (white on #157239 = 6.0:1). */
.page-partner { --wa: #157239; }
.page-partner .btn--wa:hover, .page-partner .float-wa:hover { background: #0f5a2c; }
.page-partner .site-footer .btn--wa, .page-partner .site-footer .btn--wa:hover { color: #fff; }
/* Small text links get at least a 24px-tall target */
.page-partner .topbar a { padding-block: 2px; }
.page-partner .team a { display: inline-block; padding-block: .2rem; }

/* ---------- Top bar & header CTA ---------- */
.page-partner .topbar__id { display: none; }
@media (min-width: 1200px) { .page-partner .topbar__id { display: inline-flex; } }
.page-partner .topbar a { white-space: nowrap; }
@media (max-width: 899px) { .page-partner .cta-long { display: none; } }

/* ---------- Hero: copy + partner-fee card ---------- */
.hero--partner .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "form"; }
.hero--partner h1 { font-size: clamp(1.95rem, 1.2rem + 2.4vw, 3rem); }
.hero--partner .hero__lead { max-width: 600px; }
@media (min-width: 640px) {
  .hero--partner .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "form"; }
  .hero--partner .hero__form { max-width: none; justify-self: stretch; }
}
/* Tablets: the fee card spans the width, with the chart beside the slab finder */
@media (min-width: 700px) and (max-width: 1099px) {
  .slab-card .form-card__body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); column-gap: 1.75rem; align-items: start; }
  .slab-card .slab-chart { margin-bottom: 0; }
  .slab-card__aside { border-left: 1px solid var(--line); padding-left: 1.5rem; }
  .slab-card .slab-finder { border-top: 0; padding-top: .35rem; }
}
@media (min-width: 1100px) {
  .hero--partner .hero__grid { grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "copy form"; column-gap: clamp(2rem, 4vw, 4rem); align-items: center; }
  .hero--partner .hero__form { max-width: none; justify-self: stretch; align-self: center; }
}
.hero__call--person { margin-top: .25rem; }
.hero__call-photo { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--blue-100); }

/* ---------- Partner fee chart (one series: total fee per student by slab) ---------- */
.slab-card .form-card__body { padding-top: .9rem; }
.slab-chart { list-style: none; display: grid; gap: .2rem; margin: 0 0 .9rem; }
.slab-row {
  display: grid; gap: .25rem; width: 100%; padding: .42rem .6rem .48rem;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink);
  text-align: left; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease;
}
.slab-row:hover { background: var(--blue-50); }
.slab-row:focus-visible { outline-offset: 0; border-radius: 12px; }
.slab-row__label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.3rem; }
.slab-row__name { font-size: .86rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.slab-row__tag {
  display: none; flex: none; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--green-700); border-radius: 999px; padding: .12rem .55rem;
}
.slab-row__plot { display: flex; align-items: center; gap: .6rem; }
/* Thin bar from a common baseline, rounded only at the data end; the value sits at the tip. */
.slab-row__bar {
  flex: none; height: 14px; min-width: 4px; width: calc((100% - 5.5rem) * var(--r, 1));
  border-radius: 0 4px 4px 0; background: var(--blue-600); transition: background-color .2s ease;
}
.slab-row__value { font-size: .98rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
/* Emphasis once a slab is chosen: the chosen bar keeps the brand blue, the others step back. */
.slab-chart.has-active .slab-row__bar { background: #b9c6d6; }
.slab-chart.has-active .slab-row.is-active .slab-row__bar { background: var(--blue-600); }
.slab-chart.has-active .slab-row:not(.is-active) .slab-row__value { color: var(--muted); font-weight: 600; }
.slab-row.is-active { background: var(--blue-50); box-shadow: inset 0 0 0 1.5px var(--blue-100); }
.slab-row.is-active .slab-row__tag { display: inline-block; }
@media (forced-colors: active) {
  .slab-row__bar { forced-color-adjust: none; background: CanvasText; }
  .slab-chart.has-active .slab-row:not(.is-active) .slab-row__bar { background: GrayText; }
  .slab-chart.has-active .slab-row.is-active .slab-row__bar { background: Highlight; }
}

.slab-finder { display: grid; gap: .55rem; border-top: 1px solid var(--line); padding-top: .9rem; margin-bottom: .9rem; }
.slab-finder__label { display: flex; align-items: center; gap: .45rem; font-size: .84rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.slab-finder__label .icon { width: 1.1rem; height: 1.1rem; color: var(--blue-600); }
.stepper { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; gap: .4rem; }
.stepper__btn { display: grid; place-items: center; min-height: 46px; border: 1.5px solid #cfd8e3; border-radius: 12px; background: #fff; color: var(--blue-700); cursor: pointer; }
.stepper__btn:hover { border-color: var(--blue-600); background: var(--blue-50); }
.stepper__btn .icon { width: 20px; height: 20px; }
.stepper__input { text-align: center; font-weight: 700; }
.slab-result { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--body); background: var(--soft); border-radius: 12px; padding: .7rem .85rem; }
.slab-result strong { color: var(--ink); }
.slab-source { margin: 0 0 .6rem; font-size: .76rem; color: var(--muted); }
.slab-card .text-link { display: inline-block; }
.slab-card .text-link .icon { display: inline-block; vertical-align: -.18em; margin-left: .2rem; }

/* ---------- About the partnership ---------- */
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1.4rem 0 1.6rem; }
.stat { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; min-width: 0; }
.stat strong { display: block; color: var(--blue-700); font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); line-height: 1.2; }
.stat span { display: block; margin-top: .2rem; font-size: .84rem; line-height: 1.4; color: var(--body); }
.team-card__more { margin-top: 1rem; }

/* ---------- Programme ---------- */
.student-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.student-card h3 { display: flex; align-items: center; gap: .75rem; font-size: 1.1rem; margin: 0; }
.student-card h3 .card__icon { width: 44px; height: 44px; margin: 0; }
.student-card h3 .card__icon .icon { width: 22px; height: 22px; }
.student-card .check-list { margin: 1.1rem 0 0; }
.student-card .check-list li > span:last-child { font-size: .94rem; }

/* ---------- Partner fee structure ---------- */
@media (min-width: 992px) { #partnership .fee-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); } }
.fee-aside { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.fee-aside h3 { font-size: 1.1rem; }
.fee-aside .fee-notes { margin: .5rem 0 1.25rem; }
.slab-no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); font-weight: 700; font-size: .85rem; }
.slab-table td, .inst-table td { font-variant-numeric: tabular-nums; }
.slab-table tbody th, .inst-table tbody th { width: 64px; }
.inst-table { min-width: 640px; }
.table-source { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: start; margin: .75rem 0 0; font-size: .8rem; color: var(--muted); }
.table-source .icon { width: 1rem; height: 1rem; margin-top: .2rem; color: var(--blue-600); }

/* ---------- Installments ---------- */
.year-grid { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
.year-grid > * { min-width: 0; }
.year-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.year-card__head { display: flex; align-items: center; gap: .55rem; margin: 0; padding: .9rem 1.25rem; background: var(--blue-700); color: #fff; font-size: 1.05rem; }
.year-card__head .icon { width: 1.2rem; height: 1.2rem; }
.year-card .steps { padding: 1.25rem 1.25rem .25rem; }
.year-card .steps li { grid-template-columns: 40px 1fr; gap: .85rem; padding-bottom: 1rem; }
.year-card .steps li::before { width: 40px; height: 40px; font-size: 1rem; box-shadow: 0 0 0 5px var(--blue-50); }
.year-card .steps li::after { left: 19px; top: 44px; }
.year-card .steps h4 { margin: .45rem 0 .1rem; font-size: 1rem; color: var(--ink); }
.year-card .steps p { font-size: .92rem; }
.inst-table-wrap { margin-top: .5rem; }

.terms-card { margin-top: 1.75rem; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; }
.terms-card h3 { font-size: 1.1rem; margin-bottom: .9rem; }
.terms-list { list-style: none; counter-reset: term; display: grid; gap: .75rem; }
@media (min-width: 900px) { .terms-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; } }
.terms-list li { counter-increment: term; display: grid; grid-template-columns: 28px 1fr; gap: .65rem; font-size: .93rem; color: var(--ink); }
.terms-list li::before { content: counter(term); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--blue-100); color: var(--blue-700); font-weight: 700; font-size: .8rem; }

/* ---------- How to become a partner ---------- */
.process { list-style: none; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; } }
.process__step { position: relative; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.process__num { position: absolute; top: 1.1rem; right: 1.25rem; font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--blue-100); }
.process__step h3 { margin-bottom: .35rem; }
.process__step p { margin: 0; font-size: .93rem; }
@media (min-width: 1024px) {
  .process__step:not(:last-child)::after { content: ""; position: absolute; top: 2.7rem; right: -1.25rem; width: 1.25rem; height: 2px; background: var(--blue-100); }
}

/* ---------- Partnership form ---------- */
.apply-grid { display: grid; gap: 1.5rem; }
@media (min-width: 992px) { .apply-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 2rem; align-items: start; } }
.apply-grid > * { min-width: 0; }
.partner-form .textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.partner-form .field { align-content: start; }
.field-hint { margin: 0; font-size: .76rem; color: var(--muted); }
@media (max-width: 479px) { .form-row--numbers { grid-template-columns: 1fr; } }

.apply-aside { display: grid; gap: 1rem; }
@media (min-width: 992px) { .apply-aside { position: sticky; top: calc(var(--header-h) + 24px); } }
.contact-person { display: grid; grid-template-columns: 72px 1fr; gap: .9rem; align-items: center; margin-bottom: 1.1rem; }
.contact-person img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.contact-person__label { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9fd6a8; }
.contact-person h3 { margin: .1rem 0 0; color: #fff; font-size: 1.15rem; }
.contact-person__role { margin: 0; font-size: .86rem; color: #b8cde4; }
.apply-aside__ready, .privacy-note { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem 1.25rem; box-shadow: var(--shadow-sm); }
.apply-aside__ready h3 { font-size: 1rem; margin-bottom: .6rem; }
.apply-aside__ready .fee-notes { margin-top: 0; }
.privacy-note { scroll-margin-top: calc(var(--header-h) + 16px); }
.privacy-note summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); }
.privacy-note summary::-webkit-details-marker { display: none; }
.privacy-note summary .icon { width: 1.1rem; height: 1.1rem; color: var(--green-600); }
.privacy-note summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--blue-600); border-bottom: 2px solid var(--blue-600); transform: rotate(45deg); transition: transform .2s ease; }
.privacy-note[open] summary::after { transform: rotate(-135deg); }
.privacy-note__body { margin-top: .75rem; font-size: .84rem; color: var(--body); }
.privacy-note__body p:last-child { margin-bottom: 0; }

/* ---------- Phones: fee tables become compact rows (no sideways scrolling) ---------- */
@media (max-width: 559px) {
  .slab-table tbody tr { grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: .75rem; align-items: center; }
  .slab-table tbody th { grid-row: span 2; align-self: start; width: auto; }
  .slab-table tbody td.students { font-weight: 600; color: var(--ink); }
  .slab-table tbody td.per-year[data-label] { grid-column: 2 / -1; }
  .slab-table tbody td.amount, .inst-table tbody td.amount { text-align: right; }
  .slab-table tbody td.amount::before, .inst-table tbody td.amount::before { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .slab-table tbody td.amount::before { content: "2-year total"; }
  .inst-table tbody td.amount::before { content: "Per year"; }

  .inst-table { min-width: 0; }
  .inst-table tbody tr { grid-template-columns: 30px repeat(3, minmax(0, 1fr)); column-gap: .6rem; row-gap: .45rem; align-items: center; }
  .inst-table tbody th { grid-row: span 2; align-self: start; width: auto; }
  .inst-table tbody td.students { grid-column: 2 / 4; font-weight: 600; color: var(--ink); }
  .inst-table tbody td.amount { grid-column: 4; text-align: right; }
  .inst-table tbody td.inst[data-label] { grid-column: auto; font-size: .88rem; font-weight: 600; color: var(--ink); }
  .inst-table tbody td.inst[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}

@media print {
  .slab-finder, .apply-aside .aside-card, .partner-form, .float-wa { display: none !important; }
}
