/* style_pub_nachr.css */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5dc;
    line-height: 1.6;
}

.top-bar {
    height: 8px;
    background-color: #d4c9a8;
    width: 100%;
}

.header {
    padding: 10px 5% 5px;
    background-color: #f5f5dc;
    position: relative;
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo-container {
    width: 40%;
    max-width: 490px;
    position: relative;
}

.logo-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
}

.menu-container {
    width: 65%;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.menu a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    text-transform: capitalize;
    white-space: nowrap;
    flex-grow: 1;
    text-align: center;
}

.menu a:hover {
    color: #666;
    border: 2px solid #722F37;
    border-radius: 5px;
}

.main-content {
    padding: 20px 5%;
}

.page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    display: flex;
    flex-direction: column;
    background-color: #e8e3d0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: #e0dac5;
}

.news-image {
    flex: 0 0 30%;
    margin-bottom: 15px;
    text-align: center;
}

.news-image img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.news-text {
    flex: 1;
}

.news-date {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #722F37;
}

.news-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

.news-content {
    margin-bottom: 10px;
    color: #555;
}

.publication-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.publication-item {
    background-color: #e8e3d0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.publication-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: #e0dac5;
}

.publication-image {
    flex-shrink: 0;
    margin-bottom: 15px;
    text-align: center;
}

.publication-image img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.publication-text {
    flex: 1;
}

.publication-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #722F37;
}

.publication-subtitle {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.publication-excerpt {
    margin-bottom: 10px;
    color: #555;
}

.read-more {
    color: #722F37;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #8B4513;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    margin: 20px;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 8px;
}

.close-modal {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: #722F37;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #8B4513;
    transform: scale(1.1);
}

.close-modal::before,
.close-modal::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
}

.close-modal::before {
    transform: rotate(45deg);
}

.close-modal::after {
    transform: rotate(-45deg);
}

.footer {
    background-color: #f5f5dc;
    padding: 20px 5%;
    text-align: center;
    font-family: 'Times New Roman', serif;
    border-top: 1px solid #d4c9a8;
    margin-top: 20px;
}

.footer-links {
    margin: 10px 0;
    font-size: 16px;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0 5px;
}

.footer-links a:hover {
    color: #722F37;
    text-decoration: underline;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Адаптация для планшетов и ПК */
@media (min-width: 992px) {
    .publication-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }

    .publication-image {
        margin-bottom: 0;
        text-align: left;
    }

    .publication-image img {
        margin: 0;
    }

    .news-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }
}

/* Мобильная версия */
@media (max-width: 991px) {
    .header-content {
        flex-direction: column;
    }

    .logo-container {
        width: 100%;
        max-width: none;
        padding-right: 40px;
    }

    .menu-container {
        width: 100%;
    }

    .menu {
        display: none;
        flex-direction: column;
        margin-top: 15px;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #f5f5dc;
        z-index: 10;
        padding: 15px 5%;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        justify-content: flex-start;
        align-items: flex-start;
    }

    .menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .menu a {
        text-align: left;
        padding: 10px 0;
        width: 100%;
        display: block;
    }

    .news-image img,
    .publication-image img {
        max-width: 100%;
    }

    .close-modal {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    .close-modal::before,
    .close-modal::after {
        width: 18px;
    }
}

@media (max-width: 767px) {
    .close-modal {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .close-modal::before,
    .close-modal::after {
        width: 15px;
    }
}
