/* ===========================
   First Section
=========================== */
.first-section {
    margin: 0 auto;
    margin-top: 25px;
    width: 100%;
    max-width: 1920px;
    min-height: 30.1vw;
}

.first-section .info-block {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    margin-top: 32px;
    padding: 0 25px;
}

.first-section .info-block .title {
    color: #ffffff;
    text-align: center;
    font-weight: 700;
    font-size: 3rem;
}

.first-section .info-block .desc {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.375rem;
    margin-top: 5px;
}

.first-section .info-block .buy-penetration-top {
    margin: 0 auto;
    margin-top: 25px;
}

.first-section .bg-image {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.first-section .bg-image::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: url(../images/main-min.png);
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
}

/* ===========================
   Second Section
=========================== */
.second-section {
    margin-top: 77px;
}

.second-section .title-section {
    color: var(--main-text-color);
    font-size: 2.25rem;
    font-weight: 600;
    text-align: center;
}

.second-section .todo {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.second-section .todo-item:nth-child(1) { max-width: 245px; }
.second-section .todo-item:nth-child(2) { max-width: 251px; }
.second-section .todo-item:nth-child(3) { max-width: 245px; }
.second-section .todo-item:nth-child(4) { max-width: 277px; }

.second-section .todo-item .todo-image {
    display: block;
    max-width: 300px;
    max-height: 239px;
    margin: 0 auto;
}

.second-section .todo-item .todo-info {
    margin-top: 5px;
}

.second-section .todo-item .todo-item-title {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 5px;
}

.second-section .todo-item .todo-item-desc {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--main-text-color);
}

/* ===========================
   Third Section
=========================== */
.three-section {
    font-size: 1rem;
    margin-top: 110px;
    width: 100%;
    background-color: #282936;
    overflow: hidden;
}

.three-section .wraper {
    padding: 5.75em 0;
}

.three-section .block-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
}

.three-section .title {
    color: #f0f0f0;
    font-size: 2em;
    font-weight: 700;
}

.three-section .desc {
    color: #f0f0f0;
    font-size: 1.125em;
    font-weight: 500;
    margin-top: 0.625em;
}

.three-section .buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3.125em;
}

.three-section .btn {
    display: inline-block;
    border: none;
    outline: 0;
    border-radius: 0.625em;
    color: #fff;
    padding: 0.938em 2.5em;
    background-color: var(--accent-color);
    font-size: 1.25em;
    font-weight: 600;
    transition: 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.three-section .btn:hover {
    box-shadow: 1px 1px 15px var(--accent-color);
}

.three-section .popup-disabled-questionnaire-btn {
    position: absolute;
    color: #ffbb40;
    background-color: #93671b;
    font-size: 0.875em;
    font-weight: 400;
    line-height: 1.063em;
    text-align: center;
    padding: 0.625em 3.125em;
    left: 0;
    top: 6em;
    border-radius: 5px;
    transition: 0.3s;
}

.three-section .popup-disabled-questionnaire-btn::before {
    content: "";
    position: absolute;
    right: 0.875em;
    top: -1.25em;
    border: 0.625em solid transparent;
    border-bottom: 0.625em solid #93671b;
}

.three-section .popup-disabled-questionnaire-btn.hidden {
    transform: translateY(5px);
    opacity: 0;
    pointer-events: none;
}

.three-section .questionnaire-btn {
    background-color: transparent;
    border-color: #ffa401;
}

.three-section .questionnaire-btn.disabled,
.three-section .questionnaire-btn:disabled {
    border-color: #757575;
    color: #757575;
}

.three-section .questionnaire-btn.disabled:hover,
.three-section .questionnaire-btn:disabled:hover {
    box-shadow: none;
}

.three-section .questionnaire-btn:not(:disabled):not(.disabled):hover {
    background-color: var(--accent-color);
    box-shadow: none;
}

/* ===========================
   Legendary Players Wall
=========================== */
.three-section .legendary-players-wall {
    margin-top: -3em;
    overflow: hidden;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.three-section .players-row {
    display: flex;
    gap: 1.5em;
    margin-bottom: 2em;
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    width: max-content;
    padding: 0 2em;
    will-change: transform;
}

.three-section .row-1 {
    animation-name: slideLeft;
}

.three-section .row-2 {
    animation-name: slideRight;
    animation-duration: 25s;
}

.three-section .row-3 {
    animation-name: slideLeft;
    animation-duration: 30s;
}

.three-section .player-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent-color);
    border-radius: 1em;
    padding: 1.5em;
    min-width: 200px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(255, 164, 1, 0.1);
    flex-shrink: 0;
}

