* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #ffffff;
    --dark: #1b1b1b;
    --primary: #D35400;
    --secondary: #E67E22;
    --text-color: #333333;
    --background-light: #F5F5F5;
}

/* Поддержка для разных браузеров: vh с фоллбэком на dvh */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    margin: 0 auto;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    height: 100vh; /* Фоллбэк для браузеров без поддержки dvh */
    height: 100dvh;
    scroll-behavior: smooth;
}

.container {
    padding: 2rem;
}

section {
    height: 100vh; /* Фоллбэк для браузеров без поддержки dvh */
    height: 100dvh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Секция "Обо мне" */
.about {
    color: var(--white);
}

.background-about {
    position: fixed;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Фоллбэк для браузеров без поддержки dvh */
    height: 100dvh;
    background: url('assets/bg-about2.jpg');
    background-repeat: no-repeat;
    background-position: 48.7% 49%;
    background-size: 120.7%;
}

.about .container {
    display: grid;
    width: 100%;
    height: 100%;
}

.about_me {
    display: flex;
    gap: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(-50px);
    animation: fadeInDown 0.8s ease forwards;
}

.about_me svg {
    width: 235px;
    height: auto;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInScale 0.8s ease forwards 0.3s;
}

.about-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    border: 1px solid rgba(238, 238, 238, 0.7);
    border-radius: 10px;
    background-color: #5B433766;
    backdrop-filter: blur(8.68px);
    padding: 54.23px 40.9px 45px;
    /* box-shadow: 0 0 40px 20px rgba(0, 0, 0, 0.6); */
}

.about-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a3f;
    z-index: -1;
    border-radius: 10px;
    box-shadow: 0 0 40px 20px rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.about_me h3 {
    text-align: center;
    font-size: 30px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards 0.5s;
}

