/* Hero блок */
.hero {
    width: 100%;
    min-height: 600px;
    background-color: rgba(254, 251, 244, 1);
    background-image: url('/images/hero-section.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
    top: 0;
}

.hero .main-text {
    padding-top: 175px;
    padding-left: 100px;
    width: 550px;
}

.hero .main-text h2 {
    color: rgba(29, 43, 79, 1);
    font-size: 42px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    padding-bottom: 15px;
}

.hero .main-text h3 {
    color: rgba(29, 43, 79, 1);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    padding-bottom: 35px;
}

.hero .main-text .buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero .main-text .buttons a {
    width: 40%;
    text-align: center;
    padding: 9px 18px;
    border-radius: 8px;
    color: rgba(29, 43, 79, 1);
    font-weight: 500;
    font-size: 16px;
    border: 1px solid rgba(29, 43, 79, 1);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.hero .main-text .buttons a:hover {
    background-color: rgba(29, 43, 79, 1);
    color: #fff;
}

.hero .main-text .buttons a.active {
    background-color: rgba(244, 180, 0, 1);
    border: 1px solid rgba(244, 180, 0, 1);
}

.hero .main-text .buttons a.active:hover {
    background-color: rgba(220, 160, 0, 1);
    border-color: rgba(220, 160, 0, 1);
    color: rgba(29, 43, 79, 1);
}





/* О компании */
.about {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 125px 100px 50px 0;
    width: 100%;
    box-sizing: border-box;
}

.about .image {
    position: relative;
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about .image img {
    max-width: 100%;
    height: auto;
}

/* Vector всегда прижат к левому краю экрана */
.about .image img:first-child {
    position: absolute;
    z-index: 1;
    width: 85%;
    height: 130%;
    left: 0;
}

.about .image img:last-child {
    position: relative;
    z-index: 2;
    width: 95%;
}

.about .main-text {
    width: 50%;
    padding-left: 40px;
}

.about .main-text h2 {
    color: rgba(29, 43, 79, 1);
    font-size: 38px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    line-height: 1.2;
    padding-bottom: 20px;
}

.about .main-text h3 {
    color: rgba(80, 90, 110, 1);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    padding-bottom: 40px;
}

.about .main-text .bottom-section {
    position: relative;
    border: 1px solid rgba(244, 180, 0, 1);
    border-radius: 12px;
    padding: 20px;
    width: 90%;
}

.about .main-text .bottom-section .quote-icon {
    position: absolute;
    top: -15px;
    left: 25px;
    background-color: #ffffff;
    padding: 0 15px;
    height: 24px;
    z-index: 2;
}

.about .main-text .bottom-section span {
    color: rgba(29, 43, 79, 1);
    font-family: "Playfair Display", serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    display: block;
}




/* Для кого наши товары */
.audience {
    padding: 75px 100px;
}

.audience h2 {
    text-align: center;
    color: rgba(29, 43, 79, 1);
    font-size: 36px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    padding-bottom: 50px;
}

.audience .cards {
    display: flex;
    gap: 30px;
}

.audience .cards .card {
    width: 50%;
    box-sizing: border-box;
    border-radius: 16px;
    padding: 35px;
}

.audience .cards .card.professionals {
    background-color: rgba(253, 246, 227, 1);
}

.audience .cards .card.enthusiasts {
    background-color: rgba(237, 242, 250, 1);
}

.audience .cards .card .top-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 25px;
}

.audience .cards .card .top-section img {
    width: 70px;
    height: 70px;
}

.audience .cards .card h3 {
    color: rgba(29, 43, 79, 1);
    font-size: 22px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    padding-bottom: 8px;
}

.audience .cards .card h4 {
    color: rgba(80, 90, 110, 1);
    font-size: 15px;
    font-weight: 400;
}

.audience .cards .card ul {
    padding-left: 20px;
}

.audience .cards .card ul li {
    color: rgba(80, 90, 110, 1);
    font-size: 15px;
    line-height: 1.7;
}

.audience .cards .card a {
    display: inline-block;
    margin-top: 25px;
    background-color: rgba(29, 43, 79, 1);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 10px;
    transition: background-color 0.25s ease;
}

.audience .cards .card a:hover {
    background-color: rgba(29, 43, 79, 0.85);
}




/* Квиз подбора пряжи */
.quiz {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    padding: 75px 100px;
    background-color: rgba(249, 241, 227, 1);
    background-image: url('/images/quiz-photo.png');
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 38% auto;
    box-sizing: border-box;
}

.quiz .main-text {
    width: 45%;
}

.quiz .main-text h2 {
    color: rgba(29, 43, 79, 1);
    font-size: 34px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    line-height: 1.25;
    padding-bottom: 20px;
}

.quiz .main-text h3 {
    color: rgba(80, 90, 110, 1);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    padding-bottom: 30px;
}

.quiz .quiz-card {
    width: 55%;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 35px;
    box-sizing: border-box;
    box-shadow: 0 15px 40px rgba(29, 43, 79, 0.08);
}

.quiz .quiz-card .step-label {
    display: inline-block;
    background-color: rgba(240, 243, 249, 1);
    color: rgba(29, 43, 79, 1);
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    padding: 6px 14px;
    margin-bottom: 20px;
}

.quiz .quiz-card .step {
    display: none;
}

.quiz .quiz-card .step.active {
    display: block;
}

.quiz .quiz-card .step h3 {
    color: rgba(29, 43, 79, 1);
    font-size: 22px;
    font-weight: 700;
    padding-bottom: 25px;
}

.quiz .quiz-card .step .options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.quiz .quiz-card .step .options button {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #ffffff;
    border: 1px solid rgba(226, 230, 240, 1);
    border-radius: 12px;
    padding: 14px 16px;
    color: rgba(29, 43, 79, 1);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    transition: all 0.25s ease;
}

.quiz .quiz-card .step .options button:hover {
    border-color: rgba(244, 180, 0, 1);
}

.quiz .quiz-card .step .options button.selected {
    border-color: rgba(244, 180, 0, 1);
    background-color: rgba(255, 248, 230, 1);
}

.quiz .quiz-card .step .options button .icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background-color: rgba(237, 242, 250, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz .quiz-card .step .results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.quiz .quiz-card .step .results .result-card {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(226, 230, 240, 1);
    border-radius: 12px;
    padding: 12px 15px;
}

.quiz .quiz-card .step .results .result-card img {
    width: 55px;
    height: 55px;
    min-width: 55px;
    object-fit: contain;
    border-radius: 8px;
    background-color: rgba(246, 247, 250, 1);
}

.quiz .quiz-card .step .results .result-card .info {
    flex-grow: 1;
}

.quiz .quiz-card .step .results .result-card .info h4 {
    color: rgba(29, 43, 79, 1);
    font-size: 14px;
    font-weight: 600;
    padding-bottom: 4px;
}

.quiz .quiz-card .step .results .result-card .info p {
    color: rgba(80, 90, 110, 1);
    font-size: 12px;
    line-height: 1.4;
}

.quiz .quiz-card .step .results .result-card .side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 105px;
}

.quiz .quiz-card .step .results .result-card .side .price {
    color: rgba(29, 43, 79, 1);
    font-size: 16px;
    font-weight: 700;
}

.quiz .quiz-card .step .results .result-card .side .price small {
    font-size: 11px;
    font-weight: 500;
}

.quiz .quiz-card .step .results .result-card .side .add-to-cart {
    background-color: rgba(244, 180, 0, 1);
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    color: rgba(29, 43, 79, 1);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.25s ease;
}

.quiz .quiz-card .step .results .result-card .side .add-to-cart:hover {
    background-color: rgba(220, 160, 0, 1);
}

.quiz .quiz-card .bottom-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
}

.quiz .quiz-card .bottom-section .progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz .quiz-card .bottom-section .progress .dot {
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(226, 230, 240, 1);
    transition: all 0.25s ease;
}

.quiz .quiz-card .bottom-section .progress .dot.active {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(244, 180, 0, 1);
}

.quiz .quiz-card .bottom-section .next-button {
    background-color: rgba(244, 180, 0, 1);
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    color: rgba(29, 43, 79, 1);
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.25s ease;
}

.quiz .quiz-card .bottom-section .next-button:hover {
    background-color: rgba(220, 160, 0, 1);
}

.quiz .quiz-card .bottom-section .next-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}




