/* ── ABAI INSTITUTE STYLES ──────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
    --abai-bg: #f6f8fb;
    --abai-surface: #ffffff;
    --abai-text: #0f172a;
    --abai-muted: #64748b;
    --abai-border: rgba(15, 23, 42, .10);
    --abai-primary: #1a5276;
    --abai-primary-2: #3b82f6;
    --abai-accent: #e67e22;
    --abai-shadow: 0 18px 50px rgba(2, 6, 23, .10);
    --abai-shadow-soft: 0 10px 30px rgba(2, 6, 23, .08);
    --abai-radius: 16px;
    --abai-sidebar-bg: #ffffff;
    --abai-sidebar-text: #0f172a;
    --abai-sidebar-muted: #64748b;
    --abai-sidebar-border: rgba(15, 23, 42, .10);
}

/* Page shell */
.abai-shell {
    background: linear-gradient(180deg, #f8fbff 0%, var(--abai-bg) 100%);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.abai-container {
    padding-top: 28px;
    padding-bottom: 28px;
}

.abai-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: start;
}

.abai-panel {
    background: var(--abai-surface);
    border: 1px solid var(--abai-border);
    border-radius: var(--abai-radius);
    box-shadow: var(--abai-shadow-soft);
}

.abai-panel--main {
    padding: 22px;
}

/* Sidebar */
.abai-sidebar {
    position: sticky;
    top: 18px;
    padding: 18px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.abai-sidebar__brand {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 12px 16px;
    color: var(--abai-sidebar-text);
    text-decoration: none;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    margin-bottom: 14px;
}

.abai-sidebar__brand:hover { color: var(--abai-sidebar-text); text-decoration: none; }

.abai-sidebar__logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e67e22, #d35400);
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.abai-sidebar__title {
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -.01em;
    line-height: 1.2;
    color: #111;
}

.abai-sidebar__subtitle {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    margin-top: 3px;
}

.abai-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s ease;
    margin-bottom: 2px;
}

.abai-nav__left {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.abai-nav__left i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: #94a3b8;
    transition: color .2s;
}

.abai-nav__left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abai-nav__chev {
    opacity: .35;
    font-size: 12px;
    transition: opacity .2s, transform .2s;
}

.abai-nav__item:hover {
    background: #f8fafc;
    color: #111;
    text-decoration: none;
}

.abai-nav__item:hover .abai-nav__left i { color: #e67e22; }
.abai-nav__item:hover .abai-nav__chev { opacity: .6; transform: translateX(2px); }

.abai-nav__item.is-active {
    background: linear-gradient(135deg, rgba(230, 126, 34, .08), rgba(230, 126, 34, .04));
    border: 1px solid rgba(230, 126, 34, .18);
    color: #111;
    font-weight: 600;
}

.abai-nav__item.is-active .abai-nav__left i { color: #e67e22; }

.abai-nav__item--child {
    padding-left: 18px;
}

.abai-nav__section-wrap { display: block; }

.abai-nav__section-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.abai-nav__item--section {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: -.005em;
    color: #111;
    padding: 12px 14px;
    background: #fafbfc;
    border: 1px solid rgba(15, 23, 42, .05);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.abai-nav__item--section .abai-nav__left i {
    color: #e67e22;
    font-size: 14px;
}

.abai-nav__item--section .abai-nav__chev { opacity: .45; }

.abai-nav__toggle {
    flex: 0 0 auto;
    min-width: 40px;
    padding: 0 12px;
    background: #fafbfc;
    border: 1px solid rgba(15, 23, 42, .05);
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    color: #64748b;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.abai-nav__toggle i {
    font-size: 12px;
    transition: transform .2s;
    display: inline-block;
}

.abai-nav__toggle:hover {
    background: #f1f5f9;
    color: #e67e22;
}

.abai-nav__toggle.is-open i { transform: rotate(90deg); }

.abai-nav__group {
    margin: 4px 0 12px 0;
    padding-left: 16px;
    border-left: 2px solid rgba(230, 126, 34, .15);
    display: none;
}

.abai-nav__group.is-open { display: block; }

.abai-nav__item--topic {
    padding: 9px 12px;
    border-radius: 10px;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 500;
}

.abai-nav__item--topic:hover {
    background: rgba(230, 126, 34, .06);
    color: #374151;
}

.abai-nav__item--topic.is-active {
    color: #e67e22;
    font-weight: 600;
    background: rgba(230, 126, 34, .08);
    border: 1px solid rgba(230, 126, 34, .15);
}

.abai-nav__dot {
    font-size: 5px;
    opacity: .4;
}

.abai-nav__divider {
    height: 1px;
    background: rgba(15, 23, 42, .06);
    margin: 14px 8px;
}

.abai-search {
    padding: 10px 4px 4px;
}

.abai-search .form-control {
    border-radius: 12px 0 0 12px;
    border: 1px solid rgba(15, 23, 42, .10);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 8px 14px;
}

.abai-search .form-control:focus {
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, .1);
    outline: none;
}

.abai-search .btn {
    border-radius: 0 12px 12px 0;
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.abai-search .btn:hover {
    background: #d35400;
    border-color: #d35400;
}

/* Chat widget */
.abai-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.abai-chat__fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    box-shadow: 0 8px 30px rgba(230, 126, 34, .4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.abai-chat__fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(230, 126, 34, .5);
}

.abai-chat__fab i,
.abai-chat__fab .fa-comment-dots,
.abai-chat__fab .fa-comments,
.abai-chat__fab .fa-commenting {
    color: #fff !important;
    font-size: 24px;
}

.abai-chat__panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 380px;
    max-width: calc(100vw - 36px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.abai-chat__header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border-bottom: none;
}

.abai-chat__title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.abai-chat__avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 16px;
}

.abai-chat__avatar i { color: #fff !important; font-size: 16px; }

.abai-chat__name {
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    font-size: 15px;
}

.abai-chat__status {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    line-height: 1.1;
    margin-top: 2px;
    font-weight: 500;
}

.abai-chat__actions { display: inline-flex; gap: 6px; }

.abai-chat__iconBtn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background .2s;
}

.abai-chat__iconBtn i { color: #fff !important; }

.abai-chat__iconBtn:hover { background: rgba(255, 255, 255, .25); }

.abai-chat__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    flex: 1;
    background: #fafbfc;
    overflow: hidden;
}

.abai-chat__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    scroll-behavior: smooth;
}

.abai-chat__messages::-webkit-scrollbar { width: 4px; }
.abai-chat__messages::-webkit-scrollbar-track { background: transparent; }
.abai-chat__messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 4px; }

