/* Study Abroad Blog page — uses vars from style.css
   (--primary, --secondary, --accent, --dark, --white,
   --light-bg, --text-dark, --text-light). Shared card/section
   styles (home-topuni-*, home-section, trending-*, home-scholarcard-*,
   home-article-*, enquiry-modal) appended below so this page
   renders fine standalone too. */

/* Hero — same visual pattern as the Partners Network hero: blobs +
   dotted mask background, pill eyebrow, two-tone title, search bar,
   and a glass stats box, all centered in one column. */
.blg-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(85,171,215,0.35), transparent 60%),
        radial-gradient(ellipse 700px 500px at 100% 110%, rgba(37,117,252,0.4), transparent 60%),
        linear-gradient(150deg, var(--dark) 0%, var(--primary) 62%, #1a4f86 100%);
    padding: 72px 0 58px;
    text-align: center;
}

.blg-hero-blob {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.blg-hero-blob-1 {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -100px;
    background: radial-gradient(circle, rgba(85,171,215,0.5), transparent 70%);
}

.blg-hero-blob-2 {
    width: 360px;
    height: 360px;
    bottom: -240px;
    left: -120px;
    background: radial-gradient(circle, rgba(37,117,252,0.4), transparent 70%);
}

.blg-hero-dots {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255,255,255,0.14) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 10%, #000 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 10%, #000 30%, transparent 100%);
    pointer-events: none;
}

.blg-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.blg-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 7px 18px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.blg-hero-eyebrow svg {
    color: var(--accent);
    flex-shrink: 0;
}

.blg-hero-title {
    color: var(--white);
    font-size: clamp(1.3rem, 3.2vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.25;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.blg-hero-title span {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
}

.blg-hero-sub {
    color: #cfd9f0;
    font-size: 1rem;
    margin: 0 auto 30px;
    max-width: 700px;
    line-height: 1.65;
    text-wrap: balance;
}

.blg-hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border-radius: 12px;
    padding: 14px 16px;
    max-width: 580px;
    margin: 0 auto 32px;
    box-shadow: 0 24px 50px rgba(4,26,87,0.32);
    border: 1px solid rgba(255,255,255,0.5);
}

.blg-hero-search svg {
    color: var(--text-light);
    flex-shrink: 0;
}

.blg-hero-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.blg-hero-stats {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 90%;
    margin: 0 auto;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 16px 28px;
    backdrop-filter: blur(6px);
    box-shadow: 0 18px 34px rgba(4,26,87,0.25);
}

.blg-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 0 22px;
}

.blg-hero-stat strong {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

.blg-hero-stat span {
    color: #cfd9f0;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.blg-hero-stat-divider {
    width: 1px;
    height: 26px;
    background: rgba(255,255,255,0.18);
}

@media (max-width: 768px) {
    .blg-hero-title { white-space: normal; }
}

@media (max-width: 640px) {
    .blg-hero { padding: 44px 0 36px; }
    .blg-hero-title { white-space: normal; }
    .blg-hero-search { flex-wrap: wrap; padding: 12px; }
    .blg-hero-search input { font-size: 16px; min-width: 0; }
    .blg-hero-stats { gap: 10px 4px; padding: 14px 16px; }
    .blg-hero-stat { padding: 0 12px; }
    .blg-hero-stat strong { font-size: 1.1rem; }
}

@media (max-width: 380px) {
    .blg-hero-stats { flex-direction: column; }
    .blg-hero-stat-divider { width: 100%; height: 1px; }
}

/* Category tabs — sticky pill bar, same as other listing pages, minus
   the count badge (the reference design keeps these plain). */
.blg-tabs-wrapper {
    background: var(--white);
    border-bottom: 1px solid #eee;
    position: -webkit-sticky;
    position: sticky;
    top: 72px;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.blg-tabs-inner {
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.blg-tabs-inner::-webkit-scrollbar {
    display: none;
}

.blg-tab-btn {
    background: var(--light-bg);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-dark);
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s ease;
    font-family: inherit;
}

.blg-tab-btn:hover {
    background: #eaf2fb;
    color: var(--primary);
}

.blg-tab-btn.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37,117,252,0.3);
}

