/* ОСНОВНЫЕ СТИЛИ МЕНЮ И ШАПКИ */
.container {
    width: 100%;
}

.full-width-line {
    width: 1200px;
    position: relative;
    border-bottom: 1px solid #000000;
    margin-bottom: 15px;
}

body.black-white .full-width-line {
    border-bottom-color: #ffffff;
}

.menu-content {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

/* МЕНЮ-ЭЛЕМЕНТЫ */
.menu-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #000000;
    white-space: nowrap;
    padding: 0 20px;
    position: relative;
    cursor: pointer;
    height: 100%;
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu-item-inner {
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    transition: color 0.3s ease;
}

.menu-item a {
    text-decoration: none;
    color: inherit;
}

.menu-item i {
    margin-right: 8px;
    font-size: 14px;
    color: inherit;
    transition: color 0.3s ease;
}

/* ССЫЛКИ */
a.menu-item {
    color: #000000;
    text-decoration: none;
}

.link-map-site {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

/* ТЕМНАЯ ТЕМА */
body.black-white .menu-item,
body.black-white .menu-item-inner,
body.black-white .menu-item i,
body.black-white .menu-item a,
body.black-white a.menu-item,
body.black-white .link-map-site,
body.black-white .title-section,
body.black-white .title-section a {
    color: #ffffff !important;
}

body.black-white .news-link {
    color: #ffffff;
}

/* ВЫПАДАЮЩИЕ МЕНЮ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    background: #ffffff;
    border: 1px solid #000000;
    padding: 15px;
    z-index: 1000;
    margin-top: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.dropdown-menu.show {
    display: block;
}

body.black-white .dropdown-menu {
    background: #000000;
    border-color: #ffffff;
}

/* СТРУКТУРА МЕНЮ */
.menu-horizontal {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    width: 100%;
}

.menu-column {
    flex: 1;
    min-width: 0;
}

/* ЗАГОЛОВКИ И СЕКЦИИ */
.dropdown-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
    padding-bottom: 5px;
    border-bottom: 1px solid #cccccc;
    color: inherit;
}

body.black-white .dropdown-title {
    color: #ffffff;
    border-bottom-color: #666666;
}

.dropdown-section {
    margin-bottom: 15px;
}

.dropdown-section h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: inherit;
    opacity: 0.8;
}

body.black-white .dropdown-section h3 {
    color: #ffffff;
    opacity: 0.9;
}

/* ОПЦИИ */
.options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.option {
    padding: 5px 10px;
    border: 1px solid #cccccc;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    color: #000000;
    transition: all 0.3s ease;
}

.option.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

