body {
    font-family: Arial, sans-serif;
    margin: 0;  /* Reset default body margins */
    padding: 0; /* Reset default body padding */
    background-color: #ede6d6;
    overflow-x: hidden; /* Hide horizontal scrollbar if it appears */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box; /* Ensures padding and border are included in the element's total width */
}

h2 {
    font-size: 2em;
    color: #3d405b; /* Changed text color */
    margin-bottom: 20px;
    text-align: center;
}

/* Шапка */
header {
    background: linear-gradient(to right, #a28fce, #79b8be);
    color: #fff;
    padding: 0px 0;
    border-bottom: 4px solid #8fc8ce;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    color: #3d405b; /* Changed text color */
    transition: color 0.3s ease;
}

nav a:hover {
    color: #3d405b; /* Changed hover color */
}

.reg {
    margin-left: 200px;
    margin-right: auto;
}

/* Styles for the navigation buttons */
.nav-button {
    color: #3d405b; /* Changed text color */
    text-decoration: none;
    font-size: 20px;
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    position: relative;
    padding: 0;
    font-weight: normal; /* Make the text normal weight */
}

.nav-button::before,
.nav-button::after {
    content: '';
    width: 0;
    height: 2px;
    background: #7e6aac;
    display: block;
    transition: 0.5s;
    position: absolute;
}

.nav-button::before {
    top: -5px;
    right: 0;
}

.nav-button::after {
    bottom: -5px;
    left: 0;
}

.nav-button:hover::before {
    width: 100%;
}

.nav-button:hover::after {
    width: 100%;
}

/* Styles for the registration button */
.registration-button {
    background-color: #ffffff;
    color: black;
    border-radius: 10em;
    font-size: 17px;
    padding: 0.7em 1.5em;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border: 2px solid black;
    box-shadow: 0 0 0 0 black;
    text-decoration: none;
    display: inline-block;
    line-height: 1;
    font-weight: normal; /* Make the text normal weight */
}

.registration-button:hover {
    transform: translateY(-4px) translateX(-2px);
    box-shadow: 2px 5px 0 0 black;
    color: rgb(0, 0, 0);
}

.registration-button:active {
    transform: translateY(2px) translateX(1px);
    box-shadow: 0 0 0 0 black;
}

.first-block {
    padding: 50px 0;
    background-color: #8fc8ce;
}

.first-block .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.left-content {
    width: 50%;
    padding-right: 20px;
    box-sizing: border-box;
}

.right-content {
    width: 50%;
    padding-left: 20px;
    box-sizing: border-box;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-align: center;
    color: #3d405b; /* Changed text color */
}

.left-content h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.left-content p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
}

.button-wrapper {
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #a28fce;
    color: #fff;
    text-decoration: none;
    border-radius: 31px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background-color: #7562a1;
}

.right-content img {
    width: 100%;
    border-radius: 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.qualities {
    padding: 20px 0;
}

.qualities .container {
    max-width: 900px;
    box-sizing: border-box;
}

.qualities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: auto;
    margin: 0 auto;
    box-sizing: border-box;
}

.quality-item {
    background-color: #a28fce;
    padding: 20px;
    text-align: left;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.quality-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.quality-item h3 {
    font-size: 1.3em;
    color: #3d405b; /* Changed text color */
    margin-bottom: 10px;
    box-sizing: border-box;
}

.quality-item p {
    font-size: 1em;
    color: #555;
    line-height: 1.4;
    box-sizing: border-box;
}

/* Секция "Популярные изделия" */
.popular-products .container {
    background: none; /* Убрали фон */
    box-sizing: border-box;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    box-sizing: border-box;
}

.product-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    box-sizing: border-box;
}

.product-item img {
    width: 100%;
    height: 250px;
    display: block;
    box-sizing: border-box;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
}

.product-text {
    text-align: left;
    box-sizing: border-box;
}

.product-info h3 {
    font-size: 1.2em;
    color: #3d405b; /* Changed text color */
    margin-bottom: 5px;
    box-sizing: border-box;
}