@media (max-width: 992px) {
    .blg-tabs-wrapper { top: 64px; }
}

@media (max-width: 640px) {
    .blg-tabs-inner { justify-content: flex-start; gap: 6px; padding: 12px 16px; }
    .blg-tab-btn { padding: 8px 16px; font-size: 0.82rem; }
    .blg-tabs-wrapper { top: 0; }
}

.blg-showing-line {
    color: var(--text-light);
    font-size: 0.86rem;
    margin: 0 0 18px;
    padding: 0 4px;
}

.blg-grid-section {
    padding-top: 40px;
}

/* Posts grid — reuses .home-article-card styling (shared component
   below), just needs its own responsive grid wrapper here.
   Fixed column count (not auto-fit/auto-fill) so cards never stretch
   wider just because fewer posts matched the active filter — 4 per
   row on desktop, stepping down on smaller screens. */
.blg-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

@media (max-width: 1100px) {
    .blg-posts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
    .blg-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .blg-posts-grid { grid-template-columns: 1fr; }
}

.blg-post-card {
    display: block;
}

.blg-post-title-link {
    color: inherit;
    text-decoration: none;
}

.blg-post-title-link:hover {
    color: var(--primary);
}

.blg-post-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    transition: gap 0.2s ease, color 0.2s ease;
}

.blg-post-readmore:hover {
    color: var(--secondary);
    gap: 9px;
}

.blg-post-readmore svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.blg-post-readmore:hover svg {
    transform: translateX(2px);
}

.blg-empty-state {
    display: none;
    text-align: center;
    color: var(--text-light);
    font-size: 0.92rem;
    padding: 50px 20px;
}

.blg-empty-state.show {
    display: block;
}

/* CTA */
.blg-quickcta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--dark), var(--primary));
    border-radius: 22px;
    padding: 38px 44px;
}

.blg-quickcta::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(85,171,215,0.28), transparent 70%);
    pointer-events: none;
}

.blg-quickcta-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.blg-quickcta-left { display: flex; align-items: flex-start; gap: 16px; }

.blg-quickcta-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blg-quickcta-left h3 { color: var(--white); font-size: 1.3rem; margin: 0 0 6px; }
.blg-quickcta-left p { color: #cfd9f0; font-size: 0.9rem; max-width: 460px; line-height: 1.55; margin: 0; }

.blg-quickcta-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

.blg-quickcta-btn-light, .blg-quickcta-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: all 0.25s ease;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.blg-quickcta-btn-light { background: var(--white); color: var(--primary); }

.blg-quickcta-btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.2);
    color: var(--primary);
}

.blg-quickcta-btn-outline { border: 1.5px solid rgba(255,255,255,0.45); color: var(--white); background: transparent; }

.blg-quickcta-btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); color: var(--white); }

@media (max-width: 768px) {
    .blg-quickcta { padding: 28px 24px; }
    .blg-quickcta-top { flex-direction: column; align-items: flex-start; }
    .blg-quickcta-actions { width: 100%; }
    .blg-quickcta-btn-light, .blg-quickcta-btn-outline { flex: 1; justify-content: center; }
}


/* ================================================================
   Shared styles below — identical to the other listing pages so
   this page renders correctly on its own.
   ================================================================ */

.home-section {
    padding: 64px 0;
}

.home-section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 40px;
}

.home-section-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
    display: block;
}

.home-section-head h2 {
    font-size: 1.7rem;
    margin-bottom: 10px;
}

.home-section-head p {
    color: var(--text-light);
    font-size: 0.94rem;
}

.bg-light-custom {
    background-color: var(--light-bg);
}

/* Top providers card — shared with global-learning.php via same class names */
.home-topuni-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.home-topuni-card {
    display: flex;
    align-items: stretch;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(20,40,70,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}

.home-topuni-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(20,40,70,0.18);
}

