/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Roboto:wght@400;500;700&display=swap');

/* Основные стили */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
}

/* Шапка сайта */
header {
    background: linear-gradient(90deg, #4CAF50, #2F8A5F);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-family: 'Merriweather', serif;
    font-size: 2.5em;
}

h2 {
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #FFD700;
}

/* Разделы сайта */
section {
    margin: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

section h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #4CAF50;
}

.article, .presentation {
    margin-bottom: 20px;
}

.article h3, .presentation h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.5em;
    color: #444;
    margin-bottom: 10px;
}

.article p, .presentation p {
    font-size: 1.1em;
    color: #666;
}

a.read-more {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

a.read-more:hover {
    color: #2F8A5F;
}

/* Стиль кнопок */
.gallery-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px;
}

.gallery-btn:hover {
    background-color: #2F8A5F;
}

/* Кнопка "Назад" */
.back-btn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 16px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px;
}

.back-btn:hover {
    background-color: #c0392b;
}

/* Галерея */
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.gallery-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-btn:hover {
    background-color: #2F8A5F;
    transform: translateY(-5px);
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#modal .image-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

#modal .image-container img {
    width: 150px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

#modal .image-container img:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Кнопка "Назад" */
.back-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.back-btn:hover {
    background-color: #c0392b;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .gallery-btn {
        font-size: 1em;
        padding: 10px 18px;
    }

    #modal .image-container img {
        width: 120px;
    }
}

@media (max-width: 480px) {
    .gallery-btn {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    #modal .image-container img {
        width: 100px;
    }
}

html {
    scroll-behavior: smooth;
}

/* Стили для модального окна презентации */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    text-align: center;
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.presentation-nav {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

.nav-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.nav-btn:hover {
    background: #2F8A5F;
}

/* Стиль для блока с презентациями */
.presentation-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.presentation-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.presentation-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.presentation-item h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.3em;
    color: #333;
    margin-bottom: 15px;
}

.read-more-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    margin-top: 10px;
}

.read-more-btn:hover {
    background-color: #2F8A5F;
    transform: scale(1.05);
}


/* Адаптивный дизайн для маленьких экранов */
@media (max-width: 768px) {
    .presentation-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .presentation-list {
        grid-template-columns: 1fr;
    }
}

/* Контейнер для презентации */
.presentation-container {
    display: flex;
    flex-wrap: wrap; /* Позволяет элементам переноситься на следующую строку, если они не помещаются */
    justify-content: center; /* Центрирует элементы по горизонтали */
    align-items: center; /* Центрирует элементы по вертикали */
    gap: 20px; /* Добавляет отступ между элементами */
    margin: 20px;
}

/* Элемент презентации */
.presentation-item {
    background-color: #f1f1f1;
    border-radius: 10px;
    padding: 20px;
    width: 250px; /* Устанавливает фиксированную ширину */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center; /* Текст внутри будет выравниваться по центру */
}

.presentation-item:hover {
    transform: translateY(-5px); /* Эффект поднятия при наведении */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Увеличение тени */
}


/* Подвал */
footer {
    text-align: center;
    padding: 15px;
    background: #333;
    color: white;
    font-size: 0.9em;
    margin-top: 30px;
}

