/* style.css */

/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Roboto:wght@300;400;700&display=swap');

/* Основные стили */
body {
    font-family: 'Merriweather', serif;
    background-color: #0c0c0c;
    color: #e0e0e0;
    margin: 0;
    line-height: 1.8;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигационное меню */
.navbar {
    background-color: rgba(15, 15, 15, 0.95);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.nav-logo {
    color: #b8860b;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #daa520;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.nav-links a:hover {
    color: #b8860b;
}

/* Секция героя (обложка + заголовок) */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1542845180-87a3717e8b6b?q=80&w=1974&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed;
    color: white;
}

.book-cover {
    margin-bottom: 30px;
}

.book-cover img {
    max-width: 350px;
    width: 90%;
    height: auto;
    border: 5px solid #b8860b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    transition: transform 0.4s ease;
}

.book-cover img:hover {
    transform: scale(1.03);
}

.hero-text h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 6px #000;
}

.subtitle {
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto 20px;
    color: #ccc;
    font-style: italic;
    font-family: 'Roboto', sans-serif;
}

/* Секция аннотации */
.summary-section {
    padding: 60px 20px;
    background-color: #1a1a1a;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.section-title {
    font-size: 2.2em;
    color: #b8860b;
    border-bottom: 2px solid #b8860b;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
}

.summary-section p {
    max-width: 750px;
    margin: 0 auto 20px;
    font-size: 1.1em;
}

.call-to-action {
    font-weight: bold;
    color: #e0e0e0;
    font-style: italic;
    font-size: 1.3em;
    margin-top: 30px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: #330000;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 20px;
    font-family: 'Roboto', sans-serif;
}

.btn:hover {
    background-color: #550000;
    transform: translateY(-3px);
}

.secondary-btn {
    background-color: #b8860b;
    color: #111;
}

.secondary-btn:hover {
    background-color: #daa520;
    transform: translateY(-3px);
}

/* Футер */
footer {
    text-align: center;
    padding: 20px;
    background-color: #121212;
    margin-top: 0;
    font-size: 0.9em;
    color: #666;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .nav-links {
        margin-top: 15px;
    }
    .nav-links a {
        margin: 0 10px;
    }
    .hero-text h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 50px 15px;
    }
    .hero-text h1 {
        font-size: 1.8em;
    }
    .subtitle {
        font-size: 1em;
    }
    .btn {
        padding: 12px 25px;
    }
}
/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow: auto;
    padding-top: 60px;
    animation: fadeIn 0.5s ease-out;
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border: 3px solid #b8860b;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
    animation: slideIn 0.5s ease-out;
    position: relative;
}

.close-btn {
    color: #b8860b;
    font-size: 2.5em;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: #daa520;
    transform: scale(1.1);
}

.modal-body {
    text-align: center;
}

.modal-body h2 {
    color: #cc9900;
    border-bottom: 2px solid #cc9900;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Модальное окно для изображения */
/* style.css */

/* ... (здесь весь ваш существующий код CSS, включая общие стили и стили для текста) ... */

/* Модальное окно для изображения */
#modal-image {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden; /* Скрываем стандартные скролл-бары, т.к. перемещение будет происходить с помощью JS */
    padding: 0;
    animation: fadeIn 0.5s ease-out;
    cursor: grab; /* Курсор для перетаскивания */
}

#modal-image.grabbing {
    cursor: grabbing; /* Курсор во время перетаскивания */
}

.modal-image-content {
    display: block;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1); /* Центрируем и устанавливаем начальный масштаб */
    transform-origin: 0 0;
    max-width: none;
    max-height: 100%;
    user-select: none; /* Запрещаем выделение текста на изображении */
    animation: zoomIn 0.6s ease-out;
}

#modal-image .close-btn-image {
    position: fixed; /* Закрепляем кнопку, чтобы она не двигалась вместе с картинкой */
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Добавляем тень для лучшей видимости */
}

#modal-image .close-btn-image:hover,
#modal-image .close-btn-image:focus {
    color: #b8860b;
    text-decoration: none;
    cursor: pointer;
}

/* Добавьте курсор, чтобы показать, что обложка кликабельна */
.book-cover img {
    cursor: pointer;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}