/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, #f5f9f3 0%, #f0f5e9 100%);
    color: #4a5d4a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto; /* Возвращаем прокрутку для мобильных устройств */
}

/* Кнопка назад */
.back-button-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    text-decoration: none;
    color: #6b8c6b;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(155, 188, 155, 0.3);
    box-shadow: 0 4px 15px rgba(107, 140, 107, 0.1);
    backdrop-filter: blur(5px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(-3px);
    box-shadow: 0 6px 20px rgba(107, 140, 107, 0.15);
    color: #5a7a5a;
}

.back-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.back-btn:hover i {
    transform: translateX(-2px);
}

/* Основной контент */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px 5px;
    flex: 1;
    min-height: calc(100vh - 100px); /* Минимальная высота для нормального отображения */
}

.title-container {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    padding-top: 100px; /* Отступ для логотипа */
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    font-weight: 400;
    color: #6b8c6b;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(107, 140, 107, 0.1);
}

.divider {
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #9bbc9b, transparent);
    margin: 3px auto;
    border-radius: 2px;
}

.subtitle {
    font-family: 'EB Garamond', serif;
    font-size: 1.4rem;
    color: #7a9a7a;
    font-weight: 300;
    letter-spacing: 0.8px;
    margin-bottom: 55px;
}

/* Кнопки */
.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 25px;
    position: relative;
    z-index: 2;
}

.main-btn {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    text-decoration: none;
    color: #4a5d4a;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(107, 140, 107, 0.1);
    border: 1px solid rgba(155, 188, 155, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    backdrop-filter: blur(5px);
}

.main-btn:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(107, 140, 107, 0.15);
    background: rgba(255, 255, 255, 1);
}