.home-topuni-card[data-href] {
    cursor: pointer;
}

.home-topuni-card.pw-hidden {
    display: none;
}

.home-topuni-left {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(160deg, var(--dark), var(--primary));
    color: var(--white);
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
}

.home-topuni-flagimg {
    width: 40px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    display: block;
}

.home-topuni-country {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.home-topuni-city {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #cfd9f0;
    margin-bottom: 14px;
}

.home-topuni-detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 14px;
}

.home-topuni-detail-list li {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.home-topuni-detail-list span {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #9db3d8;
}

.home-topuni-detail-list strong {
    font-size: 0.84rem;
    font-weight: 700;
}

.home-topuni-explore {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--white);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 12px;
    margin-top: auto;
    transition: color 0.2s ease;
}

.home-topuni-explore svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.home-topuni-explore:hover svg {
    transform: translateX(3px);
}

.home-topuni-main {
    flex: 1;
    min-width: 0;
    background: #eaf2fb;
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-topuni-main-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.home-topuni-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid #d7e4f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 0.88rem;
    flex-shrink: 0;
}

.home-topuni-title {
    flex: 1;
    min-width: 160px;
}

.home-topuni-title h3 {
    font-size: 1.18rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.home-topuni-title span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.home-topuni-qs {
    background: var(--dark);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    padding: 6px 12px;
    border-radius: 8px;
    line-height: 1.3;
    flex-shrink: 0;
}

.home-topuni-qs small {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    opacity: 0.75;
}

.home-topuni-statrow {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.home-topuni-statbox {
    background: var(--white);
    border-radius: 10px;
    padding: 11px 16px;
    flex: 1;
    min-width: 140px;
}

.home-topuni-statbox span {
    display: block;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-light);
    margin-bottom: 3px;
}

.home-topuni-statbox strong {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.92rem;
}

.home-topuni-statbox strong em {
    font-style: normal;
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-left: 2px;
}

.home-topuni-pillarlabel {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-light);
}

.home-topuni-pillargrid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.home-topuni-pillarcard {
    background: var(--white);
    border-radius: 10px;
    padding: 10px 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-topuni-pillarcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(20,40,70,0.1);
}

.home-topuni-pillarcard-top {
    margin-bottom: 8px;
}

.home-topuni-pillarcard-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.3;
    min-height: 2.6em;
    color: var(--text-light);
    margin-bottom: 6px;
}

.home-topuni-pillarcard-scorerow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
}

.home-topuni-pillarcard-score {
    font-weight: 800;
    color: var(--dark);
    font-size: 0.88rem;
    white-space: nowrap;
}

.home-topuni-pillarcard-score small {
    font-weight: 500;
    font-size: 0.64rem;
    color: var(--text-light);
    margin-left: 1px;
}

.home-topuni-pillarcard-rank {
    background: var(--light-bg);
    color: var(--text-light);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.home-topuni-pillartrack {
    height: 5px;
    border-radius: 5px;
    background: #e4eaf2;
    overflow: hidden;
}

.home-topuni-pillarfill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #f5c344, #f5a623);
}

@media (max-width: 900px) {
    .home-topuni-pillargrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .home-topuni-pillargrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.home-topuni-scholar {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2e8b57;
    width: fit-content;
}

.home-topuni-right {
    width: 270px;
    flex-shrink: 0;
    background: #eaf2fb;
    border-left: 1px solid #d7e4f3;
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-topuni-expert-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-topuni-avatar {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--dark);
    color: var(--white);
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-topuni-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2e8b57;
    border: 2px solid var(--white);
}

.home-topuni-expert-row strong {
    display: block;
    font-size: 0.84rem;
    color: var(--dark);
}

.home-topuni-expert-row span {
    font-size: 0.72rem;
    color: var(--text-light);
}

.home-topuni-expert-stats {
    display: flex;
    justify-content: space-between;
    background: var(--white);
    border-radius: 10px;
    padding: 10px 14px;
}

.home-topuni-expert-stats div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-topuni-expert-stats strong {
    font-size: 0.86rem;
    color: var(--dark);
}

.home-topuni-expert-stats span {
    font-size: 0.7rem;
    color: var(--text-light);
}

.home-topuni-expert-stats div:first-child span {
    color: #f5a623;
    letter-spacing: 1px;
}

.home-topuni-support {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-light);
}

