section { padding: 2.5rem 0; position: relative; }

/* ---------- HERO with line pattern ---------- */
.bg-hero {
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    color: #fff;
    padding: 3rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.bg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    mask-image: linear-gradient(135deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
}
.bg-hero::after {
    content: '';
    position: absolute;
    top: -150px; right: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.bg-hero .container { position: relative; z-index: 2; }

.inst-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: rgba(255,255,255,.6);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.inst-breadcrumb a { color: #a5b4fc; text-decoration: none; transition: .2s; }
.inst-breadcrumb a:hover { color: #fff; }
.inst-breadcrumb .sep { opacity: .5; }
.inst-breadcrumb .active { color: rgba(255,255,255,.75); max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.inst-hero-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
}
@media (max-width: 768px) { .inst-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.inst-logo-hero {
    width: 140px;
    height: 140px;
    border-radius: 1.5rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1.25rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
    border: 4px solid rgba(255,255,255,.15);
    flex-shrink: 0;
}
@media (max-width: 768px) { .inst-logo-hero { width: 100px; height: 100px; margin: 0 auto; } }
.inst-logo-hero img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inst-logo-hero i { font-size: 3.5rem; color: var(--primary); }

.inst-title {
    font-size: 2.35rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: #fff;
    margin-bottom: .75rem;
}
.inst-lead {
    font-size: 1rem;
    color: rgba(255,255,255,.82);
    line-height: 1.6;
    font-weight: 300;
    max-width: 720px;
    margin-bottom: 1.25rem;
}
.inst-meta-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.inst-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    border-radius: 50px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    font-size: .78rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}
.inst-meta-pill i { color: #a5b4fc; }
.inst-meta-pill.featured {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(245,158,11,.35);
}
.inst-meta-pill.featured i { color: #fff; }

/* ---------- STATS (overlapping) ---------- */
.inst-stats {
    margin-top: -3rem;
    padding: 0 0 2.5rem;
    position: relative;
    z-index: 5;
}
.inst-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 768px) { .inst-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.35rem 1rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 32px rgba(15,23,42,.08);
    transition: .3s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s;
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { transform: translateY(-6px); }
.stat-card .icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: .65rem;
}
.stat-card .val { font-size: 1.5rem; font-weight: 800; color: #0f172a; letter-spacing: -.04em; line-height: 1; }
.stat-card .lbl { font-size: .72rem; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: .35rem; }

/* ---------- BODY with line pattern ---------- */
.bg-body {
    background-color: #f8fafc;
    background-image:
        linear-gradient(rgba(99,102,241,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,.045) 1px, transparent 1px);
    background-size: 44px 44px;
}

/* ---------- LAYOUT ---------- */
.layout-grid { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
@media (max-width: 992px) { .layout-grid { grid-template-columns: 1fr; } }

.panel {
    background: #fff;
    border-radius: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 16px rgba(15,23,42,.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.panel-head {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.panel-head .ic {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(99,102,241,.25);
}
.panel-head h5 {
    font-weight: 800;
    color: #0f172a;
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: -.01em;
}
.panel-body { padding: 1.75rem; }

/* Profile / WYSIWYG content */
.inst-profile { font-size: 1rem; line-height: 1.75; color: #334155; }
.inst-profile h1, .inst-profile h2, .inst-profile h3 {
    font-weight: 800;
    color: #0f172a;
    margin-top: 1.5rem;
    margin-bottom: .75rem;
    letter-spacing: -.02em;
}
.inst-profile h1 { font-size: 1.5rem; }
.inst-profile h2 { font-size: 1.25rem; }
.inst-profile h3 { font-size: 1.1rem; }
.inst-profile p { margin-bottom: 1rem; }
.inst-profile ul, .inst-profile ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.inst-profile li { margin-bottom: .35rem; }
.inst-profile blockquote {
    border-left: 4px solid var(--primary);
    background: #eef2ff;
    padding: .85rem 1.15rem;
    border-radius: .75rem;
    margin: 1rem 0;
    font-style: italic;
    color: #475569;
}
.inst-profile img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1rem 0;
    box-shadow: 0 8px 24px rgba(15,23,42,.1);
}
.inst-profile a { color: var(--primary); }

/* Certifications */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.cert-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-radius: 1rem;
    border-left: 4px solid var(--primary);
    transition: .2s;
}
.cert-item:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    box-shadow: 0 8px 20px rgba(99,102,241,.15);
}
.cert-item .ic {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245,158,11,.3);
}
.cert-item .text { font-weight: 600; color: #334155; font-size: .88rem; line-height: 1.4; }

/* Course cards (compact) */
.course-card {
    background: #fff;
    border-radius: 1.15rem;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 10px rgba(15,23,42,.04);
    transition: .35s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15,23,42,.12);
    border-color: rgba(99,102,241,.25);
}
.course-card .thumb { position: relative; height: 160px; overflow: hidden; background: #f1f5f9; }
.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.course-card:hover .thumb img { transform: scale(1.06); }
.course-card .thumb .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 2rem;
}
.course-card .thumb .price-tag {
    position: absolute;
    bottom: 10px; right: 10px;
    padding: .3rem .8rem;
    border-radius: 50px;
    background: rgba(15,23,42,.88);
    backdrop-filter: blur(8px);
    color: #fff;
    font-weight: 800;
    font-size: .78rem;
}
.course-card .thumb .price-tag.free { background: linear-gradient(135deg, #10b981, #059669); }
.course-card .body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.course-card .cat-pill {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 50px;
    background: #eef2ff;
    color: var(--primary);
    font-size: .68rem;
    font-weight: 700;
    align-self: flex-start;
    margin-bottom: .5rem;
}
.course-card .title {
    font-weight: 700;
    color: #0f172a;
    font-size: .94rem;
    line-height: 1.35;
    margin-bottom: .4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-card .meta { display: flex; gap: .75rem; font-size: .74rem; color: #94a3b8; margin-bottom: .65rem; flex-wrap: wrap; }
.course-card .meta i { color: var(--primary); }
.course-card .foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: .7rem;
    border-top: 1px solid #f1f5f9;
}
.course-card .author { font-size: .74rem; color: #64748b; }
.course-card .view-btn {
    padding: .4rem 1rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    text-decoration: none;
    transition: .2s;
}
.course-card .view-btn:hover { color: #fff; box-shadow: 0 6px 16px rgba(99,102,241,.4); }

/* ---------- SIDEBAR ---------- */
.sidebar-card {
    background: #fff;
    border-radius: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 16px rgba(15,23,42,.05);
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: sticky;
    top: calc(var(--header-h) + var(--subnav-h) + 1rem);
}
.sidebar-card h6 {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.sidebar-card h6 i { color: var(--primary); }

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .75rem 0;
    border-bottom: 1px solid #f8fafc;
}
.contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-row:first-child { padding-top: 0; }
.contact-row .ic {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}
.contact-row .info { flex: 1; min-width: 0; }
.contact-row .lbl {
    font-size: .68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    margin-bottom: .1rem;
}
.contact-row .val {
    color: #0f172a;
    font-weight: 600;
    font-size: .88rem;
    word-break: break-word;
}
.contact-row .val a { color: var(--primary); text-decoration: none; }
.contact-row .val a:hover { text-decoration: underline; }

.cta-side {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1.5rem;
    padding: 1.75rem 1.5rem;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(99,102,241,.3);
    margin-bottom: 1rem;
}
.cta-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.cta-side > * { position: relative; z-index: 1; }
.cta-side .icon-circle {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: .85rem;
    backdrop-filter: blur(6px);
}
.cta-side h5 { font-weight: 800; font-size: 1.1rem; margin-bottom: .35rem; letter-spacing: -.01em; }
.cta-side p { font-size: .85rem; color: rgba(255,255,255,.9); margin-bottom: 1.15rem; line-height: 1.55; }
.cta-side a {
    padding: .65rem 1.5rem;
    border-radius: 50px;
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    font-size: .85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: .2s;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.cta-side a:hover { color: var(--primary); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.25); }

/* Other institutions */
.other-inst {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .65rem 0;
    text-decoration: none;
    color: inherit;
    transition: .2s;
    border-bottom: 1px solid #f8fafc;
}
.other-inst:last-child { border-bottom: 0; padding-bottom: 0; }
.other-inst:hover { color: var(--primary); }
.other-inst .logo-sm {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
}
.other-inst .logo-sm img { max-width: 80%; max-height: 80%; object-fit: contain; }
.other-inst .logo-sm i { color: var(--primary); font-size: 1.1rem; }
.other-inst .info { flex: 1; min-width: 0; }
.other-inst .info .t {
    font-weight: 700;
    color: #0f172a;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .1rem;
}
.other-inst:hover .info .t { color: var(--primary); }
.other-inst .info .s { font-size: .74rem; color: #94a3b8; }

/* ---------- SECTION HEADER ---------- */
.head-center { text-align: center; margin-bottom: 2rem; }
.head-center .head-pill {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .35rem 1rem; border-radius: 50px;
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(168,85,247,.12));
    color: var(--primary); font-size: .72rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: .85rem;
}
.head-center h2 {
    font-weight: 800; font-size: 1.85rem;
    letter-spacing: -.02em; margin-bottom: .5rem;
    color: #0f172a; position: relative;
    display: inline-block; padding: 0 1.5rem;
}

.head-center h2 .text-grad {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.head-center p { color: #64748b; margin: 0; font-size: .92rem; }

/* ---------- CTA ---------- */
.bg-cta {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.14) 0%, transparent 45%),
        linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 3.5rem 0;
    position: relative;
    overflow: hidden;
}
.bg-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}
.bg-cta .container { position: relative; z-index: 2; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
    .inst-title { font-size: 1.75rem; }
    .sidebar-card { position: static; }
}
@media (max-width: 576px) {
    .inst-title { font-size: 1.5rem; }
    .inst-lead { font-size: .92rem; }
    .stat-card .val { font-size: 1.25rem; }
    .panel-body { padding: 1.25rem; }
    .inst-logo-hero { width: 100px; height: 100px; padding: .85rem; }
    .inst-logo-hero i { font-size: 2.5rem; }
}