/* ============ Design tokens ============ */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #f59e0b;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-bg-alt: #f8fafc;
    --sidebar-bg: #111827;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #1f2937;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
    --shadow-md: 0 4px 14px rgba(16,24,40,.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.55;
    background: #fff;
}
a { color: var(--color-primary); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ============ Public top navbar ============ */
.topbar {
    background: var(--color-text);
    color: #fff;
    font-size: 12.5px;
}
.topbar .container { display: flex; justify-content: space-between; padding: 6px 20px; }
.topbar a { color: #e5e7eb; text-decoration: none; margin-left: 14px; }

.site-header {
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 20px; }
.logo { font-weight: 800; font-size: 21px; color: var(--color-primary); text-decoration: none; letter-spacing: -.5px; }
.logo span { color: var(--color-text); }
.site-header nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.site-header nav a { color: var(--color-text); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.site-header nav a:hover { color: var(--color-primary); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta a.btn-outline {
    border: 1px solid var(--color-border);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 14px;
}
.mobile-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--color-text);
}

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none;
    border: none;
    font: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-dropdown-toggle:hover { color: var(--color-primary); }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    min-width: 200px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 30;
}
.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}
.nav-dropdown-menu a:hover { background: var(--color-bg-alt); }
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu { display: block; }

@media (max-width: 700px) {
    .topbar .container { justify-content: flex-end; }
    .topbar .container > span { display: none; }
}

@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; }
    .header-cta { display: none; }
    .mobile-nav-toggle { display: block; order: 2; }
    .site-header nav.main-nav {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 0 4px;
        border-top: 1px solid var(--color-border);
        margin-top: 10px;
    }
    .site-header nav.main-nav.mobile-open { display: flex; }
    .site-header nav.main-nav a { padding: 8px 4px; width: 100%; }
    .nav-dropdown { width: 100%; }
    .nav-dropdown-toggle { padding: 8px 4px; width: 100%; justify-content: space-between; }
    .nav-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 12px;
        min-width: 0;
        max-height: none;
    }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown-menu a { padding: 8px 4px; }
}

/* ============ Hero ============ */
.hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
    color: #fff;
    padding: 56px 0 72px;
}
.hero h1 { font-size: 34px; margin: 0 0 10px; max-width: 640px; }
.hero p.lead { font-size: 16px; opacity: .92; max-width: 560px; margin: 0 0 26px; }
.search-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 8px;
    display: flex;
    gap: 8px;
    max-width: 720px;
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
}
.search-box input, .search-box select {
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    flex: 1;
    min-width: 140px;
}
.search-box select { border-left: 1px solid var(--color-border); color: var(--color-muted); }
.search-box button {
    background: var(--color-accent);
    color: #1a1a1a;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.hero-stats { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 22px; }
.hero-stats div span { font-size: 12.5px; opacity: .85; }

/* ============ Category pills ============ */
.category-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0; }
.category-pill {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13.5px;
    text-decoration: none;
    color: var(--color-text);
    background: #fff;
}
.category-pill:hover, .category-pill.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ============ Section headers ============ */
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 44px 0 16px; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head a.see-all { font-size: 14px; text-decoration: none; }

/* ============ Cards ============ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 20px 0; }
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { margin: 6px 0 6px; font-size: 16.5px; }
.card h3 a { color: var(--color-text); text-decoration: none; }
.card h3 a:hover { color: var(--color-primary); }
.card .meta { color: var(--color-muted); font-size: 13px; margin-bottom: 6px; }
.badge { display: inline-block; background: var(--color-bg-alt); border-radius: 6px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; color: var(--color-primary); text-transform: uppercase; letter-spacing: .3px; }
.card-thumb { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; display: block; background: var(--color-bg-alt); }
.detail-hero { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin: 14px 0; display: block; }

.btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 11px 18px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.btn:hover { background: var(--color-primary-dark); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============ CTA banner ============ */
.cta-banner {
    background: var(--color-bg-alt);
    border-radius: var(--radius);
    padding: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 50px 0;
    flex-wrap: wrap;
    gap: 16px;
}
.cta-banner h3 { margin: 0 0 4px; }
.cta-banner p { margin: 0; color: var(--color-muted); }

