/* Overseas University pages (/overseas-university). Everything is scoped under .ov so the rest of the site is not affected. */
.ov {
    --ov-green: #2eca7f;
    --ov-green-dark: #198754;
    --ov-green-bar: #1d7a4c;
    --ov-green-soft: #f2f8f1;
    --ov-yellow: #ffff25;
    --ov-muted: #6c757d;
    --ov-line: #dee2e6;
    --ov-radius: 10px;
}
.ov [id] { scroll-margin-top: 90px; }

/* ---------- List page ---------- */
.ov #ovSearch { width: 100%; }
.ov .ov-filter button { display: flex; justify-content: space-between; width: 100%; padding: 6px 0; border: 0; background: none; text-align: left; color: #212529; }
.ov .ov-filter button:hover, .ov .ov-filter button[aria-pressed='true'] { color: var(--ov-green); }
.ov .ov-filter button[aria-pressed='true'] { font-weight: 600; }
.ov .ov-filter .n { color: var(--ov-muted); font-size: 13px; font-weight: 400; }
.ov .ov-letters { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 0; margin-bottom: 12px; padding: 0.5em 0; }
.ov .ov-letters button { min-height: 38px; padding: 0; border: 0; background: none; font-size: 18px; font-weight: 700; color: #212529; }
.ov .ov-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ov .ov-filters .ov-sort { min-width: 0; width: auto; }
.ov .ov-letters button:hover, .ov .ov-letters button[aria-pressed='true'] { color: var(--ov-green); }
.ov .ov-letters button[aria-pressed='true'] { text-decoration: underline; text-underline-offset: 6px; }
.ov .ov-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ov .ov-count { color: var(--ov-muted); font-weight: 600; }
.ov .ov-sort { height: 34px; padding: 0 10px; border: 1px solid var(--ov-green-dark); border-radius: 4px; background: #fff; min-width: 190px; }

.ov .ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.ov .ucard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 12px 20px; border-radius: var(--ov-radius); background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.075); text-decoration: none; text-align: center; color: #212529; min-height: 240px; transition: transform 0.2s, box-shadow 0.2s; }
.ov .ucard:hover { transform: translateY(-6px); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15); }
.ov .ucard .logo { width: 180px; max-width: 100%; height: 100px; display: flex; align-items: center; justify-content: center; }
.ov .ucard .logo img { max-height: 100px; max-width: 100%; object-fit: contain; }
.ov .ucard h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.25; }
.ov .ucard h3 .zh { display: block; margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--ov-muted); }
.ov .ucard .meta { margin-top: auto; font-size: 12px; color: var(--ov-green-dark); font-weight: 500; }
.ov .rank-badge { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 40px; background: var(--ov-yellow); }
.ov .ucard .price { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ov-green-dark); }
.ov .ucard .price b { font-size: 16px; }
.ov .ucard .price small { font-size: 11.5px; color: var(--ov-muted); }
.ov .ucard .price.none { color: var(--ov-muted); font-style: italic; }
.ov .ov-more { display: block; margin: 24px auto 0; min-height: 44px; padding: 0 28px; border: 0; border-radius: 40px; background: var(--ov-green); color: #fff; font-weight: 600; }

.ov .fee-picker { background: #f6faf7; border: 1px solid #d6ecd9; border-radius: var(--ov-radius); padding: 14px 16px; margin: 0 0 18px; }
.ov .fp-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.ov .fp-label { font-size: 13px; font-weight: 600; color: var(--ov-muted); min-width: 90px; padding-top: 9px; }
.ov .fp-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.ov .fp-chips button { border: 1px solid #cfe7d6; background: #fff; border-radius: 20px; padding: 6px 14px; font-size: 14px; min-height: 36px; }
.ov .fp-chips button[aria-pressed='true'] { background: var(--ov-green); border-color: var(--ov-green); color: #fff; font-weight: 600; }
.ov .fp-chips button .n { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: #eef5f0; color: var(--ov-muted); font-size: 11.5px; font-weight: 600; }
.ov .fp-chips button[aria-pressed='true'] .n { background: rgba(255, 255, 255, 0.25); color: #fff; }
.ov .fp-note { margin: 4px 0 0; font-size: 12.5px; color: var(--ov-muted); }

@media (max-width: 767px) {
    /* Phones: the letters stay in one row you swipe sideways */
    .ov .ov-letters { display: flex; overflow-x: auto; scrollbar-width: none; }
    .ov .ov-letters::-webkit-scrollbar { display: none; }
    .ov .ov-letters button { flex: 0 0 34px; font-size: 16px; }
    .ov .ov-filters { width: 100%; }
    .ov .ov-filters .ov-sort { flex: 1 1 140px; }
    .ov .fp-label { min-width: 100%; padding-top: 0; }
    /* Phones: majors as one row you swipe sideways */
    .ov #fpArea { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
    .ov #fpArea::-webkit-scrollbar { display: none; }
    .ov #fpArea button { flex: 0 0 auto; white-space: nowrap; }
}

/* ---------- Detail page ---------- */
.ov .banner-title { display: inline-block; max-width: 100%; background: rgba(255, 255, 255, 0.85); border-radius: 15px; padding: 22px 32px; }
.ov .banner-title h2 { margin: 0; }
.ov .banner-title .name-zh { margin: 6px 0 0; font-size: 20px; font-weight: 500; color: #333; }
.ov .intro { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; padding: 32px 0; }
.ov .intro .logo { flex: 1 1 216px; display: flex; justify-content: center; }
.ov .intro .logo img { width: 216px; max-width: 100%; }
.ov .intro .text { flex: 999 1 560px; min-width: 0; }
.ov .intro p { margin: 0 0 14px; font-size: 17px; line-height: 1.85; text-align: justify; color: #000; }
.ov .green-bar { height: 5px; border-radius: 3px; background: var(--ov-green-bar); margin: 28px 0 0; }
.ov .ov-section { padding: 8px 0 40px; }
.ov .ov-section h2 { margin: 0 0 18px; font-size: 32px; font-weight: 600; }
.ov .ov-section h2 small, .ov .cost-head h2 small { font-size: 15px; font-weight: 500; color: var(--ov-muted); margin-left: 6px; }
.ov .info-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding: 26px 24px; border: 1px solid var(--ov-line); border-radius: var(--ov-radius); }
.ov .info-card .facts { flex: 1 1 420px; min-width: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; color: var(--ov-green-dark); margin: 0; }
.ov .info-card .facts dt { font-weight: 600; }
.ov .info-card .facts dd { margin: 0; }
.ov .info-card .facts a { color: var(--ov-green-dark); }
.ov .info-card .actions { flex: 0 0 190px; display: flex; flex-direction: column; gap: 12px; }
.ov .pill { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 0 18px; border-radius: 40px; border: 0; font-weight: 600; text-decoration: none; }
.ov .pill.green { background: var(--ov-green); color: #fff; }
.ov .pill.yellow { background: var(--ov-yellow); color: #000; }
.ov .pill.dark { background: #212529; color: var(--ov-yellow); }

/* Photo carousel + viewer (same look as the Malaysian university pages) */
.ov .slider-wrapper { display: flex; align-items: center; gap: 8px; }
.ov .slider-btn { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #02c405; color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.ov .slider-btn:hover { background: var(--ov-green-dark); }
.ov .image-list { flex: 1; min-width: 0; display: flex; gap: 8px; padding: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ov .image-list::-webkit-scrollbar { display: none; }
/* Fewer photos than fit: centre them, no arrows */
.ov .slider-wrapper.fits .image-list { justify-content: center; }
.ov .slider-wrapper.fits .slider-btn { visibility: hidden; }
.ov .feature-img { position: relative; flex: 0 0 calc((100% - 24px) / 4); height: auto; aspect-ratio: 3 / 2; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: zoom-in; scroll-snap-align: start; background: #eef0f2; }
.ov .feature-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.ov .feature-img:hover img { transform: scale(1.05); }
@media (max-width: 991px) { .ov .feature-img { flex-basis: calc((100% - 8px) / 2); } }
/* Captions: max 2 lines */
.ov .feature-img .cap { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: max-content; max-width: 88%; padding: 3px 14px; border-radius: 10px 10px 0 0; background: #fff; font-size: 11px; font-weight: 600; color: #000; line-height: 1.35; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ov .lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); }
.ov .lightbox[hidden] { display: none; }
.ov .lb-inner { position: relative; width: min(1110px, 100%); }
/* Every photo gets the same frame, whatever its size */
.ov .lb-inner img { width: 100%; height: min(75vh, 66vw); object-fit: contain; display: block; border-radius: 6px; background: #000; }
.ov .lb-close { position: absolute; top: -34px; right: 0; border: 0; background: none; color: #fff; font-size: 26px; font-weight: 700; }
.ov .lb-prev, .ov .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.ov .lb-prev { left: 16px; }
.ov .lb-next { right: 16px; }
.ov .lb-cap { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); max-width: 80%; padding: 10px 40px; border-radius: 24px 24px 0 0; background: rgba(255, 255, 255, 0.92); font-size: clamp(16px, 2.4vw, 28px); font-weight: 700; color: #000; text-align: center; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ov .lb-credit { position: absolute; right: 8px; top: 8px; font-size: 11px; color: #fff; background: rgba(0, 0, 0, 0.5); padding: 2px 8px; border-radius: 4px; text-decoration: none; }
.ov .lb-credit:empty { display: none; }

/* Why choose: 5 green boxes gliding sideways; tap to stop / start. Phones: one box at a time with dots. */
.ov .why-marquee { position: relative; overflow: hidden; cursor: pointer; padding: 4px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ov .why-track { display: flex; gap: 16px; width: max-content; animation: ov-why-scroll 36s linear infinite; }
.ov .why-marquee.paused .why-track { animation-play-state: paused; }
.ov .why-track .item { flex: 0 0 300px; padding: 20px; border-radius: var(--ov-radius); background: var(--ov-green-soft); border: 1px solid #d6ecd9; }
.ov .why-track .item h3 { margin: 0 0 6px; font-size: 17px; }
.ov .why-track .item p { margin: 0; color: #444; font-size: 15px; line-height: 1.55; }
.ov .why-marquee.static { overflow-x: auto; cursor: default; -webkit-mask-image: none; mask-image: none; }
.ov .why-marquee.static .why-track { animation: none; }
.ov .why-marquee.slides { -webkit-mask-image: none; mask-image: none; overflow: visible; }
.ov .why-marquee.slides .why-track { animation: none; width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; gap: 12px; }
.ov .why-marquee.slides .why-track::-webkit-scrollbar { display: none; }
.ov .why-marquee.slides .why-track .item { flex: 0 0 100%; scroll-snap-align: center; min-height: 150px; }
.ov .why-marquee.slides .why-track .item[aria-hidden='true'] { display: none; }
.ov .why-dots { display: none; justify-content: center; gap: 8px; margin-top: 12px; }
.ov .why-marquee.slides + .why-dots { display: flex; }
.ov .why-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: #cfe7d6; }
.ov .why-dots button[aria-current='true'] { background: var(--ov-green); width: 24px; border-radius: 6px; }
.ov .hint { margin: 8px 0 0; font-size: 12px; color: var(--ov-muted); }
@keyframes ov-why-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 8px)); } }
@media (prefers-reduced-motion: reduce) {
    .ov .why-track { animation: none; }
    .ov .why-track [data-copy] { display: none; }
    .ov .why-marquee { overflow-x: auto; cursor: default; -webkit-mask-image: none; mask-image: none; }
    .ov .why-marquee.slides .why-track { scroll-behavior: auto; }
    .ov .ucard, .ov .feature-img img, .ov .step .chev { transition: none; }
}

/* Currency switch (one per section) */
.ov .cost-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ov .cost-head h2 { margin: 0; }
.ov .cur-switch { display: inline-flex; padding: 3px; border-radius: 40px; background: #eef0f2; border: 1px solid var(--ov-line); }
.ov .cur-switch button { border: 0; background: none; border-radius: 40px; padding: 4px 16px; font-size: 13px; font-weight: 600; color: #444; }
.ov .cur-switch button[aria-pressed='true'] { background: var(--ov-green); color: #fff; }
/* Show the chosen currency big and the other small; the table layout never changes */
.ov [data-cur-section] .in-rm { display: none; }
.ov [data-cur-section].show-rm .in-rm { display: block; }
.ov [data-cur-section].show-rm .in-local { display: none; }
.ov .main { display: block; font-weight: 600; color: var(--ov-green-dark); }
.ov .alt { display: block; font-size: 13px; font-weight: 400; color: var(--ov-muted); }

/* Fees + living tables keep the same column widths when switching currency */
.ov table.fixed { table-layout: fixed; width: 100%; }
.ov table.fixed td, .ov table.fixed th { overflow-wrap: anywhere; }
.ov .fees-table { border-collapse: collapse; font-size: 16px; border: 1px solid var(--ov-line); }
.ov .fees-table th { text-align: left; padding: 16px 20px; background: #d9f3e3; color: #000; font-weight: 600; }
.ov .fees-table th:first-child { background: var(--ov-green); color: #fff; }
.ov .fees-table td { padding: 14px 20px; border-top: 1px solid var(--ov-line); vertical-align: top; }
.ov .fees-table td.area { vertical-align: middle; border-right: 1px solid var(--ov-line); }
.ov small.sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--ov-muted); margin-top: 2px; }
.ov .table-note { font-size: 13px; color: var(--ov-muted); margin: 10px 2px 0; }
.ov .cost-table { border-collapse: collapse; font-size: 15px; }
.ov .cost-table th, .ov .cost-table td { text-align: left; padding: 18px 12px; border-bottom: 1px solid var(--ov-line); vertical-align: top; }
.ov .cost-table thead th { font-size: 13px; color: var(--ov-muted); font-weight: 600; padding-top: 12px; padding-bottom: 12px; }
.ov .cost-table th[scope='row'] { font-weight: 600; font-size: 15px; color: #212529; }
.ov .cost-table tr.group th { background: #f6f8f7; font-size: 13px; color: var(--ov-muted); padding: 12px; }
.ov .cost-table tfoot th, .ov .cost-table tfoot td { border-top: 2px solid var(--ov-green); border-bottom: 0; padding-top: 20px; padding-bottom: 20px; }
.ov .tag { display: inline-block; font-size: 11px; font-weight: 600; background: #e6f7ee; color: var(--ov-green-dark); border-radius: 20px; padding: 1px 8px; vertical-align: middle; }
.ov .table-wrap { overflow-x: auto; }

/* Rankings */
.ov .rank-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ov .rank-tile { border: 1px solid var(--ov-line); border-radius: var(--ov-radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.ov .rank-tile .sys { font-size: 13px; color: var(--ov-muted); font-weight: 600; }
.ov .rank-tile .num { font-size: 36px; font-weight: 700; line-height: 1.1; }
.ov .rank-tile .num span { font-size: 18px; color: var(--ov-muted); }
.ov .rank-tile .yr { font-size: 13px; color: var(--ov-green-dark); }
.ov .rank-logo { display: inline-flex; align-items: center; height: 40px; margin-bottom: 6px; font-size: 20px; font-weight: 700; color: #212529; text-decoration: none; }
.ov .rank-logo img { height: 34px; width: auto; max-width: 160px; }

/* How to apply: opening a step ticks every step above it */
.ov .process { background: var(--ov-green-soft); padding: 56px 0 64px; }
.ov .process h2 { margin: 0 0 6px; font-size: 32px; font-weight: 600; }
.ov .process .lead { margin: 0 0 28px; color: #444; font-size: 16px; }
.ov .steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ov .step { background: #fff; border-radius: 12px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.075); overflow: hidden; }
.ov .step > button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 0; background: none; text-align: left; }
.ov .step .num { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--ov-green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ov .step .num .tick { display: none; }
.ov .step.done .num { background: #d1f2df; color: var(--ov-green-dark); }
.ov .step.done .num .n { display: none; }
.ov .step.done .num .tick { display: inline; font-size: 20px; }
.ov .step .t { flex: 1; font-weight: 600; font-size: 17px; }
.ov .step .when { font-size: 13px; color: var(--ov-muted); white-space: nowrap; }
.ov .step .chev { transition: transform 0.2s; font-size: 22px; }
.ov .step.open .chev { transform: rotate(180deg); }
.ov .step .panel { display: none; padding: 0 20px 20px 74px; }
.ov .step.open .panel { display: block; }
.ov .step .panel p { margin: 0 0 14px; line-height: 1.7; }
.ov .step .panel .links { display: flex; flex-wrap: wrap; gap: 10px; }
.ov .step .panel .links a { color: var(--ov-green-dark); font-size: 14px; }
.ov .process .help { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; border-radius: 14px; background: #fff; border: 2px solid var(--ov-green); }
.ov .process .help h3 { margin: 0 0 4px; font-size: 22px; }
.ov .process .help p { margin: 0; color: #444; }
.ov .wa-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 40px; background: #25d366; color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; }

@media (max-width: 600px) {
    .ov .banner-title { padding: 16px 20px; }
    .ov .intro p { text-align: left; font-size: 16px; }
    .ov .ov-section h2, .ov .process h2 { font-size: 26px; }
    .ov .info-card .facts { grid-template-columns: 1fr; gap: 2px; }
    .ov .info-card .facts dd { margin-bottom: 8px; }
    .ov .info-card .actions { flex: 1 1 100%; }
    .ov .feature-img { flex-basis: 100%; }
    .ov .slider-btn { width: 34px; height: 34px; }
    .ov .lb-cap { padding: 6px 16px; }
    .ov .why-track .item { flex-basis: 260px; }
    .ov .fees-table th, .ov .fees-table td { padding: 10px 12px; font-size: 14px; }
    .ov .cost-table col.amt-col { width: 28% !important; }
    .ov .step .panel { padding-left: 20px; }
    .ov .step .when { display: none; }
}
/* Living expenses: more room above and below the table */
.ov #costs { padding-top: 24px; padding-bottom: 56px; }
.ov #costs .table-note { margin-top: 16px; }
/* Layout rules that used to be inline styles */
.ov .search-label { display: inline-block; width: 100%; position: relative; }
.ov .ov-section.first { padding-top: 40px; }
.ov .ov-section.tight { padding-top: 16px; }
.ov .fees-table col.w-major { width: 32%; }
.ov .fees-table col.w-type { width: 36%; }
.ov .fees-table col.w-fee { width: 32%; }
.ov .cost-table col.amt-col { width: 22%; }
.ov .wa-btn .wa-icon { font-size: 22px; }
