        * { box-sizing: border-box; }

        body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.logo {
  width: 350px;      /* Максимальная ширина */
  max-height: 48px;     /* Максимальная высота */
  width: auto;          /* Ширина подстраивается под пропорции */
  height: auto;         /* Высота подстраивается под пропорции */
  object-fit: contain; /* Сохраняет пропорции, не обрезает */
 border-radius: 5px;
 padding: 2px;
padding-top: 5px; 
}
.main-content {
    flex: 1;
    background-color: #ffffff;
    padding: 5px;
    /* Отступы под фиксированное меню и футер */
    padding-top: 70px;    /* 50px меню + 20px отступ */
    padding-bottom: 60px; /* 50px футер + 10px отступ */
    width: 99%;
    max-width: 1400px;
    margin: 0 auto;
}

/* === Стили для раздела "Программы" === */
.program-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.program-section h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #5b7a9e;
}
.program-section h4 a {
    color: #2c5aa0;
    text-decoration: none;
}
.program-section h4 a:hover {
    text-decoration: underline;
}
.section-desc {
    color: #666;
    font-size: 0.95rem;
}
.program-list {
    list-style: none;
    padding-left: 0;
}
.program-list li {
    padding: 4px 0;
    border-bottom: 1px dashed #f0f0f0;
}
.program-list li:last-child {
    border-bottom: none;
}
.no-programs {
    color: #888;
    font-style: italic;
}

        nav { 
background-color: #5b7a9e; width: 100%; 
    /* background-image: url('image.jpg'); */
}

        .mobile-header {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 10px 15px;
            width: 100%;
        }

        .nav-toggle {
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            margin: 0;
        }

        .mobile-home {
            color: white;
            text-decoration: none;
            font-size: 1.2rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .desktop-menu {
            display: flex;
            list-style: none;
            margin: 0;
            padding: 0;
            height: 50px;
        }

        .mobile-menu {
            display: none;
            list-style: none;
            margin: 0;
            padding: 0;
            background-color: #5b7a9e;
        }

.article-program-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}
/* Убираем подчёркивание с карточек программ */
a.article-program-tile,
a.article-program-tile:hover,
a.article-program-tile:visited,
a.article-program-tile:focus {
    text-decoration: none;
}

.article-program-tile {
    flex: 1;
    min-width: 300px;
    background-color: #f5f5f5; /* < чуть серее */
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}


.tile-header {
    background-color: #5b7a9e;
    color: white;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.tile-content {
    padding: 5px;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #000;
}
.tile-content b,
.tile-content strong {
    color: #000;
}

.tile-content a {
    color: #2c5aa0;
    text-decoration: none;
}

.tile-content a:hover {
    text-decoration: underline;
}

.tile-content b {
    color: #333;
}
/* Стили, аналогичные выпадающему меню */
.main-content-area {
    padding: 5px;
    /* max-width: 900px; */
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #ccc;
      /* border-top: none; */
}

.main-content-area h2,
.main-content-area h3 {
    color: #5b7a9e;
    margin-top: 0.3em;
    margin-bottom: 0.8em;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.article-list {
    background-color: #F9FAFB;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 20px;
}

.article-item {
    padding: 10px 5px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item a {
    color: #333;
    text-decoration: none;
    font-weight: normal;
}

.article-item a:hover {
    color: #5b7a9e;
    text-decoration: underline;
}

.article-date {
    color: #777;
    font-size: 0.8em;
    white-space: nowrap;
}
.warning {
            background-color: #fff3cd;
               /* border: 1px solid #ffeaa7; */
            padding: 5px;
            margin: 15px 0;
            border-radius: 4px;
            border-left: 5px solid #ff0000;
        }
   .highlight {
            background-color: #f0f8ff;
            padding: 5px;
            border-left: 5px solid #3498db;
            margin: 2px 0;
        }
/* Центрирование изображений в анонсах новостей */
.news-excerpt-image {
    text-align: center;
    margin: 0 0 12px 0;
}

.news-excerpt-image img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
/* === Стили для аккордеона программ с гибридным поведением === */
/* === Новая структура категорий === */
.program-category {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fafafa;
}
.category-title {
    padding: 10px 15px;
    font-weight: bold;
}
.category-link {
    color: #2c5aa0;
    text-decoration: none;
    font-size: 1.1rem;
}
.category-link:hover {
    text-decoration: underline;
}
.category-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
}
.category-desc {
/*    color: #666; */
/*     font-size: 0.95rem; */
    flex: 1;
    margin-right: 10px;
}
.toggle-icon {
    color: #5b7a9e;
    cursor: pointer;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: right;
}
.program-list {
    padding: 10px 15px;
    border-top: 1px solid #eee;
}
.program-list.hidden {
    display: none;
}
.program-item {
    padding: 5px 0;
    border-bottom: 1px dashed #f0f0f0;
}
.program-item:last-child {
    border-bottom: none;
}
.no-programs {
    color: #888;
    font-style: italic;
}
/* === Стили для таблицы программ === */
.category-desc {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 15px;
}
.table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}
.programs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.programs-table th,
.programs-table td {
    padding: 5px;
    border: 1px solid #ddd;
    text-align: left;
min-width: 68px;
}
.programs-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}
.program-title {
    margin-bottom: 5px;
}
.program-desc {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.4;
}
.text-center {
    text-align: center;
}
.programs-table a {
    color: #2c5aa0;
    text-decoration: none;
}
.programs-table a:hover {
    text-decoration: underline;
}

        /* Десктоп */
        @media screen and (min-width: 768px) {
            .mobile-header, .mobile-menu { display: none !important; }
            .desktop-menu { display: flex !important; padding-left: 10px; }
            .desktop-menu li {
                position: relative;
                margin-right: 4px;
            }

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
       /*  z-index: 1000; */
}
            .desktop-menu li:last-child { margin-right: 0; }
            .desktop-menu li a, .desktop-menu li .menu-label {
                color: white;
                text-decoration: none;
                padding: 10px 20px;
                display: block;
                font-size: 16px;
                transition: background-color 0.3s ease;
                cursor: pointer;
                white-space: nowrap;
            }
            .desktop-menu li a:hover, .desktop-menu li .menu-label:hover {
                background-color: #4d6786;
            }

            .submenu {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                width: 360px;
                background-color: #F9FAFB;
                padding: 0;
                z-index: 1000;
                box-shadow: 0 2px 6px rgba(0,0,0,0.1);
                border: 1px solid #ccc;
                border-top: none;
            }

            .submenu a {
                color: #333 !important;
                padding: 10px 20px;
                display: block;
                font-weight: normal;
                text-decoration: none;
                border-bottom: 1px solid #eee;
            }

            .submenu a:last-child { border-bottom: none; }
            .submenu a:hover {
                background-color: #EDEFF2;
                border: 1px solid #555;
                margin: 0 -1px;
            }

            .caret {
                margin-left: 8px;
                transition: transform 0.2s ease;
            }
            .menu-label.open .caret {
                transform: rotate(180deg);
            }
        }

