/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
    --primary-color: #3498db;
    --primary-rgb: 52, 152, 219;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #2c3e50;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

/* ========== БАЗОВЫЙ СБРОС ========== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== ОБЩИЕ АНИМАЦИИ ========== */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shrink {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes squareClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes imageFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ========== ОБЩИЕ КЛАССЫ ========== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e0e0e0 20%, #d0d0d0 50%, #e0e0e0 80%, transparent 100%);
    margin: 4rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.cursor-pointer { cursor: pointer !important; }

/* Прижимаем футер */
#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

.site-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

body:has(.no-content) #content {
    min-height: 60vh;
}

#wpadminbar {
    position: fixed !important;
}
/* ========== УВЕДОМЛЕНИЯ ========== */
.redirect-notice {
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    animation: slideDown 0.5s ease;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    color: #333;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.redirect-notice h3 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 600;
    color: inherit;
}

.redirect-notice p {
    font-size: 18px;
    margin-bottom: 20px;
}

.redirect-notice .countdown {
    font-size: 56px;
    font-weight: bold;
    margin: 25px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: inherit;
    animation: pulse 1s infinite;
}

.redirect-notice .progress {
    height: 15px;
    margin: 25px 0;
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(255,255,255,0.3);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.redirect-notice .progress-bar {
    background: linear-gradient(90deg, #fff, #f0f0f0);
    width: 100%;
    height: 100%;
    animation: shrink 1.5s linear forwards;
}

.redirect-notice .btn-group-custom {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.redirect-notice .btn-group-custom .btn {
    min-width: 220px;
    padding: 12px 25px;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 16px;
}

.redirect-notice .btn-group-custom .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Модификаторы */
.redirect-notice--success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #155724;
}

.redirect-notice--primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.redirect-notice--warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #333;
}

.redirect-notice--info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.redirect-notice--dynamic {
    background: linear-gradient(135deg, var(--notice-start, #667eea), var(--notice-end, #764ba2));
    color: var(--notice-text, white);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Уведомления для ошибок/предупреждений (отдельно) */
.error-container, .warning-container {
    padding: 40px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    animation: slideIn 0.5s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.error-container {
    border: 2px solid var(--danger-color);
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.warning-container {
    border: 2px solid var(--warning-color);
    background: linear-gradient(135deg, #fff3cd, #ffecb5);
    color: #856404;
}

.error-container h2, .warning-container h2 {
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: bold;
}
/* ========== КНОПКИ ========== */
.btn {
    border-radius: 8px;
    padding: 12px 25px;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1,1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% { transform: scale(0,0); opacity: 0.5; }
    20% { transform: scale(25,25); opacity: 0.3; }
    100% { opacity: 0; transform: scale(40,40); }
}

/* Цветовые варианты */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 5px 15px rgba(40,167,69,0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 5px 15px rgba(243,156,18,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.btn-light {
    background: white;
    color: var(--primary-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-xs, .btn-group-xs .btn {
    font-size: 11px;
    padding: 2px 6px;
    min-width: 28px;
    height: 28px;
}

/* Группы кнопок */
.btn-group .btn {
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.375rem !important;
    margin: 0 2px;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}

/* ========== ФОРМЫ ========== */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 16px;
}

.form-label i {
    color: var(--primary-color);
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(40,167,69,0.25);
    transform: translateY(-2px);
}

.form-control-color {
    width: 100%;
    height: 45px;
    padding: 5px;
}

.form-text {
    font-size: 0.875em;
    color: #6c757d;
}

/* WordPress редактор */
.wp-editor-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ced4da !important;
}

.wp-editor-container:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(40,167,69,0.25);
    border-color: var(--success-color) !important;
}

.mce-toolbar-grp {
    background-color: var(--light-bg) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.mce-btn.mce-active {
    background-color: #e9ecef !important;
    border-color: var(--border-color) !important;
}

.title-editor {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#title_ifr {
    min-height: 150px !important;
    height: 150px !important;
}

#content_ifr {
    min-height: 500px !important;
}

/* Предпросмотр */
.slug-preview, .slug-info {
    background-color: var(--light-bg);
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid var(--success-color);
    margin-top: 5px;
    font-family: monospace;
}

/* Валидация */
.validation-error {
    border-color: var(--danger-color) !important;
}

.validation-error:focus {
    box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.25) !important;
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 5px;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #0d6efd;
    padding: 12px 16px;
    border-radius: 6px;
}
.page-info {
    background-color: rgba(var(--primary-rgb), 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

/* ========== КАРТОЧКИ ========== */
.card {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: 15px;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    font-weight: 500;
}

.card-body {
    padding: 1.5rem;
}
@media (max-width: 768px) {
    .card-body { padding: 1rem; }
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(145deg, var(--light-bg), #e9ecef);
    border-radius: 12px;
    margin: 20px 0;
}

.empty-state i {
    font-size: 5em;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}
/* ========== ФУТЕР ========== */
.footer-useful-add {
    min-width: 150px;
    cursor: pointer;
    transition: 0.2s;
}

.footer-useful-add:hover {
    transform: scale(1.05);
}
.footer-org-title {
    color: white;
    font-weight: 800;
    margin-bottom: 12px;
}


.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    height: 96px;
    width: auto;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.footer-title {
    font-weight: bold;
    color: white;
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

/* Адаптивность футера */
@media (max-width: 1200px) {
    .footer-logo-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-logo {
        height: 80px;
    }
    .footer-title {
        font-size: 1.1rem;
        text-align: left;
    }
}

@media (max-width: 991px) {
    .footer-logo-block {
        flex-direction: column !important;
        text-align: center;
    }
    .footer-logo {
        margin-right: 0 !important;
        margin-bottom: 15px;
        height: 80px !important;
    }
    .footer-org-title {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 768px) {
    .footer-logo-wrapper {
        align-items: center;
    }
    .footer-logo {
        height: 70px;
    }
    .footer-title {
        font-size: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-logo {
        height: 60px;
    }
    .footer-title {
        font-size: 0.9rem;
    }
}

/* ========== ПОЛЕЗНАЯ ИНФОРМАЦИЯ (КАРУСЕЛЬ В ФУТЕРЕ) ========== */
.footer-useful-section {
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    position: relative;
}

/* ========== ПОЛЕЗНАЯ ИНФОРМАЦИЯ (КАРУСЕЛЬ) ========== */

.footer-useful-carousel {
    padding: 0 50px;
    position: relative;
}

.footer-useful-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow: hidden;
    gap: 1rem;
    padding: 10px 0;
    scroll-behavior: smooth;
}

/* Сама карточка */
.footer-useful-item {
    flex: 0 0 280px; /* Ширина карточки */
    height: 170px; /* Высота карточки */
    background: transparent; /* Убираем белый фон */
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: none; /* Убираем рамку */
}

.footer-useful-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Контейнер для картинки */
.footer-useful-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Сама картинка */
.footer-useful-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка заполняет весь блок, обрезая лишнее */
    display: block;
    transition: transform 0.3s ease;
}

.footer-useful-item:hover .footer-useful-image img {
    transform: scale(1.05);
}


.footer-useful-no-image {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-useful-no-image i {
    font-size: 2rem;
    color: white;
    opacity: 0.9;
}

/* Стрелки карусели (как в Bootstrap) */
.footer-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    opacity: 0.7;
}

.footer-carousel-control:hover {
    background: rgba(0,0,0,0.6);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.footer-carousel-control.prev {
    left: 5px;
}

.footer-carousel-control.next {
    right: 5px;
}

.carousel-control-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    filter: invert(1);
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Адаптив карусели */
/* Адаптив для телефонов */
@media (max-width: 768px) {
    .footer-useful-carousel {
        padding: 0 35px;
    }
    .footer-useful-item {
        flex: 0 0 200px; 
        height: 130px; 
    }
}
/* ========== КВАДРАТНЫЕ БЛОКИ ========== */
.square-block-wrapper {
    position: relative;
}

.square-col {
    transition: var(--transition-fast);
}

.square-block {
    display: block;
    width: 100%;
    height: 250px;
    border-radius: 15px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
    border: 3px solid transparent;
}

.square-block:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.4);
}

.square-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(0,0,0,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.square-block:hover::before {
    opacity: 1;
}

.square-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 25px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.square-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
    line-height: 1.4;
    word-wrap: break-word;
}

.square-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.square-click-animation {
    animation: squareClick 0.2s ease-out;
}

/* Админские контролы для квадратов */
.square-admin-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.square-block-wrapper:hover .square-admin-controls,
.square-admin-controls.visible {
    opacity: 1;
}

.square-admin-controls .btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.square-admin-controls .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Пустое состояние для квадратов */
.squares-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
}

/* Размеры квадратов в зависимости от экрана */
@media (min-width: 1200px) {
    .col-xl-3 .square-block { height: 280px; }
    .square-title { font-size: 1.5rem; }
}
@media (min-width: 992px) {
    .col-lg-3 .square-block { height: 260px; }
    .square-title { font-size: 1.4rem; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .col-md-6 .square-block { height: 240px; }
    .square-title { font-size: 1.3rem; }
}
@media (min-width: 576px) and (max-width: 767px) {
    .col-sm-6 .square-block { height: 220px; }
    .square-title { font-size: 1.2rem; }
}
@media (max-width: 575px) {
    .col-sm-6 .square-block { height: 200px; }
    .square-title { font-size: 1.1rem; }
}


/* Кнопка "Показать все" */
.show-all-squares-btn {
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    transition: var(--transition-fast);
}
.show-all-squares-btn:hover,
.show-all-squares-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

/* ========== СТРАНИЦА КВАДРАТА ========== */
.square-page-container {
    padding: 2rem 0;
    background: var(--light-bg);
    min-height: 80vh;
}

.page-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.breadcrumb-link {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb-link:hover {
    color: var(--primary-color);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #6c757d;
}

.page-content-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

.page-content {
    padding: 3rem;
    font-size: 1.1rem;
    line-height: 1.75;
    color: #495057;
}

.page-content h2 {
    color: #212529;
    font-size: 1.8rem;
    margin: 2.5rem 0 1.25rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 1.5rem 0;
}

.page-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-content th {
    background: var(--light-bg);
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-content td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .page-content {
        padding: 2rem 1.5rem;
    }
    .page-title {
        font-size: 2rem;
    }
}
/* ========== НОВОСТИ ========== */
.news-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Куб последней новости */
.latest-news-cube {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transition: var(--transition);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    min-height: 320px;
}

.latest-news-cube:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}

.latest-news-cube .latest-news-full-photo {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: 1;
}

.latest-news-cube img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.latest-news-cube:hover img {
    transform: scale(1.08);
    filter: brightness(0.7);
}

.latest-news-cube .card-body {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 14px;
    color: white;
    background: linear-gradient(transparent, rgba(0,0,0,0.9) 45%);
    z-index: 3;
}

.latest-news-cube .card-body h3 a,
.latest-news-cube .card-body .text-white {
    color: white !important;
}

/* Квадратные превью справа */
.news-side-logo-square {
    width: 100%;
    margin-bottom: 0.75rem;
}

.news-side-logo-square__wrap {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.news-side-logo-square__wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Список новостей со скроллом */
.news-scroll {
    max-height: 360px;
    overflow-y: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: #adb5bd transparent;
}

.news-scroll::-webkit-scrollbar {
    width: 6px;
}
.news-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.news-scroll::-webkit-scrollbar-thumb {
    background: #b8b8b8;
    border-radius: 4px;
}

.news-item {
    position: relative;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: var(--transition-fast);
}

.news-item:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

/* Админские кнопки в новостях */
.admin-buttons {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 9;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.news-item:hover .admin-buttons,
.square-block-wrapper:hover .admin-buttons,
.useful-info-card:hover .admin-buttons {
    opacity: 1;
}

/* Полноэкранная новость */
.news-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.news-meta {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.news-meta i {
    margin-right: 5px;
}

.news-meta span {
    margin-right: 15px;
}

.news-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.news-logo img {
    max-height: 400px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.news-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.news-content:after {
    content: "";
    display: table;
    clear: both;
}

/* Изображения внутри контента */
.news-content img,
.content-area img,
.editable-content img,
.page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px auto;
    border-radius: 0px;
    box-shadow: 0 0px 0px rgba(0,0,0,0.1);
    transition: var(--transition-fast);
    animation: imageFadeIn 0.5s ease;
}

/* Выравнивание изображений */
.news-content .alignleft,
.content-area .alignleft {
    float: left;
    margin: 0 20px 20px 0 !important;
    max-width: 50%;
}

.news-content .alignright,
.content-area .alignright {
    float: right;
    margin: 0 0 20px 20px !important;
    max-width: 50%;
}

.news-content .aligncenter,
.content-area .aligncenter {
    display: block;
    margin: 20px auto !important;
    clear: both;
}

/* Подписи к изображениям */
.news-content .wp-caption,
.content-area .wp-caption {
    max-width: 100%;
    padding: 5px;
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 1.5em;
}

.news-content .wp-caption-text,
.content-area .wp-caption-text {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    margin: 5px 0 0;
    font-style: italic;
}

/* Галереи */
.news-content .gallery,
.content-area .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0 !important;
}

.news-content .gallery-item,
.content-area .gallery-item {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
}

.news-content .gallery-item img,
.content-area .gallery-item img {
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========== ПОЛЕЗНАЯ ИНФОРМАЦИЯ (СЕТКА) ========== */
.useful-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.useful-info-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition-fast);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.useful-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.useful-info-image {
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.useful-info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.useful-info-card:hover .useful-info-image img {
    transform: scale(1.05);
}

.useful-info-no-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.useful-info-no-image i {
    font-size: 48px;
    color: white;
    opacity: 0.7;
}

.useful-info-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.useful-info-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.useful-info-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.useful-info-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    align-self: flex-start;
}

.useful-info-link:hover {
    background: #2980b9;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(52,152,219,0.3);
}

/* Админские кнопки на карточках */
.useful-info-admin-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.useful-info-card {
    position: relative;
}

/* ========== СТИЛИ ДЛЯ ИЗОБРАЖЕНИЙ (ОБЩЕЕ) ========== */
img {
    max-width: 100%;
    height: auto;
}

#news_logo_preview,
#preview-image,
#preview-styled-image,
#logo_useful,
#preview-img {
    transition: var(--transition-fast);
    max-width: 200px;
    max-height: 140px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#preview-image:hover,
#logo_useful:hover,
#preview-img:hover {
    transform: scale(1.05);
}

#newslogo {
    max-height: 400px;
    object-fit: cover;
}

#img_slider {
    height: 60px;
}

#logoz-staff {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

/* Модальное окно для изображений */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal-caption {
    color: white;
    padding: 10px 0;
    text-align: center;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: color 0.3s;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.modal-nav.prev { left: 20px; }
.modal-nav.next { right: 20px; }

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

.image-zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-wrapper:hover .image-zoom-hint {
    opacity: 1;
}

@media (max-width: 768px) {
    .modal-nav {
        font-size: 30px;
        padding: 15px;
    }
    .close-modal {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
}

/* ========== ТАБЛИЦЫ И СКРОЛЛ НА МОБИЛЬНЫХ ========== */
.content-area table,
.news-content table,
.square-page-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.content-area th,
.news-content th,
.square-page-content th {
    background: var(--light-bg);
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    font-weight: 600;
}

.content-area td,
.news-content td,
.square-page-content td {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
}

@media (max-width: 991px) {
    .content-area table,
    .news-content table,
    .square-page-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .content-area table::-webkit-scrollbar,
    .news-content table::-webkit-scrollbar,
    .square-page-content table::-webkit-scrollbar {
        height: 8px;
    }
    
    .content-area table::-webkit-scrollbar-track,
    .news-content table::-webkit-scrollbar-track,
    .square-page-content table::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .content-area table::-webkit-scrollbar-thumb,
    .news-content table::-webkit-scrollbar-thumb,
    .square-page-content table::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }
    
    .content-area table::-webkit-scrollbar-thumb:hover,
    .news-content table::-webkit-scrollbar-thumb:hover,
    .square-page-content table::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
    
    .content-area img,
    .news-content img,
    .square-page-content img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 576px) {
    .content-area th,
    .content-area td,
    .news-content th,
    .news-content td,
    .square-page-content th,
    .square-page-content td {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}

.scroll-hint {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 5px 0;
    padding: 3px;
    background: var(--light-bg);
    border-radius: 4px;
}
/* ========== DROPDOWN-МЕНЮ ========== */
/* Все меню скрыты по умолчанию */
.dropdown-menu-wrap,
.other-dropdown-menu,
.dropdown-menu-columns,
.other-dropdown-columns {
    min-width: 280px;
    max-width: 600px;
    padding: 0.5rem;
    right: 0 !important;
    left: auto !important;
    display: none !important;
    margin-top: 0;
    position: absolute;
    z-index: 1000;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow-y: visible;
    overflow-x: hidden;
    max-height: none;
}

/* Показываем при активном классе */
.click-dropdown.active > .dropdown-menu-wrap,
.click-dropdown.active > .other-dropdown-menu,
.click-dropdown.active > .dropdown-menu-columns,
.click-dropdown.active > .other-dropdown-columns {
    display: block !important;
}

/* Две колонки для подчинённых (более 12) */
.dropdown-menu-columns,
.other-dropdown-columns {
    width: 600px !important;
    max-width: 600px !important;
    display: none !important;
    flex-wrap: wrap !important;
    padding: 15px !important;
    gap: 10px;
}

.click-dropdown.active > .dropdown-menu-columns,
.click-dropdown.active > .other-dropdown-columns {
    display: flex !important;
}

.dropdown-menu-columns > li,
.other-dropdown-columns > li {
    flex: 0 0 calc(50% - 5px) !important;
    list-style: none;
}

.dropdown-menu-columns > li.full-width,
.other-dropdown-columns > li.full-width,
.dropdown-menu-columns .add-item-fullwidth,
.other-dropdown-columns .add-item-fullwidth {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 10px;
}

.dropdown-menu-columns .dropdown-divider,
.other-dropdown-columns .dropdown-divider {
    flex: 0 0 100% !important;
    margin: 10px 0 !important;
}

/* Элементы меню */
.dropdown-item-wrap {
    white-space: normal !important;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
    padding: 8px 15px !important;
    display: block;
    border-radius: 6px;
    transition: var(--transition-fast);
    color: var(--dark-color) !important;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
}

.dropdown-item-wrap:hover {
    background-color: rgba(36, 75, 43, 0.1) !important;
    padding-left: 12px !important;
    padding-right: 18px !important;
    transform: translateX(-2px);
    color: var(--primary-color) !important;
}

.dropdown-menu-columns .dropdown-item-wrap,
.other-dropdown-columns .dropdown-item-wrap {
    padding: 10px 12px !important;
   
    height: 100%;
}

.dropdown-menu-columns .dropdown-item-wrap:hover,
.other-dropdown-columns .dropdown-item-wrap:hover {
    background-color: #e9ecef !important;
    transform: translateY(-2px) translateX(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Стрелка */
.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    transition: transform 0.2s ease;
}

.click-dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Скрытые разделы в меню */
.other-dropdown-menu .dropdown-item-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
}

.other-dropdown-menu .hidden-badge,
.hidden-badge {
    background-color: var(--warning-color);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

/* Скролл для меню на планшетах/телефонах */
@media (max-width: 991.98px) {
    .click-dropdown.active .dropdown-menu-wrap,
    .click-dropdown.active .dropdown-menu-columns,
    .click-dropdown.active .other-dropdown-menu,
    .click-dropdown.active .other-dropdown-columns {
        max-height: 350px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        display: block !important;
    }
    
    .click-dropdown.active .dropdown-menu-wrap::-webkit-scrollbar,
    .click-dropdown.active .dropdown-menu-columns::-webkit-scrollbar,
    .click-dropdown.active .other-dropdown-menu::-webkit-scrollbar,
    .click-dropdown.active .other-dropdown-columns::-webkit-scrollbar {
        width: 6px;
    }
    
    .click-dropdown.active .dropdown-menu-wrap::-webkit-scrollbar-track,
    .click-dropdown.active .dropdown-menu-columns::-webkit-scrollbar-track,
    .click-dropdown.active .other-dropdown-menu::-webkit-scrollbar-track,
    .click-dropdown.active .other-dropdown-columns::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .click-dropdown.active .dropdown-menu-wrap::-webkit-scrollbar-thumb,
    .click-dropdown.active .dropdown-menu-columns::-webkit-scrollbar-thumb,
    .click-dropdown.active .other-dropdown-menu::-webkit-scrollbar-thumb,
    .click-dropdown.active .other-dropdown-columns::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }
    
    .click-dropdown.active .dropdown-menu-wrap::-webkit-scrollbar-thumb:hover,
    .click-dropdown.active .dropdown-menu-columns::-webkit-scrollbar-thumb:hover,
    .click-dropdown.active .other-dropdown-menu::-webkit-scrollbar-thumb:hover,
    .click-dropdown.active .other-dropdown-columns::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

@media (max-width: 576px) {
    .click-dropdown.active .dropdown-menu-wrap,
    .click-dropdown.active .dropdown-menu-columns,
    .click-dropdown.active .other-dropdown-menu,
    .click-dropdown.active .other-dropdown-columns {
        max-height: 250px !important;
    }
}

/* Отключаем две колонки на мобильных */
@media (max-width: 991.98px) {

    .other-dropdown-columns {
       
        max-width: 100% !important;
        flex-direction: column !important;
    }
    
    .dropdown-menu-columns > li,
    .other-dropdown-columns > li {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 767.98px) {
    .dropdown-menu-wrap,
    .other-dropdown-menu,
    .dropdown-menu-columns,
    .other-dropdown-columns {
        width: 100% !important;
        max-width: 100% !important;
        right: 0 !important;
        left: 0 !important;
        position: relative !important;
        margin-top: 10px !important;
    }
}



/* Зеленые кнопки "Добавить" */
.dropdown-item.text-success {
    color: #27ae60 !important;
}
.dropdown-item.text-success:hover {
    color: #ffffff !important;
    background-color: #27ae60 !important;
}

/* ========== НАВИГАЦИЯ ПО СТРАНИЦАМ ========== */
.page-navigation {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
    }
}

/* Хлебные крошки */
.breadcrumb-link {
    color: #495057;
    text-decoration: none;
}
.breadcrumb-link:hover {
    color: var(--primary-color);
}
.breadcrumb-separator {
    color: #dee2e6;
}
/* ========== АДМИН ПАНЕЛЬ ========== */
.admin-useful-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border: none;
    border-radius: 12px 12px 4px 4px;
    color: white;
    font-size: 1.2rem;
    z-index: 100000;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(52,152,219,0.4);
    transition: var(--transition);
}

.admin-useful-toggle:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.admin-useful-edit {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 99999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.admin-useful-edit.show {
    transform: translateX(0);
}

.admin-useful-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.admin-useful-item-list {
    padding: 1rem 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.useful-admin-item {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--light-bg);
    transition: var(--transition-fast);
}

.useful-admin-item:hover {
    background: #e3f2fd;
    transform: translateX(4px);
}

/* Кнопки админа на блоках */
.position-absolute.top-2.end-2,
.position-absolute.top-0.end-0 {
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    padding: 2px;
    z-index: 10;
}

/* Стили для порталов */
.portal__item {
    position: relative !important;
}
.edit-portal-btn {
    font-size: 12px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    min-width: 32px;
    height: 32px;
}
.edit-portal-btn:hover {
    transform: scale(1.05);
}

/* ========== СОТРУДНИКИ (STAFF) ========== */
.staff-edit-card {
    border-radius: 15px;
    border: none;
    animation: staffEditFadeIn 0.5s ease;
}

@keyframes staffEditFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.staff-edit-table td {
    vertical-align: middle;
}

.staff-edit-table .btn-sm {
    padding: 0.25rem 0.5rem;
    margin: 0 2px;
}

.staff-edit-preview {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: var(--transition-fast);
}

.staff-edit-preview:hover {
    transform: scale(1.05);
}

.staff-edit-upload-block {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--light-bg);
}

.staff-edit-order-input {
    width: 70px;
}

.staff-edit-action-btn {
    padding: 0.25rem 0.5rem;
    margin: 0 2px;
    text-decoration: none;
    display: inline-block;
    border-radius: 0.25rem;
    transition: var(--transition-fast);
}

.staff-edit-action-btn.edit {
    background-color: var(--primary-color);
    color: white;
}
.staff-edit-action-btn.delete {
    background-color: var(--danger-color);
    color: white;
}
.staff-edit-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#logo_div {
    width: 50px; height: 50px; border-radius: 5px;
}

/* ========== СКРЫТЫЕ РАЗДЕЛЫ ========== */
.hidden-sections-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
}

.section-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.section-header {
    background: var(--light-bg);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hidden-badge-large {
    background-color: var(--warning-color);
    color: #000;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.section-body {
    padding: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #666;
}

.info-item i {
    color: var(--primary-color);
    width: 20px;
    margin-top: 3px;
}

.info-item strong {
    color: #333;
    min-width: 100px;
}

.section-preview {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.95em;
    border: 1px solid var(--border-color);
}

/* Кнопки действий в скрытых разделах */
.btn-action {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}
.btn-show { background-color: var(--success-color); color: white; }
.btn-hide { background-color: var(--warning-color); color: #000; }
.btn-edit { background-color: var(--primary-color); color: white; }
.btn-delete { background-color: var(--danger-color); color: white; }
.btn-copy { background-color: #6c757d; color: white; }

.btn-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.quick-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    .action-buttons,
    .quick-actions {
        flex-direction: column;
    }
    .btn-action {
        width: 100%;
        justify-content: center;
    }
}
/* ========== ОРГАНИЗАЦИИ (FEATURED CARDS) ========== */
.featured-cards-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    justify-content: center;
    width: 100%;
    position: relative;
}

.featured-card-wrapper {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

.featured-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: white;
    border-radius: 24px;
    padding: 18px 18px 18px 16px;
    box-shadow: 0 15px 30px -12px rgba(0,20,40,0.2);
    transition: var(--transition-fast);
    border: 1px solid rgba(0,0,0,0.02);
    gap: 14px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.featured-card-link {
    cursor: pointer;
}

.featured-card-link:hover,
.featured-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 25px 40px -15px #1a4f8b;
    border-color: #b6d0f0;
}

.featured-card-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: linear-gradient(135deg, #d9e2ef, #cbd5e6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 15px -8px rgba(0,0,0,0.3);
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.featured-card-image .no-image {
    font-size: 24px;
    color: #999;
}

.featured-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.featured-card-title {
    font-size: 1.28rem;
    font-weight: 650;
    line-height: 1.4;
    color: #0b1f33;
    letter-spacing: -0.02em;
    white-space: normal;
    word-wrap: break-word;
    width: 100%;
}

.featured-card-title p {
    margin: 0;
}

/* Кнопки админа для организаций */
.organization-admin-buttons {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 20;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.featured-card-wrapper:hover .organization-admin-buttons {
    opacity: 1;
}

.organization-admin-buttons .btn {
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    border-radius: 12px;
}
.organization-admin-buttons .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
}
.organization-admin-buttons .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}


.btn-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: var(--transition-fast);
    border: 2px solid white;
}

.btn-edit {
    background-color: var(--warning-color);
    color: #000;
}
.btn-delete {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-admin:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Адаптивность */
@media screen and (max-width: 1000px) {
    .featured-cards-row {
        flex-wrap: wrap;
    }
    .featured-card-wrapper {
        flex: 0 1 calc(50% - 12px);
    }
}

@media screen and (max-width: 600px) {
    .featured-card-wrapper {
        flex: 0 1 100%;
    }
    .organization-admin-buttons {
        opacity: 0.8;
    }
    .btn-admin {
        width: 35px; height: 35px; font-size: 18px;
    }
    .featured-card-image {
        width: 60px; height: 60px;
    }
    .featured-card-title {
        font-size: 1.1rem;
    }
}
/* Адаптив: на мобильных кнопки видны всегда (не только при ховере) */
@media (max-width: 768px) {
    .organization-admin-buttons {
        opacity: 1;
        top: 5px;
        right: 5px;
        padding: 2px 4px;
    }
}
/* ========== ПРОЧИЕ УТИЛИТЫ ========== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.line-clamp-2, .line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

.rounded-4 {
    border-radius: 1rem !important;
}

.bi-instagram {
    font-size: 1.2rem;
}

#ne-znayu-kak-nazvat2 {
    width:100%; height:100%; background:linear-gradient(135deg, #0d6efd 0%, #6610f2 100%); 
    display:flex; align-items:center; justify-content:center; color:white; font-weight:700; font-size:14px;
}

#ne-znayu-kak-nazvat1 {
    width:100%; height:114px; background:var(--light-bg);
}

#image-preview,
#predprosmotr {
    display: none;
}

#color {
    height: 45px;
}

#progress-bar {
    width: 100%;
}

#deletepost {
    display: inline;
}

/* ========== О СТРАНИЦЕ (ABOUT) ========== */
.about-company-logo {
    max-width: 200px;
    margin-bottom: 1rem;
}

/* Директор - адаптивное фото */
.about-company-director-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    max-width: 400px;
    margin: 0 auto;
}

/* Сотрудники - адаптивное фото */
.about-company-staff-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    max-width: 400px;
    margin: 0 auto;
}

/* Для карточек, чтобы изображение не выходило за пределы */
.card .about-company-director-img,
.card .about-company-staff-img {
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

/* ========== ОБЩИЕ МЕДИА-ЗАПРОСЫ ========== */
@media (max-width: 992px) {
    .section-divider {
        margin: 2.5rem 0;
    }
    .section-divider::before {
        width: 40px;
    }
    .useful-info-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .news-wrapper {
        grid-template-columns: 1fr;
        max-width: 700px;
    }
    .latest-news-cube {
        max-width: 500px;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 768px) {
    .section-divider {
        margin: 2rem 0;
    }
    .useful-info-grid {
        grid-template-columns: 1fr;
    }
    .news-wrapper {
        padding: 0 10px;
    }
    .latest-news-cube {
        min-height: 260px;
    }
    .btn-group-custom .btn {
        min-width: 100%;
    }
    .countdown {
        font-size: 40px;
    }
    .redirect-notice {
        padding: 25px;
    }
    .page-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .btn-success {
        width: 100%;
    }
    .news-wrapper {
        padding: 0 8px;
    }
    .latest-news-cube {
        aspect-ratio: 1/1;
        min-height: 200px;
    }
    .card-body h5 {
        font-size: 1rem;
    }
}

@media (min-width: 1400px) {
    .news-wrapper {
        max-width: 1400px;
    }
}

/* ========== ПЕЧАТЬ ========== */
@media print {
    .square-page-container {
        padding: 0;
        max-width: 100%;
    }
    .page-content a {
        color: black;
        text-decoration: underline;
    }
    .error-container,
    .warning-container {
        border: 1px solid #000;
        background: none;
        box-shadow: none;
    }
    .btn,
    .action-buttons,
    .admin-buttons {
        display: none !important;
    }
}
.imglogohead {
    max-width: 100%;
    height: auto;
    max-height: 50px; /* ограничение по высоте */
    width: auto; /* ширина подстроится пропорционально */
}





.latest-news-cube:hover .admin-buttons,
.news-item:hover .admin-buttons {
    opacity: 1;
}    /* Стили для уведомления с таймером (как в news-add) */
       
        .countdown {
            font-size: 4rem;
            font-weight: bold;
            line-height: 1;
            margin: 1rem 0;
        }
        .progress {
            height: 10px;
            margin: 1.5rem 0;
            background: rgba(255,255,255,0.3);
            border-radius: 10px;
            overflow: hidden;
        }
        .progress-bar {
            background: #fff;
            width: 100%;
            height: 100%;
            transition: width 0.1s linear;
        }
       
     
/* Контейнер только для таблиц с горизонтальным скроллом */
.contacts-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
    margin: 20px 0;
    border-radius: 8px;
    border: 0px solid #dee2e6; /* легкая граница для выделения таблицы */
}

/* Стили для самой таблицы - только она может быть широкой */
.contacts-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    /* Убираем min-width, теперь таблица занимает 100% ширины контейнера,
       но если контент не помещается, появляется скролл */
}

/* Стили для ячеек таблицы */
.contacts-table-wrapper th,
.contacts-table-wrapper td {
    padding: 12px 15px;

    text-align: left;
    white-space: nowrap; /* текст в ячейках в одну строку */
}

/* Заголовки таблицы */
.contacts-table-wrapper th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Для обычного текста вне таблицы - всё как обычно */
.contact-text-content {
    max-width: 100%;
    word-wrap: break-word; /* длинные слова переносятся */
    overflow-wrap: break-word;
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 768px) {
    .contacts-table-wrapper th,
    .contacts-table-wrapper td {
        padding: 8px 10px;
        font-size: 14px;
    }
}



/* Кастомный скроллбар (опционально) */
.contacts-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.contacts-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;

}

.contacts-table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
 
}

.contacts-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Стили для предпросмотра */
#preview-image {
    transition: transform 0.3s ease;
}
#preview-image:hover {
    transform: scale(1.1);
}





 
    
    @keyframes slideIn {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .redirect-notice .countdown {
        font-size: 3rem;
        font-weight: bold;
        margin: 1rem 0;
    }
    
    .redirect-notice .progress {
        height: 10px;
        margin: 1rem 0;
        background-color: rgba(255,255,255,0.3);
    }
    
    .redirect-notice .progress-bar {
        background-color: #fff;
        transition: width 0.1s linear;
    }
    
    .redirect-notice .btn-group-custom {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 2rem;
    }
  .media-library-btn {
            border: 2px dashed #dee2e6;
            padding: 15px;
            text-align: center;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.3s;
            background: #f8f9fa;
        }
        .media-library-btn:hover {
            border-color: #0d6efd;
            background-color: #e9ecef;
        }
        .selected-image-preview {
            margin-top: 15px;
            padding: 15px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            display: none;
        }
        .selected-image-preview img {
            max-width: 100%;
            max-height: 200px;
            border-radius: 4px;
        }
        .image-dimensions {
            font-size: 0.9em;
            color: #6c757d;
            margin-top: 5px;
        }
        .dashicons {
            font-size: 16px;
            line-height: 1;
            vertical-align: middle;
        }
        #remove_media_image {
            padding: 2px 4px;
            min-width: auto;
        }







/* Стили для фото сотрудников на странице "О компании" */
.staff-photo-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
    background-color: #f8f9fa; /* фон на случай загрузки */
}

.staff-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Кнопки поверх фото */
.staff-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
}

.staff-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.2s ease;
}

.staff-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-decoration: none;
}