/* ============ Forms (public) ============ */
form.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
form.filters input, form.filters select {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
}
.form-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px;
    max-width: 480px;
}
.form-card input, .form-card select, .form-card textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}
.form-card label { font-size: 13.5px; color: var(--color-muted); display: block; margin-bottom: 4px; }

/* ============ Institution profile page ============ */
.institution-banner {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}
.institution-banner-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}
.institution-header {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    margin-top: -48px;
    padding: 0 4px 20px;
    flex-wrap: wrap;
}
.institution-logo {
    width: 96px;
    height: 110px;
    border-radius: 14px;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    object-fit: cover;
    flex-shrink: 0;
}
.institution-logo-placeholder {
    width: 96px;
    height: 110px;
    border-radius: 14px;
    background: #fff;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--color-primary);
    flex-shrink: 0;
}
.institution-header-info {
    background: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-height: 110px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.institution-header-info h1 { margin: 4px 0 4px; }
.rating-stars { color: #f59e0b; font-size: 15px; letter-spacing: 1px; }
.rating-stars .rating-num { color: var(--color-text); font-weight: 700; font-size: 14px; margin-left: 4px; }

.profile-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; margin-top: 10px; }
.profile-sidebar { position: sticky; top: 80px; }
.profile-sidebar .panel { padding: 16px; margin-bottom: 16px; }
.profile-sidebar h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--color-muted); margin: 0 0 10px; }
.quick-facts { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.quick-facts li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--color-border); }
.quick-facts li:last-child { border-bottom: none; }
.quick-facts .fact-label { color: var(--color-muted); }
.profile-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.profile-sidebar nav a { padding: 7px 0; font-size: 13.5px; text-decoration: none; color: var(--color-text); border-left: 2px solid transparent; padding-left: 10px; }
.profile-sidebar nav a:hover { color: var(--color-primary); border-left-color: var(--color-primary); }
.sidebar-cta { display: flex; flex-direction: column; gap: 8px; }
.sidebar-cta .btn, .sidebar-cta .btn-outline { width: 100%; text-align: center; box-sizing: border-box; }
.sidebar-rating { text-align: center; }
.sidebar-rating .big-num { font-size: 32px; font-weight: 800; }

.profile-main .panel { margin-bottom: 20px; }
.profile-main .panel h2 { margin: 0 0 14px; font-size: 18px; }
.contact-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.contact-list li { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.contact-list li:last-child { border-bottom: none; }
.contact-list .fact-label { color: var(--color-muted); display: inline-block; min-width: 90px; }
.map-embed { width: 100%; height: 280px; border: 0; border-radius: 10px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; }
.gallery-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; display: block; }