.abai-chat__msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 14px;
    animation: abaiMsgIn .3s ease;
}

@keyframes abaiMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.abai-chat__msg--user { justify-content: flex-end; }

.abai-chat__botIcon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e67e22;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.abai-chat__botIcon i { color: #fff !important; font-size: 12px; }

.abai-chat__bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    border: none;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.abai-chat__msg--user .abai-chat__bubble {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
}

/* Loading dots */
.abai-chat__bubble--loading {
    display: flex;
    gap: 5px;
    padding: 14px 20px;
}

.abai-chat__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    animation: abaiDotBounce 1.4s infinite ease-in-out both;
}

.abai-chat__dot:nth-child(1) { animation-delay: 0s; }
.abai-chat__dot:nth-child(2) { animation-delay: .16s; }
.abai-chat__dot:nth-child(3) { animation-delay: .32s; }

@keyframes abaiDotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: .4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Status dot */
.abai-chat__statusDot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    margin-right: 4px;
    vertical-align: middle;
}

.abai-chat__suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    transition: opacity .2s, max-height .3s;
}

.abai-chat__chip {
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    color: #374151;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    width: 100%;
}

.abai-chat__chip i {
    color: #e67e22 !important;
    font-size: 13px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.abai-chat__chip:hover {
    background: #fef7f0;
    border-color: rgba(230, 126, 34, .25);
    transform: translateX(4px);
}

.abai-chat__footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(15, 23, 42, .06);
    background: #fff;
}

.abai-chat__inputWrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.abai-chat__input {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .10);
    padding: 0 14px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s;
}

.abai-chat__input:focus {
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, .12);
    background: #fff;
}

.abai-chat__send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: #e67e22;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background .2s, transform .15s;
    flex-shrink: 0;
}

.abai-chat__send i { color: #fff !important; }

.abai-chat__send:hover { background: #d35400; transform: scale(1.05); }

.abai-chat__hint {
    margin-top: 10px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

.abai-chat__link {
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.abai-chat__link i { font-size: 11px; }
.abai-chat__link:hover { text-decoration: underline; color: #d35400; }

@media (max-width: 768px) {
    .abai-chat__panel {
        width: calc(100vw - 28px);
        max-width: calc(100vw - 28px);
        right: 0;
        bottom: 70px;
        height: calc(100vh - 100px);
        height: calc(100dvh - 100px);
        max-height: calc(100vh - 100px);
    }
}

/* Typography */
.abai-h1 {
    color: var(--abai-text);
    font-weight: 900;
    letter-spacing: -.02em;
    font-size: 28px;
    margin: 0 0 10px;
}

.abai-subtitle {
    color: var(--abai-muted);
    margin: 0 0 18px;
}

.abai-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--abai-border);
    margin: 18px 0 14px;
    color: var(--abai-text);
    font-weight: 900;
}

/* Article cards */
.abai-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.abai-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.abai-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.abai-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.abai-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.abai-card:hover .abai-card-img img {
    transform: scale(1.05);
}

.abai-card-body {
    padding: 12px 15px;
}

.abai-card-body h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.abai-card-body p {
    font-size: 13px;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.abai-card-date {
    font-size: 12px;
    color: #999;
}

.abai-card-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.abai-card-meta span {
    margin-right: 12px;
}

.abai-card.large .abai-card-img {
    height: 250px;
}

/* Category blocks */
.abai-category-block div:hover {
    background: #e8f4f8 !important;
    transform: translateY(-2px);
}

/* Article content */
.abai-article-content {
    word-wrap: break-word;
}

.abai-article-content img,
.abai-sections-accordion img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 12px auto;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .abai-article-content img,
    .abai-sections-accordion img {
        max-height: 360px;
    }
}

.abai-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.abai-article-content table td,
.abai-article-content table th {
    border: 1px solid #ddd;
    padding: 8px;
}

/* Chat */
#chat-container {
    font-size: 14px;
}

#chat-messages {
    background: #fafafa;
}

/* Responsive */
@media (max-width: 768px) {
    .abai-layout {
        grid-template-columns: 1fr;
    }

    .abai-sidebar {
        position: relative;
        top: auto;
    }

    .abai-card-img {
        height: 140px;
    }

    .abai-card.large .abai-card-img {
        height: 180px;
    }

    #chat-container {
        height: 350px !important;
    }
}