.home-topuni-free {
    background: #eafaf0;
    color: #2e8b57;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    text-transform: none;
    letter-spacing: 0;
}

.home-topuni-enquire {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(160deg, var(--dark), var(--primary));
    color: var(--white);
    font-weight: 700;
    font-size: 0.86rem;
    padding: 11px;
    border-radius: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    width: 100%;
}

.home-topuni-enquire svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.home-topuni-enquire:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(4,26,87,0.25);
    color: var(--white);
}

.home-topuni-enquire:hover svg {
    transform: translateX(3px);
}

.home-topuni-contact-row {
    display: flex;
    gap: 8px;
}

.home-topuni-contact-row a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 1px solid #d7e4f3;
    background: var(--white);
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.2s ease;
}

.home-topuni-contact-row a:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.home-topuni-activity {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border-radius: 20px;
    padding: 7px 12px;
    font-size: 0.7rem;
    color: var(--text-light);
}

.home-topuni-activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2e8b57;
    flex-shrink: 0;
}

.home-topuni-more-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-topuni-heart {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #d7e4f3;
    background: var(--white);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.home-topuni-heart:hover {
    border-color: #e0567a;
    color: #e0567a;
}

.home-topuni-more {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
}

.home-topuni-viewall {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.home-topuni-viewall .btn-outline-dark {
    border: 1.5px solid #d7dfe8;
    color: var(--dark);
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 30px;
    transition: all 0.25s ease;
}

.home-topuni-viewall .btn-outline-dark:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.home-topuni-viewall .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--white);
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 30px;
    transition: all 0.25s ease;
}

.home-topuni-viewall .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(37,117,252,0.35);
    color: var(--white);
}

@media (max-width: 992px) {
    .home-topuni-card {
        flex-wrap: wrap;
    }
    .home-topuni-left {
        width: 100%;
    }
    .home-topuni-right {
        width: 100%;
        border-left: none;
        border-top: 1px solid #d7e4f3;
    }
}

@media (max-width: 600px) {
    .home-topuni-statbox {
        min-width: 120px;
    }
}

/* Trending programs / course-item-card — shared */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.course-item-card {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border: 1px solid #cfe0f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20,40,70,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.course-item-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(20,40,70,0.1);
}

.course-card-uni {
    width: 240px;
    flex-shrink: 0;
    padding: 20px 22px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.course-card-logo {
    width: 56px;
    height: 40px;
    border-radius: 6px;
    background: var(--white);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3px;
    font-weight: 800;
    color: var(--primary);
    font-size: 0.72rem;
}

.course-card-uniname {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--dark);
    font-size: 0.88rem;
    line-height: 1.3;
}

.course-card-uniname svg {
    color: #2e8b57;
    flex-shrink: 0;
}

.course-card-loc {
    font-size: 0.74rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-card-main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.course-card-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.course-card-level {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    background: var(--light-bg);
    color: var(--dark);
    padding: 4px 10px;
    border-radius: 6px;
}

.course-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.course-card-title:hover {
    color: var(--primary);
}

.course-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.85;
}

.course-card-meta strong {
    color: var(--dark);
    font-weight: 600;
}

.course-card-apply {
    width: 300px;
    flex-shrink: 0;
    background: linear-gradient(160deg, var(--dark), var(--primary));
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-card-apply-head {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.course-card-apply-head strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--white);
}

.course-card-apply-head span {
    font-size: 0.74rem;
    color: #cfd9f0;
}

.course-card-apply-body {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-card-apply-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--white);
}

.course-card-apply-row svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--white);
}

.course-card-apply-row strong {
    display: block;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--white);
}

