@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --primary-color: #1b1b1b;
    --outline-color: rgba(0, 0, 0, 0.12);
    --background: #fff;
    --header-background: #E8E9EB;
    --text-color: #1b1b1b;
    --text-sec-color: #000;
    --text-inv-color: #fff;
    --input-color: #C5C6C8;
}

*::selection {
    background-color: var(--background);
    color: var(--text-sec-color);
}

*::-webkit-scrollbar {
    width: 7px;
}

*::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border: 3px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    border: 0;
    background: rgba(27, 27, 27, 0.5);
}

*::-webkit-scrollbar-thumb:active {
    background: rgba(27, 27, 27, 0.2);
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0);
}

.invert-selection *::selection, .invert-selection::selection {
    background-color: var(--text-sec-color);
    color: var(--background);
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: var(--background);
    color: var(--text-color);
}

/* navbar */

.navbar {
    padding: 27px;
    width: 100%;
    height: 98px;
    background-color: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    z-index: 9999;
    transition: background-color 0.2s;
}

.navbar .left a {
    font-weight: 400;
    user-select: none;
    font-size: 32px;
    text-decoration: none;
    color: #fff;
    transition: font-weight 0.2s, color 0.2s;
}

.navbar .left a:hover {
    font-weight: 800;
}

.navbar .right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar .right a {
    font-weight: 400;
    font-size: 24px;
    color: #fff;
    transition: opacity 0.2s, color 0.2s;
}

.navbar .right a:hover {
    opacity: 0.8;
}

.navbar .right .searchbar {
    min-width: 332px;
    height: 49px;
    border: none;
    border-radius: 8px;
    padding: 11px 13px;
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.51);
    transition: color 0.2s, background-color 0.2s;
    display: flex;
    gap: 4px;
}

.navbar .right .searchbar:has(*:focus) {
    box-shadow: 0 0 0 1px #FFFFFF;
}

.navbar .right .searchbar input {
    width: 332px;
    border: none;
    font-size: 20px;
    background-color: transparent;
    color: #FFFFFF;
    font-family: 'Noto Sans', sans-serif;
    outline: none;
    transition: color 0.2s, background-color 0.2s;
}

.navbar .right .searchbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFFFFF;
    font-size: 20px;
    height: 27px;
    width: 27px;
    aspect-ratio: 1 / 1;
    padding: 8px;
    border-radius: 4px;
    filter: opacity(0);
    transition: filter 0.2s;
    user-select: none;
    pointer-events: none;
}

.navbar .right .searchbar a img {
    user-select: none;
    filter: invert(1);
}

.navbar .right .searchbar:has(*:focus) a {
    filter: opacity(1);
    pointer-events: auto;
    user-select: auto;
}

.navbar .right .searchbar input::placeholder {
    color: #FFFFFF;
    opacity: 0.57;
    font-family: 'Noto Sans', sans-serif;
    font-style: italic;
    font-weight: 400;
    transition: color 0.2s;
}

.navbar .divider {
    width: 1px;
    background-color: #E8E9EB;
    height: 32px;
    transition: background-color 0.2s;
}

.navbar.scrolled {
    background-color: var(--header-background);
}

.navbar.scrolled * {
    color: var(--text-sec-color) !important;
}

.navbar.scrolled .right .searchbar {
    background-color: var(--input-color);
    color: var(--text-color);
}

.navbar.scrolled .right .searchbar input::placeholder {
    color: #747474;
}

.navbar.scrolled .divider {
    background-color: #353535;
}

.mobile-logo {
    user-select: none;
    display: none;
}

.mobile-logo img {
    filter: invert(0);
    transition: filter 0.2s;
    user-select: none;
}

.navbar.scrolled .mobile-logo img {
    filter: invert(1);
}

img.is_svg {
    filter: invert(1);
    user-select: none;
}

/* content */

.block {
    width: 100%;
    min-height: 100vh;
}

/* content: block1 */
.block.header-grid {
    display: grid;
    grid-template-rows: auto 137px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(/static/src/img/headerbg.jpg);
    background-size: cover;
    background-position: center;
    color: white;
}

.block.header-grid .header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 48px;
    transform: translateY(69px);
    animation: startpage 0.2s ease-out forwards;
}

@keyframes startpage {
    from {
        opacity: 0;
        transform: translateY(400px);
    }
    to {
        opacity: 1;
        transform: translateY(69px);
    }
}

.block.header-grid .header-text h1 {
    font-size: 128px;
    font-weight: 700;
}

.block.header-grid .header-text h3 {
    font-size: 48px;
    font-weight: 400;
}

/* .block.header-grid .header-text span {
    background-color: #fff;
    color: #1b1b1b;
    border-radius: 8px;
} */

