@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,700;1,400;1,700&display=swap');

body {
    margin: 0;
    font-family: 'EB Garamond', serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* Для позиционирования иконки Telegram */
}

header {
    background-color: #2c2c2c;
    padding: 2rem 0;
    text-align: center;
    background-image: url('images/2.jpg'); /* Укажите путь к вашему изображению */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh; /* Полная высота экрана */
    width: 100%; /* Полная ширина экрана */
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный слой для читаемости текста */
    z-index: 1;
}

header .container {
    position: relative;
    z-index: 2; /* Текст поверх фонового слоя */
    padding-top: 1rem; /* Отступ сверху */
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: #ffffff;
    text-transform: uppercase;
}

nav {
    margin-top: 1rem;
}

nav a {
    color: #ffffff;
    margin: 0 1rem;
    text-decoration: none;
    font-size: 1.1rem;
}

nav a:hover {
    text-decoration: underline;
}

.telegram-icon {
    position: absolute;
    top: 50%; /* Центрирование по вертикали относительно заголовка */
    transform: translateY(-50%);
    right: 20px; /* Отступ от правого края контейнера */
    z-index: 3; /* Выше полупрозрачного слоя */
}

.telegram-icon img {
    width: 30px;
    height: 30px;
    transition: opacity 0.3s;
}

.telegram-icon:hover img {
    opacity: 0.8;
}

section {
    padding: 3rem 0;
}

section h2 {
    font-size: 2rem;
    text-align: center;
    color: #ffffff;
    margin-bottom: 2rem;
}

section p {
    font-size: 1.1rem;
    color: #d0d0d0;
    max-width: 600px;
    margin: 0 auto;
}

/* Анимация появления текста */
.fade-in {
    opacity: 0;
    transform: translateY(20px); /* Начальное смещение вниз */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0); /* Возврат в исходное положение */
}

#contact {
    background-color: #2c2c2c;
}

#contact a {
    color: #60a5fa;
    text-decoration: none;
}

#contact a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

footer {
    background-color: #2c2c2c;
    padding: 1rem 0;
    text-align: center;
    color: #b0b0b0;
}

#scrollTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #60a5fa;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s;
}

#scrollTop:hover {
    background-color: #93c5fd;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    section p {
        font-size: 1rem;
    }

    nav a {
        display: block;
        margin: 0.5rem 0;
    }

    .telegram-icon {
        top: 50%;
        transform: translateY(-50%);
        right: 10px;
    }
}