/*
|--------------------------------------------------------------------------
| AUTOHUMP KNOWLEDGE BASE
|--------------------------------------------------------------------------
| Uses the existing AutoHUMP brand direction:
| dark blue / red / black / grey with a clean light background.
|--------------------------------------------------------------------------
*/

.knowledgeBasePage {
    --kb-blue: #000080;
    --kb-red: #c1121f;
    --kb-orange: #FF9900;
    --kb-black: #000000;
    --kb-grey: #d1d1d1;
    --kb-light: #f5f6f8;
    --kb-line: #e3e5e8;
    --kb-white: #ffffff;
    --kb-muted: #62666d;
    width: 100%;
    overflow: hidden;
    background: var(--kb-white);
    color: var(--kb-black);
}

.knowledgeBasePage *,
.knowledgeBasePage *::before,
.knowledgeBasePage *::after {
    box-sizing: border-box;
}

.knowledgeBasePage h1,
.knowledgeBasePage h2,
.knowledgeBasePage h3,
.knowledgeBasePage p {
    margin-top: 0;
}

/* HERO */
.kbHero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    min-height: 560px;
    background:
        radial-gradient(circle at 85% 20%, rgba(59, 89, 153, 0.12), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f5f6f8 58%, #eceef2 100%);
    border-bottom: 1px solid var(--kb-line);
}