body.black-white .option {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

body.black-white .option.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* РАЗМЕРЫ ШРИФТА */
.sizes {
    display: flex;
    gap: 15px;
    align-items: center;
}

.size {
    font-size: 18px;
    font-weight: bold;
    padding: 3px 8px;
    border: 1px solid #cccccc;
    background: #ffffff;
    color: #000000;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size.active {
    background: #000000;
    color: #ffffff;
}

body.black-white .size {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

body.black-white .size.active {
    background: #ffffff;
    color: #000000;
}

.size.small { font-size: 14px; }
.size.medium { font-size: 18px; }
.size.large { font-size: 22px; }

/* МЕЖБУКВЕННОЕ РАССТОЯНИЕ */
.spacing-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spacing-option {
    padding: 5px 10px;
    border: 1px solid #cccccc;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    color: #000000;
    transition: all 0.3s ease;
}

.spacing-option.active {
    background: #000000;
    color: #ffffff;
}

body.black-white .spacing-option {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

body.black-white .spacing-option.active {
    background: #ffffff;
    color: #000000;
}

/* ЦВЕТОВЫЕ СХЕМЫ */
.color-scheme {
    display: flex;
    gap: 10px;
}

.color-option {
    padding: 8px 15px;
    border: 1px solid #cccccc;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    flex: 1;
    text-align: center;
    color: #000000;
    transition: all 0.3s ease;
}

.color-option.active {
    background: #000000;
    color: #ffffff;
}

.color-option.inverted {
    background: #000000;
    color: #ffffff;
}

.color-option.inverted.active {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

body.black-white .color-option {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

body.black-white .color-option.active {
    background: #ffffff;
    color: #000000;
}

body.black-white .color-option.inverted {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

body.black-white .color-option.inverted.active {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

/* ШАПКА */
.header-main {
    display: flex;
    align-items: center;
    width: 1200px;
    margin: 0 auto;
}

.logo-section a {
    text-decoration: none;
}

.logo-img-1 {
    width: 101px;
    height: 101px;
}

.logo-img-2 {
    width: 190px;
    height: 101px;
}

.title-section {
    text-decoration: none;
    font-size: 25px;
    line-height: 1.3;
    font-weight: bold;
    color: #000000;
    font-family: inherit;
}

.title-section a {
    text-decoration: none;
    color: #000000;
    transition: color 0.3s ease;
}

/* НОВОСТИ */
.news-container {
    width: 1200px;
    margin: 0 auto;
}

.news-main-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 20px;
    color: inherit;
}

.news-breadcrumb-center {
    text-align: center;
    font-size: 18px;
    margin: 20px 0 40px 0;
    color: inherit;
}

.news-list-container {
    margin: 30px 0;
}

.news-card {
    background: #f5f5f5;
    border: 1px solid #000000;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

body.black-white .news-card {
    background: #222222;
    border-color: #ffffff;
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-date {
    font-size: 14px;
    color: #666666;
    margin-bottom: 10px;
}

body.black-white .news-date {
    color: #aaaaaa;
}

.news-item-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: inherit;
}

.news-item-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.news-item-link:hover {
    color: #0056b3;
}

body.black-white .news-item-link:hover {
    color: #66b3ff;
}

.news-excerpt {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: inherit;
}

.read-more-link {
    display: inline-block;
    padding: 10px 20px;
    background: #000000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    background: #333333;
    transform: translateY(-2px);
}

body.black-white .read-more-link {
    background: #ffffff;
    color: #000000;
}

body.black-white .read-more-link:hover {
    background: #dddddd;
}

.no-news-message {
    text-align: center;
    font-size: 18px;
    padding: 40px;
    color: inherit;
}

/* ПАГИНАЦИЯ */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-link {
    padding: 8px 16px;
    border: 1px solid #000000;
    text-decoration: none;
    color: #000000;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.pagination-link:hover {
    background: #000000;
    color: #ffffff;
}

.pagination-link.current {
    background: #000000;
    color: #ffffff;
    cursor: default;
}

body.black-white .pagination-link {
    border-color: #ffffff;
    color: #ffffff;
}

body.black-white .pagination-link:hover {
    background: #ffffff;
    color: #000000;
}

body.black-white .pagination-link.current {
    background: #ffffff;
    color: #000000;
}

/* ПОИСК */
.search-menu {
    width: 400px;
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: 4px 4px 0 #000000;
    padding: 20px;
}

body.black-white .search-menu {
    background: #000000;
    border-color: #ffffff;
    box-shadow: 4px 4px 0 #ffffff;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000000;
}

body.black-white .search-header {
    border-bottom-color: #ffffff;
}

.search-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: #000000;
}

body.black-white .search-title {
    color: #ffffff;
}

.search-close {
    cursor: pointer;
    padding: 5px;
    color: #000000;
    transition: all 0.2s;
}

.search-close:hover {
    transform: rotate(90deg);
}

body.black-white .search-close {
    color: #ffffff;
}

.search-close i {
    font-size: 18px;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    outline: none;
}

.search-input:focus {
    border-color: #333333;
}

body.black-white .search-input {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

body.black-white .search-input:focus {
    border-color: #cccccc;
}

.search-button {
    padding: 12px 20px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.search-button:hover {
    background: #333333;
    border-color: #333333;
}

body.black-white .search-button {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

body.black-white .search-button:hover {
    background: #cccccc;
    border-color: #cccccc;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1240px) {
    .header-main,
    .menu-content,
    .news-container,
    .full-width-line {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    .full-width-line {
        position: static;
        margin: 0;
    }
    
    .dropdown-menu {
        width: calc(100% - 40px);
    }
}

/* ПЛАНШЕТЫ (1024px и меньше) */
@media (max-width: 1024px) {
    .dropdown-menu {
        width: 90vw;
        max-width: 800px;
        padding: 12px;
    }
    
    .menu-horizontal {
        flex-direction: column;
        gap: 20px;
    }
    
    .menu-column {
        width: 100%;
    }
    
    .options,
    .sizes,
    .color-scheme,
    .spacing-options {
        flex-wrap: wrap;
    }
    
    .option,
    .size,
    .color-option,
    .spacing-option {
        flex: 1;
        min-width: calc(50% - 10px);
        margin-bottom: 10px;
        text-align: center;
    }
}

/* ПЛАНШЕТЫ (768px и меньше) */
@media (max-width: 768px) {
    .menu-content {
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px 0;
        gap: 10px;
    }
    
    .menu-item {
        flex: none;
        width: calc(50% - 10px);
        margin-bottom: 10px;
        padding: 10px 5px;
        font-size: 18px;
    }
    
    .menu-item-inner {
        font-size: 16px;
        padding: 8px 0;
    }
    
    .menu-item i {
        font-size: 12px;
        margin-right: 5px;
    }
    
    .dropdown-menu {
        width: 95vw;
        max-width: 95vw;
        left: 0;
        transform: none;
        position: fixed;
        top: auto;
        bottom: 0;
        max-height: 80vh;
        overflow-y: auto;
        margin-top: 0;
        z-index: 2000;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .search-menu {
        width: 95vw;
        max-width: 95vw;
        padding: 15px;
        left: 0;
        transform: none;
        position: fixed;
        top: auto;
        bottom: 0;
        max-height: 80vh;
        overflow-y: auto;
        margin-top: 0;
        z-index: 2000;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .search-container {
        width: 100%;
    }
    
    .menu-horizontal {
        max-height: 60vh;
        overflow-y: auto;
        padding-right: 5px;
    }
    
    .dropdown-section h3 {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .option,
    .size,
    .color-option,
    .spacing-option {
        font-size: 13px;
        padding: 8px 5px;
        min-width: calc(50% - 5px);
    }
    
    .size {
        width: 30px;
        height: 30px;
    }
    
    .size.small { font-size: 12px; }
    .size.medium { font-size: 16px; }
    .size.large { font-size: 20px; }
    
    .dropdown-title {
        font-size: 16px;
        margin-bottom: 8px;
        padding-bottom: 3px;
    }
    
    .search-title {
        font-size: 18px;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        width: 100%;
        font-size: 15px;
        padding: 10px;
    }
    
    .search-button {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
        font-size: 15px;
    }
    
    .news-main-title {
        font-size: 28px;
    }
    
    .news-item-title {
        font-size: 20px;
    }
    
    .news-card {
        padding: 20px;
    }
    
    .pagination-link {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* ТЕЛЕФОНЫ (480px и меньше) */
@media (max-width: 480px) {
    .menu-content {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .menu-item {
        width: 100%;
        margin-bottom: 8px;
        padding: 12px 10px;
        justify-content: flex-start;
        font-size: 16px;
    }
    
    .menu-item-inner {
        justify-content: flex-start;
        font-size: 15px;
        padding-left: 10px;
    }
    
    .dropdown-menu {
        width: 100vw;
        max-width: 100vw;
        border-radius: 15px 15px 0 0;
        padding: 15px 20px;
    }
    
    .search-menu {
        width: 100vw;
        max-width: 100vw;
        border-radius: 15px 15px 0 0;
        padding: 20px;
    }
    
    .menu-horizontal {
        max-height: 65vh;
    }
    
    .menu-column {
        margin-bottom: 15px;
    }
    
    .option,
    .spacing-option,
    .color-option {
        min-width: 100%;
        margin-bottom: 8px;
    }
    
    .sizes {
        justify-content: center;
        gap: 20px;
    }
    
    .size {
        flex: none;
        width: 35px;
        height: 35px;
    }
    
    .dropdown-title {
        font-size: 17px;
        text-align: center;
    }
    
    .search-title {
        font-size: 17px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 12px;
    }
    
    .search-button {
        padding: 12px;
        font-size: 16px;
    }
    
    .news-main-title {
        font-size: 24px;
    }
    
    .news-item-title {
        font-size: 18px;
    }
    
    .news-pagination {
        gap: 5px;
    }
    
    .pagination-link {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .pagination-link.first,
    .pagination-link.last {
        display: none;
    }
    
    .title-section {
        font-size: 24px;
    }
    
    /* Индикатор закрытия для мобильных */
    .dropdown-menu::before,
    .search-menu::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #cccccc;
        border-radius: 2px;
        margin: 0 auto 15px auto;
        cursor: pointer;
    }
    
    body.black-white .dropdown-menu::before,
    body.black-white .search-menu::before {
        background: #666666;
    }
}

/* МАЛЕНЬКИЕ ТЕЛЕФОНЫ (320px и меньше) */
@media (max-width: 320px) {
    .menu-item {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .menu-item-inner {
        font-size: 14px;
        padding-left: 5px;
    }
    
    .menu-item i {
        font-size: 11px;
        margin-right: 3px;
    }
    
    .option,
    .spacing-option,
    .color-option {
        font-size: 12px;
        padding: 6px 4px;
    }
    
    .size {
        width: 28px;
        height: 28px;
    }
    
    .size.small { font-size: 10px; }
    .size.medium { font-size: 14px; }
    .size.large { font-size: 18px; }
    
    .search-title {
        font-size: 16px;
    }
    
    .search-input {
        font-size: 13px;
        padding: 10px;
    }
    
    .search-button {
        font-size: 14px;
        padding: 10px;
    }
}

/* ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ МОБИЛЬНОЙ АДАПТАЦИИ */
@media (max-width: 768px) {
    .dropdown-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }
    
    .dropdown-overlay.show {
        display: block;
    }
    
    body.black-white .dropdown-overlay {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .menu-item,
    .menu-item-inner,
    .search-input,
    .search-button,
    .option,
    .spacing-option,
    .color-option,
    .size {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dropdown-menu,
    .search-menu {
        animation: slideUp 0.3s ease-out;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .dropdown-menu.show,
    .search-menu.show {
        animation: slideUp 0.3s ease-out;
    }
}