/* === ОБЩИЕ СТИЛИ === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
textarea {
    border-radius: 12px;                /* было 8px */
}

body {
    font-family: 'Geologica', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    color: #0077cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ШАПКА САЙТА */
header {
    background: hsl(0deg 0% 9.02%);   /* почти чёрный */
    color: white;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 a {
    color: white;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: #ccc;
    transition: color 0.2s ease;
}

nav a:hover {
    color: white;
}

/* ОСНОВНОЙ КОНТЕНТ */
.main-grid {
    display: flex;
    gap: 1rem;                    /* уменьшено по прошлым правкам */
    margin-top: 0.5rem;           /* расстояние между header и основным блоком */
}

/* Боковые панели */
.sidebar {
    flex: 0 0 250px;
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: border-radius 0.2s ease;
}

.sidebar h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
   // border-bottom: 2px solid hsl(72.26, 100%, 46.08%);
    padding-bottom: 0.3rem;
}

/* Центральная колонка */
.content {
    flex: 1;
    min-width: 0;
}

/* Карточка новости */
.full-news {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 1.2rem;
    overflow: hidden;               /* обрезает шапку по краям */
}

/* Шапка новости (зелёная полоса) */
.full-news h2 {
    margin: -1.5rem -1.5rem 0.75rem -1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: hsl(72.26, 100%, 46.08%);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1.2rem;
    line-height: 1.4;
    color: #000;                   /* на случай, если внутри только текст */
}

.full-news h2 a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

.full-news h2 .date {
    color: #000;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Контент новости */
.news-content {
    line-height: 1.8;
}

.news-content img {
    margin: 1rem 0;
    border-radius: 8px;
}

/* Вложения */
.attachments {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #ccc;
}

.attachments ul {
    list-style: none;
    padding-left: 0;
}

.attachments li {
    padding: 0.3rem 0;
}

.attachments a::before {
    content: "📎 ";
}

/* ФОРМА ОБРАТНОЙ СВЯЗИ */
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 12px;                /* увеличено */
    font-size: 0.9rem;
    font-family: inherit;
}

.feedback-form input::placeholder,
.feedback-form textarea::placeholder {
    color: #aaa;
    opacity: 1;
}

.feedback-form button {
    width: 100%;                        /* во всю ширину колонки */
    padding: 0.8rem 1.5rem;             /* выше */
    background: hsl(72.26, 100%, 46.08%);
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s ease;
    font-size: 1rem;                    /* для читаемости */
}

.feedback-form button:hover {
    background: hsl(72.26, 100%, 40%);
}

.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    margin-top: 1rem;
    border-radius: 8px;
}

/* СПИСОК СОТРУДНИКОВ */
.employee-list {
    list-style: none;
    padding: 0;
}

.employee-list li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.employee-list li .position {
    color: #777;
    font-size: 0.85rem;
}

/* ПОДВАЛ (скрыт) */
footer {
    display: none !important;
}
.mobile-only {
    display: none;
}
/* Гамбургер-иконка и чекбокс по умолчанию скрыты */
.menu-toggle {
    display: none;
}
.menu-icon {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: white;
    user-select: none;
}

/* Ссылки, которые видны только в мобильной версии */
.hide-desktop {
    display: none;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    /* Показываем гамбургер */
    .menu-icon {
        display: block;
    }

    /* Скрываем основное меню по умолчанию */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;            /* сразу под хедером */
        left: 0;
        width: 100%;
        background: hsl(0deg 0% 9.02%);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
        z-index: 100;
    }

    /* Показываем меню, когда чекбокс включён */
    .menu-toggle:checked ~ .main-nav {
        display: flex;
    }

    /* Возвращаем видимость ссылкам, скрытым на десктопе */
    .hide-desktop {
        display: block;
    }

    /* Контейнер хедера должен быть относительным для позиционирования меню */
    header .container {
        position: relative;
    }

    /* Распределяем логотип и гамбургер по краям */
    header .container {
        justify-content: space-between;
    }

    /* Мобильная сетка main-grid (уже было) */
    .main-grid {
        flex-direction: column;
    }
    .sidebar {
        display: none;
    }
}

/* ========== АДМИН-ПАНЕЛЬ ========== */
.admin-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
}

.admin-nav .container {
    display: flex;
    gap: 2rem;
}

.admin-nav a {
    color: #333;
    font-weight: 500;
}

.admin-nav a:hover {
    color: hsl(72.26, 100%, 46.08%);
    text-decoration: none;
}

/* Кнопки в админке */
.btn {
    display: inline-block;
    background: hsl(72.26, 100%, 46.08%);
    color: #000;                  /* чёрный текст */
    padding: 0.5rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    margin-right: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s ease;
}

.btn:hover {
    background: hsl(72.26, 100%, 40%);
}

.btn.logout {
    background: #cc4444;
    color: white;                 /* для logout оставим белый, или тоже чёрный? По желанию */
    border-radius: 12px;
}

.btn.logout:hover {
    background: #aa3333;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f0f2f5;
}

.status {
    font-weight: bold;
    font-size: 0.85rem;
}

.status.active { color: #155724; }
.status.inactive { color: #721c24; }

.actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(72.26, 100%, 46.08%);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.actions button:hover {
    color: hsl(72.26, 100%, 35%);
}

/* Формы в админке */
.news-form label {
    display: block;
    margin: 1rem 0 0.3rem;
}

.news-form input[type="text"],
.news-form textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
}

.news-form input::placeholder,
.news-form textarea::placeholder {
    color: #aaa;
    opacity: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.form-actions {
    margin-top: 1.5rem;
}

.form-actions button {
    background: hsl(72.26, 100%, 46.08%);
    color: #000;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s ease;
}

.form-actions button:hover {
    background: hsl(72.26, 100%, 40%);
}

.form-actions a {
    margin-left: 1rem;
    color: #666;
    font-family: inherit;
}

.hint {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* Логин */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 320px;
}

.login-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-form label {
    display: block;
    margin-bottom: 1rem;
    font-family: inherit;
}

.login-form input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: inherit;
}

.login-form input::placeholder {
    color: #aaa;
    opacity: 1;
}

.error {
    color: #cc0000;
    margin-bottom: 1rem;
    text-align: center;
}