.course-card-apply-row span {
    color: #cfd9f0;
    font-size: 0.74rem;
}

.course-card-apply-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 20px 14px;
}

.course-card-heart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    background: transparent;
    transition: all 0.2s ease;
}

.course-card-heart:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--white);
}

.course-card-apply-btn {
    flex: 1.3;
    background: var(--white);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.82rem;
    text-align: center;
    padding: 8px 8px;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.course-card-apply-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.course-card-more-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.4);
    background: transparent;
    color: var(--white);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.course-card-apply .course-card-more-link:hover {
    background: rgba(255,255,255,0.18);
    border-color: var(--white);
    color: var(--white);
}

@media (max-width: 780px) {
    .course-item-card {
        flex-direction: column;
    }
    .course-card-uni {
        width: 100%;
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .course-card-apply {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .trending-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Scholarships — shared */
.home-scholar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.home-scholarcard {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid #edf0f4;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(20,40,70,0.04);
}

.home-scholarcard:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(20,40,70,0.14);
    border-color: var(--accent);
}

.home-scholarcard-level {
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: linear-gradient(90deg, var(--dark), var(--primary));
    padding: 12px 20px;
    text-align: left;
}

.home-scholarcard-level span {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--dark);
    background: var(--white);
    padding: 2px 8px;
    border-radius: 6px;
}

.home-scholarcard-level strong {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.home-scholarcard-body {
    flex: 1;
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-scholarcard-org {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-light);
}

.home-scholarcard-org strong {
    color: var(--dark);
    text-transform: none;
    font-size: 0.84rem;
}

.home-scholarcard-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.02rem;
    line-height: 1.35;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-scholarcard-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed #e6ecf5;
}

.home-scholarcard-amount {
    font-size: 0.72rem;
    font-weight: 700;
    color: #b5790f;
    background: #fdf3e4;
    border: 1px solid #f5e3c2;
    padding: 3px 10px;
    border-radius: 20px;
}

.home-scholarcard-deadline {
    font-size: 0.74rem;
    color: var(--text-light);
}

.home-scholarcard-apply {
    margin-top: 10px;
    text-align: center;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 11px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.home-scholarcard-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37,117,252,0.3);
    color: var(--white);
}

/* Blog articles — shared */
.home-articles {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    padding: 60px 0;
}

.home-articles-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.home-articles-head h2 {
    color: var(--white);
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.home-articles-head .home-section-eyebrow {
    color: #9db3d8;
}

.home-articles-viewall {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--white);
}

.home-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.home-article-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.25);
}

.home-article-media {
    position: relative !important;
    height: 140px !important;
    max-height: 140px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.35);
}

/* Optional post image (post.image in the blade file): fills the media
   box behind the icon/badge. If a post has no image, or the image
   404s, the blade's onerror hides it and the original icon shows
   through — this rule set is purely additive and does not change
   layout for posts without an image.
   !important guards against the same class names being defined
   elsewhere (e.g. a global home.css loaded on this page) and
   letting the raw photo stretch to its natural height instead of
   staying capped at the 140px media box. */
.home-article-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 140px !important;
    object-fit: cover !important;
    z-index: 1;
    margin: 0 !important;
}

.home-article-media.has-image .home-article-icon {
    display: none !important;
}

.home-article-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: rgba(255,255,255,0.92);
    color: var(--dark);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}

.home-article-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-article-body h4 {
    font-size: 0.96rem;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.35;
}

.home-article-body p {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 14px;
    line-height: 1.5;
}

.home-article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-light);
    border-top: 1px solid #eee;
    padding-top: 10px;
}

@media (max-width: 768px) {
    .home-articles-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Enquiry modal — shared */
.enquiry-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.enquiry-modal.active {
    display: flex;
}

.enquiry-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(1px);
}

.enquiry-modal-box {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: 14px;
    padding: 26px 26px 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    animation: enquiryModalOpen 0.25s ease;
}