.three-section .player-name {
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 0.5em;
    text-shadow: 0 0 10px rgba(255, 164, 1, 0.5);
}

.three-section .player-status {
    color: var(--accent-color);
    font-size: 0.9em;
    font-weight: 500;
    margin: 0;
}

@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-32.5%);
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(-32.5%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Добавляем дублирование карточек для бесконечной анимации */
.three-section .players-row::before,
.three-section .players-row::after {
    content: "";
    display: flex;
    gap: 1.5em;
    white-space: nowrap;
}

.three-section .row-1::before,
.three-section .row-1::after {
    content: "";
    display: flex;
    gap: 1.5em;
}

.three-section .row-2::before,
.three-section .row-2::after {
    content: "";
    display: flex;
    gap: 1.5em;
}

.three-section .row-3::before,
.three-section .row-3::after {
    content: "";
    display: flex;
    gap: 1.5em;
}

.three-section .bg-image {
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    max-height: 340px;
}

/* ===========================
   Fourth Section
=========================== */
.four-section {
    margin-top: 110px;
}

.four-section .section-title {
    text-align: center;
    font-weight: 600;
    font-size: 2rem;
}

.four-section .card-list {
    margin: 0 auto;
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    gap: 30px;
}

.four-section .card-list .card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 320px;
    height: 370px;
    padding: 30px;
    border-radius: 15px;
    background: #2a2a2a;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.four-section .card-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Card title wrapper */
.four-section .card-list .card .wraper-title {
    display: flex;
    align-items: center;
}

.four-section .card-list .card .wraper-title .title-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.four-section .card-list .card .wraper-title .card-title {
    font-size: 1.25em;
    font-weight: 600;
    color: #ffffff;
}

.four-section .card-list .card .card-desc {
    font-size: 1em;
    color: #cccccc;
    line-height: 1.25em;
    font-weight: 500;
    margin-top: 22px;
}

.four-section .card-list .card .card-link {
    display: block;
    text-decoration: underline;
    transition: 0.3s;
}

.four-section .card-list .card .card-link:hover {
    transform: translateX(2px);
}

/* ===========================
   Fifth Section
=========================== */
.five-section {
    margin-top: 110px;
}

.five-section .section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

.five-section .section-subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    text-align: center;
    margin-top: 5px;
    padding: 0 25px;
}

