/* ===== СТИЛИ ДЛЯ ВСЕХ ИЗОБРАЖЕНИЙ В СТАТЬЕ ===== */
/* 1. ОСНОВНОЕ ИЗОБРАЖЕНИЕ СТАТЬИ (featured image) */
.post-featured-image {
    width: 100% !important;
    margin: 30px auto !important;
    text-align: center !important;
}

.post-featured-image img.featured-image {
    width: 100% !important;
    max-width: 800px !important;
    height: 500px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s ease !important;
    cursor: pointer !important;
    background: #fff !important;
    padding: 5px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.post-featured-image img.featured-image:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

/* 2. ВСЕ ОСТАЛЬНЫЕ ИЗОБРАЖЕНИЯ В ТЕКСТЕ СТАТЬИ */
.post-content h2,
.post-content h3 {
  text-align: center;
  color: #2c5aa0;
}
.single-post-content .post-content img,
.single-post-content .post-content figure img,
.single-post-content .post-content .wp-caption img,
.single-post-content .post-content p img,
.single-post-content .post-content div img,
.single-post-content .post-content .wp-block-image img {
    width: 100% !important;
    height: 350px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 25px auto !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s ease !important;
    cursor: pointer !important;
    background: #fff !important;
    padding: 5px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    max-width: 100% !important;
}

/* Эффект при наведении */
.single-post-content .post-content img:hover,
.single-post-content .post-content figure img:hover,
.single-post-content .post-content .wp-caption img:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

/* Контейнеры для изображений */
.single-post-content .post-content figure,
.single-post-content .post-content .wp-caption {
    max-width: 100% !important;
    margin: 25px auto !important;
    text-align: center !important;
    position: relative !important;
}

/* Подписи к изображениям */
.single-post-content .post-content .wp-caption-text,
.single-post-content .post-content figcaption,
.post-featured-image .featured-image-caption {
    display: block !important;
    margin-top: 10px !important;
    padding: 10px 15px !important;
    font-size: 0.9rem !important;
    color: var(--secondary) !important;
    text-align: center !important;
    font-style: italic !important;
    line-height: 1.4 !important;
    background: var(--light) !important;
    border-radius: 8px !important;
    border-left: 3px solid var(--accent) !important;
    max-width: 100% !important;
}

/* Выровненные изображения */
.single-post-content .post-content .alignleft {
    float: left !important;
    width: 45% !important;
    height: 250px !important;
    margin: 10px 25px 10px 0 !important;
}

.single-post-content .post-content .alignright {
    float: right !important;
    width: 45% !important;
    height: 250px !important;
    margin: 10px 0 10px 25px !important;
}

.single-post-content .post-content .aligncenter {
    width: 80% !important;
    height: 350px !important;
    margin: 25px auto !important;
    float: none !important;
    display: block !important;
}

/* Галереи */
.single-post-content .post-content .gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 15px !important;
    margin: 30px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.single-post-content .post-content .gallery-item {
    overflow: hidden !important;
    border-radius: 10px !important;
    position: relative !important;
    background: #fff !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    height: 220px !important;
}

.single-post-content .post-content .gallery-item img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 10px !important;
    transition: transform 0.5s ease !important;
}

.single-post-content .post-content .gallery-item:hover img {
    transform: scale(1.08) !important;
}

/* Размеры по классам WordPress */
.single-post-content .post-content img.size-thumbnail,
.single-post-content .post-content img[class*="thumb"] {
    height: 200px !important;
    width: auto !important;
    max-width: 100% !important;
}

.single-post-content .post-content img.size-medium {
    height: 300px !important;
}

.single-post-content .post-content img.size-large {
    height: 350px !important;
}

.single-post-content .post-content img.size-full {
    height: 400px !important;
}

/* ЛЕЙТБОКС */
.image-lightbox {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.image-lightbox.active {
    display: flex !important;
    opacity: 1 !important;
}

.lightbox-content {
    max-width: 90% !important;
    max-height: 90% !important;
    position: relative !important;
}

.lightbox-content img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: 8px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    object-fit: contain !important;
}

/* СТИЛИ ДЛЯ КНОПКИ ЗАКРЫТИЯ С SVG */
.lightbox-close {
    position: absolute !important;
    top: -40px !important;
    right: 0 !important;
    background: var(--accent) !important;
    color: white !important;
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s ease, background 0.3s ease !important;
    padding: 0 !important;
}

.lightbox-close svg {
    width: 18px !important;
    height: 18px !important;
    fill: currentColor !important;
    transition: transform 0.3s ease !important;
}

.lightbox-close:hover {
    background: #c0392b !important;
}

.lightbox-close:hover svg {
    transform: rotate(-90deg) !important;
}

.lightbox-caption {
    position: absolute !important;
    bottom: -40px !important;
    left: 0 !important;
    width: 100% !important;
    color: white !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    padding: 10px !important;
}