/* Блок товаров */
.products {
    padding: 75px 100px;
}

.products h2 {
    text-align: center;
    color: rgba(29, 43, 79, 1);
    font-size: 36px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    padding-bottom: 50px;
}

.products .slider {
    display: flex;
    align-items: center;
    gap: 20px;
}

.products .slider .arrow {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 10px;
    transition: opacity 0.25s ease;
}

.products .slider .arrow img {
    width: 42px;
    height: 42px;
}

.products .slider .arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.products .slider .viewport {
    overflow: hidden;
    flex-grow: 1;
}

.products .slider .track {
    position: relative;
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.products .slider .track .card {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(233, 236, 243, 1);
    border-radius: 12px;
    padding: 12px;
    box-sizing: border-box;
    cursor: pointer;
}

.products .slider .track .card .image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(246, 247, 250, 1);
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.products .slider .track .card .image img {
    max-height: 100%;
    object-fit: contain;
}

.products .slider .track .card h3 {
    color: rgba(29, 43, 79, 1);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 5px;
}

.products .slider .track .card .sku {
    color: rgba(80, 90, 110, 1);
    font-size: 13px;
    padding-bottom: 12px;
}

.products .slider .track .card .price {
    color: rgba(29, 43, 79, 1);
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 15px;
    margin-top: auto;
}

.products .slider .track .card .price small {
    font-size: 12px;
    font-weight: 500;
}

.products .slider .track .card .add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(244, 180, 0, 1);
    border: none;
    border-radius: 8px;
    padding: 11px;
    color: rgba(29, 43, 79, 1);
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.25s ease;
}