.bottom-0 { bottom: 0; }
.end-0 { left: 300px; }
.m-2 { margin: 0.5rem; }
.btn-sm {
        line-height: 30px !important;
        padding: 6px 12px; 
}


.position-absolute.bottom-0.end-0.m-2{
z-index: 10;

}
.bi.bi-instagram{
    font-size: 1.2rem;
}

    .skrito{
    background-color: #ffc107; color: #000; padding: 2px 6px; border-radius: 3px; font-size: 10px; margin-left: 5px;
}
.img-thumbnail.border-primary{
 max-width: 120px; max-height: 120px; object-fit: cover;
} 


#org_logo_preview_container{
    display: none;}

#org_logo_preview{
    max-width: 120px; max-height: 120px; object-fit: cover;}

    #image-preview-container{
        display: none;
    }
    #image_preview{
  max-width: 100%; max-height: 200px;
 }

#current_photo_preview{   
    max-width: 100px; max-height: 100px; object-fit: cover;
  }

  #staff_photo_preview_container{
    display: none;
  }

  #staff_photo_preview{
max-width: 120px; max-height: 120px; object-fit: cover;}

.footer-useful-image.d-flex.align-items-center.justify-content-center
{
    background:#f8f9fa;
}
.footer-useful-item.text-decoration-none{
    position: relative;
}