.product-info p {
    font-size: 0.9em;
    color: #666;
    box-sizing: border-box;
}

.product-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #a28fce;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.product-link:hover {
    background-color: #7562a1;
}

.product-link a {
    color: #fff;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
}

/* Added styles for the section title */
.section-title {
    font-size: 2em;
    color: #3d405b; /* Changed text color */
    margin-bottom: 20px;
    text-align: center;
    padding-top: 30px; /* рАЗМЕР ОТСУПОВ ЗАГОЛОВКА */
    padding-bottom: 30px; /* Adjust as needed */
    box-sizing: border-box;
}

/* стили для секции "Основы рукоделия" */
.crafts-basics .container {
    background: none; /* Убрали фон */
    box-sizing: border-box;
}

.crafts-basics {
    padding: 20px;
    background-color: #ede6d6;
    box-sizing: border-box;
}

.crafts-basics h2 {
    font-size: 2em;
    color: #3d405b; /* Changed text color */
    text-align: center;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.crafts-basics p {
    font-size: 1.1em;
    color: #555;
    text-align: center;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.crafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    box-sizing: border-box;
}

.craft-item {
    background-color: #8fc8ce;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    align-items: center;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.craft-item:hover {
    transform: translateY(-5px);
}

.craft-item img {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
    box-sizing: border-box;
}

.craft-item .text-content {
    text-align: left;
    box-sizing: border-box;
}

.craft-item h3 {
    font-size: 1.3em;
    color: #3d405b; /* Changed text color */
    margin-bottom: 10px;
    text-align: left;
    box-sizing: border-box;
}

.craft-item p {
    font-size: 1em;
    color: #555;
    line-height: 1.4;
    text-align: left;
    box-sizing: border-box;
}

/* Стили для мастер-классов */
.master-classes-container {
    max-width: 1200px;
    padding: 30px;
    border-radius: 10px;
    margin: 0 auto;
    box-sizing: border-box;
    margin-bottom: 100px;
}

.master-classes-container h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
    color: #3d405b;
}