/* ── MOBILE: SIDEBAR DRAWER + LAYOUT REFINEMENTS ───────── */
.abai-mobile-menu-btn { display: none; }
.abai-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1099;
}
.abai-sidebar__close { display: none; }

@media (max-width: 768px) {
    .abai-container {
        padding: 14px 12px !important;
    }

    .abai-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Main panel: tighter on mobile (won't override about page's inline padding:0) */
    .abai-panel--main {
        padding: 14px;
        border-radius: 12px;
    }

    /* Hamburger button shown above the main panel content */
    .abai-mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 14px;
        background: linear-gradient(135deg, #e67e22, #d35400);
        color: #fff;
        border: 0;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(230, 126, 34, .3);
        font-family: inherit;
        margin-bottom: 12px;
    }
    .abai-mobile-menu-btn i { font-size: 14px; }

    /* Sidebar wrapper becomes a drawer */
    .abai-layout > aside {
        position: fixed;
        top: 0;
        left: 0;
        width: 86%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        z-index: 1100;
        background: #fff;
        transform: translateX(-105%);
        transition: transform .28s ease;
        overflow-y: auto;
        box-shadow: 4px 0 24px rgba(0, 0, 0, .18);
        -webkit-overflow-scrolling: touch;
    }
    .abai-layout > aside.is-open { transform: translateX(0); }

    .abai-sidebar {
        position: relative;
        top: 0;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        padding: 14px 14px 60px;
        height: auto;
        min-height: 100%;
    }

    /* Backdrop */
    .abai-mobile-backdrop.is-open {
        display: block;
    }

    /* Close button inside drawer */
    .abai-sidebar__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        border: 1px solid rgba(15, 23, 42, .08);
        background: #fff;
        color: #374151;
        font-size: 14px;
        cursor: pointer;
        z-index: 2;
    }

    body.abai-drawer-open { overflow: hidden; }

    /* Typography in main panel */
    .abai-panel--main h1.abai-h1 {
        font-size: 22px;
        line-height: 1.25;
    }

    /* Hero banners (library, section pages) */
    .abai-panel--main > div[style*="min-height:160px"] {
        min-height: 110px !important;
        margin-bottom: 16px !important;
    }
    .abai-panel--main > div[style*="min-height:160px"] > div[style*="padding:28px 24px"] {
        padding: 16px 14px !important;
    }
    .abai-panel--main > div[style*="min-height:160px"] h1 {
        font-size: 20px !important;
        line-height: 1.25 !important;
    }
    .abai-panel--main > div[style*="min-height:160px"] p {
        font-size: 13px !important;
    }

    /* Breadcrumb */
    .abai-panel--main > div[style*="font-size:13px"][style*="color:#888"] {
        font-size: 12px !important;
        line-height: 1.5 !important;
    }

    /* ── Library page: search form + bookshelf ── */
    .abai-panel--main form[action*="library"] {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .abai-panel--main form[action*="library"] input[type="text"] {
        flex: 1 1 100% !important;
        font-size: 16px !important; /* prevent iOS zoom */
        padding: 11px 14px !important;
    }
    .abai-panel--main form[action*="library"] button[type="submit"],
    .abai-panel--main form[action*="library"] > a {
        flex: 1 1 auto !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        justify-content: center;
        text-align: center;
    }

    .abai-library-shelf {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 22px 12px;
        padding: 14px 0 6px;
    }
    .abai-book__title { font-size: 13px; line-height: 1.25; }
    .abai-book__caption { font-size: 12px; min-height: 30px; }
    .abai-book__sub { font-size: 11px; }
    .abai-book__face { padding: 14px 10px; }

    /* Disable 3D hover lift on touch devices — feels janky */
    .abai-book-link:hover .abai-book {
        transform: none;
    }

    /* ── Section page: topic cards ── */
    .abai-panel--main > div[style*="minmax(300px, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .abai-panel--main > div[style*="minmax(300px, 1fr)"] a > div[style*="height:220px"] {
        height: 160px !important;
    }

    /* ── Topic page ── */
    .abai-slider__stage img,
    .abai-slider__slide img {
        height: 220px !important;
    }
    .abai-slider__caption {
        padding: 10px 50px !important;
        font-size: 12px !important;
    }
    [data-abai-slider-prev],
    [data-abai-slider-next] {
        width: 36px !important;
        height: 36px !important;
        left: 8px !important;
    }
    [data-abai-slider-next] { left: auto !important; right: 8px !important; }
    .abai-slider__thumbs button[data-abai-slider-thumb] {
        flex: 0 0 72px !important;
        width: 72px !important;
        height: 48px !important;
    }

    [data-abai-video-player] .abai-video-player__main {
        border-radius: 10px;
    }
    [data-abai-video-player] > div[style*="grid-template-columns:repeat(auto-fill, minmax(180px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* Topic interactives + non-video media */
    .abai-panel--main div[style*="minmax(280px, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Topic content text */
    .abai-article-content {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }
    .abai-sections-accordion details {
        padding: 12px 14px !important;
    }
    .abai-sections-accordion summary {
        font-size: 14px !important;
    }

    /* ── About page ── */
    .abai-panel--main > div[style*="linear-gradient(135deg,#1a5276"] {
        padding: 22px 18px !important;
        min-height: 170px !important;
    }
    .abai-panel--main > div[style*="linear-gradient(135deg,#1a5276"] h1 {
        font-size: 22px !important;
    }
    .abai-panel--main > div[style*="linear-gradient(135deg,#1a5276"] p {
        font-size: 13px !important;
    }
    .abai-panel--main > div[style*="font-size:140px"] {
        font-size: 90px !important;
        top: 12px !important;
        right: 12px !important;
    }
    .abai-panel--main > div[style*="padding:28px 32px"] {
        padding: 18px 14px !important;
    }
    .abai-panel--main h2[style*="font-size:20px"] {
        font-size: 17px !important;
    }
    .abai-panel--main h3[style*="font-size:16px"] {
        font-size: 15px !important;
    }

    /* ── Library-show page header ── */
    .abai-shell > .abai-container > div[style*="flex-wrap:wrap"] h1 {
        font-size: 20px !important;
    }
    .abai-shell > .abai-container > div[style*="flex-wrap:wrap"] > div[style*="display:flex"][style*="gap:8px"] {
        flex-wrap: wrap;
        width: 100%;
    }
    .abai-shell > .abai-container > div[style*="flex-wrap:wrap"] > div[style*="display:flex"][style*="gap:8px"] > a {
        flex: 1 1 auto;
        justify-content: center;
    }
    #flipbook {
        height: 70vh !important;
        min-height: 460px !important;
    }

    /* Chat widget */
    .abai-chat {
        right: 14px;
        bottom: 14px;
    }
    .abai-chat__fab {
        width: 52px;
        height: 52px;
    }
    .abai-chat__fab i,
    .abai-chat__fab .fa-comment-dots,
    .abai-chat__fab .fa-comments,
    .abai-chat__fab .fa-commenting {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .abai-library-shelf {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 10px;
    }

    .abai-panel--main h1.abai-h1 {
        font-size: 19px;
    }

    [data-abai-video-player] > div[style*="grid-template-columns:repeat(auto-fill, minmax(180px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    .abai-slider__stage img,
    .abai-slider__slide img {
        height: 180px !important;
    }
}


/* ═══════════════════════════════════════════
   ABAI LANDING PAGE — PDF DESIGN
═══════════════════════════════════════════ */

.abai-landing {
    background: #ffffff;
    padding: 0 !important;
    margin: 0 !important;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
}

.abai-landing.body-inner {
    padding: 0 !important;
    margin: 0 !important;
}

.abai-landing__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── NAVBAR ── */
.abai-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 70px;
    background: rgba(10, 15, 30, .55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.abai-navbar__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.abai-navbar__burger {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.abai-navbar__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
}

.abai-navbar__logo:hover {
    color: #fff;
    text-decoration: none;
}

.abai-navbar__homeIcon {
    color: #e67e22;
}

.abai-navbar__brand {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .06em;
    color: #fff;
}

.abai-navbar__brandAccent {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .06em;
    color: #e67e22;
}

.abai-navbar__right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.abai-navbar__right a {
    color: #d4d4d4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .15s;
}

.abai-navbar__right a:hover {
    color: #fff;
}

.abai-navbar__lang {
    position: relative;
    font-size: 13px;
}

.abai-navbar__langBtn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d4d4d4;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}

.abai-navbar__langBtn:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.abai-navbar__langBtn svg {
    opacity: .7;
}

.abai-navbar__langMenu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: rgba(20, 20, 20, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.abai-navbar__lang.is-open .abai-navbar__langMenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.abai-navbar__langMenu li {
    margin: 0;
}

.abai-navbar__langMenu a,
.abai-navbar__langMenu > li > span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #d4d4d4;
    text-decoration: none;
    font-size: 13px;
    transition: background .15s, color .15s;
}

.abai-navbar__langMenu a:hover {
    background: rgba(230, 126, 34, .15);
    color: #fff;
    text-decoration: none;
}

.abai-navbar__langMenu li.is-active > span {
    color: #e67e22;
    font-weight: 700;
    cursor: default;
}

.abai-navbar__langFlag {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: inline-block;
}

/* ── HERO ── */
.abai-hero {
    position: relative;
    width: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.abai-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.abai-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, .45) 0%,
        rgba(0, 0, 0, .35) 50%,
        rgba(0, 0, 0, .50) 100%
    );
}

.abai-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 60px 24px;
    max-width: 800px;
}

