* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Georgia', serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
}

.logo img {
    max-width: 400px;
    height: auto;
    margin-bottom: 30px;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    color: #fff;
    border: none;
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: #ccc;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Страницы коллекций - выравнивание по верху */
.main-content.cheese-page,
.main-content.faces-page,
.main-content.books-page,
.main-content.pillars-page,
.main-content.tragedy-page,
.main-content.fairy-tale-page {
    align-items: flex-start;
}

.collections {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.collection-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.collection-link:hover {
    transform: scale(1.05);
}

.collection-link img {
    height: 360px;
    width: auto;
    display: block;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.site-footer .contact-link {
    margin-top: 10px;
    font-size: 18px;
}

.site-footer .contact-email {
    color: #4a90d9;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 18px;
}

.site-footer .contact-email:hover {
    color: #6eb4ff;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .collection-link img {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .collections {
        flex-direction: column;
    }
    
    .collection-link img {
        height: 200px;
    }
    
    .logo img {
        max-width: 300px;
    }
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
}

.modal-content {
    background-color: #111;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ccc;
}

.modal-history-content {
    max-width: 800px;
}

.modal-history-body {
    padding: 20px;
}

.modal-history-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-history-video:hover {
    transform: scale(1.05);
}

.modal-history-video-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}

.modal-history-video-label {
    font-size: 16px;
    color: #ccc;
    font-family: 'Georgia', serif;
}

.modal-history-text {
    font-size: 16px;
    line-height: 1.8;
    color: #ddd;
    white-space: normal;
}

.modal-history-text p {
    margin-bottom: 20px;
}

.modal-history-text img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 25px auto;
    border-radius: 4px;
}

.modal-history-text .history-author {
    font-style: italic;
    text-align: right;
    margin-top: 30px;
    color: #aaa;
}

.modal-contact-content {
    max-width: 620px;
}

.modal-contact-body {
    padding: 20px;
    color: #ddd;
}

.modal-contact-title {
    font-size: 30px;
    margin-bottom: 20px;
    color: #fff;
    font-family: 'Georgia', serif;
    text-align: center;
}

.contact-form-field {
    margin-bottom: 18px;
}

.contact-form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: #ddd;
}

.contact-form-field input,
.contact-form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #111;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

.contact-form-field input:focus,
.contact-form-field textarea:focus {
    outline: none;
    border-color: #5fa8ff;
}

.contact-form-field textarea {
    min-height: 170px;
    resize: vertical;
}

.contact-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.contact-form-submit,
.contact-form-cancel {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.contact-form-submit {
    background: #4a90d9;
    color: #fff;
}

.contact-form-cancel {
    background: #333;
    color: #fff;
}

.contact-form-submit:hover,
.contact-form-cancel:hover {
    opacity: 0.92;
}

.contact-form-note {
    margin-top: 20px;
    font-size: 14px;
    color: #aaa;
    line-height: 1.6;
}

.contact-form-note a {
    color: #6eb4ff;
    text-decoration: underline;
}

/* Модальное окно для видео */
.modal-video-content {
    max-width: 800px;
}

.modal-video-body {
    padding: 20px;
    text-align: center;
}

.video-modal-label {
    font-size: 18px;
    color: #fff;
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
}

.video-player {
    width: 100%;
    max-height: 500px;
}

.modal-legendarium-content {
    max-width: 560px !important;
}

.modal-legendarium-body {
    padding: 20px;
}

.modal-legendarium-text {
    font-size: 16px;
    line-height: 1.8;
    color: #ddd;
    white-space: pre-wrap;
}

/* Модальное окно "Авторы и хранители" */
.modal-authors-content {
    max-width: 1000px;
}

.modal-authors-body {
    padding: 30px;
}

.modal-authors-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #fff;
    font-family: 'Georgia', serif;
    text-align: center;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.author-item {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: #222;
    border-radius: 8px;
}

.author-image {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.author-info {
    flex: 1;
}

.author-info h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    font-family: 'Georgia', serif;
}

.author-info p {
    font-size: 14px;
    line-height: 1.6;
    color: #ddd;
}

@media (max-width: 768px) {
    .authors-grid {
        grid-template-columns: 1fr;
    }

    .author-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-image {
        flex: none;
    }
}

/* Модальное окно "Награды" */
.modal-awards-content {
    max-width: 630px !important;
    background: #1a1a1a;
    border: 1px solid #333;
}

.modal-awards-body {
    padding: 30px;
}

.modal-awards-title {
    font-size: 28px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
}

.modal-awards-intro {
    font-size: 16px;
    line-height: 1.8;
    color: #ddd;
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Georgia', serif;
}

.award-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #333;
}

.award-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.award-content {
    flex: 1;
    text-align: left;
    padding-right: 30px;
}

.award-title {
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Georgia', serif;
    text-align: left;
}

.award-org {
    font-size: 15px;
    color: #aaa;
    font-family: 'Georgia', serif;
    font-style: italic;
    text-align: left;
}

.award-image {
    flex: 0 0 auto;
    text-align: center;
}

.award-image img {
    max-width: 150px;
    height: auto;
    display: block;
}

/* Форма обратной связи */
.contact-section {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    text-align: center;
}

.contact-section h1 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #fff;
    font-family: 'Georgia', serif;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #ddd;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #111;
    color: #fff;
    font-size: 16px;
    font-family: 'Georgia', serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5fa8ff;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-section button {
    padding: 12px 30px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-section button:hover {
    background: #555;
}