.work_time {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fade-wrapper {
    width: 380px;
    border: 1px solid #BCBCBC78;
    border-radius: 6px;
    background-color: #5B433766;
    backdrop-filter: blur(7px);
    padding: 4px 16px;
    height: fit-content;
}

.fade-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.work_time p {
    font-weight: 600;
    font-size: 39px; 
    transition: opacity 1s ease;
}

.work_time p span {
    font-weight: 600;
    font-size: 21px;
}

.about-line {
    background-color: #ffffff27;
}

.about-info {
    text-align: left;
    padding-right: 16.5px;
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInLeft 0.8s ease forwards;
}

.about-info h4 {
    font-weight: 700;
    font-size: 37px;
    line-height: 140%;
    opacity: 0;
    padding-bottom: 13px;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards 0.3s;
}

.about-info span {
    font-weight: 800;
    font-size: 21px;
    line-height: 140%;
    letter-spacing: 0%;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards 0.5s;
}

.about-info p {
    font-weight: 600;
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0%;
    padding-top: 13px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards 0.7s;
}

.solutions {
    text-align: left;
    padding-left: 66px;
}

.solutions h4 {
    padding-top: 5px;
    padding-bottom: 16px;
    font-weight: 800;
    font-size: 21px;
    line-height: 140%;
    letter-spacing: 0%;
    opacity: 0;
    transform: translateX(50px);
    animation: fadeInRight 0.8s ease forwards;
}

.solutions li {
    font-weight: 600;
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0%;
    padding-bottom: 12px;
    margin-left: 16px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.solutions li:nth-child(1) { animation-delay: 0.1s; }
.solutions li:nth-child(2) { animation-delay: 0.2s; }
.solutions li:nth-child(3) { animation-delay: 0.3s; }
.solutions li:nth-child(4) { animation-delay: 0.4s; }
.solutions li:nth-child(5) { animation-delay: 0.5s; }
.solutions li:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.mouse-img {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px;
}


.tech-stack {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0 32px 16px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s ease forwards;
}

.tech-stack .tech-icon-wrapper {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.tech-icon-wrapper svg {
    width: 50px;
    height: 50px;
}

.tech-stack .tech-icon-wrapper:nth-child(1) { animation-delay: 0.1s; }
.tech-stack .tech-icon-wrapper:nth-child(2) { animation-delay: 0.2s; }
.tech-stack .tech-icon-wrapper:nth-child(3) { animation-delay: 0.3s; }
.tech-stack .tech-icon-wrapper:nth-child(4) { animation-delay: 0.4s; }
.tech-stack .tech-icon-wrapper:nth-child(5) { animation-delay: 0.5s; }
.tech-stack .tech-icon-wrapper:nth-child(6) { animation-delay: 0.6s; }
.tech-stack .tech-icon-wrapper:nth-child(7) { animation-delay: 0.7s; }

.tech-stack .tech-icon-wrapper p {
    position: absolute;
    top: 100%;
    opacity: 0;
    transition: 0.3s ease;
    white-space: nowrap;
}

.change-lang {
    display: flex;
    justify-content: center;
    gap: 23px;
    position: fixed;
    top: 55px;
    right: 55px;
    z-index: 1000;
}

.change-lang__button {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 22.14px;
    line-height: 100%;
    letter-spacing: 4%;
    text-transform: uppercase;
    color: #ffffff83;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.change-lang__button:not(.active) {
    display: block;
    opacity: 0.5;
}

.change-lang__button.active {
    color: #ffffff;
    transform: scale(1.1);
}

.change-lang__button:hover {
    color: #ffffff;
}

.tech-stack .tech-icon-wrapper:hover p {
    opacity: 1;
}

/* Секция "Портфолио" */
.portfolio {
    color: var(--white);
}

.portfolio {
    background: url('assets/bg-portfolio.jpg');
    background-repeat: no-repeat;
    background-position: 45% 70%;
    background-size: cover;
    overflow: hidden;
}

.portfolio .container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 77px 250px 0;
}

.portfolio .container h2 {
    font-weight: 500;
    font-size: 55px;
    text-transform: uppercase;
    padding-bottom: 28px;
    text-align: center;
    opacity: 0;
    animation: fadeInDown 1s ease forwards;
    z-index: 10;
}

.portfolio-tabs {
    display: flex;
    animation: fadeInLeft 1s ease forwards;
    animation-delay: 0.3s;
    justify-content: center;
    gap: 23px;
}

.tab-slot {
    position: relative;
    transition: 0.3s ease;
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInLeft 0.5s ease forwards;
}

.tab-slot button {
    width: 119.61px;
    height: 35px;
    background-color: rgba(153, 128, 114, 0.9);
    border: 1px solid rgba(188, 188, 188, 0.8);
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12.16px;
    color: var(--white);
    cursor: pointer;
    transition: 0.3s ease;
}

.tab-slot span {
    position: absolute;
    top: -5.2px;
    right: 0;
    width: 17.23px;
    height: 17.42px;
    background-color: rgba(155, 135, 124, 1);
    border: 1px solid rgba(188, 188, 188, 0.8);
    border-radius: 50%;
    font-weight: 700;
    font-size: 8.11px;
    color: var(--white);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
    padding-bottom: 2px;
}

.tab-slot:hover button {
    background-color: rgba(153, 128, 114, 1);
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.tab-slot:hover span {
    background-color: rgba(153, 128, 114, 1);
    transform: translateY(-2px);
}

.tab-slot.active .tab-btn {
    background-color: rgba(181, 116, 78, 1);
    color: white;
    font-weight: bold;
    scale: 1.05;
}

.tab-slot.active span {
    width: 19.48px;
    height: 19.48px;
    font-size: 9.17px;
    background-color: rgba(181, 116, 78, 1);
    border: 1px solid #ffffff;
    padding-left: 1px;
}

.tab-slot:nth-child(1) { animation-delay: 0.4s; }
.tab-slot:nth-child(2) { animation-delay: 0.5s; }
.tab-slot:nth-child(3) { animation-delay: 0.6s; }
.tab-slot:nth-child(4) { animation-delay: 0.7s; }
.tab-slot:nth-child(5) { animation-delay: 0.8s; }

.portfolio-wrapper {
    display: flex;
    gap: 40px;
    flex-direction: column;
    z-index: 10;
}

.portfolio:after {
    content: "";
    position: absolute;
    top: 0;
    right: 20%;
    left: 20%;
    height: 300px;
    background-image: url("/assets/shadowh2.png");
    background-size: contain;
    background-repeat: no-repeat;
}

.portfolio-content {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.9s;
    position: relative;
}

/* Стили для scrollable контейнера */
.portfolio-scrollable-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 21px;
    width: 100%;
    max-height: 75vh; /* Фоллбэк для браузеров без поддержки dvh */
    max-height: 75dvh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(181, 116, 78, 0.7) rgba(153, 128, 114, 0.2);
}

.portfolio-scrollable-container::-webkit-scrollbar {
    width: 8px;
}

.portfolio-scrollable-container::-webkit-scrollbar-track {
    background: rgba(153, 128, 114, 0.2);
    border-radius: 10px;
}

.portfolio-scrollable-container::-webkit-scrollbar-thumb {
    background-color: rgba(181, 116, 78, 0.7);
    border-radius: 10px;
    border: 2px solid rgba(153, 128, 114, 0.2);
}

.portfolio-scrollable-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(181, 116, 78, 1);
}

/* Стили для карточек портфолио */
.porfolio-card {
    background-color: rgba(153, 128, 114, 1);
    border-radius: 10px;
    border: 1px solid rgba(188, 188, 188, 0.29);
    padding: 9px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 363px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}

/* Удаляем старые анимации для карточек */
.porfolio-card:nth-child(1) { animation-delay: 1s; }
.porfolio-card:nth-child(2) { animation-delay: 1.1s; }
.porfolio-card:nth-child(3) { animation-delay: 1.2s; }
.porfolio-card:nth-child(4) { animation-delay: 1.3s; }
.porfolio-card:nth-child(5) { animation-delay: 1.4s; }
.porfolio-card:nth-child(6) { animation-delay: 1.5s; }
.porfolio-card:nth-child(7) { animation-delay: 1.6s; }
.porfolio-card:nth-child(8) { animation-delay: 1.7s; }

.porfolio-card.active {
    transform: scale(1.06);
}

.porfolio-card .portfolio-img {
    /* width: 226px; */
    height: 222px;
    border-radius: 10px;
    box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.6);
    overflow: hidden;
    pointer-events: none;
    margin-bottom: 16.4px;
    transition: all 0.5s ease;
    position: absolute;
    top: 9px;
    left: 9px;
    right: 9px;
}

