:root {
    --bg: #0c0c0e;
    --panel: #1a1a1c;
    --muted: #b7b7b9;
    --line: #34343a;
    --accent: #56b4ff;
    --accent-2: #0d2b4a;
    --text: #f3f4f6;
    --text-dim: #cdd3d9;
}

/* ==== BASE ==== */
html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, Arial, sans-serif;
}

h2 {
    margin: 0 0 8px;
}

/* ==== LAYOUT ==== */
section.arhetypes_section {
    display: flex;
    gap: 24px;
    align-items: stretch;
    justify-content: space-between;
    padding: 32px clamp(16px, 4vw, 64px) 96px;
    position: relative;
}

.col {
    flex: 1;
    min-width: 0;
}

.col.left,
.col.right {
    max-width: 33%;
}

/* ==== CARD STRUCTURE ==== */
.arhetypes_card_border {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
    height: 480px;
    margin: 0 0 10px 0;
    transition: height 0.3s ease;
}

.arhetypes_discribe p {
    color: var(--text-dim);
    line-height: 1.55;
    font-size: 14px;
}

/* ==== TITLE AREA ==== */
.arhetype_title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    text-align: left;
}

.arhetype_title h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.1;
}

.arhetypes_littlepic {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #56b4ff, #0d2b4a);
    box-shadow: 0 0 10px rgba(86, 180, 255, 0.4);
    overflow: hidden;
    transition: all 0.25s ease;
}

.arhetypes_littlepic img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.4));
}

.arhetypes_littlepic:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(86, 180, 255, 0.7);
}

/* ==== CLASSES LIST ==== */
.arhetypes_classes {
    margin-top: 20px;
    text-align: left;
    padding: 8px 0 0;
}

.classes_title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 15px;
    color: #d3d9e2;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.classes_title::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    background: url("../img/icons/info_icon.png") no-repeat center center;
    background-size: contain;
    flex-shrink: 0;
    margin-right: 6px;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.8));
}

.arhetypes_classes ul {
    list-style: none;
    padding-left: 18px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.arhetypes_classes li {
    font-size: 14px;
    font-weight: 500;
    color: #9fd2ff;
    position: relative;
    padding-left: 14px;
    transition: color 0.2s ease;
}

.arhetypes_classes li::before {
    content: "›";
    position: absolute;
    left: 0;
    top: 0;
    color: #56b4ff;
    font-size: 13px;
}

/* ==== CENTER IMAGE ==== */
.arhetypes_pers {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    /* ensure it fills its parent */
    min-height: 300px;
    max-height: 520px;
    position: relative;
}

.arhetypes_pic {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 100%;
    height: 100%;
}

.arhetypes_pic.choise_card {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    animation: fadeIn 0.4s ease;
}

/* Stretch image proportionally but as large as possible */
.arhetypes_pic .photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.arhetypes_pic .photo img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.55));
    transition: transform 0.3s ease;
}

.arhetypes_pic .photo img:hover {
    transform: scale(1.05);
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==== RESPONSIVE: Smaller center image on narrow screens ==== */
@media (max-width: 1000px) {
    .arhetypes_pers {
        min-height: 300px;
        max-height: 400px;
        padding: 10px 0;
    }

    .arhetypes_pic .photo img {
        height: auto;
        max-height: 360px;
        width: 90%;
    }
}

/* ==== SKILLS COLUMN ==== */
.arhetypes_skills_column {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--panel);
    border-radius: 16px;
    padding: 18px;
    height: 480px;
    margin: 0 0 10px 0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    scroll-behavior: smooth;
}

.arhetypes_skills {
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.arhetypes_skills.choise_card {
    display: block;
    opacity: 1;
}

.row_skill {
    padding: 0px 0;
}

.skill_head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill_icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid #2a2a30;
}

.skill_name {
    font-weight: 700;
}

.skill_for_who {
    font-size: 12px;
    color: #a4acb6;
}

.skill_discribe {
    color: #cfd6de;
    font-size: 14px;
    line-height: 1.55;
    margin: 6px 0 0;
}

.line_class {
    height: 1px;
    background: var(--line);
    margin: 12px 0;
}