/* Мобильные */
@media screen and (max-width: 767px) {
    .desktop-menu { display: none !important; }
  .article-program-grid {
        flex-direction: column;
    }
 .main-content {
        padding-top: 70px;    /* под мобильную шапку */
        padding-bottom: 60px; /* под футер */
    }

    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        background-color: #5b7a9e;
    }

    .mobile-menu {
        display: none;
        list-style: none;
        margin: 0;
        padding: 0;
        background-color: #5b7a9e;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        bottom: 36;
        z-index: 1000;
        overflow-y: auto;
    }

    .mobile-menu.active {
        display: block;
    }

    .mobile-menu li a, .mobile-menu li .menu-label {
        color: white;
        text-align: left;
        padding: 15px 10px;
        font-size: 1.2rem;
        letter-spacing: 0.5px;
        border-bottom: 1px solid #4d6786;
        display: block;
        background-color: transparent;
        text-decoration: none;
    }

    .mobile-menu li a:hover, .mobile-menu li .menu-label:hover {
        background-color: #4d6786;
    }

    .submenu {
        display: none;
        background-color: #F9FAFB;
        padding: 0;
        width: 100%;
        border: 1px solid #ccc;
        border-top: none;
        margin-top: -1px;
    }

    .submenu a {
        color: #333 !important;
        padding: 12px 20px 12px 40px;
        font-size: 1rem;
        text-transform: none;
        letter-spacing: 0;
        border-bottom: 1px solid #eee;
    }

    .submenu a:last-child { border-bottom: none; }
    .submenu a:hover {
        background-color: #EDEFF2;
        border: 1px solid #555 !important;
        margin: 0 -1px;
    }

    .caret {
        float: right;
        margin: 0;
        transition: transform 0.2s ease;
    }

    .menu-label.open .caret {
        transform: rotate(180deg);
    }
 /* Уменьшаем ширину ВСЕХ изображений в .main-content-area на мобильных */
    .main-content-area img {
         width: 100%; /* Например, 95% ширины контейнера */
         max-width: 100%; /* Альтернатива */
         margin: 0 auto; /* Центрируем */
         height: auto; /* Сохраняем пропорции */
    }

}
/* Футер */
/* === Футер — прилипает к низу окна === */
.footer {
    background-color: #5b7a9e;
/*  background-image: url('image.jpg'); */
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 999;
}

.footer a {
    color: white;
    text-decoration: underline;
}

.footer a:hover {
    color: #e0e0e0;
}
/* === Карта сайта === */
.sitemap-list {
    list-style: none;
    padding-left: 0;
}
.sitemap-list ul {
    list-style: none;
    padding-left: 20px;
    margin: 8px 0;
}
.sitemap-list li {
    margin: 6px 0;
}
.sitemap-list a {
    color: #2c5aa0;
    text-decoration: none;
}
.sitemap-list a:hover {
    text-decoration: underline;
}
/* === Элементы карты сайта — статьи и новости === */
.sitemap-item {
    background-color: #F9FAFB;
    border: 1px solid #ccc;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
}
.sitemap-item a {
    color: #333;
    text-decoration: none;
    display: block;
}
.sitemap-item a:hover {
    color: #5b7a9e;
    text-decoration: underline;
}
/* === Плитка заголовка для pr_veiw.php === */
.page-header-tile {
    background-color: #5b7a9e;
    color: white;
    padding: 10px;
    display: flex;
    align-items: flex-start;
    gap: 50px;
    width: 100%;
}
.page-header-icon {
    max-width: 70%;
    max-height: 140px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.page-header-text h1 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: bold;
}
.page-header-text p {
    margin: 0;
    font-size: 1.05rem;
    opacity: 0.95;
}
@media (max-width: 767px) {
    .page-header-tile {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .page-header-icon {
       height: 55px;
    }
    .page-header-text h1 {
        font-size: 1.5rem;
    }
}