.footer-useful-image.d-flex.align-items-center.justify-content-center span
{
font-size: 28px;
}

.d-flex.align-items-center.justify-content-center.text-decoration-none{
   height: 100%;/* ===== ПК ===== */}
   /* ===== АДАПТИВНАЯ КАРУСЕЛЬ ===== */
/* ===== ОСНОВНАЯ КАРУСЕЛЬ ===== */
#ukpCarousel,
#ukpCarousel .carousel-inner,
#ukpCarousel .carousel-item {
    height: auto !important;
    min-height: 0 !important;
}

#ukpCarousel .carousel-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

/* ===== ТЕЛЕФОНЫ И ПЛАНШЕТЫ ===== */
@media (max-width: 1024px) {
    #ukpCarousel {
        width: 100%;
        overflow: hidden !important;
    }

    #ukpCarousel .carousel-inner,
    #ukpCarousel .carousel-item {
        width: 100%;
        height: auto !important;
        overflow: hidden !important;
    }

    #ukpCarousel .carousel-img {
        display: block !important;
        width: 180% !important;
        max-width: none !important;
        height: auto !important;
        aspect-ratio: 1920 / 440;
        object-fit: cover !important;
        object-position: center center !important;
        margin: 0 !important;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
}.contact-text-content.content-area table,
.content-area table {
    height: auto !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
}