.new_skill {
    display: inline-block;
    background: var(--accent);
    color: #031421;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 6px;
}

/* ==== CUSTOM SCROLLBAR ==== */
.arhetypes_skills_column::-webkit-scrollbar {
    width: 10px;
}

.arhetypes_skills_column::-webkit-scrollbar-track {
    background: rgba(40, 42, 48, 0.5);
    border-radius: 8px;
    margin: 4px;
}

.arhetypes_skills_column::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #56b4ff 0%, #2d9ad6 100%);
    border-radius: 8px;
    box-shadow: 0 0 6px rgba(86, 180, 255, 0.5);
}

.arhetypes_skills_column::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6ec3ff 0%, #3eb6e2 100%);
}

.arhetypes_skills_column {
    scrollbar-width: thin;
    scrollbar-color: #56b4ff #2b2d33;
}

/* ==== BOTTOM NAV ==== */
.arhetypes_nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 18, 0.95);
    border-top: 1px solid #2b2b30;
    /* Padding: only vertical, no left/right */
    padding-top: 10px;
    padding-bottom: 10px;
    /* Center content horizontally */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Prevent overflow / preserve layout */
    box-sizing: border-box;
    z-index: 10;
}

.tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.arhetypes_slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
    background: #16171a;
    border-radius: 12px;
    padding: 8px 10px;
    color: #b7b7bb;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 85px;
}

.arhetypes_slide:hover {
    color: #fff;
    border-color: #56565a;
}

.arhetypes_slide.choise_card {
    border-color: #56b4ff;
    background: #0d2b4a;
    color: #fff;
    box-shadow: 0 0 8px rgba(86, 180, 255, 0.4);
    margin: 0px 0px 0px 0px;
}

.arhetypes_slide figure {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0px 0px 0px 0px;
}

.arhetypes_slide img {
    width: 32px;
    height: 32px;
    display: block;
}

.tabs::-webkit-scrollbar {
    height: 6px;
}

.tabs::-webkit-scrollbar-thumb {
    background: #2c2f34;
    border-radius: 8px;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1000px) {
    section.arhetypes_section {
        flex-direction: column;
    }

    .col.left,
    .col.right,
    .col.middle {
        max-width: 100%;
    }

    /* Scrollable archetype card on smaller screens */
    .arhetypes_card_border {
        height: 350px;
        padding: 10px 0 0 10px;
        margin: 0px;
        overflow-y: auto;
        overflow-x: hidden;
        scroll-behavior: smooth;
    }

    /* Fancy scrollbar (WebKit) */
    .arhetypes_card_border::-webkit-scrollbar {
        width: 8px;
    }

    .arhetypes_card_border::-webkit-scrollbar-track {
        background: rgba(40, 42, 48, 0.45);
        border-radius: 8px;
    }

    .arhetypes_card_border::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #56b4ff 0%, #2d9ad6 100%);
        border-radius: 8px;
        box-shadow: 0 0 6px rgba(86, 180, 255, 0.5);
        transition: background 0.3s ease;
    }

    .arhetypes_card_border::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #6ec3ff 0%, #3eb6e2 100%);
    }

    /* Firefox fallback */
    .arhetypes_card_border {
        scrollbar-width: thin;
        scrollbar-color: #56b4ff #2b2d33;
    }

    /* Keep right column height consistent */
    .arhetypes_skills_column {
        height: 300px;
        padding: 10px 0 0 10px;
        margin: 0 0 35px 0;
    }
}

/* === FIX: Show only active archetype === */
.arhetypes_card,
.arhetypes_pic,
.arhetypes_skills {
    display: none !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: all 0.35s ease;
}

.arhetypes_card.choise_card,
.arhetypes_pic.choise_card,
.arhetypes_skills.choise_card {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 1000px) {

    /* Stack buttons more compactly */
    .tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    /* Change layout: icon left, text right */
    .arhetypes_slide {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        min-width: 140px;
        /* wider for text */
        padding: 6px 10px;
        gap: 8px;
        text-align: left;
    }

    .arhetypes_slide figure {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .arhetypes_slide img {
        width: 26px;
        height: 26px;
    }

    .arhetypes_slide span {
        font-size: 13px;
        line-height: 1;
    }
}