/* cool span animation that higlight text from left to right with eseing */
.block.header-grid .header-text .highlight {
    position: relative;
    overflow: hidden;
}

.block.header-grid .header-text .highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0%;
    width: 0%;
    height: 100%;
    border-radius: 8px;
    background-color: #fff;
    color: #1b1b1b;
    overflow: hidden;
    pointer-events: none;
    animation: highlightAnimation 0.7s ease-out forwards;
    z-index: 9;
}

.block.header-grid .header-text .highlightA::after {
    content: 'Твоя';
    animation-delay: 1s;
}

.block.header-grid .header-text .highlightB::after {
    content: 'твое';
    animation-delay: 1.2s;
}


@keyframes highlightAnimation {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.block.header-grid .arrow {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    /* background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 1) 100%); */
}

.block.header-grid .arrow div {
    width: 100%;
    height: 50px;
    background-color: var(--background);
    border-radius: 32px 32px 0 0;
}

.block.header-grid .arrow img {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.block.header-grid .arrow img:hover {
    opacity: 0.8;
    transform: rotate(90deg) scale(1.1) !important;
}

/* content: block2 */
.block.professions {
    padding: 130px 32px 32px 32px;
}

.block.professions h1 {
    font-size: 64px;
    margin-bottom: 32px;
}

.professions-container {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    gap: 16px;
}

.professions-container::-webkit-scrollbar {
    height: 7px;
}

.professions-container:not(.vertical) .profession {
    min-width: 648px;
    min-height: 648px;
    max-width: 648px;
    max-height: 648px;
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    padding: 12px;
    gap: 12px;
}

.professions-container:not(.vertical) .profession .profession-header {
    width: 100%;
    height: 254px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.professions-container:not(.vertical) .profession .profession-header .profession-header-container {
    height: 100%;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    padding: 12px;
}

.professions-container:not(.vertical) .profession .profession-header .profession-header-container div {
    display: grid;
    width: 100%;
    align-items: center;
    grid-template-columns: auto max-content;
}

.professions-container:not(.vertical) .profession .profession-header .profession-header-container h2 {
    font-size: 36px;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.professions-container:not(.vertical) .profession .profession-header .profession-header-container p {
    font-size: 24px;
    font-weight: 400;
}

.professions-container:not(.vertical) .profession .profession-description {
    height: 282px;
    display: grid;
    grid-template-rows: max-content auto;
    gap: 12px;
}

.professions-container:not(.vertical) .profession .profession-description p {
    max-height: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.professions-container:not(.vertical) .profession .profession-description .college {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-sec-color);
}

.professions-container:not(.vertical) .profession .button a {
    background-color: var(--primary-color);
    color: var(--text-inv-color);
    width: 100%;
    height: 64px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.professions-container:not(.vertical) .profession .button a:hover {
    background-color: var(--header-background);
    color: var(--text-color);
}

.professions-container.vertical {
    width: 100%;
    flex-direction: column;
    gap: 32px;
    overflow: hidden;
}

.professions-container.vertical .profession {
    width: 100%;
    height: 256px;
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 224px auto;
    background-color: var(--background);
    padding: 16px;
    gap: 16px;
}

.professions-container.vertical .profession .profession-img {
    width: 224px;
    height: 224px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}

.professions-container.vertical .profession .profession-img .top-layer {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    pointer-events: none;
}

.professions-container.vertical .profession .profession-content {
    display: flex;
    flex-direction: column;
    padding-top: 16px;
}

.professions-container.vertical .profession .profession-content .profession-header {
    display: grid;
    grid-template-columns: auto max-content;
    align-items: center;
    max-width: 100%;
    margin-bottom: 16px;
    color: var(--text-color);
}

.professions-container.vertical .profession .profession-content .profession-header h2 {
    font-size: 36px;
    font-weight: 500;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.professions-container.vertical .profession .profession-content .profession-header h2 a {
    color: var(--text-color);
    transition: opacity 0.2s;
}

.professions-container.vertical .profession .profession-content .profession-header h2 a:hover {
    opacity: 0.8;
}

.professions-container.vertical .profession .profession-content .profession-header p {
    opacity: 0.8;
    font-size: 24px;
    font-weight: 400;
}

.professions-container.vertical .profession .profession-content .profession-description {
    height: 146px;
    max-height: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.professions-container.vertical .profession .profession-content .profession-description .college {
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 400;
}

.medal {
    width: 32px;
    height: 32px;
    user-select: none;
    cursor: pointer;
    filter: drop-shadow(0 0 0.5rem black);
    transition: transform 0.2s;
}

.medal:hover {
    transform: scale(1.1);
}

/* content: block3 */
.block.test {
    min-height: calc(100vh + 50px);
    display: flex;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(/static/src/img/testbg.jpg);
    background-size: cover;
    background-position: center;
    color: white;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.block.test > div {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
}

.block.test .tail {
    width: 100%;
    height: 50px;
    background-color: var(--background);
    border-radius: 0 0 32px 32px;
}

.block.test .text {
    text-align: center;
}

.block.test .text h1 {
    font-size: 96px;
    font-weight: 400;
}

.block.test .button a{
    width: 514px;
    height: 81px;
    border: 2px solid #E8E9EB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 24px;
    transition: background-color 0.2s, color 0.2s;
}

.block.test .button a:hover {
    background-color: #E8E9EB;
    color: #1b1b1e;
}

/* footer */
footer {
    color: #fff;
    width: 100%;
    height: 88px;
    background-color: #101010;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 27px;
    font-size: 24px;
    font-weight: 400;
}

footer a {
    color: #fff;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.8;
}

/* profession-detail */
.profession-detail {
    margin-top: 98px;
}

.profession-detail-header {
    width: 100%;
    height: 415px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.profession-detail-header-cont {
    display: grid;
    grid-template-columns: 3fr 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.profession-detail-header .info {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 27px;
    gap: 16px;
    color: #fff;
}

.profession-detail-header .info h1 {
    font-size: 64px;
    font-weight: 300;
}

.profession-detail-header .info h2 {
    font-size: 32px;
    font-weight: 400;
    opacity: 0.7;
}

.profession-detail-header .additional-bg {
    width: 150%;
    height: 200%;
    background-size: 256px;
    background-position: top left;
    opacity: 0.3;
    transform: rotate(30deg);
    mask: linear-gradient(240deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
}

.profession-detail-body {
    padding: 27px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profession-detail-body h1 {
    font-size: 36px;
    font-weight: 300;
}

.profession-detail-body hr {
    border: none;
    height: 1px;
    background-color: var(--outline-color);
}

.profession-detail-body a {
    color: var(--primary-color);
    transition: opacity 0.2s;
}

.profession-detail-body a.has-icon {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profession-detail-body a:hover {
    opacity: 0.8;
}

.profession-detail-reviews {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 27px;
}

.profession-detail-reviews .total-rating {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--outline-color);
    padding-bottom: 16px;
}

.profession-detail-reviews .reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profession-detail-reviews .reviews-list .review-card {
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* search */
.search-result {
    padding: 27px;
    width: 100%;
    margin-top: 98px;
    min-height: calc(100vh - 98px - 88px);
}

.search-result > h1 {
    font-size: 48px;
    margin-bottom: 32px;
}

/* test */
.content.test {
    width: 100%;
    height: calc(100vh - 98px);
    margin-top: 98px;
    padding: 27px;
    display: flex;
    flex-direction: column;
}

.content.test.done {
    height: auto;
    min-height: calc(100vh - 98px);
}

.content.test .question {
    height: 100%;
    display: none;
    grid-template-rows: 1fr 2fr;
    gap: 24px;
}

.content.test .question.active {
    display: grid;
}

.content.test .question .text h2 {
    font-weight: 300;
}

.content.test .question .answers {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto min-content;
    gap: 16px;
}

.content.test .question .answers .choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.content.test .question .answers .choice .answer {
    padding: 16px;
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.content.test .question .answers .choice .answer:not(.selected):hover {
    background-color: var(--header-background);
}

.content.test .question .answers .answer.selected {
    background-color: var(--primary-color);
    color: var(--text-inv-color);
}

.content.test .next button {
    width: 100%;
    height: 64px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: var(--text-inv-color);
    font-size: 24px;
    cursor: pointer;
    font-family: 'Noto Sans', sans-serif;
    transition: background-color 0.2s, color 0.2s;
}

.content.test .next button:hover {
    background-color: var(--header-background);
    color: var(--text-color);
}

.content.test .next button:disabled {
    background-color: var(--outline-color);
    color: var(--text-color);
    opacity: 0.7;
    cursor: not-allowed;
}

.content.test .result {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.content.test .result .profession {
    display: none;
}

.content.test .result .profession.showed {
    display: grid;
}


/* mobile adaptation */
@media screen and (max-width: 1220px) {
    .block.header-grid .header-text h1 {
        font-size: 102.4px;
    }
    .block.header-grid .header-text h3 {
        font-size: 38.4px;
    }
    .block.test .text h1 {
        font-size: 76.8px;
    }
}
@media screen and (max-width: 1024px) {
    .navbar .right .searchbar input {
        width: 232px;
    }
    .professions-container:not(.vertical) .profession {
        min-width: 512px;
        min-height: 512px;
        max-width: 512px;
        max-height: 512px;
    }
    .professions-container:not(.vertical) .profession .profession-header .profession-header-container h2, .professions-container.vertical .profession .profession-content .profession-header h2 {
        font-size: 28.8px;
    }
    .professions-container:not(.vertical) .profession .profession-header .profession-header-container p, .professions-container.vertical .profession .profession-content .profession-header p {
        font-size: 19.2px;
    }
    .professions-container:not(.vertical) .profession .profession-description .college, .professions-container.vertical .profession .profession-content .profession-description .college {
        font-size: 19.2px;
    }
}
@media screen and (max-width: 768px) {
    .navbar {
        padding: 16px;
    }
    .navbar .left a {
        font-size: 24px;
    }
    .navbar .right a {
        font-size: 20px;
    }
    .navbar .right .searchbar {
        height: 40px;
        font-size: 16px;
        padding: 8px 10px;
        min-width: max-content;
    }
    .navbar .right .searchbar a {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
    .block.header-grid .header-text h1 {
        font-size: 76.8px;
    }
    .block.header-grid .header-text h3 {
        font-size: 28.8px;
    }
    .block.professions {
        padding: 100px 16px 16px 16px;
    }
    .block.test .text h1 {
        font-size: 57.6px;
    }
    footer {
        font-size: 20px;
        height: 72px;
    }
    .block.professions > h1 {
        font-size: 51.2px;
    }
    .block.test .button a {
        width: 100%;
        height: 64px;
        font-size: 20px;
        padding: 8px 20px;
    }
    .professions-container.vertical .profession {
        height: auto;
        grid-template-columns: 100%;
        grid-template-rows: 224px auto;
    }
    .professions-container.vertical .profession .profession-img {
        width: 100%;
        height: 224px;
    }
    .content.test  {
        min-height: calc(100vh - 98px);
        height: max-content;
    }
    .content.test.done {
        min-height: auto;
    }
    .content.test .question .answers .choice {
        grid-template-columns: 1fr;
    }
}
@media screen and (max-width: 610px) {
    .mobile-logo {
        display: block;
    }
    .navbar .left a:not(.mobile-logo) {
        display: none;
    }
    .block.professions > h1 {
        font-size: 38.4px;
    }
    .block.header-grid .header-text h1 {
        font-size: 57.6px;
    }
    .block.header-grid .header-text h3 {
        font-size: 24px;
    }
    .navbar .right .divider, .navbar .right a {
        display: none;
    }
}
@media screen and (max-width: 545px) {
    .professions-container.vertical .profession .profession-content .profession-header {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
    }
    .professions-container:not(.vertical) .profession {
        min-width: 100%;
        min-height: 100%;
        max-width: 100%;
        max-height: 100%;
    }
    .professions-container:not(.vertical) .profession .profession-header .profession-header-container div {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
    }
    .profession-detail-header .additional-bg {
        display: none;
    }
    .profession-detail-header-cont {
        grid-template-columns: 1fr;
        grid-template-rows: auto 0;
        gap: 16px;
    }
    .profession-detail-header .info h1 {
        font-size: 48px;
    }
    .profession-detail-header .info h2 {
        font-size: 24px;
    }
    .search-result > h1 {
        font-size: 32px;
    }
    .professions-container.vertical .profession .profession-content .profession-description {
        height: max-content;
        max-height: auto;
    }
}
@media screen and (max-width: 400px) {
    .block.header-grid .header-text h1 {
        font-size: 48px;
    }
    .block.header-grid .header-text h3 {
        font-size: 20px;
    }
    .block.test .text h1 {
        font-size: 38.4px;
    }
    .block.professions > h1 {
        font-size: 32px;
    }
    .navbar {
        flex-direction: column;
        height: auto;
        gap: 8px;
    }
    footer {
        font-size: 16px;
    }
}

/* dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #FFFFFF;
        --outline-color: rgba(255, 255, 255, 0.12);
        --background: #101010;
        --header-background: #1b1b1b;
        --text-color: #FFFFFF;
        --text-sec-color: #FFFFFF;
        --text-inv-color: #1b1b1b;
        --input-color: #121212;
    }
    .professions-container:not(.vertical) .profession .profession-header .profession-header-container {
        background: linear-gradient(180deg, rgba(16, 16, 16, 0) 0%, rgba(16, 16, 16, 1) 100%);
    }
    *::-webkit-scrollbar-thumb:hover {
        border: 0;
        background: rgba(255, 255, 255, 0.5);
    }
    
    *::-webkit-scrollbar-thumb:active {
        background: rgba(255, 255, 255, 0.2);
    }
    img.is_svg {
        filter: invert(0) !important;
    }
    .mobile-logo img {
        filter: invert(0) !important;
    }
}