.kbHeroContent {
    padding: 78px clamp(28px, 6vw, 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kbEyebrow,
.kbSectionHeading > span,
.kbTopicPanelHeader > span,
.kbPlayerHeader > div > span,
.kbLanguageLabel > span {
    display: block;
    color: var(--kb-red);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.kbHero h1 {
    margin: 12px 0 18px;
    color: var(--kb-black);
    font-size: clamp(2.8rem, 5vw, 5.4rem);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.kbHero h1 span {
    color: var(--kb-red);
}

.kbHeroLead {
    max-width: 760px;
    margin-bottom: 30px;
    color: #3c4046;
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.65;
}

.kbHeroPoints {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    max-width: 840px;
    background: var(--kb-line);
    border: 1px solid var(--kb-line);
    border-radius: 14px;
}

.kbHeroPoints > div {
    min-height: 118px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
}

.kbHeroPoints strong {
    display: block;
    margin-bottom: 8px;
    color: var(--kb-blue);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.kbHeroPoints span {
    color: #555a62;
    font-size: 0.92rem;
    line-height: 1.45;
}

.kbHeroVisual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px clamp(28px, 6vw, 90px) 55px 20px;
}

.kbVisualFrame {
    width: min(100%, 620px);
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border: 1px solid #cfd3da;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(24, 31, 45, 0.18);
    transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
}

.kbVisualTopbar {
    display: flex;
    gap: 7px;
    height: 42px;
    padding: 14px 16px;
    background: #f5f6f8;
    border-bottom: 1px solid var(--kb-line);
}

.kbVisualTopbar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #bcc1ca;
}

.kbVisualScreen {
    height: calc(100% - 42px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(193, 18, 31, 0.94), rgba(193, 18, 31, 0.78) 30%, transparent 30%),
        linear-gradient(145deg, #17233f, #000080 70%, #233760);
}

.kbVisualPlay,
.kbPlaceholderPlay {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 24px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    font-size: 1.6rem;
    padding-left: 5px;
}

.kbVisualScreen strong {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.05em;
}

.kbVisualScreen small {
    margin-top: 8px;
    font-size: 0.98rem;
    opacity: 0.86;
}

/* COMMON SECTION */
.kbSection {
    width: min(1460px, calc(100% - 48px));
    margin: 0 auto;
    padding: 78px 0;
}

.kbSectionHeading {
    max-width: 760px;
    margin-bottom: 34px;
}

.kbSectionHeading--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.kbSectionHeading h2 {
    margin: 8px 0 10px;
    color: var(--kb-blue);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.06;
    font-weight: 850;
}

.kbSectionHeading p {
    margin-bottom: 0;
    color: var(--kb-muted);
    line-height: 1.6;
}

/* LANGUAGE BAR */
.kbLanguageBar {
    display: grid;
    grid-template-columns: minmax(210px, 0.28fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid var(--kb-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 9px 30px rgba(32, 42, 60, 0.06);
}

.kbLanguageLabel strong {
    display: block;
    margin-top: 5px;
    color: var(--kb-black);
    font-size: 1rem;
}

.kbLanguageButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.kbLanguageButton {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 43px;
    padding: 8px 14px;
    border: 1px solid #d9dde4;
    border-radius: 9px;
    background: #f8f9fa;
    color: #262a30;
    cursor: pointer;
    transition: 0.18s ease;
}

.kbLanguageButton span {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 24px;
    padding: 0 5px;
    border-radius: 5px;
    background: #e8eaf0;
    color: var(--kb-blue);
    font-size: 0.7rem;
    font-weight: 900;
}

.kbLanguageButton strong {
    font-size: 0.88rem;
    font-weight: 750;
}

.kbLanguageButton:hover,
.kbLanguageButton.is-active {
    transform: translateY(-1px);
    border-color: var(--kb-red);
    background: var(--kb-red);
    color: #fff;
}

.kbLanguageButton.is-active span,
.kbLanguageButton:hover span {
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
}

/* WORKSPACE */
.kbWorkspace {
    display: grid;
    grid-template-columns: minmax(270px, 0.32fr) minmax(0, 1fr);
    min-height: 680px;
    overflow: hidden;
    border: 1px solid var(--kb-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(29, 39, 58, 0.08);
}

.kbTopicPanel {
    background: #f5f6f8;
    border-right: 1px solid var(--kb-line);
}

.kbTopicPanelHeader {
    padding: 24px 22px 18px;
    border-bottom: 1px solid var(--kb-line);
    background: #fff;
}

.kbTopicPanelHeader strong {
    display: block;
    margin-top: 5px;
    color: var(--kb-blue);
    font-size: 1.2rem;
}

.kbTopicList {
    padding: 10px;
}

.kbTopicButton {
    width: 100%;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    margin-bottom: 6px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #262a30;
    text-align: left;
    cursor: pointer;
    transition: 0.16s ease;
}

.kbTopicButton:hover {
    background: #fff;
    border-color: #dfe2e7;
}

.kbTopicButton.is-active {
    background: #fff;
    border-color: rgba(193, 18, 31, 0.34);
    box-shadow: inset 4px 0 0 var(--kb-red), 0 6px 18px rgba(24, 31, 45, 0.05);
}

.kbTopicCode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 29px;
    border-radius: 6px;
    background: #e7e9ee;
    color: var(--kb-blue);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.kbTopicButton.is-active .kbTopicCode {
    background: var(--kb-red);
    color: #fff;
}

.kbTopicText {
    font-size: 0.95rem;
    font-weight: 720;
    line-height: 1.25;
}

.kbTopicArrow {
    color: #9da2aa;
    font-size: 1.55rem;
    line-height: 1;
}

.kbTopicButton.is-active .kbTopicArrow {
    color: var(--kb-red);
}

.kbNoTopics {
    padding: 24px 16px;
    color: var(--kb-muted);
    text-align: center;
    font-size: 0.92rem;
}

/* PLAYER */
.kbPlayerPanel {
    min-width: 0;
    padding: 30px;
    background: #fff;
}

.kbPlayerHeader {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    min-height: 86px;
    padding-bottom: 18px;
}

.kbPlayerHeader h2 {
    margin: 6px 0 0;
    color: var(--kb-black);
    font-size: clamp(1.4rem, 2.2vw, 2.2rem);
    font-weight: 850;
    line-height: 1.1;
}

.kbVideoShell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #080b11;
    box-shadow: 0 16px 40px rgba(8, 11, 17, 0.18);
}

.kbVideoShell iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.kbVideoPlaceholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(193, 18, 31, 0.32), transparent 32%),
        linear-gradient(145deg, #101827, #22365f 70%, #111826);
}

.kbVideoPlaceholder[hidden] {
    display: none;
}

.kbVideoPlaceholder strong {
    font-size: clamp(1.35rem, 2.6vw, 2.3rem);
    letter-spacing: 0.05em;
}

.kbVideoPlaceholder p {
    max-width: 560px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.kbPlayerFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 22px;
}

.kbPlayerNote strong {
    display: block;
    margin-bottom: 4px;
    color: var(--kb-blue);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.kbPlayerNote span {
    color: var(--kb-muted);
    font-size: 0.9rem;
}

.kbNavigationButtons {
    display: flex;
    gap: 8px;
}

.kbNavButton {
    min-width: 105px;
    min-height: 42px;
    padding: 8px 15px;
    border: 1px solid #d9dde4;
    border-radius: 8px;
    background: #fff;
    color: var(--kb-black);
    font-weight: 750;
    cursor: pointer;
}

.kbNavButton--primary {
    border-color: var(--kb-red);
    background: var(--kb-red);
    color: #fff;
}

.kbNavButton:disabled {
    opacity: 0.36;
    cursor: not-allowed;
}

/* COVERAGE */
.kbCoverageSection {
    padding-top: 56px;
    padding-bottom: 90px;
}

.kbCoverageGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.kbCoverageGrid article {
    min-height: 220px;
    padding: 28px;
    border: 1px solid var(--kb-line);
    border-radius: 14px;
    background: #fff;
    transition: 0.18s ease;
}

.kbCoverageGrid article:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 34px rgba(29, 39, 58, 0.08);
}

.kbCoverageGrid article > span {
    display: block;
    margin-bottom: 28px;
    color: var(--kb-red);
    font-size: 0.78rem;
    font-weight: 900;
}

.kbCoverageGrid h3 {
    margin-bottom: 10px;
    color: var(--kb-blue);
    font-size: 1.25rem;
}

.kbCoverageGrid p {
    margin-bottom: 0;
    color: var(--kb-muted);
    line-height: 1.55;
}

.kbSystemMessage {
    padding: 20px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid var(--kb-line);
}

.kbSystemMessage strong,
.kbSystemMessage span {
    display: block;
}

.kbSystemMessage--warning {
    border-color: rgba(193, 18, 31, 0.35);
    background: rgba(193, 18, 31, 0.05);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .kbHero {
        grid-template-columns: 1fr;
    }

    .kbHeroVisual {
        padding-top: 0;
        padding-left: clamp(28px, 6vw, 100px);
    }

    .kbVisualFrame {
        transform: none;
    }

    .kbCoverageGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .kbHeroPoints {
        grid-template-columns: 1fr;
    }

    .kbHeroPoints > div {
        min-height: auto;
    }

    .kbLanguageBar {
        grid-template-columns: 1fr;
    }

    .kbWorkspace {
        grid-template-columns: 1fr;
    }

    .kbTopicPanel {
        border-right: 0;
        border-bottom: 1px solid var(--kb-line);
    }

    .kbTopicList {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .kbTopicButton {
        margin-bottom: 0;
    }
}

@media (max-width: 620px) {
    .kbHeroContent {
        padding: 55px 22px;
    }

    .kbHeroVisual {
        padding: 0 22px 45px;
    }

    .kbSection {
        width: min(100% - 28px, 1460px);
        padding: 55px 0;
    }

    .kbLanguageButtons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kbLanguageButton {
        width: 100%;
    }

    .kbTopicList {
        grid-template-columns: 1fr;
    }

    .kbPlayerPanel {
        padding: 18px;
    }

    .kbPlayerFooter {
        flex-direction: column;
        align-items: stretch;
    }

    .kbNavigationButtons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .kbCoverageGrid {
        grid-template-columns: 1fr;
    }
}