.abai-hero__title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1;
    margin: 0 0 20px;
    color: #fff;
    text-transform: uppercase;
}

.abai-hero__subtitle {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 12px;
    color: rgba(255, 255, 255, .92);
}

.abai-hero__desc {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 28px;
    color: #e67e22;
}

.abai-hero__actions {
    display: flex;
    justify-content: center;
}

.abai-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .02em;
    box-shadow: 0 4px 14px rgba(230, 126, 34, .35);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.abai-hero__btn:hover {
    background: linear-gradient(135deg, #d35400, #b8470a);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(230, 126, 34, .5);
}

/* ── ORNAMENT DIVIDER ── */
.abai-ornament {
    display: flex;
    justify-content: center;
    padding: 28px 0 12px;
}

.abai-ornament svg {
    opacity: .5;
}

.abai-ornament__img {
    max-width: 420px;
    width: 100%;
    height: auto;
    opacity: .75;
    mix-blend-mode: multiply;
}

/* ── NEWS SECTION ── */
.abai-news {
    padding: 20px 0 30px;
    border-bottom: 1px solid #eee;
}

.abai-news__title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    color: #1a1a1a;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.abai-news__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.abai-news__item {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 2px 0 2px 14px;
    border-left: 3px solid #4a4a4a;
    transition: opacity .15s, border-left-color .15s, padding-left .15s;
}