.porfolio-card.active .portfolio-img {
    opacity: 0;
    top: -250px;
    transition: opacity 0.3s ease, top 0.5s ease;
}

.porfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-face {
    padding: 0 20.27px;
    transition: all 0.5s ease;
    position: absolute;
    top: 250px;
    left: 0;
    right: 0;
    display: grid;
    gap: 16px;
}

.porfolio-card.active .portfolio-face {
    top: 17px;
    transition: top 0.5s ease;
}

.portfolio-face h3 {
    font-weight: 800;
    font-size: 19px;
    line-height: 140%;
    letter-spacing: 0%;
    padding-bottom: 2.31px;
    transition: all 0.5s ease;
}

.portfolio-face p {
    font-weight: 600;
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0%;
    height: 33px;
    padding-bottom: 10px;
    transition: opacity 0.3s ease;
}

.porfolio-card.active .portfolio-face p {
    opacity: 1;
}

.portfolio-backside {
    padding: 0 20.27px;
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    letter-spacing: 0%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s, visibility 0s;
    position: absolute;
    top: 105px;
    left: 0;
    right: 0;
    height: 240px;
}

.porfolio-card.active .portfolio-backside {
    opacity: 0;
    visibility: visible;
    animation: fadeInText 0.4s ease forwards 0.5s;
}

/* Добавляем новые анимации для карточек */
@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInTags {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Кнопки прокрутки для tabs */
.portfolio-tabs-container {
    position: relative;
    width: 100%;
}

.portfolio-tabs-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.tabs-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background-color: rgba(181, 116, 78, 1);
    border: 1px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s ease;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25);
    display: none;
    transition: 0.3s ease;
}