.five-section .block {
    margin-top: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.five-section .block .image-block {
    max-width: 400px;
    max-height: 400px;
    margin-right: 50px;
}

/* Spoller */
.five-section .block .wraper-spoller {
    font-size: 1rem;
    max-width: 750px;
    width: 100%;
}

.five-section .block .spoller-item {
    padding: 1.563em;
    border-bottom: 3px solid rgba(255, 164, 1, 0.25);
    user-select: none;
    cursor: pointer;
    transition: 0.3s;
}

.five-section .block .spoller-item:first-child {
    border-top: 3px solid rgba(255, 164, 1, 0.25);
}

.five-section .block .spoller-item.active {
    background: rgba(255, 164, 1, 0.1);
}

.five-section .block .spoller-item.active .spoller-item-desc {
    height: 3.125em;
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
}

.five-section .block .spoller-item.active .spoller-item-title {
    padding-bottom: 1.563em;
}

.five-section .block .spoller-item:not(.active):hover .spoller-item-title {
    transform: translateX(3px);
}

.five-section .block .spoller-item-desc {
    font-size: 1em;
    height: 0;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.five-section .block .spoller-item-desc::-webkit-scrollbar {
    width: 6px;
}

.five-section .block .spoller-item-desc::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 20px;
}

.five-section .block .spoller-item-desc a {
    text-decoration: underline;
    font-size: 0.85em;
    opacity: 0.75;
}

.five-section .block .spoller-item-desc a:hover {
    color: var(--accent-color);
    opacity: 1;
}

.five-section .block .spoller-item-title {
    font-size: 1.125em;
    font-weight: 600;
    transition: 0.3s;
}

/* ===========================
   Sixth Section
=========================== */
.six-section {
    font-size: 1rem;
    margin-top: 110px;
    padding-bottom: 110px;
}

.six-section .section-title {
    font-size: 2em;
    font-weight: 600;
    text-align: center;
}

.six-section .section-subtitle {
    font-size: 1.125em;
    font-weight: 500;
    text-align: center;
    margin-top: 5px;
}

.six-section .wraper-cards-links {
    margin-top: 75px;
}

.six-section .content-cards-links {
    display: grid;
    align-items: flex-start;
    column-gap: 20px;
    row-gap: 90px;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
}

.six-section .content-cards-links .item-card {
    width: 24.375em;
    transition: all 0.3s ease;
}

.six-section .content-cards-links .item-card .item-card-link {
    display: flex;
    align-items: center;
    gap: 15px;
}

.six-section .content-cards-links .item-card .image-wraper {
    padding: 1.125em;
    border-radius: 1.25em;
}

.six-section .content-cards-links .item-card .image-wraper img {
    width: 3.75em;
    height: 3.75em;
    transition: transform 0.3s ease;
}

.six-section .content-cards-links .item-card .title-card-link {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
}

.six-section .content-cards-links .item-card .desc-card-link {
    display: block;
    font-size: 1rem;
    font-weight: 500;
}

/* Поддержка prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .three-section .players-row {
        animation: none;
    }
    
    .three-section .player-card {
        transform: none;
    }
    
    .four-section .card-list .card {
        transition: none;
    }
    
    .four-section .card-list .card:hover {
        transform: none;
    }
}

/* ===========================
   Media Queries
=========================== */
@media (max-width: 1450px) {
    .first-section .bg-image { top: 40px; }
    .four-section .card-list { font-size: 0.938rem; }
    .four-section .card-list .card { max-width: 290px; height: 320px; }
}

@media (max-width: 1310px) {
    .four-section .card-list { font-size: 0.875rem; }
    .four-section .card-list .card { max-width: 270px; height: 300px; }
    .six-section .content-cards-links { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 1250px) {
    .first-section .bg-image { top: 80px; }
    .second-section .todo {
        width: fit-content;
        grid-template-columns: repeat(2, 30vw);
        row-gap: 10px;
        column-gap: 8vw;
    }
    .second-section .todo .todo-item { max-width: 100%; }
    .second-section .todo .todo-item .todo-item-desc { text-align: center; }
    .three-section .bg-image { max-height: 280px; right: 8vw; }
    .four-section { margin-top: 60px; }
    .four-section .card-list { grid-template-columns: repeat(2, 42vw); row-gap: 4vw; column-gap: 4vw; }
    .four-section .card-list .card { max-width: 100%; height: auto; }
    .four-section .card-list .card .card-link { margin-top: 20px; }
    .five-section .block .image-block { max-width: 300px; max-height: 300px; }
    .five-section .block .wraper-spoller { font-size: 0.938rem; max-width: 600px; }
}

/* Дальше можно аналогично оформить остальные медиазапросы */
@media (max-width: 978px) {
    .first-section .bg-image { top: 100px; }
    .second-section { margin-top: 100px; }
    .second-section .todo {
        column-gap: 6vw;
        grid-template-columns: repeat(2, 38vw);
    }
    .six-section { font-size: 0.875rem; }
    .three-section .bg-image { display: none; }
}

@media (max-width: 850px) {
    .first-section .bg-image {
        top: -50px;
        overflow: hidden;
        width: 850px;
        height: 350px;
    }
    .first-section .bg-image::before {
        background-size: 120% auto;
        left: 50vw;
        transform: translateX(-50%);
        opacity: 0.25;
    }
    .second-section { margin-top: 150px; }
    .three-section { font-size: 0.875rem; }
    .three-section .legendary-players-wall { 
        margin-top: 2em; 
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    .three-section .players-row { 
        padding: 0 1em;
        gap: 1em;
    }
    .three-section .player-card { 
        min-width: 160px; 
        padding: 1.2em;
    }
    .three-section .player-name { font-size: 1em; }
    .three-section .player-status { font-size: 0.8em; }
    .five-section { margin-top: 70px; }
    .five-section .block .image-block {
        display: none;
        position: absolute;
        left: 20%;
        top: -10%;
        opacity: 0.2;
        z-index: -1;
    }
    .five-section .block .wraper-spoller { margin: 0 auto; }
    .six-section { margin-top: 70px; }
    .six-section .content-cards-links {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 60px;
    }
    .six-section .content-cards-links .item-card { width: 100%; max-width: 400px; }
    .six-section .content-cards-links .item-card .item-card-link {
        flex-direction: column;
        align-items: center;
    }
    .six-section .content-cards-links .item-card .title-card-link,
    .six-section .content-cards-links .item-card .desc-card-link {
        text-align: center;
    }
}

@media (max-width: 720px) {
    .first-section { margin-top: 100px; height: 300px;}
    .first-section .info-block { max-width: 400px; }
    .first-section .info-block .buy-penetration-top { margin-top: 30px; }
    .first-section .bg-image { top: 5px; }

    .second-section .todo {
        grid-template-columns: repeat(1, 300px);
        row-gap: 5px;
    }

    .four-section .container { padding: 0; }
    .four-section .card-list {
        grid-template-columns: repeat(1, 1fr);
        gap: 1em;
    }
    .four-section .card-list .card {
        border: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(40, 41, 54, 0.118);
    }
    .four-section .card-list .card:nth-child(1) {
        border-top: 1px solid rgba(40, 41, 54, 0.118);
    }

    .five-section .container { padding: 0; }
    .five-section .block .wraper-spoller { max-width: 100%; }
    .five-section .block .spoller-item { padding-left: 60px; }
}

@media (max-width: 590px) {
    .six-section { margin-top: 60px; }
    .six-section .wraper-cards-links { margin-top: 40px; }
    .six-section .content-cards-links {
        grid-template-columns: repeat(1, 1fr);
        row-gap: 40px;
    }
    .six-section .content-cards-links .item-card .item-card-link {
        width: fit-content;
        margin: 0 auto;
    }
    .three-section .legendary-players-wall { 
        margin-top: 1.5em; 
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    .three-section .players-row { 
        gap: 0.8em; 
        margin-bottom: 1.5em;
        padding: 0 0.5em;
        /* Дополнительная оптимизация для маленьких экранов */
        animation-duration: 12s;
        transform: translateZ(0);
    }
    .three-section .row-1 { animation-duration: 12s; }
    .three-section .row-2 { animation-duration: 16s; }
    .three-section .row-3 { animation-duration: 20s; }
    .three-section .player-card { 
        min-width: 140px; 
        padding: 1em;
        /* Улучшенная оптимизация рендеринга */
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
    .three-section .player-name { font-size: 0.9em; }
    .three-section .player-status { font-size: 0.75em; }
}

@media (max-width: 520px) {
    .second-section .title-section { font-size: 1.7rem; }
    .three-section { font-size: 0.85rem; }
    .three-section .block-content { max-width: 100%; }
    .three-section .block-content .buttons .btn { padding: 0.8em 1.8em; }
    .three-section .desc { margin-top: 1.25em; }
}