.abai-news__item:hover {
    opacity: .85;
    color: inherit;
    text-decoration: none;
    border-left-color: #1a1a1a;
    padding-left: 16px;
}

.abai-news__meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    font-weight: 500;
}

.abai-news__text {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
}

/* ── CATEGORY CARDS ── */
.abai-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 30px 0;
    max-width: 1100px;
    margin: 0 auto;
}

.abai-categories__card {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    aspect-ratio: 4 / 3;
    transition: transform .2s, box-shadow .2s;
}

.abai-categories__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    color: #fff;
    text-decoration: none;
}

.abai-categories__card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.abai-categories__card:hover img {
    transform: scale(1.05);
}

.abai-categories__card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, .05) 0%,
        rgba(0, 0, 0, .15) 50%,
        rgba(0, 0, 0, .55) 100%
    );
    z-index: 1;
}

.abai-categories__label {
    position: absolute;
    bottom: 14px;
    left: 16px;
    z-index: 2;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .03em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

/* ── ХАЛЫҚАРАЛЫҚ БАСТАМА ── */
.abai-initiative {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.abai-initiative__soon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    vertical-align: middle;
    margin-left: 10px;
}

.abai-initiative__title {
    font-size: 28px;
    font-weight: 900;
    color: #1a1a1a;
    margin: 0 0 24px;
}

.abai-initiative__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.abai-initiative__list li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.abai-initiative__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #555;
    overflow: hidden;
}

.abai-initiative__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.abai-initiative__badge {
    background: #e67e22;
    color: #fff;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.abai-initiative__right {
    display: flex;
    justify-content: flex-end;
}

.abai-initiative__right img {
    width: 100%;
    max-width: 440px;
    height: 320px;
    object-fit: contain;
    border-radius: 14px;
}

/* ── ОНЛАЙН КІТАПХАНА ── */
.abai-library {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #000;
    border-radius: 16px;
    margin: 10px 0 60px;
    min-height: 260px;
    align-items: center;
}

.abai-library__visual {
    position: relative;
    overflow: visible;
    padding: 20px 24px 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    align-self: stretch;
}

.abai-library__visual img {
    width: 100%;
    max-width: 460px;
    height: auto;
    object-fit: contain;
    display: block;
    margin-bottom: -44px;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35));
}

.abai-library__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
}

.abai-library__title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 22px;
}

.abai-library__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    padding: 10px 36px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .15s;
}

.abai-library__btn:hover {
    background: #f0f0f0;
    color: #1a1a1a;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ── BOOKSHELF (library index) ── */
.abai-lib-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
}

.abai-lib-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: background .18s, color .18s;
    font-family: inherit;
}

.abai-lib-tab.is-active {
    background: #fff;
    color: #0f2540;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.abai-lib-tab:hover:not(.is-active) {
    color: #333;
}

.abai-lib-section {
    margin-bottom: 48px;
}

.abai-lib-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.abai-lib-section__title {
    font-size: 20px;
    font-weight: 900;
    color: #0f2540;
    margin: 0;
    letter-spacing: .02em;
}

.abai-lib-section__title span {
    font-weight: 400;
    color: #666;
}

.abai-lib-section__all {
    font-size: 13px;
    font-weight: 600;
    color: #e67e22;
    text-decoration: none;
    white-space: nowrap;
}

.abai-lib-section__all:hover {
    text-decoration: underline;
}

.abai-library-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 36px 24px;
    padding: 24px 0 10px;
    perspective: 1200px;
}

.abai-book-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-style: preserve-3d;
}