/* ============ Lightbox ============ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,15,.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 60px 20px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-content { position: relative; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox-content img { max-width: 92vw; max-height: 80vh; display: block; border-radius: 8px; margin: 0 auto; }
.lightbox-caption { color: #e5e7eb; margin-top: 12px; font-size: 14px; }
.lightbox-close {
    position: absolute; top: -44px; right: -6px;
    background: none; border: none; color: #fff; font-size: 30px; line-height: 1;
    cursor: pointer; padding: 6px;
}
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.12); border: none; color: #fff;
    font-size: 20px; width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-prev { left: -8px; }
.lightbox-next { right: -8px; }
@media (max-width: 900px) {
    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
    .lightbox-close { top: -38px; right: 0; }
}

.bullet-list { margin: 0; padding-left: 20px; }
.bullet-list li { margin-bottom: 8px; font-size: 14.5px; }

.course-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.course-pills a {
    display: inline-block;
    background: #eef4ff;
    color: var(--color-primary);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}
.course-pills a:hover { background: var(--color-primary); color: #fff; }

.institution-cta-buttons { display: flex; gap: 10px; align-items: center; margin-top: 8px; margin-left: auto; flex-wrap: wrap; }

@media (max-width: 800px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
}
.site-footer { background: #111827; color: #cbd5e1; margin-top: 60px; padding: 40px 0 20px; font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.footer-grid h4 { color: #fff; font-size: 14px; margin: 0 0 10px; }
.footer-grid a { color: #9ca3af; text-decoration: none; display: block; margin-bottom: 6px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1f2937; padding-top: 16px; color: #6b7280; }

/* ============ Auth pages (login/register) ============ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
}
.auth-side {
    flex: 1;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
}
.auth-side h2 { font-size: 28px; max-width: 380px; }
.auth-side p { opacity: .9; max-width: 380px; }
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
}
.auth-card { width: 100%; max-width: 380px; }
.auth-card .logo { display: block; margin-bottom: 26px; }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-card p.sub { color: var(--color-muted); margin: 0 0 26px; font-size: 14px; }
.auth-card label { font-size: 13px; font-weight: 600; display: block; margin: 14px 0 6px; }
.auth-card input, .auth-card select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
}
.auth-card .btn { width: 100%; margin-top: 20px; padding: 13px; }
.auth-card .alt-link { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--color-muted); }
.auth-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 6px;
}
.auth-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 6px;
}
@media (max-width: 800px) { .auth-side { display: none; } }

/* ============ ADMIN: sidebar layout ============ */
.admin-wrap { display: flex; min-height: 100vh; background: var(--color-bg-alt); }
.admin-sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 0 0 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar .brand {
    padding: 20px;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    display: block;
    text-decoration: none;
    border-bottom: 1px solid #1f2937;
    margin-bottom: 10px;
}
.admin-sidebar .nav-section { padding: 10px 20px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; }
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.admin-sidebar nav a .nav-icon { width: 18px !important; height: 18px !important; flex-shrink: 0; opacity: .85; }
.admin-sidebar nav a:hover .nav-icon,
.admin-sidebar nav a.active .nav-icon { opacity: 1; }
.admin-sidebar nav a:hover { background: var(--sidebar-active); color: #fff; }
.admin-sidebar nav a.active { background: var(--sidebar-active); color: #fff; border-left-color: var(--color-primary); font-weight: 600; }
.admin-sidebar .sidebar-foot { padding: 16px 20px; border-top: 1px solid #1f2937; margin-top: 10px; font-size: 12.5px; color: #6b7280; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 26px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.admin-topbar h1 { font-size: 19px; margin: 0; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.admin-user .logout-link {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--color-border);
    padding: 6px 12px;
    border-radius: 7px;
}
.admin-user .logout-link:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.admin-user .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.admin-content { padding: 26px; }

.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 28px; }
.admin-stat-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; }
.admin-stat-card .num { font-size: 26px; font-weight: 800; }
.admin-stat-card .label { color: var(--color-muted); font-size: 13px; }