.contact-text-content.content-area table tr,
.contact-text-content.content-area table td,
.contact-text-content.content-area table th,
.content-area table tr,
.content-area table td,
.content-area table th {
    height: auto !important; /* Заставляем ячейки растягиваться под текст */
    min-height: 1px !important;
    vertical-align: top !important;
    padding: 10px !important;
}

/* Убираем эффект наложения (наезда) текста */
.contact-text-content.content-area table *,
.content-area table * {
    position: static !important; 
}

/* Чтобы длинные слова (адреса, телефоны) не вылезали за края */
.contact-text-content.content-area table td,
.contact-text-content.content-area table th,
.content-area table td,
.content-area table th {
    word-wrap: break-word;
    word-break: break-word;
}

.content-area table {
    max-width: 100%;
}

/* Контейнер для таблицы */
.content-area .table-scroll-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 16px 0;
}

/* Убираем возможные наложения текста после таблицы */
.content-area .table-scroll-wrapper::after {
    content: "";
    display: block;
    clear: both;
}

/* Телефоны и планшеты */
@media (max-width: 991.98px) {

    .content-area .table-scroll-wrapper {
        display: block;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        box-sizing: border-box;
        padding-bottom: 5px;
    }

    /* Обычная таблица занимает ширину контейнера */
    .content-area .table-scroll-wrapper > table {
        width: 100% !important;
        min-width: 100%;
        max-width: none !important;
        margin: 0 !important;
        table-layout: auto;
    }

    /* Ячейки: переносим длинный текст */
    .content-area .table-scroll-wrapper th,
    .content-area .table-scroll-wrapper td {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-wrap: break-word;
        word-break: normal;
        vertical-align: top;
        box-sizing: border-box;
    }

    /* Ссылки не должны растягивать таблицу */
    .content-area .table-scroll-wrapper td a,
    .content-area .table-scroll-wrapper th a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Таблицы, которым действительно нужна прокрутка */
    .content-area .table-scroll-wrapper.is-scrollable > table {
        width: max-content !important;
        min-width: 100%;
        max-width: none !important;
        table-layout: auto;
    }

    /* Абзацы и текст после таблиц */
    .content-area p,
    .content-area ul,
    .content-area ol,
    .content-area h1,
    .content-area h2,
    .content-area h3,
    .content-area h4 {
        overflow-wrap: anywhere;
    }

    .content-area p {
        clear: both;
    }

    /* Изображения не выходят за ширину экрана */
    .content-area img {
        max-width: 100%;
        height: auto;
    }
}