.abai-book-link:hover,
.abai-book-link:focus {
    text-decoration: none;
    color: inherit;
}

.abai-book {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 3px 8px 8px 3px;
    overflow: hidden;
    background: #1e3a5f;
    transform-origin: center left;
    transition: transform .35s ease, box-shadow .35s ease;
    box-shadow:
        inset 6px 0 12px -4px rgba(0, 0, 0, .35),
        inset -1px 0 0 rgba(255, 255, 255, .06),
        inset 0 -2px 4px rgba(0, 0, 0, .15),
        4px 10px 22px rgba(0, 0, 0, .2),
        2px 4px 8px rgba(0, 0, 0, .18);
}

.abai-book::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.abai-book::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .08));
    pointer-events: none;
}

.abai-book-link:hover .abai-book {
    transform: translateY(-4px) rotateY(-12deg) scale(1.02);
    box-shadow:
        inset 6px 0 12px -4px rgba(0, 0, 0, .35),
        inset -1px 0 0 rgba(255, 255, 255, .06),
        inset 0 -2px 4px rgba(0, 0, 0, .15),
        18px 20px 34px rgba(0, 0, 0, .28),
        6px 10px 14px rgba(0, 0, 0, .18);
}

.abai-book__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.abai-book__face {
    position: absolute;
    inset: 0;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    color: #f8eed5;
    z-index: 2;
}

.abai-book__title {
    font-family: 'Inter', Georgia, 'Times New Roman', serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.abai-book__author {
    font-size: 12px;
    opacity: .85;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.abai-book__caption {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    color: #1f2937;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.abai-book__sub {
    margin-top: 3px;
    text-align: center;
    font-size: 11.5px;
    color: #6b7280;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── FOOTER ── */
.abai-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 32px 0 20px;
}

.abai-footer__top {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.abai-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.abai-footer__logoText {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .04em;
}

.abai-footer__logoName {
    color: #1a1a1a;
}

.abai-footer__logoAccent {
    color: #e67e22;
}

.abai-footer__brand p {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 0;
    max-width: 320px;
}

.abai-footer__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.abai-footer__links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color .15s;
}

.abai-footer__links a:hover {
    color: #e67e22;
}

.abai-footer__chat {
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.abai-footer__chatBadge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    letter-spacing: .04em;
}

.abai-footer__chatTitle {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.abai-footer__chatInput {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    color: #999;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}

.abai-footer__chatInput:focus {
    border-color: #e67e22;
}

.abai-footer__bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #999;
}


/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
    .abai-hero__title {
        font-size: 46px;
    }
}

@media (max-width: 992px) {
    .abai-hero {
        min-height: 400px;
    }

    .abai-hero__title {
        font-size: 38px;
    }

    .abai-hero__subtitle {
        font-size: 18px;
    }

    .abai-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .abai-news__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .abai-initiative {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .abai-initiative__right {
        justify-content: center;
    }

    .abai-library {
        grid-template-columns: 1fr;
    }

    .abai-footer__top {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .abai-navbar {
        padding: 0 16px;
    }

    .abai-navbar__right a:not(:last-child) {
        display: none;
    }

    .abai-hero {
        min-height: 340px;
    }

    .abai-hero__title {
        font-size: 30px;
        letter-spacing: .06em;
    }

    .abai-hero__subtitle {
        font-size: 16px;
    }

    .abai-hero__desc {
        font-size: 13px;
    }

    .abai-categories {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .abai-landing__container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .abai-hero__title {
        font-size: 24px;
    }

    .abai-categories {
        grid-template-columns: 1fr;
    }
}

/* ── YOUTUBE VIDEOS BLOCK ── */
.abai-videos-section {
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2540 100%);
    border-radius: 20px;
    padding: 32px;
    margin: 40px 0;
}

.abai-videos {
    margin: 0;
}

.abai-videos-section .abai-videos__title {
    color: #1a3a5c;
    font-weight: 600;
}

.abai-videos-section .abai-videos__caption {
    color: #1a2e42;
    font-weight: 700;
    font-size: 14px;
}

.abai-videos__title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 20px;
    letter-spacing: .04em;
    color: #1a1a1a;
}

.abai-videos__layout {
    display: grid;
    grid-template-columns: 2fr 1.4fr;
    gap: 16px;
    align-items: start;
}

.abai-videos__main iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    border: none;
    display: block;
}

.abai-videos__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.abai-videos__thumb {
    flex-shrink: 0;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s, opacity .2s;
}

.abai-videos__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.abai-videos__thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.3);
    transition: background .2s;
}

.abai-videos__thumb:hover .abai-videos__thumb-play {
    background: rgba(0,0,0,.5);
}

.abai-videos__thumb.is-active {
    border-color: #e67e22;
}

.abai-videos__thumb.is-active .abai-videos__thumb-play {
    background: rgba(230,126,34,.35);
}

.abai-videos__thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    line-clamp: 2;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.abai-videos__caption {
    font-size: 13px;
    color: #555;
    margin: 6px 0 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .abai-videos__layout {
        grid-template-columns: 1fr;
    }
    .abai-videos__list {
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
    }
    .abai-videos__item {
        min-width: 260px;
    }
}