.btn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(155, 188, 155, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-btn:hover .btn-overlay {
    opacity: 1;
}

.btn-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.main-btn:hover .btn-icon {
    transform: scale(1.1) rotate(5deg);
}

.btn-drawing .btn-icon {
    background: linear-gradient(135deg, #e6f2e6 0%, #d4e8d4 100%);
    color: #6b8c6b;
    box-shadow: 0 4px 15px rgba(107, 140, 107, 0.1);
}

.btn-coloring .btn-icon {
    background: linear-gradient(135deg, #e9f2e6 0%, #d8e8d4 100%);
    color: #7a9a7a;
    box-shadow: 0 4px 15px rgba(122, 154, 122, 0.1);
}

.btn-toys .btn-icon {
    background: linear-gradient(135deg, #ecf2e6 0%, #dce8d4 100%);
    color: #6b8c6b;
    box-shadow: 0 4px 15px rgba(107, 140, 107, 0.1);
}

.btn-text {
    text-align: center;
    z-index: 1;
}

.btn-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #4a5d4a;
}

.btn-text p {
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    color: #7a9a7a;
    line-height: 1.5;
    font-weight: 300;
}

/* Декоративные элементы */
.decoration {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.leaf-1 {
    width: 60px;
    height: 60px;
    background: url('../img/leaf1.png') center/contain no-repeat;
    top: 10%;
    left: 5%;
    opacity: 0.6;
}

.leaf-2 {
    width: 80px;
    height: 80px;
    background: url('../img/leaf2.png') center/contain no-repeat;
    bottom: 20%;
    right: 7%;
    opacity: 0.5;
}

.leaf-3 {
    width: 50px;
    height: 50px;
    background: url('../img/leaf3.png') center/contain no-repeat;
    top: 40%;
    right: 10%;
    opacity: 0.4;
}

.flower-1 {
    width: 70px;
    height: 70px;
    background: url('../img/flower1.png') center/contain no-repeat;
    bottom: 30%;
    left: 8%;
    opacity: 0.5;
}

.flower-2 {
    width: 90px;
    height: 90px;
    background: url('../img/flower2.png') center/contain no-repeat;
    top: 15%;
    right: 5%;
    opacity: 0.6;
}

/* Футер */
.footer {
    text-align: center;
    padding: 35px 0 25px;
    background: transparent;
    width: 100%;
    z-index: 10;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: rgba(91, 115, 91, 0.3);
}

.footer p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #6b8c6b;
    margin: 0;
    margin-top: 30px;
}

/* ================== */
/* ЛОГОТИП В ШАПКЕ */
/* ================== */
.title-container::before {
    content: '';
    position: absolute;
    top: -80px; /* Поднимаем логотип над заголовком */
    left: 50%;
    transform: translateX(-50%);
    width: 180px; /* Ширина логотипа */
    height: 180px; /* Высота логотипа */
    background: url('../img/log.png') center/contain no-repeat;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(107, 140, 107, 0.2));
}

/* ================== */
/* ФОНОВАЯ КАРТИНКА */
/* ================== */
body::after {
    content: '';
    position: fixed;
    top: 65%;
    left: 50%;
    width: 160vw;
    height: 80vh;
    background: url('../img/pict.png') center/contain no-repeat;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    opacity: 0.46;
}

/* ================== */
/* АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ (768px - 1024px) */
/* ================== */
@media (max-width: 1024px) {
    .title {
        font-size: 3.2rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }

    .buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    .title-container::before {
        width: 160px;
        height: 160px;
        top: -70px;
    }

    body::after {
        opacity: 0.35;
        top: 63%;
    }
}

/* ================== */
/* АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ В ПОРТРЕТНОЙ ОРИЕНТАЦИИ (600px - 768px) */
/* ================== */
@media (max-width: 768px) {
    body {
        overflow-y: auto; /* Разрешаем прокрутку на планшетах */
    }

    .title {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.2rem;
        margin-bottom: 40px;
    }

    .buttons-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 25px auto 0;
        gap: 20px;
    }

    .title-container {
        padding-top: 80px;
    }

    .title-container::before {
        width: 130px;
        height: 130px;
        top: -60px;
    }

    body::after {
        opacity: 0.25;
        top: 65%;
        width: 140vw;
        height: 60vh;
    }

    .back-btn {
        padding: 10px 16px;
        font-size: 1.1rem;
    }

    .back-button-container {
        top: 15px;
        left: 15px;
    }

    .container {
        padding: 40px 15px 20px;
    }

    /* Адаптация декораций для планшетов */
    .leaf-1, .flower-2 {
        transform: scale(0.8);
    }

    .leaf-2, .flower-1 {
        transform: scale(0.7);
    }

    .leaf-3 {
        transform: scale(0.6);
    }
}

/* ================== */
/* АДАПТАЦИЯ ДЛЯ БОЛЬШИХ ТЕЛЕФОНОВ (480px - 600px) */
/* ================== */
@media (max-width: 600px) {
    .title {
        font-size: 2.4rem;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 35px;
        line-height: 1.4;
    }

    .buttons-grid {
        max-width: 400px;
    }

    .main-btn {
        padding: 22px;
    }

    .btn-icon {
        font-size: 2.4rem;
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }

    .btn-text h3 {
        font-size: 1.4rem;
    }

    .btn-text p {
        font-size: 0.95rem;
    }

    .title-container::before {
        width: 110px;
        height: 110px;
        top: -50px;
    }

    body::after {
        opacity: 0.2;
        top: 68%;
        width: 130vw;
        height: 50vh;
    }

    .footer {
        padding: 30px 0 20px;
    }

    .footer::before {
        top: 25px;
    }

    .footer p {
        margin-top: 25px;
        font-size: 1.1rem;
    }

    /* Уменьшаем декорации для телефонов */
    .decoration {
        transform: scale(0.6) !important;
    }

    .leaf-1 {
        left: 2%;
        top: 5%;
    }

    .leaf-2 {
        right: 2%;
        bottom: 15%;
    }

    .flower-1 {
        left: 3%;
        bottom: 25%;
    }
}

/* ================== */
/* АДАПТАЦИЯ ДЛЯ СРЕДНИХ ТЕЛЕФОНОВ (375px - 480px) */
/* ================== */
@media (max-width: 480px) {
    .title {
        font-size: 2.1rem;
        margin-bottom: 10px;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .divider {
        width: 140px;
    }

    .buttons-grid {
        max-width: 100%;
        gap: 16px;
        margin-top: 20px;
    }

    .main-btn {
        padding: 20px;
        border-radius: 16px;
    }

    .btn-icon {
        font-size: 2.2rem;
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }

    .btn-text h3 {
        font-size: 1.3rem;
    }

    .btn-text p {
        font-size: 0.9rem;
    }

    .title-container::before {
        width: 90px;
        height: 90px;
        top: -40px;
    }

    body::after {
        opacity: 0.15;
        top: 70%;
        width: 120vw;
        height: 45vh;
    }

    .back-btn {
        padding: 8px 14px;
        font-size: 1rem;
    }

    .back-btn span {
        display: inline; /* Оставляем текст на телефонах */
    }

    .back-btn i {
        font-size: 1.2rem;
    }

    .footer p {
        font-size: 1rem;
    }

    /* Прячем некоторые декорации на очень маленьких экранах */
    .leaf-3 {
        display: none;
    }
}

/* ================== */
/* АДАПТАЦИЯ ДЛЯ МАЛЕНЬКИХ ТЕЛЕФОНОВ (до 375px) */
/* ================== */
@media (max-width: 375px) {
    .title {
        font-size: 1.9rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .main-btn {
        padding: 18px;
    }

    .btn-icon {
        font-size: 2rem;
        width: 65px;
        height: 65px;
    }

    .btn-text h3 {
        font-size: 1.2rem;
    }

    .btn-text p {
        font-size: 0.85rem;
    }

    .title-container::before {
        width: 80px;
        height: 80px;
        top: -35px;
    }

    body::after {
        opacity: 0.12;
        top: 72%;
        width: 110vw;
        height: 40vh;
    }

    .back-btn span {
        font-size: 0.9rem;
    }

    /* Прячем больше декораций на очень маленьких экранах */
    .flower-2 {
        display: none;
    }
}

/* ================== */
/* АДАПТАЦИЯ ДЛЯ ОЧЕНЬ ВЫСОКИХ ЭКРАНОВ (высота больше 900px) */
/* ================== */
@media (min-height: 900px) and (max-width: 768px) {
    .title-container {
        padding-top: 120px;
    }

    .title-container::before {
        width: 150px;
        height: 150px;
        top: -80px;
    }

    .buttons-grid {
        margin-top: 40px;
    }

    body::after {
        opacity: 0.3;
    }
}

/* ================== */
/* АДАПТАЦИЯ ДЛЯ ГОРИЗОНТАЛЬНОЙ ОРИЕНТАЦИИ ТЕЛЕФОНОВ */
/* ================== */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding-top: 20px;
    }

    .title-container {
        padding-top: 60px;
        margin-bottom: 20px;
    }

    .title {
        font-size: 2rem;
    }

    .title-container::before {
        width: 70px;
        height: 70px;
        top: -30px;
    }

    .buttons-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        margin-top: 15px;
    }

    .main-btn {
        padding: 15px;
    }

    .btn-icon {
        font-size: 1.8rem;
        width: 55px;
        height: 55px;
        margin-bottom: 10px;
    }

    body::after {
        opacity: 0.1;
        top: 55%;
    }
}

/* ================== */
/* ДОПОЛНИТЕЛЬНАЯ АДАПТАЦИЯ ДЛЯ ОЧЕНЬ ШИРОКИХ ЭКРАНОВ */
/* ================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .title {
        font-size: 4.2rem;
    }

    .subtitle {
        font-size: 1.6rem;
    }

    .buttons-grid {
        gap: 40px;
    }

    .main-btn {
        padding: 30px;
    }

    .title-container::before {
        width: 220px;
        height: 220px;
        top: -100px;
    }
}