.panel { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 17px; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td {
    border-bottom: 1px solid var(--color-border);
    padding: 11px 10px;
    text-align: left;
    font-size: 13.5px;
}
table.admin-table th { color: var(--color-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
table.admin-table tr:hover td { background: var(--color-bg-alt); }
.row-actions a { margin-right: 10px; font-size: 13px; text-decoration: none; }

.status-pill { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.status-pill.published { background: #dcfce7; color: #15803d; }
.status-pill.draft { background: #fef3c7; color: #92400e; }
.status-pill.archived { background: #f3f4f6; color: #6b7280; }
.status-pill.new { background: #dbeafe; color: #1d4ed8; }
.status-pill.contacted { background: #fef3c7; color: #92400e; }
.status-pill.converted { background: #dcfce7; color: #15803d; }
.status-pill.closed { background: #f3f4f6; color: #6b7280; }

.admin-form input, .admin-form select, .admin-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
}
.admin-form label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 5px; }
.admin-form .checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.admin-form .checkbox-row input { width: auto; margin: 0; }

@media (max-width: 900px) {
    .admin-sidebar { width: 72px; }
    .admin-sidebar .brand, .admin-sidebar nav a span.label, .admin-sidebar .nav-section, .admin-sidebar .sidebar-foot { display: none; }
    .admin-sidebar nav a { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}


/* ---------- Delete buttons, flash messages, scrollable tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.row-actions { white-space: nowrap; }
.delete-form { display: inline; margin: 0; }
.btn-delete {
    background: none; border: none; padding: 0; margin: 0;
    color: #c0392b; font-size: 13px; font-family: inherit; cursor: pointer;
}
.btn-delete:hover { text-decoration: underline; }
.btn.btn-danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn.btn-danger:hover { background: #991b1b; }
.danger-zone { margin-top: 20px; border-color: #fecaca; max-width: 720px; }
.danger-zone h2 { margin: 0 0 6px; font-size: 16px; color: #b91c1c; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- Single/detail pages: 70% content / 30% sidebar ---------- */
.detail-wrap { padding-top: 24px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 28px; align-items: start; }
.detail-main { min-width: 0; line-height: 1.7; }
.detail-main h1 { margin: 8px 0 6px; line-height: 1.3; }
.detail-sidebar { position: sticky; top: 80px; }
.detail-sidebar .panel { padding: 16px; margin-bottom: 16px; }
.detail-sidebar h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--color-muted); margin: 0 0 12px; }
.sidebar-form input, .sidebar-form textarea {
    width: 100%; margin-bottom: 10px; padding: 10px 12px; font-family: inherit; font-size: 14px;
    border: 1px solid var(--color-border); border-radius: 8px; box-sizing: border-box;
}
.sidebar-form .btn { width: 100%; }
.enquiry-success { background: #dcfce7; color: #166534; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 12px; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { border-bottom: 1px solid var(--color-border); }
.related-list li:last-child { border-bottom: none; }
.related-list a { display: flex; gap: 10px; align-items: center; padding: 10px 0; text-decoration: none; color: var(--color-text); }
.related-list a:hover .related-title { color: var(--color-primary); }
.related-list img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.related-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.related-meta { display: block; font-size: 12px; color: var(--color-muted); margin-top: 2px; }
@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
}


/* ---------- SEO fields on admin forms ---------- */
.seo-fields { border: 1px solid var(--color-border); border-radius: 10px; padding: 14px 16px 4px; margin: 6px 0 18px; background: #f9fafb; }
.seo-fields legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.seo-fields legend .meta { font-weight: 400; font-size: 12px; }
.seo-hint { font-size: 12px; color: var(--color-muted); margin: -10px 0 14px; }
.seo-hint.seo-over { color: #b91c1c; }
.seo-page-card { border-top: 1px solid var(--color-border); padding-top: 16px; margin-top: 16px; }
.seo-page-card:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.seo-page-card h3 { margin: 0 0 10px; font-size: 15px; }
.seo-page-card .seo-url { font-weight: 400; font-size: 12px; color: var(--color-muted); margin-left: 6px; }


/* ---------- Logo height setting ---------- */
.logo-height-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.logo-height-row input[type="range"] { flex: 1; margin: 0; padding: 0; border: none; }
.admin-form .logo-height-row input[type="number"] { width: 90px; margin: 0; }
.logo-preview-box { background: #fff; border: 1px dashed var(--color-border); border-radius: 8px; padding: 14px; margin-bottom: 14px; overflow-x: auto; }
.logo-preview-box img { display: block; width: auto; max-width: none; }
.admin-sidebar .brand img { max-width: 100%; }
@media (max-width: 700px) {
    .logo .site-logo-img { max-height: 56px; }
}


/* ---------- Social links ---------- */
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.footer-grid .social-links a.social-icon { display: inline-flex; margin: 0; }
.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: #1f2937; color: #cbd5e1; text-decoration: none; transition: background .15s, color .15s;
}
a.social-icon:hover { color: #fff; }
a.social-facebook:hover  { background: #1877f2; }
a.social-instagram:hover { background: #d6249f; }
a.social-youtube:hover   { background: #ff0000; }
a.social-tiktok:hover    { background: #000; }
a.social-x:hover         { background: #000; }
a.social-linkedin:hover  { background: #0a66c2; }
a.social-whatsapp:hover  { background: #25d366; }
.social-label { display: flex !important; align-items: center; gap: 8px; }
.social-label .social-icon { width: 26px; height: 26px; }

/* ---------- Rich text (content written with the WYSIWYG editor) ---------- */
.rich-text { line-height: 1.75; font-size: 15.5px; color: var(--color-text); overflow-wrap: break-word; }
.rich-text > :first-child { margin-top: 0; }
.rich-text p { margin: 0 0 14px; }
.rich-text h2 { font-size: 22px; margin: 26px 0 10px; line-height: 1.3; }
.rich-text h3 { font-size: 18.5px; margin: 22px 0 8px; line-height: 1.35; }
.rich-text h4 { font-size: 16px; margin: 18px 0 6px; }
.rich-text ul, .rich-text ol { margin: 0 0 14px; padding-left: 24px; }
.rich-text li { margin-bottom: 6px; }
.rich-text a { color: var(--color-primary); text-decoration: underline; }
.rich-text img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-text figure { margin: 16px 0; }
.rich-text figcaption { font-size: 13px; color: var(--color-muted); text-align: center; margin-top: 6px; }
.rich-text blockquote { border-left: 4px solid var(--color-primary); margin: 16px 0; padding: 10px 16px; background: #f9fafb; color: #374151; border-radius: 0 8px 8px 0; }
.rich-text hr { border: none; border-top: 1px solid var(--color-border); margin: 22px 0; }
.rich-text .table-scroll { width: 100%; overflow-x: auto; margin: 0 0 16px; }
.rich-text table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 14.5px; }
.rich-text th, .rich-text td { border: 1px solid var(--color-border); padding: 8px 12px; text-align: left; vertical-align: top; }
.rich-text th, .rich-text thead td { background: #f3f4f6; font-weight: 600; }
.rich-text tr:nth-child(even) td { background: #fafafa; }
.rich-text .embed-wrap { position: relative; padding-top: 56.25%; margin: 16px 0; border-radius: 10px; overflow: hidden; background: #000; }
.rich-text .embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rich-text pre { background: #111827; color: #e5e7eb; padding: 12px 14px; border-radius: 8px; overflow-x: auto; }

/* Editor box in admin forms */
.admin-form .tox-tinymce { border-radius: 8px; border-color: var(--color-border); margin-bottom: 14px; }


/* ---------- Homepage hero banner image ---------- */
.hero.hero-image { background-color: #1e3a8a; background-size: cover; background-position: center; }
.hero.hero-image h1, .hero.hero-image p.lead, .hero.hero-image .hero-stats { text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero-preview {
    border-radius: 10px; padding: 26px 22px; margin-bottom: 16px; color: #fff;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
    background-size: cover; background-position: center;
}
.hero-preview strong { display: block; font-size: 17px; margin-bottom: 6px; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero-preview span { font-size: 13px; opacity: .9; }

/* ---------- "Also offered by" picker (admin program form) ---------- */
.also-offered { border: 1px solid var(--color-border); border-radius: 10px; padding: 14px 16px; margin: 4px 0 18px; }
.also-offered legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.also-offered legend .meta { font-weight: 400; font-size: 12px; }
.admin-form .also-search { margin-bottom: 6px; }
.also-tools { font-size: 12.5px; margin-bottom: 8px; }
.also-tools a { color: var(--color-primary); }
.also-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 8px; }
.admin-form .also-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 0; font-weight: 400; border-bottom: 1px solid var(--color-border); cursor: pointer; }
.also-row:last-child { border-bottom: none; }
.also-row.checked { background: #eff6ff; }
.admin-form .also-row input[type="checkbox"] { width: auto; margin: 0; flex-shrink: 0; }
.also-name { flex: 1; font-size: 14px; }
.also-name small { display: block; color: var(--color-muted); font-size: 12px; }
.admin-form .also-row .also-fee { width: 150px; margin: 0; padding: 6px 8px; font-size: 13px; display: none; }
.also-row.checked .also-fee { display: block; }

/* ---------- "Also offered at" on course pages ---------- */
.offered-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 12px 0 24px; }
.offered-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--color-border); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--color-text); background: #fff; transition: border-color .15s, box-shadow .15s; }
.offered-item:hover { border-color: var(--color-primary); box-shadow: 0 2px 10px rgba(37,99,235,.08); }
.offered-item img, .offered-item .offered-initial { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; flex-shrink: 0; background: #f3f4f6; }
.offered-item .offered-initial { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--color-primary); }
.offered-item strong { display: block; font-size: 14.5px; line-height: 1.3; }
.offered-item small { display: block; color: var(--color-muted); font-size: 12.5px; margin-top: 2px; }
.offered-item .primary-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #166534; background: #dcfce7; border-radius: 4px; padding: 1px 6px; margin-top: 4px; }
.more-colleges { color: var(--color-primary); font-size: 12.5px; font-weight: 600; }

/* ---------- Course page (Edusanjal-style) ---------- */
.course-head { margin-bottom: 18px; }
.course-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-soft { color: var(--color-muted); }
.course-head h1 { font-size: 28px; margin: 10px 0 6px; line-height: 1.3; }
.course-sub { color: var(--color-muted); font-size: 14.5px; margin: 0 0 16px; }
.course-sub a { font-weight: 600; }
.course-facts {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px;
    background: var(--color-border); border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden;
}
.course-fact { background: #fff; padding: 12px 14px; }
.course-fact span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--color-muted); margin-bottom: 4px; }
.course-fact strong { font-size: 14.5px; line-height: 1.35; display: block; }
.course-fact strong a { color: var(--color-primary); text-decoration: none; }

.course-tabs {
    position: sticky; top: 64px; z-index: 10; background: #fff;
    display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
    border-bottom: 2px solid var(--color-border); margin: 6px 0 8px; scrollbar-width: none;
}
.course-tabs::-webkit-scrollbar { display: none; }
.course-tabs a {
    padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--color-muted); text-decoration: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.course-tabs a:hover { color: var(--color-text); }
.course-tabs a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.course-section { padding: 18px 0 8px; border-bottom: 1px solid var(--color-border); scroll-margin-top: 140px; }
.course-section:last-of-type { border-bottom: none; }
.course-section > h2 { font-size: 21px; margin: 0 0 12px; }

.college-rows { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 767px) {
    .college-row {
        display: block;
    }
}
@media (min-width: 768px) {
    .college-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px;
    border: 1px solid var(--color-border); border-radius: 10px; background: #fff;
 } 
}


.college-row:hover { border-color: #bfdbfe; }
.college-row-logo { width: 54px; height: 54px; flex-shrink: 0; border-radius: 8px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; text-decoration: none; }
.college-row-logo img { width: 100%; height: 100%; object-fit: contain; }
.college-row-logo span { font-weight: 800; font-size: 20px; color: var(--color-primary); }
.college-row-info { flex: 1; min-width: 0; }
.college-row-name { font-weight: 700; font-size: 15px; color: var(--color-text); text-decoration: none; line-height: 1.3; }
.college-row-name:hover { color: var(--color-primary); }
.college-row .meta { font-size: 13px; margin-top: 3px; }
.college-row .primary-tag { margin: 0 0 0 6px; vertical-align: middle; }
.college-row-fee { text-align: right; min-width: 120px; }
.college-row-fee span { display: block; font-size: 11px; text-transform: uppercase; color: var(--color-muted); letter-spacing: .4px; }
.college-row-fee strong { font-size: 14px; }
.btn.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn.btn-outline { background: #fff; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn.btn-outline:hover { background: var(--color-primary); color: #fff; }
@media (max-width: 640px) {
    .course-head h1 { font-size: 23px; }
    .college-row { flex-wrap: wrap; }
    .college-row-fee { text-align: left; min-width: 0; order: 3; flex: 1; }
    .college-row .btn { order: 4; }
}

/* "Published on : 27 Sep 2026" on news, blog and post pages */
.published-on { text-align: right; font-weight: 700; margin: 8px 0 16px; }


/* "Main college" tag anywhere + program rows on institution pages */
.primary-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #166534; background: #dcfce7; border-radius: 4px; padding: 1px 6px; }
.program-row-thumb { width: 88px; height: 60px; }
.program-row-thumb img { object-fit: cover; }

/* ---------- Email verification (OTP) ---------- */
.otp-input { font-size: 26px !important; letter-spacing: 10px; text-align: center; font-weight: 700; }
.link-button { background: none; border: none; padding: 0; color: var(--color-primary); font-size: 13.5px; cursor: pointer; font-family: inherit; text-decoration: underline; }
.status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.rejected { background: #fee2e2; color: #b91c1c; }
.status-pill.disabled { background: #f3f4f6; color: #6b7280; }
.status-pill.active { background: #dcfce7; color: #166534; }
.pending-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }
.pending-alert a { font-weight: 700; color: #92400e; }
.link-action { background: none; border: none; padding: 0; margin-right: 10px; color: var(--color-primary); cursor: pointer; font-size: 13px; font-family: inherit; }
.link-action.approve { color: #15803d; font-weight: 700; }
.link-action.reject { color: #b91c1c; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tabs a { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--color-border); background: #fff; color: var(--color-text); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.filter-tabs a.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---------- Partner sign-up steps ---------- */
.reg-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 4px 0 18px; counter-reset: step; }
.reg-steps li { flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: var(--color-muted); padding-top: 30px; position: relative; counter-increment: step; }
.reg-steps li::before { content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; line-height: 24px; border-radius: 50%; background: #e5e7eb; color: #6b7280; font-size: 12px; }
.reg-steps li.current { color: var(--color-primary); }
.reg-steps li.current::before { background: var(--color-primary); color: #fff; }
.reg-steps li.done::before { content: '✓'; background: #16a34a; color: #fff; }
.verified-email { color: #166534; background: #dcfce7; border-radius: 8px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; margin: 0 0 6px; }
.publish-panel { border: 1px solid #bfdbfe; background: #f8fbff; margin-bottom: 20px; }
.publish-checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 14px 0 18px; }
.publish-checklist h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--color-muted); }
.check-item { font-size: 14px; padding: 4px 0; color: #6b7280; }
.check-item.done { color: #166534; font-weight: 600; }

/* ---------- Partner: find & join existing courses ---------- */
.find-course-form { display: flex; gap: 8px; flex-wrap: wrap; }
.find-course-form input[type="text"] { flex: 1; min-width: 220px; }
.find-course-form input, .find-course-form select { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 14px; font-family: inherit; }
.join-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.join-form input { width: 150px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 13px; }
.create-new-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding: 14px 16px; background: #f9fafb; border: 1px dashed var(--color-border); border-radius: 10px; }
.linked-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: #1d4ed8; background: #dbeafe; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.fee-inline { display: inline-flex; gap: 6px; align-items: center; }
.fee-inline input { width: 110px; padding: 5px 8px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 13px; }
.duplicate-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.duplicate-hint { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: -8px 0 14px; }
.duplicate-hint a { font-weight: 700; color: #92400e; }

/* ---------- Approvals ---------- */
.nav-badge { margin-left: auto; background: #f59e0b; color: #111827; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; line-height: 1.5; }
.review-note { background: #fef2f2; border-left: 4px solid #b91c1c; color: #7f1d1d; padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 16px; font-size: 14px; }
.preview-banner { background: #fef3c7; color: #92400e; text-align: center; padding: 10px 16px; font-size: 14px; font-weight: 600; border-bottom: 1px solid #fde68a; }