.containerС {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Растягиваем карточки по высоте */
    flex-wrap: wrap; /* Разрешаем перенос на маленьких экранах */
    gap: 20px; /* Отступ между карточками */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.card {
    position: relative;
    width: 300px;
    height: 320px;
    background: #8fc8ce;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    cursor: pointer;
    padding: 20px;
    text-align: center;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-content {
    z-index: 2;
    font-size: 18px;
    font-weight: bold;
    color: #3d405b;
    padding: 20px;
    transition: all 0.3s ease;
}

.card-hover-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    font-size: 16px;
    color: #3d405b;
    background-color: rgba(162, 143, 206, 0.9);
    border-radius: 15px;
    transition: all 0.5s ease;
    transform: translateY(20px);
    box-sizing: border-box;
}

.card:hover .card-content {
    opacity: 0;
    transform: translateY(-20px);
}

.card:hover .card-hover-content {
    opacity: 1;
    transform: translateY(0);
}

.card::before,
.card::after {
    position: absolute;
    content: "";
    width: 20%;
    height: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #a28fce;
    transition: all 0.5s;
    z-index: 0;
}

.card::before {
    top: 0;
    right: 0;
    border-radius: 0 15px 0 100%;
}

.card::after {
    bottom: 0;
    left: 0;
    border-radius: 0 100% 0 15px;
}

.card:hover::before,
.card:hover::after {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    opacity: 0;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .containerС {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .card {
        height: 280px;
    }
    
    .card-content,
    .card-hover-content {
        font-size: 14px;
        padding: 15px;
    }
}















/* Секция "Готовы начать творить?" */
.ready-to-create {
    background-color: #8fc8ce; /* section background */
    padding: 50px 0;
    text-align: center;
    box-sizing: border-box;
}

.ready-to-create .container {
    width: 100%;
    max-width: none;
    padding: 20px; /* Reduced container padding */
    margin: 0;
    box-sizing: border-box;
}

.ready-to-create h1 {
    font-size: 2.5em;
    margin-bottom: 45px; /* Reduced margin below heading */
    color: #3d405b; /* Changed text color */
    box-sizing: border-box;
}

.ready-to-create p {
    font-size: 1.2em;
    margin-bottom: 80px; /* Increased margin below paragraph */
    color: #3d405b; /* Changed text color */
    box-sizing: border-box;
}

.ready-to-create .buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    box-sizing: border-box;
}

.ready-to-create .start-free,
.ready-to-create .already-know {
    background-color: white;
    color: black;
    border-radius: 10em;
    font-size: 17px;
    font-weight: 600;
    padding: 0.7em 1.5em; /* Adjusted padding */
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border: 1px solid black;
    box-shadow: 0 0 0 0 black;
    box-sizing: border-box;
    text-decoration: none; /* added to remove underlines */
}

.ready-to-create .start-free:hover,
.ready-to-create .already-know:hover {
    transform: translateY(-4px) translateX(-2px);
    box-shadow: 2px 5px 0 0 black;
}

.ready-to-create .start-free:active,
.ready-to-create .already-know:active {
    transform: translateY(2px) translateX(1px);
    box-shadow: 0 0 0 0 black;
}

.ready-to-create .guarantees {
    display: flex;
    justify-content: space-around;
    box-sizing: border-box;
}

.ready-to-create .guarantee {
    text-align: center;
    box-sizing: border-box;
}

.ready-to-create .guarantee h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.ready-to-create .guarantee p {
    font-size: 1em;
    color: #000000; /* Keep footer text color as is */
    box-sizing: border-box;
}














/* вроде начало подвала */
.website-footer {
    background: linear-gradient(to right, #a28fce, #79b8be); /* Gradient Background */
    color: white; /* Keep as is */
    padding: 40px 0;
    font-family: Arial, sans-serif;
}

.website-footer .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.website-footer .footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.website-footer .footer-content > div {
    width: 30%;
}

.website-footer h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.website-footer ul {
    list-style: none;
    padding: 0;
}

.website-footer li {
    margin-bottom: 8px;
}

.website-footer a {
    color: white; /* Keep as is */
    text-decoration: none;
    transition: color 0.3s ease;
}

.website-footer a:hover {
    color: #ddd;
}

.website-footer .social-icon {
    display: inline-block;
    margin-right: 10px;
}

.website-footer .footer-bottom {
    text-align: center;
    font-size: 0.9em;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}



/* Мобильная адаптация */
@media (max-width: 768px) {
    /* Общие стили */
    .container {
        width: 95%;
        padding: 5px;
    }
    
    /* Шапка */
    header .container {
        flex-direction: column;
        padding: 10px 0;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 5px 0;
    }
    
    .reg {
        margin: 15px 0 0 0;
    }
    
    /* Первый блок */
    .first-block .container {
        flex-direction: column;
    }
    
    .left-content, .right-content {
        width: 100%;
        padding: 0;
        text-align: center;
    }
    
    .right-content img {
        margin-top: 20px;
        max-width: 100%;
    }
    
    /* Популярные изделия */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    /* Основы рукоделия */
    .crafts-grid {
        grid-template-columns: 1fr;
    }
    
    .craft-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .craft-item .text-content {
        text-align: center;
    }
    
    /* Мастер-классы */
    .containerС {
        flex-direction: column;
    }
    
    .card {
        width: 80%;
        margin: 10px auto;
    }
    
    /* Готовы начать творить */
    .ready-to-create .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .ready-to-create .start-free,
    .ready-to-create .already-know {
        width: 80%;
        margin-bottom: 10px;
    }
    
    .ready-to-create .guarantees {
        flex-direction: column;
    }
    
    /* Подвал */
    .footer-content {
        flex-direction: column;
    }
    
    .footer-content > div {
        width: 100%;
        margin-bottom: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Дополнительные адаптации для очень маленьких экранов */
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .nav-button {
        font-size: 16px;
    }
    
    .registration-button {
        padding: 0.5em 1em;
        font-size: 14px;
    }
    
    .card {
        height: 280px;
    }
    
    .card-hover-content {
        font-size: 14px;
    }
}