.lightbox-nav {
    position: absolute !important;
    top: 50% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 0 20px !important;
    transform: translateY(-50%) !important;
}

.lightbox-nav button {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: none !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.lightbox-nav button:hover {
    background: var(--accent) !important;
    transform: scale(1.1) !important;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 992px) {
    .post-featured-image img.featured-image {
        height: 400px !important;
        max-width: 90% !important;
    }
    
    .single-post-content .post-content img {
        height: 300px !important;
    }
    
    .single-post-content .post-content .alignleft,
    .single-post-content .post-content .alignright {
        float: none !important;
        width: 100% !important;
        height: 250px !important;
        margin: 20px auto !important;
    }
    
    .single-post-content .post-content .aligncenter {
        width: 90% !important;
        height: 300px !important;
    }
    
    .single-post-content .post-content .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    }
    
    .single-post-content .post-content .gallery-item,
    .single-post-content .post-content .gallery-item img {
        height: 180px !important;
    }
}

.employee-info {
    padding: 25px;
}

.employee-name {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.employee-position {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.employee-education {
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.employee-bio {
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.employee-bio p {
    margin-bottom: 10px;
}

.employee-contacts {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(44, 90, 160, 0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.9rem;
}

.contact-item i {
    color: var(--primary);
    width: 20px;
}

.no-staff-message {
    text-align: center;
    padding: 50px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 30px 0;
}

.no-staff-message i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-staff-message h3 {
    color: var(--text);
    margin-bottom: 10px;
}

.no-staff-message .admin-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.no-staff-message .admin-link:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .post-featured-image img.featured-image {
        height: 350px !important;
        max-width: 95% !important;
    }
    
    .single-post-content .post-content img {
        height: 250px !important;
    }
    
    .single-post-content .post-content .aligncenter {
        width: 95% !important;
        height: 250px !important;
    }
    
    .single-post-content .post-content .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
    
    .single-post-content .post-content .gallery-item,
    .single-post-content .post-content .gallery-item img {
        height: 150px !important;
    }
}

@media (max-width: 576px) {
    .post-featured-image img.featured-image {
        height: 300px !important;
    }
    
    .single-post-content .post-content img {
        height: 200px !important;
    }
    
    .single-post-content .post-content .gallery {
        grid-template-columns: 1fr !important;
    }
    
    .single-post-content .post-content .gallery-item,
    .single-post-content .post-content .gallery-item img {
        height: 180px !important;
    }
    
    .lightbox-content {
        max-width: 95% !important;
    }
    
    .lightbox-close {
        top: -35px !important;
        width: 30px !important;
        height: 30px !important;
    }
    
    .lightbox-close svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* Важные стили для переопределения */
.single-post-content .post-content * {
    max-width: 100% !important;
}

.single-post-content .post-content p:has(img) {
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

/* Специальные классы для ручного управления */
.post-featured-image img.featured-image.img-small {
    height: 300px !important;
}

.post-featured-image img.featured-image.img-medium {
    height: 400px !important;
}

.post-featured-image img.featured-image.img-large {
    height: 500px !important;
}

.single-post-content .post-content img.img-small {
    height: 200px !important;
}

.single-post-content .post-content img.img-medium {
    height: 300px !important;
}

.single-post-content .post-content img.img-large {
    height: 350px !important;
}

/* ===== РАЗМЕТКА ПОСТА С САЙДБАРОМ ===== */
.post-layout {
    display: flex;
    flex-direction: row;
}

/* Основной контент справа */
.post-main {
    flex: 3; 
    order: 2;
}

/* Сайдбар слева */
.blog-sidebar {
    flex: 1;
    order: 1; 
}   

/* Приоритетные стили */
.post-featured-image {
    all: initial !important;
    max-width: 80% !important;
}

.post-featured-image *,
.single-post-content .post-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.sidebar-categories .current-category > a {
    color: var(--accent);
    font-weight: 600;
    background: var(--light);
    border-radius: 5px;
    display: flex;
} 
/* Стили для нового расположения сайдбара */
.category-layout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.blog-sidebar {
    flex: 0 0 300px;
    order: -1; /* Перемещаем на левую сторону */
}

.category-main {
    flex: 1;
    min-width: 300px;
}

/* Стиль для текущей категории в списке */
.sidebar-categories .current-category > a {
    color: var(--accent);
    font-weight: 600;
    background: var(--light);
    border-radius: 5px;
    display: flex;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1222px) {
    .post-layout {
        flex-direction: column;
    }
    .post-main, .blog-sidebar {
        order: unset;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .category-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .blog-sidebar {
        order: 2; /* На мобильных сайдбар будет внизу */
        flex: 1;
        width: 100%;
    }
    
    .category-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .category-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .blog-sidebar {
        order: 2; /* На мобильных сайдбар будет внизу */
        flex: 1;
        width: 100%;
    }
    
    .category-main {
        order: 1;
    }
}