.tabs-scroll-btn:hover {
    background-color: rgba(153, 128, 114, 1);
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.tabs-scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.tabs-scroll-left {
    left: 0;
}

.tabs-scroll-right {
    right: 0;
}

.tabs-scroll-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tabs-scroll-btn:hover svg {
    stroke-width: 2;
}

.tags-portfolio {
    padding-top: 10px;
    display: flex;
    gap: 7.1px;
    position: absolute;
    bottom: 0;
    left: 20.37px;
    right: 20.37px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0s, visibility 0s;
}

.porfolio-card.active .tags-portfolio {
    visibility: visible;
    animation: fadeInTags 0.4s ease forwards 0.9s;
}

.tags-portfolio button {
    width: 92.84px;
    height: 25.4px;
    background-color: rgba(181, 116, 78, 1);
    border: 1px solid rgba(188, 188, 188, 1);
    border-radius: 22.32px;
    font-weight: 500;
    font-size: 12px;
    line-height: 153%;
    letter-spacing: 0%;
    text-align: center;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tags-portfolio button:hover {
    background-color: rgba(211, 123, 70, 1);
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Секция "Этапы работы" */
.stages {
    background: url('assets/bg-stages.jpg');
    background-size: cover;
    background-position: 46% 56%;
    background-repeat: no-repeat;
    color: var(--white);
    overflow: hidden;
}

.stages .container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 56px 108px 66px;
    align-items: center;
    gap: 120px;
}

.stages .container h2 {
    font-weight: 500;
    font-size: 48px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.5s ease forwards 0.5s;
}

.stages-header svg {
    width: 165px;
    height: auto;
}

.stages-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 10;
    opacity: 0;
    transform: translateY(-50px);
    animation: fadeInDown 0.8s ease forwards;
}

.stages-header svg {
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInScale 0.8s ease forwards 0.3s;
}

.stages:after {
    content: "";
    position: absolute;
    top: 0;
    right: 20%;
    left: 20%;
    height: 300px;
    background-image: url("/assets/shadowh2.png");
    background-size: contain;
    background-repeat: no-repeat;
}

.stages-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(6, 176px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.7s;
}

.stage-item {
    padding: 13px 5px 5px 17px;
    background-color: rgba(153, 128, 114, 0.94);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
    border-radius: 13.84px;
    position: relative;
    border: 1px solid rgba(188, 188, 188, 1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.stage-item:nth-child(1),
.stage-item:nth-child(2),
.stage-item:nth-child(3) {
    grid-column: span 2;
    height: 290px;
}

.stage-item:nth-child(4),
.stage-item:nth-child(5) {
    grid-column: span 3;
    height: 246px;
}

.stage-icon {
    position: absolute;
    right: 20px;
    bottom: 25px;
}

.stage-icon svg {
    width: 48px;
    height: 48px;
}

.stage-item:hover {
    background-color: rgba(181, 116, 78, 1);
    border: 1px solid transparent;
}

.stage-item.active {
    background-color: rgba(181, 116, 78, 1);
    border: 1px solid transparent;
}

.stage-item h3 {
    font-size: 20px;
    margin-bottom: 20px;
    height: 58px;
    font-weight: 600;
    line-height: 140%;
    opacity: 0;
    transform: translateX(50px);
    animation: fadeInRight 0.7s ease forwards;
}

.stage-item:nth-child(1) h3 { animation-delay: 1.2s; }
.stage-item:nth-child(2) h3 { animation-delay: 1.4s; }
.stage-item:nth-child(3) h3 { animation-delay: 1.6s; }
.stage-item:nth-child(4) h3 { animation-delay: 1.8s; }
.stage-item:nth-child(5) h3 { animation-delay: 2.0s; }

.stage-item p {
    font-size: 16px;
    line-height: 153%;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s ease forwards;
}

.stage-item:nth-child(1) p { animation-delay: 1.3s; }
.stage-item:nth-child(2) p { animation-delay: 1.5s; }
.stage-item:nth-child(3) p { animation-delay: 1.7s; }
.stage-item:nth-child(4) p { animation-delay: 1.9s; }
.stage-item:nth-child(5) p { animation-delay: 2.1s; }

.stage-item .stage-icon {
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInScale 0.7s ease forwards;
}

.stage-item:nth-child(1) .stage-icon { animation-delay: 1.1s; }
.stage-item:nth-child(2) .stage-icon { animation-delay: 1.3s; }
.stage-item:nth-child(3) .stage-icon { animation-delay: 1.5s; }
.stage-item:nth-child(4) .stage-icon { animation-delay: 1.7s; }
.stage-item:nth-child(5) .stage-icon { animation-delay: 1.9s; }

/* Индикатор страниц */
.page-indicator {
    position: fixed;
    right: 54px;
    bottom: 118px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1000;
    background: #32292280;
    backdrop-filter: blur(4px);
    padding: 18px;
    border-radius: 15px;
}

.indicator-item {
    font-size: 19.37px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator-item.active {
    font-weight: 700;
}

.promo__mouse {
    display: inline-block;
    position: relative;
    width: 1.65rem;
    height: 2.5875rem;
    border: 3px solid #ffffff;
    border-radius: 15px;
    animation: mouseMove 3s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

.promo__mouse:before {
    content: '';
    position: absolute;
    width: .1875rem;
    height: .4375rem;
    background-color: #ffffff;
    border-radius: 2px;
    left: 50%;
    transform: translateX(-50%);
    top: .1875rem;
    animation: scroll 3s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

.solutions ul li:last-child {
    padding-bottom: 0;
}

@keyframes scroll {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    30% {
        transform: translateX(-50%) translateY(14px);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes mouseMove {
    0% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(12px);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mobile-visibility {
    display: none;
}

@media (max-width: 1919px) {

    .about_me h3 {
        font-size: 30px;
    }

    .about .container {
        padding: 2rem 2rem 0.3rem;
    }

    .tech-icon-wrapper svg {
        width: 35px;
        height: 35px;
    }

    .stages .container {
        gap: 30px;
    }

    .mouse-img {
        position: absolute;
        right: 41px;
        bottom: 318px;
    }

    .page-indicator {
        right: 33px;
        bottom: 76px;
    }

    .fade-wrapper {
        padding: 0;
    }

    .stages .container {
        padding: 30px 139px;
    }

    .portfolio .container {
        padding: 30px 130px 0;
    }

    .portfolio-content {
        grid-template-columns: repeat(3, 1fr);
    }

    .portfolio-tabs {
        justify-content: left;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 10px;
        gap: 15px;
    }

    .portfolio-tabs::-webkit-scrollbar {
        display: none;
    }

    .tabs-scroll-btn {
        opacity: 1;
        visibility: visible;
        display: flex;
    }

    .portfolio-tabs-wrapper {
        padding: 0 20px;
    }

    .change-lang {
        top: 33px;
        right: 33px;
    }
}

@media (max-width: 1119px) {
    .about_me svg {
        width: 176px;
        height: 71px;
    }

    .about_me h3 {
        font-size: 22.4px;
    }

    .fade-wrapper {
        padding: 0;
    }

    .tech-stack {
        display: none;
    }

    .about .container {
        padding: 24px 16px;
    }

    .about-info h4 {
        font-size: 37px;
    }

    .about-content {
        padding: 35px 30px 35px;
    }

    .mouse-img {
        right: 46px;
        bottom: 239px;
    }

    .promo__mouse {
        width: 1.45rem;
        height: 2.2875rem;
        border: 2px solid #ffffff;
    }

    .page-indicator {
        right: 40px;
        bottom: 58px;
        padding: 14px;
        border-radius: 7.8px;
    }

    .indicator-item {
        font-size: 14.52px;
    }

    .stages .container {
        padding: 20px 110px 0;
    }

    .stages .container h2{
        font-size: 41px;
    }

    .stages-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 35px;
    }

    .stage-item:nth-child(n) {
        grid-column: span 1;
        height: 290px;
    }

    .portfolio-content {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 35px;
    }

    .portfolio .container {
        padding: 22px 110px 0;
    }

    .portfolio .container h2 {
        font-size: 41px;
        padding-bottom: 10px;
    }

    .portfolio-wrapper {
        gap: 30px;
    }

    .porfolio-card {
        height: 350px;
    }

    .portfolio-scrollable-container {
        max-height: 70vh; /* Фоллбэк для браузеров без поддержки dvh */
        max-height: 70dvh;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    
    .porfolio-card {
        min-height: 320px;
    }

    .change-lang {
        top: 29px;
        right: 43px;
    }

    .tags-portfolio {
        bottom: 25px;
    }

}

@media (max-width: 959px) {

    .background-about {
        background-size: cover;
    }
    
    .container {
        align-content: space-between;
        padding: 24px 0 18px;
    }

    .portfolio-tabs {
        padding: 15px 15px;
    }
    
    .portfolio-tabs-wrapper {
        padding: 0 66px;
    }

    .portfolio-content {
        padding: 0 99px;
        grid-template-columns: 1fr;
    }

    .tabs-scroll-right {
        right: 45px;
    }

    .tabs-scroll-left {
        left: 45px;
    }

    .portfolio .container {
        padding: 30px 20px 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        padding: 24px 110px 40px 40px;
    }

    .about_me h3 {
        font-size: 22.49px;
    }

    .about-line {
        width: 100%;
        height: 1px;
    }

    .about-info {
        padding-right: 0;
        padding-bottom: 40px;
    }

    .solutions h4 {
        padding-top: 30px;
    }

    .solutions {
        padding-left: 0;
    }

    .tech-stack {
        display: flex;
    }

    .tech-icon-wrapper svg {
        width: 45px;
        height: 45px;
    }

    .mouse-img {
        right: 15px;
        bottom: 224px;
    }

    .page-indicator {
        right: 9.7px;
        bottom: 58px;
    }

    .stages-grid {
        grid-template-columns: repeat(1, 1fr);
        column-gap: 35px;
    }

    .stage-item:nth-child(n) {
        grid-column: span 1;
        height: 235px;
    }

    .porfolio-card {
        height: 300px;
    }

    .porfolio-card .portfolio-img {
        height: 200px;
    }

    .portfolio-face {
        top: 220px;
        gap: 8px;
    }

    .portfolio-face h3 {
        font-size: 17px;
    }

    .portfolio-face p {
        font-size: 14px;
    }

    .portfolio-scrollable-container {
        max-height: 65vh; /* Фоллбэк для браузеров без поддержки dvh */
        max-height: 65dvh;
    }
    
    .porfolio-card {
        min-height: 300px;
    }
    
    .tags-portfolio button {
        min-height: 36px;
        padding: 8px 12px;
    }

    .change-lang {
        top: 29px;
        right: 13px;
    }

    .change-lang__button {
        font-size: 16.6px;
    }

    .stage-icon {
        display: none;
    }

    .portfolio-img {
        display: none;
    }

    .portfolio-face {
        top: 17px;
    }

    .tags-portfolio {
        bottom: auto;
    }

    .stage-item h3 {
        height: 30px;
    }

    .stage-item:nth-child(n) {
        height: fit-content;
    }

    .porfolio-card {
        min-height: max-content;
        height: 100px;
        transition: height 0.3s ease!important;
    }

    .porfolio-card.active{
        height: 300px;
    }

    .tags-portfolio button {
        width: 120px;
    }
}

@media (max-width: 639px) {

    .about .container {
        padding: 14px 5px 5px;
    }

    .page-indicator {
        display: none;
    }

    .about_me svg {
        width: 140px;
        height: 56px;
    }

    .about_me h3 {
        font-size: 18px;
    }

    .work_time p {
        font-size: 26px;
    }

    .work_time p span {
        font-size: 18px;
    }

    .fade-wrapper {
        width: 300px;
    }

    .about-info h4 {
        font-size: 26px;
        padding-bottom: 10px;
    }

    .about-info span {
        font-size: 18px;
    }

    .mobile-visibility {
        display: block;
    }

    .pc-visibility {
        display: none;
    }

    .about-info p {
        padding-top: 8px;
        font-size: 13px;
    }

    .about-info {
        padding-bottom: 18px;
    }

    .solutions h4 {
        font-size: 18px;
        padding-top: 18px;
    }

    .about-content {
        padding: 7px 12px 15px 20px;
    }

    .mouse-img {
        position: static;
    }

    .tech-stack {
        padding: 10px;
    }

    .tech-icon-wrapper svg {
        width: 26px;
        height: 26px;
    }

    .solutions li {
        font-size: 13px;
    }

    .promo__mouse {
        width: 1.15rem;
        height: 1.6875rem;
        border: 2px solid #ffffff;
    }

    .stages .container h2{
        font-size: 26px;
    }

    .stages .container {
        padding: 40px 10px 0;
    }

    .stages-grid {
        grid-template-columns: repeat(1, 1fr);
        column-gap: 35px;
        row-gap: 24px;
    }

    .stage-item:nth-child(n) {
        grid-column: span 1;
        height: 229px;
    }

    .stage-item h3 {
        font-size: 14px;
        height: 30px;
    }

    .stage-item p {
        font-size: 13px;
    }

    .tab-slot button {
        width: 120px;
        height: 42px;
        font-size: 12.1px;
    }

    .portfolio .container {
        padding: 40px 0 0;
    }

    .portfolio .container h2 {
        font-size: 26px;
    }

    .tabs-scroll-btn {
        display: none;
    }

    .portfolio-tabs-wrapper {
        padding: 0;
    }

    .portfolio-content {
        padding: 0 10px;
    }

    .porfolio-card {
        height: 313px;
    }

    .portfolio-backside {
        font-size: 14px;
    }

    .tags-portfolio {
        opacity: 0;
        visibility: hidden;
        bottom: -50px;
    }
    
    .porfolio-card.active .tags-portfolio {
        visibility: visible;
        animation: fadeInTags 0.4s ease forwards 0.9s;
    }

    .tags-portfolio {
        bottom: auto;
    }

    .stage-item h3 {
        height: 20px;
    }

    .stage-item:nth-child(n) {
        height: fit-content;
    }

    .porfolio-card {
        min-height: max-content;
        height: 100px;
        transition: height 0.3s ease!important;
    }

    .porfolio-card.active {
        height: 300px!important;
    }

    .tags-portfolio button {
        width: 120px;
    }

    .change-lang {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* Восстанавливаем стили для hover-эффекта */
.porfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Стили для индикации активной прокрутки */
.portfolio-scrollable-container:active {
    cursor: grabbing;
}

.portfolio-scrollable-container {
    cursor: grab;
}

/* Улучшение для тач-интерфейсов */
@media (pointer: coarse) {
    .portfolio-scrollable-container {
        scrollbar-width: none;
    }
    
    .portfolio-scrollable-container::-webkit-scrollbar {
        width: 0px;
    }
    
    .porfolio-card {
        transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
    }
}

/* Добавляем стили для скроллируемого контейнера stages-grid */
@media (max-width: 1200px) {
    .stages-grid {
        max-height: 75vh; /* Фоллбэк для браузеров без поддержки dvh */
        max-height: 75dvh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(181, 116, 78, 0.7) rgba(153, 128, 114, 0.2);
        padding-right: 10px;
        row-gap: 24px;
        cursor: grab;
        transition: box-shadow 0.3s ease;
    }
    
    .stages-grid.has-focus {
        box-shadow: 0 0 15px rgba(181, 116, 78, 0.6);
    }
    
    .stages-grid:active {
        cursor: grabbing;
    }
    
    .stages-grid::-webkit-scrollbar {
        width: 8px;
    }
    
    .stages-grid::-webkit-scrollbar-track {
        background: rgba(153, 128, 114, 0.2);
        border-radius: 10px;
    }
    
    .stages-grid::-webkit-scrollbar-thumb {
        background-color: rgba(181, 116, 78, 0.7);
        border-radius: 10px;
        border: 2px solid rgba(153, 128, 114, 0.2);
    }
    
    .stages-grid::-webkit-scrollbar-thumb:hover {
        background-color: rgba(181, 116, 78, 1);
    }
    
    .stages .container {
        overflow: hidden;
        justify-content: flex-start;
    }
    
    .stages-grid {
        padding-bottom: 20px;
    }
    
}

@media (max-width: 1119px) and (min-width: 960px) {
    .stages-grid {
        max-height: 85vh; /* Фоллбэк для браузеров без поддержки dvh */
        max-height: 85dvh;
    }
}

@media (max-width: 959px) {
    .stages-grid {
        max-height: 85vh; /* Фоллбэк для браузеров без поддержки dvh */
        max-height: 85dvh;
    }
    
    .stage-item:nth-child(n) {
        margin-bottom: 0;
    }
}

@media (pointer: coarse) and (max-width: 1200px) {
    .stages-grid {
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    
    .stages-grid::-webkit-scrollbar {
        width: 0px;
    }
}