.products .slider .track .card .add-to-cart img {
    width: 16px;
    height: 16px;
}

.products .slider .track .card .add-to-cart:hover {
    background-color: rgba(220, 160, 0, 1);
}

/* Работы клиентов */
.works {
    padding: 75px 100px;
    background-color: rgba(237, 242, 250, 1);
}

.works .main-text h2 {
    text-align: center;
    color: rgba(29, 43, 79, 1);
    font-size: 36px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    padding-bottom: 12px;
}

.works .main-text h3 {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    color: rgba(80, 90, 110, 1);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    padding-bottom: 50px;
}

.works .slider {
    display: flex;
    align-items: center;
    gap: 20px;
}

.works .slider .arrow {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 10px;
    transition: opacity 0.25s ease;
}

.works .slider .arrow img {
    width: 42px;
    height: 42px;
}

.works .slider .arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.works .slider .viewport {
    overflow: hidden;
    flex-grow: 1;
}

.works .slider .track {
    position: relative;
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.works .slider .track .card {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid rgba(233, 236, 243, 1);
    border-radius: 12px;
    padding: 12px;
    box-sizing: border-box;
}

.works .slider .track .card .image {
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.works .slider .track .card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.works .slider .track .card:hover .image img {
    transform: scale(1.05);
}

.works .slider .track .card h3 {
    color: rgba(29, 43, 79, 1);
    font-size: 18px;
    font-weight: 700;
    font-family: "Playfair Display", serif;
    line-height: 1.3;
    padding-bottom: 6px;
}

.works .slider .track .card .yarn {
    color: rgba(29, 43, 79, 1);
    font-size: 13px;
    font-weight: 600;
    padding-bottom: 10px;
}

.works .slider .track .card p {
    color: rgba(80, 90, 110, 1);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}




/* Адаптация главной */
@media (max-width: 1440px) {
    .hero .main-text {
        padding-left: 60px;
    }

    .about {
        padding: 100px 60px 50px 0;
    }

    .audience,
    .quiz,
    .products,
    .works {
        padding-left: 60px;
        padding-right: 60px;
    }
}

@media (max-width: 1240px) {
    .hero .main-text {
        padding-left: 40px;
        padding-top: 150px;
        width: 480px;
    }

    .hero .main-text h2 {
        font-size: 36px;
    }

    .about {
        padding: 80px 40px 40px 0;
    }

    .audience,
    .quiz,
    .products,
    .works {
        padding-left: 40px;
        padding-right: 40px;
    }

    .quiz {
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    /* Фото на всю ширину, текст поверх пустой части снимка */
    .hero {
        min-height: auto;
        padding-bottom: 80%;
        background-image: url('/images/hero-section-tablet.jpg');
        background-position: center bottom;
        background-size: 100% auto;
    }

    .hero .main-text {
        width: auto;
        padding: 45px 30px 35px 30px;
        text-align: center;
    }

    .hero .main-text .buttons {
        justify-content: center;
    }

    .hero .main-text .buttons a {
        width: auto;
    }

    .about {
        flex-direction: column-reverse;
        padding: 50px 0 30px 0;
        gap: 60px;
    }

    .about .image {
        width: 100%;
    }

    .about .image img:first-child {
        position: relative;
        width: 100%;
        height: auto;
    }

    .about .image img:last-child {
        position: absolute;
        z-index: 2;
        width: 88%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .about .main-text {
        width: 100%;
        padding: 0 30px;
        box-sizing: border-box;
    }

    .about .main-text h2 {
        font-size: 30px;
    }

    .audience {
        padding: 40px 30px;
    }

    .audience h2 {
        font-size: 30px;
    }

    .audience .cards {
        flex-direction: column;
    }

    .audience .cards .card {
        width: 100%;
        box-sizing: border-box;
    }

    .quiz {
        flex-direction: column;
        padding: 40px 30px;
        background-image: none;
    }

    .quiz .main-text {
        width: 100%;
        text-align: center;
    }

    .quiz .main-text h2 {
        font-size: 28px;
    }

    .quiz .quiz-card {
        width: 100%;
        box-sizing: border-box;
        padding: 25px;
    }

    .products {
        padding: 40px 30px;
    }

    .products h2 {
        font-size: 30px;
        padding-bottom: 30px;
    }

    .products .slider {
        gap: 10px;
    }

    .products .slider .track .card {
        flex: 0 0 calc((100% - 20px) / 2);
    }

    .products .slider .arrow img {
        width: 34px;
        height: 34px;
    }

    .works {
        padding: 40px 30px;
    }

    .works .main-text h2 {
        font-size: 30px;
    }

    .works .main-text h3 {
        padding-bottom: 30px;
    }

    .works .slider {
        gap: 10px;
    }

    .works .slider .track .card {
        flex: 0 0 calc((100% - 20px) / 2);
    }

    .works .slider .arrow img {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 768px) {
    .hero {
        background-image: url('/images/hero-section-phone.jpg');
    }

    .hero .main-text h2 {
        font-size: 30px;
    }

    .hero .main-text h3 {
        font-size: 16px;
    }

    .hero .main-text .buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero .main-text .buttons a {
        width: 100%;
        box-sizing: border-box;
    }

    .products .slider .arrow,
    .works .slider .arrow {
        padding: 4px;
    }
}

@media (max-width: 480px) {
    .hero .main-text {
        padding: 35px 16px 30px 16px;
    }

    .hero .main-text h2 {
        font-size: 26px;
    }

    .about {
        padding: 40px 0 20px 0;
        gap: 45px;
    }

    .about .main-text {
        padding: 0 16px;
    }

    .about .main-text h2 {
        font-size: 25px;
    }

    .audience {
        padding: 30px 16px;
    }

    .audience h2 {
        font-size: 25px;
        padding-bottom: 25px;
    }

    .audience .cards .card {
        padding: 20px;
    }

    .quiz {
        padding: 30px 16px;
    }

    .quiz .main-text h2 {
        font-size: 24px;
    }

    .quiz .quiz-card {
        padding: 20px;
    }

    .quiz .quiz-card .step h3 {
        font-size: 19px;
        padding-bottom: 18px;
    }

    .quiz .quiz-card .step .options button {
        font-size: 14px;
        padding: 12px 14px;
    }

    .quiz .quiz-card .bottom-section {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .quiz .quiz-card .bottom-section .progress {
        justify-content: center;
    }

    .quiz .quiz-card .bottom-section .next-button {
        width: 100%;
    }

    .products {
        padding: 30px 16px;
    }

    .products h2 {
        font-size: 25px;
    }

    .products .slider .track .card {
        flex: 0 0 calc((100% - 20px) / 2);
    }

    .products .slider .track .card .image {
        height: 140px;
    }

    .products .slider .track .card h3 {
        font-size: 14px;
    }

    .products .slider .track .card .price {
        font-size: 17px;
    }

    .products .slider .track .card .add-to-cart {
        font-size: 12px;
        gap: 6px;
        padding: 9px;
    }

    .works {
        padding: 30px 16px;
    }

    .works .main-text h2 {
        font-size: 25px;
    }

    .works .main-text h3 {
        font-size: 15px;
    }

    .works .slider .track .card .image {
        height: 160px;
    }

    .works .slider .track .card h3 {
        font-size: 16px;
    }

    .works .slider .track .card p {
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .quiz .quiz-card .step .options {
        grid-template-columns: 1fr;
    }
}

/* Короткий текст кнопки на карточках */
.products .slider .track .card .add-to-cart .short {
    display: none;
}

@media (max-width: 768px) {
    .products .slider .track .card .add-to-cart .full {
        display: none;
    }

    .products .slider .track .card .add-to-cart .short {
        display: inline;
    }

    .hero .main-text .buttons {
        flex-direction: row;
        gap: 10px;
    }

    .hero .main-text .buttons a {
        width: 50%;
        box-sizing: border-box;
        font-size: 13px;
        padding: 10px 8px;
    }

    .products .slider,
    .works .slider {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .products .slider .viewport,
    .works .slider .viewport {
        flex-basis: 100%;
        order: 1;
    }

    .products .slider .arrow,
    .works .slider .arrow {
        order: 2;
    }
}

/* Широкие экраны */
@media (min-width: 1680px) {
    .hero .main-text {
        padding-left: 12%;
    }

    .about {
        padding-right: 12%;
    }

    .audience,
    .quiz,
    .products,
    .works {
        padding-left: 12%;
        padding-right: 12%;
    }
}