@keyframes enquiryModalOpen {
    from { opacity: 0; transform: translateY(15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.enquiry-modal-close {
    position: absolute;
    top: 13px;
    right: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #667085;
    font-size: 27px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enquiry-modal-close:hover {
    color: var(--dark);
}

.enquiry-modal-box h2 {
    font-size: 1.35rem;
    color: var(--dark);
    margin: 0 0 6px;
}

.enquiry-modal-subtitle {
    margin: 0 0 22px;
    color: var(--text-light);
    font-size: 0.84rem;
    line-height: 1.5;
}

.enquiry-modal-subtitle span {
    font-weight: 600;
}

.enquiry-form-group {
    margin-bottom: 16px;
}

.enquiry-form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--dark);
    font-size: 0.82rem;
    font-weight: 600;
}

.enquiry-form-group input,
.enquiry-form-group textarea {
    width: 100%;
    border: 1px solid #dfe4ec;
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.84rem;
    color: var(--dark);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.enquiry-form-group input {
    height: 46px;
}

.enquiry-form-group textarea {
    min-height: 90px;
    resize: vertical;
}

.enquiry-form-group input::placeholder,
.enquiry-form-group textarea::placeholder {
    color: #98a2b3;
}

.enquiry-form-group input:focus,
.enquiry-form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 93, 170, 0.1);
}

.enquiry-submit-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 9px;
    background: linear-gradient(160deg, var(--dark), var(--primary));
    color: #fff;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.enquiry-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(4, 26, 87, 0.22);
}

body.enquiry-modal-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .enquiry-modal { padding: 15px; }
    .enquiry-modal-box { max-width: 100%; padding: 24px 20px 20px; }
}

/* =========================================================
   FILTER TABS — same behaviour as the other listing pages
   (Program Finder, Events, Study Destination):
   sticky exactly under the header, one swipeable row on
   phones with a blue scroll bar + fade, tabs wrap on laptop.
   Works together with the updated blogs.js
   ========================================================= */

:root { --blg-header-h: 72px; }

/* NOTE: never put overflow on html/body — it breaks position: sticky. */
.blg-hero, .blg-grid-section { overflow-x: clip; }

.blg-tabs-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: var(--blg-header-h, 72px) !important;
    z-index: 999;
    margin-top: -1px;
}

.blg-grid-section {
    scroll-margin-top: calc(var(--blg-header-h, 72px) + 80px);
}

/* laptop / desktop: centred pills that wrap instead of being cut off */
.blg-tabs-inner {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    padding: 14px 0 !important;
}

/* tabs wrapper + custom blue scroll bar (both added by JS) */
.blg-tabs-scroll { position: relative; min-width: 0; }
.blg-tabs-bar {
    display: none;
    position: relative;
    height: 4px;
    margin: 0 0 10px;
    border-radius: 10px;
    background: #e4ecf3;
    overflow: hidden;
}
.blg-tabs-bar span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.15s ease;
}

/* phones & small tablets: single swipeable row */
@media (max-width: 768px) {
    .blg-tabs-inner {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        scroll-behavior: smooth;
        scrollbar-width: none;
        gap: 6px;
        padding: 12px 0 10px !important;
    }
    .blg-tabs-inner::-webkit-scrollbar { display: none; }
    .blg-tab-btn { flex-shrink: 0; padding: 8px 14px; font-size: 0.8rem; }
    .blg-tabs-scroll.has-overflow .blg-tabs-bar { display: block; }
    .blg-tabs-scroll.has-overflow:not(.at-end) .blg-tabs-inner {
        -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
        mask-image: linear-gradient(90deg, #000 82%, transparent);
    }
}

@media (max-width: 640px) {
    .blg-tabs-wrapper { top: var(--blg-header-h, 60px) !important; }
}

/* touch devices: no stuck hover colour on tabs / lift on cards */
@media (hover: none) {
    .blg-tab-btn:hover { background: var(--light-bg); color: var(--text-dark); }
    .blg-tab-btn.active:hover { background: linear-gradient(90deg, var(--primary), var(--secondary)); color: var(--white); }
    .home-article-card:hover { transform: none; }
}