/**
 * AI Learning Hub WPBakery Addon Styles
 */

/* ===========================
   Base
   =========================== */



/* ===========================
   Main Content
   =========================== */
.ai-learning-hub-main {
    max-width: 1400px;
    margin: 0 auto;

}



/* ===========================
   Main category tabs — same underline pattern as fundamentals sub-tabs (screenshot)
   =========================== */
.ai-learning-hub .ai-learning-hub-tabs-bar,
.ai-learning-hub .ai-learning-hub-filters {
    margin-bottom: 30px;
}

.ai-learning-hub .ai-learning-hub-tabs,
.ai-learning-hub .ai-learning-hub-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 36px;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
    justify-content: flex-start;
    background: transparent;
    -webkit-overflow-scrolling: touch;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-tabs,
html.theme-dark .ai-learning-hub .ai-learning-hub-filter-buttons {
    border-bottom-color: #334155;
}

.ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab,
.ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn {
    position: relative;
    flex-shrink: 0;
    margin: 0 0 -1px;
    padding: 16px 4px 14px;
    border: none;
    border-radius: 0!important;
    border-bottom: 3px solid transparent;
    background: transparent;
    box-shadow: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: #546e7a;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    text-align: start;
}

.ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab:hover,
.ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn:hover {
    color: #334155;
    background: transparent;
}

.ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab.is-active,
.ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn.is-active {
    color: #2563eb;
    font-weight: 600;
    border-bottom-color: #2563eb;
    background: transparent;
    box-shadow: none;
}

@media (prefers-color-scheme: dark) {
    .ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab,
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn {
        color: #94a3b8;
    }
    .ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab:hover,
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn:hover {
        color: #e2e8f0;
    }
    .ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab.is-active,
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn.is-active {
        color: #60a5fa;
        border-bottom-color: #60a5fa;
    }
}

