/* style.css - Основной файл стилей */

/* Импорт модулей стилей */
@import url('./src/styles/newsCard.css'); /* Стили для карточек новостей */

/* Универсальный box-sizing для единообразной модели окна */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-image: linear-gradient(to right, #2c722e, #6fd674);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.5rem;
    margin: 0.5rem;
}

.footer {
    background-image: linear-gradient(to right, #2c722e, #6fd674);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem;
}

/* Header */
.header .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.header nav a {
    color: white;
    margin-left: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.header nav a:hover {
    color: #baf394;
}

/* Основная область контента */
.content {
    flex-grow: 1;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Макет списка новостей */
.news-list {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr; /* Одна колонка для мобильных  */
}

/* Адаптивная сетка для списка новостей */
@media (min-width: 768px) {
    .news-list {
        grid-template-columns: repeat(2, 1fr); /* Две колонки для планшета */
    }
}

@media (min-width: 1024px) {
    .news-list {
        grid-template-columns: repeat(3, 1fr); /* Три колонки для desktop */
    }
}

/* Оформление полной новостной статьи */
.full-news-article {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 1.5rem;
}

.full-news-article h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #070000;
}

.full-news-article .article-meta {
    font-size: 0.9rem;
    color: #070000;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.full-news-article img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.full-news-article p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #070000;
    margin-bottom: 1rem;
}

.full-news-article ul {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #070000;
    margin-bottom: 1rem;
}

/* Стиль кнопки "назад к новостям" */
.back-button {
    background-color: #4599f3; 
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #0056b3;
}

/* Оформление страницы с документами */
.document-section {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 1.5rem;
}

.document-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.document-list {
    list-style: none;
    padding: 0;
}

.document-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.document-list li a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.document-list li a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Стиль для иконки документа */
.document-list-icon {
    width: 24px; 
    height: 24px;
    margin-right: 0.75rem; 
    vertical-align: middle; /* Выравнивание по центру текста */
}

/* Оформление страницы контактов */
.contact-section {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 1.5rem;
}

.contact-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.contact-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1rem;
}

.contact-section a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-section a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.telegram-channel-link {
    display: flex; /* Используем flexbox для выравнивания */
    align-items: center; 
    gap: 0.5rem; 
    font-size: 1.1rem; /* Поддерживаем размер шрифта параграфа */
    color: #444; 
    margin-bottom: 1rem; 
}

.telegram-channel-link .telegram-icon {
    width: 30px; 
    height: 30px; 
    vertical-align: middle; /* Для лучшего вертикального выравнивания, хотя flexbox уже помогает */
    white-space: nowrap; /* Запрещает перенос строки внутри этого элемента */
}

/* Footer */
.footer {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Стили мобильной навигации */
/* .mobile-menu-button {
    display: none; 
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
} */
.mobile-menu-button {
    /* Сброс стандартных стилей кнопки и центрирование содержимого */
    display: none; /* Скрыто по умолчанию на десктопе */
    background: none;
    border: none;
    padding: 0; /* Удаляем padding, чтобы управлять размером через внутренние элементы */
    width: 40px; /* Фиксированная ширина для иконки */
    height: 40px; /* Фиксированная высота для иконки */
    cursor: pointer;
    position: relative; /* Для правильного позиционирования полосок */
    align-items: center; /* Центрируем содержимое по вертикали */
    justify-content: center; /* Центрируем содержимое по горизонтали */
    z-index: 1001; /* Поверх навигации */
}

.mobile-menu-button .hamburger-lines {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px; /* Ширина полосок */
    height: 20px; /* Высота контейнера полосок */
}

.mobile-menu-button .hamburger-lines span {
    display: block;
    width: 100%;
    height: 3px; /* Толщина полоски */
    background-color: white; /* Цвет полосок */
    border-radius: 3px;
    transition: all 0.3s ease-in-out; /* Плавная анимация */
}

/* Анимация гамбургера в крестик */
.mobile-menu-button.active .hamburger-lines span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* Верхняя полоска */
}

.mobile-menu-button.active .hamburger-lines span:nth-child(2) {
    opacity: 0; /* Средняя полоска исчезает */
}

.mobile-menu-button.active .hamburger-lines span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* Нижняя полоска */
}

/* Кнопка "Наверх" */
.scroll-to-top-btn {
    position: fixed; /* Fixed position relative to the viewport */
    bottom: 2rem; /* 2rem from the bottom */
    right: 2rem; /* 2rem from the right */
    background-image: linear-gradient(to right, #4CAF50, #66BB6A); /* Green gradient */
    color: white;
    border: none;
    border-radius: 50%; /* Makes the button round */
    width: 50px; /* Width of the button */
    height: 50px; /* Height of the button (should be same as width for a perfect circle) */
    font-size: 2rem; /* Size of the arrow icon */
    display: flex; /* Use flexbox to center the arrow */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    opacity: 0; /* Initially hidden */
    visibility: hidden; /* Ensures it's not interactive when hidden */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Smooth transition for show/hide */
    z-index: 1000; /* Ensure it stays on top of other content */
}

.scroll-to-top-btn.show {
    opacity: 1; /* Fully visible */
    visibility: visible; /* Make it interactive */
}

.scroll-to-top-btn:hover {
    background-image: linear-gradient(to right, #5cb85c, #70d870); /* Slightly lighter gradient on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
}

/* Стиль абзаца с указанием авторства изображения */
.photo {
    font-size: 0.75rem;
    color: #615b5b;
    margin-top: 1.5rem;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 767px) {
    .mobile-menu-button {
        display: block; /* Показывать на мобильном */
    }
    .header nav {
        display: none; /* Скрыть навигацию в desktop по умолчанию */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Регулировка в зависимости от высоты жатки */
        left: 0;
        right: 0;
        width: auto;
        margin: 0;
        background-image: linear-gradient(to right, #2c722e, #6fd674);
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-radius: 0.5rem;
    }
    .header nav.active {
        display: flex; /* Показывать, когда активен */
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    .header nav a {
        margin: 0.5rem 1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    .header nav a:last-child {
        border-bottom: none;
    }
    .header {
        justify-content: space-between;
        padding: 0.5rem 1rem;
    }
    .header .logo {
        font-size: 1.2rem;
    }
    .scroll-to-top-btn {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
}