/* ── FORUM CTA BLOCK ── */
.abai-forum-cta {
    margin: 40px 0;
    border-radius: 20px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0f2540 100%);
    padding: 40px 32px;
    text-align: center;
}

.abai-forum-cta__posts {
    margin: 24px 0 28px;
    text-align: left;
    background: rgba(255,255,255,.06);
    border-radius: 14px;
    overflow: hidden;
}

.abai-forum-cta__posts-head {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.abai-forum-cta__posts-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
}

.abai-forum-cta__post-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-decoration: none;
    transition: background .15s;
}

.abai-forum-cta__post-item:last-child {
    border-bottom: none;
}

.abai-forum-cta__post-item:hover {
    background: rgba(255,255,255,.08);
    text-decoration: none;
}

.abai-forum-cta__post-av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22, #e74c3c);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.abai-forum-cta__post-body {
    flex: 1;
    min-width: 0;
}

.abai-forum-cta__post-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abai-forum-cta__post-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255,255,255,.5);
}

.abai-forum-cta__title {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: .06em;
}

.abai-forum-cta__desc {
    color: rgba(255,255,255,.75);
    font-size: 15px;
    margin: 0 0 22px;
}

.abai-forum-cta__btn {
    display: inline-block;
    background: #e67e22;
    color: #fff;
    padding: 11px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .15s;
}

.abai-forum-cta__btn:hover {
    background: #d35400;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   BURGER DRAWER (main ABAI landing)
═══════════════════════════════════════ */
.abai-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9998;
    backdrop-filter: blur(2px);
}
.abai-drawer-backdrop.is-open { display: block; }

.abai-landing-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 320px;
    max-width: 90vw;
    background: #0d1117;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.abai-landing-drawer.is-open { transform: translateX(0); }

.abai-landing-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.abai-landing-drawer__brand {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    letter-spacing: .08em;
    text-decoration: none;
}
.abai-landing-drawer__brand span { color: #e67e22; }
.abai-landing-drawer__close {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 4px;
}
.abai-landing-drawer__close:hover { color: #fff; }

.abai-landing-drawer__body { padding: 16px 12px; flex: 1; }

.abai-landing-drawer__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    color: rgba(255,255,255,.35);
    text-transform: uppercase;
    padding: 12px 8px 6px;
}

.abai-landing-drawer__sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.abai-landing-drawer__section-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    text-decoration: none;
    display: block;
}
.abai-landing-drawer__section-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.abai-landing-drawer__section-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 100%);
}
.abai-landing-drawer__section-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    z-index: 2;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .05em;
    line-height: 1.3;
    text-transform: uppercase;
}

.abai-landing-drawer__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 10px;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background .15s, color .15s;
    margin-bottom: 2px;
}
.abai-landing-drawer__link:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
    text-decoration: none;
}
.abai-landing-drawer__link i {
    width: 20px;
    text-align: center;
    color: #e67e22;
    font-size: 16px;
}