html.theme-dark .ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab,
html.theme-dark .ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn {
    color: #94a3b8 !important;
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    box-shadow: none !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab:hover,
html.theme-dark .ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn:hover {
    color: #e2e8f0 !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab.is-active,
html.theme-dark .ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn.is-active {
    color: #60a5fa !important;
    border-bottom-color: #60a5fa !important;
    background: transparent !important;
}

/* AI Fundamentals topic filters — pill row + shared estimate line */
.ai-learning-hub .ai-learning-hub-fundamentals-filter-bar {
    grid-column: 1 / -1;
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 25px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-toolbar > .ai-learning-hub-fundamentals-filter-tabs {
    flex: 0 0 auto;
    min-width: 0;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-cta {
    display: flex;
    align-items: flex-start;
    flex: 0 0 auto;
    margin-left: auto;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-item--cta {
    gap: 0;
    max-width: none;
}

.ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 6px 15px;
    border-radius: 9999px !important;
    border: 1px solid #2563eb !important;
    background-color: #2563eb !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    min-height: 38px;
    -webkit-appearance: none;
    appearance: none;
}

.ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link:hover {
    border-color: #1d4ed8 !important;
    background-color: #1d4ed8 !important;
    color: #fff !important;
}

.ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link:focus {
    outline: none;
}

.ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-bar .ai-learning-hub-fundamentals-filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px;
    overflow: visible;
    padding: 0;
    border: none;
    background: transparent;
    justify-content: flex-start;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    flex-shrink: 0;
    max-width: min(100%, 340px);
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-tab {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 6px 15px;
    border-radius: 9999px !important;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    color: #2d3748;
    cursor: pointer;
    white-space: normal;
    text-align: left;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    text-align: start;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-tab-label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #2d3748;
    background-color: #f0f4f8;
}

.ai-learning-hub .ai-learning-hub-fundamentals-active-estimate {
    margin: 0;
    padding: 0 6px 0 2px;
    font-size: 15px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.45;
    color: #475569;
    max-width: 100%;
    box-sizing: border-box;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-tab:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-tab.is-active {
    color: #2563eb;
    border-color: #93c5fd;
    background-color: #eff6ff;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
    font-weight: 600;
}

.ai-learning-hub .ai-learning-hub-fundamentals-filter-tab.is-active .ai-learning-hub-fundamentals-filter-tab-count {
    color: #2563eb;
    background-color: #dbeafe;
}

@media (prefers-color-scheme: dark) {
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab {
        border-color: #334155;
        background-color: #0f172a;
        color: #e2e8f0;
    }
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab-count {
        color: #e2e8f0;
        background-color: #1e293b;
    }
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab:hover {
        border-color: #475569;
        background-color: #1e293b;
    }
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab.is-active {
        color: #93c5fa;
        border-color: #3b82f6;
        background-color: rgba(30, 58, 138, 0.35);
        box-shadow: none;
    }
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab.is-active .ai-learning-hub-fundamentals-filter-tab-count {
        color: #bfdbfe;
        background-color: rgba(37, 99, 235, 0.35);
    }
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-active-estimate {
        color: #cbd5e1;
    }
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link {
        border-color: #334155 !important;
        background-color: #0f172a !important;
        color: #e2e8f0 !important;
        box-shadow: none !important;
    }
    html:not(.theme-light) .ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link:hover {
        border-color: #475569 !important;
        background-color: #1e293b !important;
        color: #f1f5f9 !important;
    }
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab {
    border-color: #334155 !important;
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab .ai-learning-hub-fundamentals-filter-tab-count {
    color: #e2e8f0 !important;
    background-color: #1e293b !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab:hover {
    border-color: #475569 !important;
    background-color: #1e293b !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab.is-active {
    color: #93c5fa !important;
    border-color: #3b82f6 !important;
    background-color: rgba(30, 58, 138, 0.35) !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab.is-active .ai-learning-hub-fundamentals-filter-tab-count {
    color: #bfdbfe !important;
    background-color: rgba(37, 99, 235, 0.35) !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-active-estimate {
    color: #cbd5e1 !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link {
    border-color: #334155 !important;
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

html.theme-dark .ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link:hover {
    border-color: #475569 !important;
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

/* ===========================
   Video Grid
   =========================== */
/* Optional main description (per tab, above that tab’s cards) */
.ai-learning-hub .ai-learning-hub-section-intro {
    grid-column: 1 / -1;
    margin-bottom: 0px;
}

.ai-learning-hub-section-intro-inner {
    font-size: 16px;
    line-height: 1.65;
    color: #475569;
}

.ai-learning-hub-section-intro-inner p {
    margin: 0 0 1em;
}

.ai-learning-hub-section-intro-inner p:last-child {
    margin-bottom: 0;
}

/* Hidden template: cloned into the hub modal when .ai-learning-hub-intro-modal-open is clicked */
.ai-learning-hub-intro-modal-source {
    display: none !important;
}



@media (prefers-color-scheme: dark) {
    html:not(.theme-light) .ai-learning-hub-section-intro-inner {
        color: #94a3b8;
    }
}

html.theme-dark .ai-learning-hub-section-intro-inner {
    color: #94a3b8;
}

.ai-learning-hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .ai-learning-hub-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ai-learning-hub-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ai-learning-hub-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
    .ai-learning-hub-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
    .ai-learning-hub-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
    .ai-learning-hub-grid[data-columns="5"],
    .ai-learning-hub-grid[data-columns="6"] { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
    .ai-learning-hub-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
    .ai-learning-hub-grid[data-columns="6"] { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1400px) {
    .ai-learning-hub-grid[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }
}

.ai-learning-hub-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-learning-hub-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

@media (prefers-color-scheme: dark) {
    html:not(.theme-light) .ai-learning-hub-card {
        background-color: #0f172a;
        border-color: #1e293b;
    }
}

html.theme-dark .ai-learning-hub-card {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}

.ai-learning-hub-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #020617;
    overflow: hidden;
}

/* Sub-tab / topic label — top-left pill on thumbnail */
.ai-learning-hub-card-topic-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    max-width: calc(100% - 24px);
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #334155;
    background-color: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    display: none;
}

html.theme-dark .ai-learning-hub-card-topic-badge {
    color: #e2e8f0;
    background-color: rgba(30, 41, 59, 0.92);
    border-color: rgba(51, 65, 85, 0.95);
}

.ai-learning-hub-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: all 0.5s ease;
}

.ai-learning-hub-card:hover .ai-learning-hub-card-thumb img {
    opacity: 1;
    transform: scale(1.05);
}

.ai-learning-hub-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.ai-learning-hub-card-play::after {
    content: '';
    position: absolute;
    width: 64px;
    height: 64px;
    background-color: #2563eb;
    border-radius: 50%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ai-learning-hub-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-learning-hub-play-icon {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    color: #ffffff;
    margin-left: 4px;
}

.ai-learning-hub-card-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 6;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
}

/* Link cards (AI Overview / other link tabs): icon badge instead of play */
.ai-learning-hub-card--link .ai-learning-hub-card-play,
.ai-learning-hub-card--link .ai-learning-hub-card-duration {
    display: none;
}

/* Link-card icon badge — same pattern as AI Knowledge Sharing (.ai-ks-card-icon-badge) */
.ai-learning-hub-card-icon-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 5;
    color: #2563eb;
}

.ai-learning-hub-card-icon-badge i,
.ai-learning-hub-card-icon-badge svg {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor;
    fill: none !important;
    display: block;
    flex-shrink: 0;
}

html.theme-dark .ai-learning-hub-card-icon-badge {
    background-color: rgba(15, 23, 42, 0.92);
    color: #60a5fa;
}

.ai-learning-hub-card-body {
    padding: 24px;
}

.ai-learning-hub-card-meta {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.ai-learning-hub-card-section-heading {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.35;
}

html.theme-dark .ai-learning-hub-card-section-heading {
    color: #60a5fa !important;
}

/* Legacy: category chip (prefer .ai-learning-hub-card-section-heading for main tab row) */
.ai-learning-hub-card-category {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html.theme-dark .ai-learning-hub-card-category {
    color: #60a5fa !important;
}

.ai-learning-hub-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}
html.theme-dark  .ai-learning-hub-card-title {
    color: #fff;
}
.ai-learning-hub-card:hover .ai-learning-hub-card-title {
    color: #2563eb !important;
}

html.theme-dark .ai-learning-hub-card:hover .ai-learning-hub-card-title {
    color: #60a5fa !important;
}

.ai-learning-hub-card-desc {
    font-size: 14px;
    color: #62748e;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html.theme-dark .ai-learning-hub-card-desc {
    color: #94a3b8 !important;
}

.ai-learning-hub-card.is-hidden,
.ai-learning-hub-section-intro.is-hidden,
.ai-learning-hub-fundamentals-alert-slot.is-hidden,
.ai-learning-hub-fundamentals-filter-bar.is-hidden {
    display: none !important;
}

/* ===========================
   Empty State
   =========================== */
.ai-learning-hub-empty {
    text-align: center;
    padding: 80px 24px;
}

.ai-learning-hub-empty-icon {
    width: 64px;
    height: 64px;
    background-color: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #90a1b9;
}
html.theme-dark .ai-learning-hub-empty-icon {
    background-color: #1d293d;
}
.ai-learning-hub-empty-icon i {
    width: 32px;
    height: 32px;
    color: #94a3b8;
}

.ai-learning-hub-empty-title {
    font-weight: 600;
    color: #0f172b;
    margin: 0 0 0px 0!important;
    font-size: 18px;
}
html.theme-dark .ai-learning-hub-empty-title {
    color: #fff;
}
.ai-learning-hub-empty-text {
    color: #64748b;
    margin: 0;
    font-size: 16px;
}

/* ===========================
   Modal (Bootstrap-style: lives in body, top-level)
   =========================== */
.ai-learning-hub-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem; /* Bootstrap: modal-dialog-margin */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (min-width: 576px) {
    .ai-learning-hub-modal {
        padding: 1.75rem; /* Bootstrap: modal-dialog-margin-y-sm-up */
    }
}

.ai-learning-hub-modal.is-open {
    opacity: 1;
    visibility: visible;
}

/* Fullscreen on small viewports (Bootstrap modal-fullscreen-sm-down) */
@media (max-width: 575.98px) {
    .ai-learning-hub-modal.is-open {
        padding: 0;
        align-items: stretch;
    }
}

.ai-learning-hub-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.ai-learning-hub-modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 896px;
    max-height: calc(100vh - 1rem);
    background-color: #000000;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}


@media (min-width: 576px) {
    .ai-learning-hub-modal-content {
        max-height: calc(100vh - 3.5rem);
    }
}

/* Fullscreen on small */
@media (max-width: 575.98px) {
    .ai-learning-hub-modal.is-open .ai-learning-hub-modal-content {
        max-height: 100vh;
        max-width: 100vw;
        border-radius: 0;
        border: none;
    }
}

.ai-learning-hub-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: #0f172a;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}

.ai-learning-hub-modal-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-learning-hub-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

@media (min-width: 640px) {
    .ai-learning-hub-modal-title {
        max-width: 448px;
    }
}

.ai-learning-hub-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-learning-hub-modal-btn,
.ai-learning-hub-modal-close {
    padding: 8px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s, background-color 0.2s;
}

.ai-learning-hub-modal-btn:hover,
.ai-learning-hub-modal-close:hover {
    background-color: #1e293b;
    color: #ffffff;
}

.ai-learning-hub-modal-btn i,
.ai-learning-hub-modal-close i {
    width: 20px;
    height: 20px;
}

/* Modal player - scrollable */
.ai-learning-hub-modal-player {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 300px;
    flex-shrink: 1;
    background-color: #000000;
}

.ai-learning-hub-modal-player.is-collapsed {
    display: none;
}

.ai-learning-hub-modal-static-slot {
    flex-shrink: 0;
    padding: 24px;
    font-size: 16px;
    line-height: 1.65;
    color: #94a3b8;
    background-color: #0f172a;
    border-bottom: 1px solid #1e293b;
}

.ai-learning-hub-modal-static-slot p {
    margin: 0 0 1em;
}

.ai-learning-hub-modal-static-slot p:last-child {
    margin-bottom: 0;
}

.ai-learning-hub-modal-static-slot a {
    color: #60a5fa;
    text-decoration: underline;
}

.ai-learning-hub-modal-static-slot a:hover {
    color: #93c5fd;
}

/* Static intro modal: same overlay as video modal (no backdrop override — avoids flash when --static is removed on close) */
.ai-learning-hub-modal--static .ai-learning-hub-modal-content {
    width: 100%;
    max-width: 550px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    border-radius: 14px;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    padding: 8px 20px 8px;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-title {
    color: #111827;
    font-size: 1.375rem;
    font-weight: 700;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    line-height: 1.25;
}

@media (min-width: 640px) {
    .ai-learning-hub-modal--static .ai-learning-hub-modal-title {
        font-size: 1.5rem;
    }
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-close {
    color: #6b7280;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-close:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot {
    background-color: #ffffff;
    border-bottom: none;
    padding: 20px 20px 20px;
    color: #475569;
    font-size: 1rem;
    line-height: 1.65;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot p {
    color: #525252;
    margin: 0 0 0rem;
    line-height: 1.6;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot ul,
.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot ol {
    margin: 0 0 0.5rem;
    padding-left: 1.35rem;
    color:#525252;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot li {
    margin: 0 0 0.65em;
    line-height: 1.7;
    padding-left: 0.25rem;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot li::marker {
    color: #525252;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot a {
    color: #2563eb;
    text-decoration: underline;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot a:hover {
    color: #1d4ed8;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h2,
.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h3,
.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h4 {
    color: #111827;
    font-weight: 700;
    margin: 0 0 0.5em;
    line-height: 1.3;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h2 {
    font-size: 1.5rem;
}

.ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h3 {
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .ai-learning-hub-modal--static.is-open .ai-learning-hub-modal-content {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .ai-learning-hub-modal--static .ai-learning-hub-modal-header {
        padding: 16px 20px 12px;
    }

    .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot {
        padding: 4px 20px 28px;
    }
}

/* Static modal in dark theme: match video modal shell (slate / black) */
@media (prefers-color-scheme: dark) {
    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-content {
        background-color: #000000;
        border: 1px solid #1e293b;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-header {
        background-color: #0f172a;
        border-bottom: 1px solid #1e293b;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-title {
        color: #ffffff;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-close {
        color: #94a3b8;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-close:hover {
        background-color: #1e293b;
        color: #ffffff;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot {
        background-color: #0f172a;
        color: #94a3b8;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot p {
        color: #94a3b8;
    }

    .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot ul,
    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot ol {
        color: #94a3b8;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot li::marker {
        color: #64748b;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot a {
        color: #60a5fa;
    }

    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot a:hover {
        color: #93c5fd;
    }

    .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h2,
    .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h3,
    html:not(.theme-light) .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h4 {
        color: #f1f5f9;
    }
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-content {
    background-color: #000000;
    border: 1px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-header {
    background-color: #0f172a;
    border-bottom: 1px solid #1e293b;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-title {
    color: #ffffff;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-close {
    color: #94a3b8;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-close:hover {
    background-color: #1e293b;
    color: #ffffff;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot {
    background-color: #0f172a;
    color: #94a3b8;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot p {
    color: #94a3b8;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot ul,
html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot ol {
    color: #94a3b8;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot li::marker {
    color: #64748b;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot a {
    color: #60a5fa;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot a:hover {
    color: #93c5fd;
}

html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h2,
html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h3,
html.theme-dark .ai-learning-hub-modal--static .ai-learning-hub-modal-static-slot h4 {
    color: #f1f5f9;
}

.ai-learning-hub-modal-video-wrap {
    position: absolute;
    inset: 0;
    display: none;
}

.ai-learning-hub-modal-video-wrap.is-active {
    display: block;
}

.ai-learning-hub-modal-video-wrap iframe,
.ai-learning-hub-modal-video-wrap video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

.ai-learning-hub-modal-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ai-learning-hub-modal-placeholder.is-hidden {
    display: none;
}

.ai-learning-hub-modal-placeholder-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.ai-learning-hub-modal-play-btn {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    background-color: #2563eb;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: background-color 0.2s, transform 0.2s;
    margin-bottom: 16px;
    color: #fff;
}
html body .ai-learning-hub-modal-player .ai-learning-hub-modal-play-btn {border-radius: 50%!important;}

.ai-learning-hub-modal-play-btn:hover {
    background-color: #3b82f6;
    transform: scale(1.05);
}

.ai-learning-hub-modal-play-btn i {
    width: 32px;
    height: 32px;
    color: #ffffff;
    margin-left: 4px;
}

.ai-learning-hub-modal-play-text {
    position: relative;
    z-index: 1;
    font-size: 16px;
    font-weight: 500;
    color: #94a3b8;
    margin: 0;
    padding-bottom: 0px!important;
}

/* Modal footer - scrollable body */
.ai-learning-hub-modal-footer {
    padding: 24px;
    background-color: #0f172a;
    border-top: 1px solid #1e293b;
    overflow-y: auto;
    flex-shrink: 0;
    min-height: 0;
}

@media (max-height: 600px) {
    .ai-learning-hub-modal-footer {
        padding: 16px;
    }
}

.ai-learning-hub-modal-desc-title {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.ai-learning-hub-modal-desc-text {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 0 24px 0;
    max-width: 768px;
    padding-bottom: 0px!important;
}

.ai-learning-hub-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ai-learning-hub-modal-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background-color: #1e293b;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.ai-learning-hub-modal-download:hover {
    background-color: #334155;
    color: #ffffff;
}

.ai-learning-hub-modal-download svg{
    width: 18px;
    height: 18px;
}

@media (prefers-reduced-motion: reduce) {
    .ai-learning-hub-card {
        transition: none !important;
    }
    .ai-learning-hub-card:hover {
        transform: none;
    }
}


@media (max-width: 999px) {
    .ai-learning-hub .ai-learning-hub-tabs .ai-learning-hub-tab,
    .ai-learning-hub .ai-learning-hub-filter-buttons .ai-learning-hub-filter-btn {
        padding: 12px 2px 10px;
        font-size: 14px;
    }
    .ai-learning-hub .ai-learning-hub-fundamentals-filter-item--cta {
        max-width: 100%;
    }
    .ai-learning-hub .ai-learning-hub-fundamentals-knowledge-test-link {
        padding: 8px 14px;
        font-size: 13px;
    }
    .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab {
        padding: 8px 14px;
        font-size: 13px;
        gap: 6px;
    }
    .ai-learning-hub .ai-learning-hub-fundamentals-active-estimate {
        font-size: 12px;
    }
    .ai-learning-hub .ai-learning-hub-fundamentals-filter-tab-count {
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        font-size: 11px;
    }
    .ai-learning-hub .ai-learning-hub-tabs,
    .ai-learning-hub .ai-learning-hub-filter-buttons {
        gap: 22px;
    }
    .ai-learning-hub .ai-learning-hub-fundamentals-filter-bar .ai-learning-hub-fundamentals-filter-tabs {
        gap: 8px;
    }
    .ai-learning-hub .ai-learning-hub-fundamentals-filter-toolbar {
        gap: 10px;
    }
    .ai-learning-hub .ai-learning-hub-tabs-bar,
    .ai-learning-hub .ai-learning-hub-filters,
    .ai-learning-hub .ai-learning-hub-fundamentals-filter-bar {
        margin-bottom: 20px;
    }
}


.ai-learning-hub .ai-learning-hub-fundamentals-alert-slot {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ai-learning-hub .ai-learning-hub-fundamentals-alert-slot .ai-learning-alert {
    margin-top: 0;
}

/* Full-width notice (fundamentals alert slot or intro if present) */
.ai-learning-hub .ai-learning-alert {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #dbeafe;
    color: #0a0a0a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 0;
}