/* ═══════════════════════════════════════
   TOP FORUM POSTS (main ABAI page)
═══════════════════════════════════════ */
.abai-top-posts {
    margin: 40px 0;
}
.abai-top-posts__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.abai-top-posts__title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #1a1a1a;
    margin: 0;
}
.abai-top-posts__more {
    font-size: 13px;
    color: #e67e22;
    text-decoration: none;
    font-weight: 600;
}
.abai-top-posts__more:hover { color: #d35400; text-decoration: none; }
.abai-top-posts__list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
}
.abai-top-posts__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.abai-top-posts__item:last-child { border-bottom: none; }
.abai-top-posts__item:hover { background: #fafafa; text-decoration: none; }
.abai-top-posts__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22, #d35400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.abai-top-posts__content { flex: 1; min-width: 0; }
.abai-top-posts__author {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}
.abai-top-posts__text {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.abai-top-posts__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: #aaa;
}
.abai-top-posts__meta i { margin-right: 4px; }

/* ═══════════════════════════════════════
   THREADS-STYLE FORUM
═══════════════════════════════════════ */
.abai-threads { max-width: 680px; }

.abai-threads__new-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: #f7f7f7;
    border: 1.5px solid #e8e8e8;
    border-radius: 14px;
    padding: 14px 18px;
    cursor: pointer;
    color: #aaa;
    font-size: 15px;
    margin-bottom: 24px;
    transition: border-color .15s, background .15s;
    text-align: left;
}
.abai-threads__new-btn:hover { border-color: #ccc; background: #f0f0f0; color: #888; }
.abai-threads__new-btn .abai-threads__av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22, #d35400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.abai-threads__post-form {
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}
.abai-threads__post-form h5 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a1a;
}
.abai-threads__post-form .form-group { margin-bottom: 14px; }
.abai-threads__post-form label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
    display: block;
}
.abai-threads__post-form input.form-control,
.abai-threads__post-form textarea.form-control {
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color .15s;
    background: #fafafa;
}
.abai-threads__post-form input.form-control:focus,
.abai-threads__post-form textarea.form-control:focus {
    border-color: #e67e22;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230,126,34,.1);
}
.abai-threads__post-form .ql-container {
    border-radius: 0 0 10px 10px;
    border: 1.5px solid #e8e8e8;
    border-top: none;
    font-size: 15px;
    min-height: 140px;
    background: #fafafa;
}
.abai-threads__post-form .ql-toolbar {
    border-radius: 10px 10px 0 0;
    border: 1.5px solid #e8e8e8;
    background: #f7f7f7;
}
.abai-threads__post-form .ql-container:focus-within {
    border-color: #e67e22;
    background: #fff;
}
.abai-threads__form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}
.abai-threads__submit-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.abai-threads__submit-btn:hover { background: #333; transform: translateY(-1px); }
.abai-threads__cancel-btn {
    background: none;
    border: 1.5px solid #e8e8e8;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
}
.abai-threads__cancel-btn:hover { border-color: #ccc; color: #333; }

.abai-threads__pending {
    background: #fffbeb;
    border: 1.5px solid #fbbf24;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.abai-threads__pending-title {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
}
.abai-threads__pending-item {
    font-size: 14px;
    color: #78350f;
    padding: 6px 0;
    border-bottom: 1px solid rgba(251,191,36,.3);
}
.abai-threads__pending-item:last-child { border-bottom: none; }
.abai-threads__pending-badge {
    font-size: 11px;
    background: #fbbf24;
    color: #78350f;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700;
    margin-left: 8px;
}

/* Thread card */
.abai-thread {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}
.abai-thread:last-child { border-bottom: none; }
.abai-thread:hover .abai-thread__title { color: #e67e22; }

.abai-thread__av-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.abai-thread__av {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22, #d35400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    position: relative;
    z-index: 1;
}
.abai-thread__av-line {
    width: 2px;
    flex: 1;
    background: #f0f0f0;
    margin-top: 6px;
    min-height: 20px;
}

.abai-thread__body { flex: 1; min-width: 0; }
.abai-thread__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.abai-thread__author {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}
.abai-thread__time {
    font-size: 13px;
    color: #aaa;
}
.abai-thread__pinned {
    font-size: 11px;
    background: #fef3c7;
    color: #d97706;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700;
}
.abai-thread__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
    text-decoration: none;
    display: block;
    transition: color .15s;
}
.abai-thread__excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.abai-thread__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.abai-thread__action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.abai-thread__action-btn:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}
.abai-thread__action-btn.is-liked { color: #e74c3c; }
.abai-thread__action-btn.is-disliked { color: #3b82f6; }
.abai-thread__action-btn svg { width: 18px; height: 18px; }

.abai-threads__empty {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
}
.abai-threads__empty svg { margin-bottom: 16px; opacity: .4; }
.abai-threads__empty p { font-size: 15px; }

.abai-threads__pagination { margin-top: 24px; text-align: center; }

/* Thread detail */
.abai-thread-detail { max-width: 680px; }
.abai-thread-detail__header { padding: 20px 0 0; }
.abai-thread-detail__title {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.35;
    margin-bottom: 12px;
}
.abai-thread-detail__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.abai-thread-detail__av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22, #d35400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}
.abai-thread-detail__author-info {}
.abai-thread-detail__author-name { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.abai-thread-detail__time { font-size: 13px; color: #aaa; }
.abai-thread-detail__body {
    font-size: 16px;
    line-height: 1.75;
    color: #222;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.abai-thread-detail__body img { max-width: 100%; border-radius: 10px; margin: 10px 0; }
.abai-thread-detail__body p { margin: 0 0 14px; }
.abai-thread-detail__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

/* Replies */
.abai-replies__title {
    font-size: 16px;
    font-weight: 700;
    color: #666;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.abai-reply {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}
.abai-reply:last-child { border-bottom: none; }
.abai-reply--nested { padding-left: 24px; }
.abai-reply__av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #4f46e5;
    flex-shrink: 0;
}
.abai-reply__body { flex: 1; min-width: 0; }
.abai-reply__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.abai-reply__author { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.abai-reply__time { font-size: 12px; color: #aaa; }
.abai-reply__text { font-size: 14px; color: #333; line-height: 1.6; }
.abai-reply__text img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.abai-reply__actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }

/* Reply form */
.abai-reply-form {
    background: #f9f9f9;
    border-radius: 14px;
    padding: 18px;
    margin-top: 24px;
}
.abai-reply-form h5 { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: #1a1a1a; }
.abai-reply-form textarea.form-control {
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    background: #fff;
}
.abai-reply-form textarea.form-control:focus {
    border-color: #e67e22;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230,126,34,.1);
}
.abai-login-prompt {
    text-align: center;
    padding: 24px;
    background: #f9f9f9;
    border-radius: 14px;
    margin-top: 24px;
    color: #888;
    font-size: 14px;
}
.abai-login-prompt a { color: #e67e22; font-weight: 600; }

@media (max-width: 768px) {
    .abai-threads { max-width: 100%; }
    .abai-thread-detail { max-width: 100%; }
    .abai-landing-drawer { width: 280px; }
    .abai-landing-drawer__sections { grid-template-columns: 1fr 1fr; }
}
