/* ============================================
   ДАТА ПУБЛИКАЦИИ
   ============================================ */
.publication-date {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: all 0.3s ease;
}

.publication-date i {
    color: #ff6121;
    margin-right: 5px;
}

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

@media (max-width: 768px) {
    .publication-date {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* ============================================
   КНОПКА СКАЧАТЬ PDF
   ============================================ */
.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download-pdf:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-download-pdf i {
    font-size: 18px;
}

.btn-download-pdf:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 576px) {
    .btn-download-pdf {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   ИНДИКАТОР ЗАГРУЗКИ PDF
   ============================================ */
.pdf-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    color: white;
}

.pdf-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary, #ff6121);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pdf-loading-text {
    font-size: 16px;
    font-weight: 500;
}

.pdf-loading-subtext {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 8px;
    max-width: 300px;
    text-align: center;
}

/* ============================================
   МОДАЛЬНОЕ ОКНО "ПОДЕЛИТЬСЯ"
   ============================================ */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 97, 33, 0.4);
}

.btn-copy-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-social-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-social-share.telegram:hover {
    background: #0099e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.btn-social-share.vk:hover {
    background: #5b8bc4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 118, 168, 0.3);
}

.btn-social-share.whatsapp:hover {
    background: #2fe36f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.share-modal-close:hover {
    color: #333;
}

#qrcode img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 576px) {
    .share-modal-content { padding: 30px 20px; }
    .share-social-buttons { flex-direction: column; }
    .expert-share-buttons { max-width: 300px; margin: 25px auto; }
    .btn-share { width: 70%; }
    .btn-copy-link { width: 100%; justify-content: center; }
}

/* ============================================
   HERO-СЕКЦИЯ ПУБЛИКАЦИЙ
   ============================================ */
.publications-hero {
    position: relative;
    background-color: #1A1A1A !important;
    overflow: hidden;
    padding: 100px 0 50px;
    color: #fff;
}

.publications-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 97, 33, 0.15) 0%, rgba(255, 62, 123, 0.15) 100%);
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
}

.publications-hero .hero-content {
    max-width: 100%;
    text-align: left;
    position: relative;
    z-index: 2;
}

.publications-hero .hero-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: #FF6121;
    background: linear-gradient(90deg, #FF6121 0%, #FF3E7B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.publications-hero .hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   ОБЩИЕ СЕКЦИИ
   ============================================ */
.expert-section { padding: 30px 0; }
.expert-section:nth-child(even) { background: #f9f9f9; }

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* ============================================
   КЛИЕНТЫ — СЕТКА
   ============================================ */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.client-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.client-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.client-logo-wrapper {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    width: 100%;
}

.client-logo-wrapper img {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.client-card:hover .client-logo-wrapper img {
    filter: grayscale(0%);
    opacity: 1;
}

.client-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
    min-height: 100px;
}

.client-stat-number {
    font-size: 46px;
    font-weight: 700;
    color: var(--primary, #007bff);
    line-height: 1;
    margin-bottom: 8px;
    display: block;
    text-align: center;
}

.client-stat-label,
.client-name {
    font-size: 15px;
    color: #666;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}

.client-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.client-name a:hover {
    color: var(--primary, #007bff);
}

@media (max-width: 992px) {
    .clients-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
    .client-stat-number { font-size: 32px; }
    .client-stat-label, .client-name { font-size: 14px; }
}

@media (max-width: 768px) {
    .clients-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
    .client-stat-number { font-size: 28px; }
    .client-card { padding: 20px 5px; min-height: 160px; }
}

@media (max-width: 576px) {
    .clients-grid { grid-template-columns: repeat(2, 1fr); }
    .client-stat-number { font-size: 24px; }
    .client-stat-label, .client-name { font-size: 13px; }
}

/* ============================================
   УСЛУГИ / ГАЛЕРЕЯ / ВИДЕО / СЕРТИФИКАТЫ (общие сетки)
   ============================================ */
.services-list { display: grid; gap: 20px; }
.service-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

.video-container {
    position: relative;
    padding-bottom: 177.77%; /* 9:16 */
    height: 0;
    overflow: hidden;
    max-width: 400px;
    margin: 20px auto;
}

.video-container.is-horizontal {
    padding-bottom: 56.25%; /* 16:9 */
    max-width: 100%;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.certificate-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
}

.video-list { display: grid; gap: 30px; }
.video-item { background: white; padding: 20px; border-radius: 10px; }

.contact-btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
}

/* ============================================
   ЭКСПЕРТЫ — СЕКЦИЯ И ФИЛЬТРЫ
   ============================================ */
.experts-section {
    padding: 30px 0 100px;
    position: relative;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.experts-filter-container {
    margin: 20px 0 40px;
    position: relative;
    padding: 0 40px;
    display: flex;
    align-items: center;
}

.experts-filter-wrapper {
    overflow-x: auto;
    padding: 10px 0;
    margin: 0;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.experts-filter-wrapper::-webkit-scrollbar { display: none; }

.experts-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 0 5px;
    min-width: min-content;
}

.experts-filter .filter-tag {
    display: inline-block;
    background-color: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
}

.experts-filter .filter-tag:hover {
    background-color: rgba(var(--primary-rgb), 0.15);
    transform: translateY(-3px);
}

.experts-filter .filter-tag.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

.experts-filter-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    color: var(--primary);
    transition: 0.3s;
    opacity: 0.9;
}

.experts-filter-arrow:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
    opacity: 1;
}

.experts-filter-arrow.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.experts-filter-arrow-left { left: 0; }
.experts-filter-arrow-right { right: 0; }

/* ============================================
   КАРТОЧКА ЭКСПЕРТА
   ============================================ */
.expert-card {
    background: var(--bg-card-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    padding: 35px;
    position: relative;
}

.expert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.expert-card.hidden { display: none; }

.expert-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.expert-tag,
.expert-sphere-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.expert-tag {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}

.expert-sphere-tag {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.expert-content {
    display: grid;
    grid-template-columns: 170px 1fr 1fr;
    gap: 30px;
}

.expert-photo-container { grid-column: 1; }

.expert-photo {
    width: 170px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

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

.expert-info {
    background: var(--bg-card-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    padding: 35px;
    position: relative;
    grid-column: 2;
}

.expert-experience { grid-column: 3; }

.expert-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    position: relative;
    padding-bottom: 10px;
}

.expert-name a {
    position: relative;
    display: block;
    color: var(--text-dark);
}

.expert-name a:hover { color: var(--primary); }

.expert-name:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.expert-email {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.expert-email i {
    margin-right: 6px;
    font-size: 0.85rem;
}

.expert-email:hover {
    text-decoration: underline;
    color: var(--accent);
}

.expert-description {
    color: var(--text-secondary-dark);
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.expert-experience-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 8px;
}

.expert-experience-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.expert-experience-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.expert-experience-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary-dark);
}

.expert-experience-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;

}

/* ============================================
   ПУБЛИКАЦИИ (Swiper)
   ============================================ */
.expert-publications {
    margin-top: 40px;
    position: relative;
}

.publications-swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 0 35px 53px;
}

.swiper-slide { height: auto; }

.publication-item,
.service-card_ {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.publication-item:hover,
.service-card_:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.publication-img {
    width: 100%;
    height: 160px;
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
    position: relative;
}

.publication-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.publication-title { padding-bottom: 7px; }

.publication-title a {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.3;
    text-decoration: none;
    padding-bottom: 10px;
}

.publication-title a:hover { color: var(--primary); }

.publication-description {
    font-size: 0.9rem;
    color: var(--text-secondary-dark);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 15px;
}

.publication-link {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.publication-link:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary);
    transition: width 0.2s ease;
}

.publication-link:hover:after { width: 100%; }

.publication-link i {
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.publication-link:hover i { transform: translateX(5px); }

.publications-swiper-prev,
.publications-swiper-next {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.publications-swiper-prev { left: 0; }
.publications-swiper-next { right: 0; }

.publications-swiper-prev:hover,
.publications-swiper-next:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.publications-swiper-prev.swiper-button-disabled,
.publications-swiper-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: auto;
    pointer-events: none;
}

.publications-swiper-pagination {
    position: absolute;
    bottom: -30px;
    width: 100%;
    text-align: center;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #ccc;
    margin: 0 4px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.publication-bg-1 { background-image: url('https://via.placeholder.com/400x250/f5f5f5/cccccc?text=Публикация+1'); }
.publication-bg-2 { background-image: url('https://via.placeholder.com/400x250/f5f5f5/cccccc?text=Публикация+2'); }
.publication-bg-3 { background-image: url('https://via.placeholder.com/400x250/f5f5f5/cccccc?text=Публикация+3'); }
.publication-bg-4 { background-image: url('https://via.placeholder.com/400x250/f5f5f5/cccccc?text=Публикация+4'); }
.publication-bg-5 { background-image: url('https://via.placeholder.com/400x250/f5f5f5/cccccc?text=Публикация+5'); }
.publication-bg-6 { background-image: url('https://via.placeholder.com/400x250/f5f5f5/cccccc?text=Публикация+6'); }

/* ============================================
   ПОПАП ЭКСПЕРТА
   ============================================ */
.expert-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.expert-popup {
    max-width: 820px;
    width: 100%;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    position: relative;
    background: rgb(255, 255, 255);
    border: 1px solid var(--border-color-light);
    box-shadow: var(--shadow-medium-light);
}

.popup-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 28px;
    color: #444;
    background: none;
    border: none;
    cursor: pointer;
}

#popup-expert-label span {
    color: var(--primary);
    font-weight: 600;
}

button.expert-contact-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
    position: relative;
    border: none;
    margin: 5px 0 15px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.25s ease;
}

button.expert-contact-btn:hover {
    background: linear-gradient(135deg, #ff5000 0%, #ff0031 100%);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .expert-popup .section-subtitle { font-size: 1rem; margin: 0 auto 1rem; }
    .expert-popup .section-title { font-size: 1.4rem; }
    .expert-popup .form-group { margin-bottom: 0.5rem; }
}

/* ============================================
   ЕДИНЫЕ СТИЛИ КАРУСЕЛЕЙ (OWL)
   ============================================ */
.owl-carousel.services-carousel,
.owl-carousel.videos-carousel,
.owl-carousel.certificates-carousel,
.owl-carousel.publications-carousel {
    padding: 20px 0 60px;
}

.owl-carousel .owl-stage {
    display: flex;
    align-items: stretch;
    padding: 40px 20px;
}

.owl-carousel .owl-stage-outer { overflow: visible; }

.owl-item {
    flex: 0 0 auto;
    min-height: 1px;
    -webkit-backface-visibility: hidden;
}

.owl-carousel .owl-nav {
    position: absolute;
    top: -20px;
    right: 0;
    z-index: 10;
}

.owl-carousel .owl-prev,
.owl-carousel .owl-next {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    background: #333 !important;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.owl-carousel .owl-prev:hover,
.owl-carousel .owl-next:hover {
    background: #666 !important;
    transform: scale(1.1);
}

.owl-carousel .owl-prev:before,
.owl-carousel .owl-next:before {
    color: #fff !important;
    font-size: 20px;
    line-height: 40px;
    text-align: center;
    display: block;
}

.owl-carousel .owl-prev:before { content: "‹"; }
.owl-carousel .owl-next:before { content: "›"; }

.owl-carousel .owl-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.owl-carousel .owl-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #ddd;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #000 !important;
}

.owl-carousel .owl-dot:hover { background: #bbb; }

.owl-carousel .owl-dot.active {
    background: #333;
    width: 30px;
    border-radius: 5px;
}

/* Видео-слайды */
.video-slide-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-slide-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    min-height: 40px;
}

.video-slide-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    flex-grow: 1;
}

.video-slide-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-platform-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    align-self: flex-start;
}

/* Сертификаты */
.certificates-carousel .certificate-item {
    margin: 10px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificates-carousel .certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.certificates-carousel .certificate-image-wrapper {
    position: relative;
    cursor: pointer;
    background: #f5f5f5;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.certificates-carousel .certificate-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.certificates-carousel .certificate-image-wrapper:hover img {
    transform: scale(1.05);
}

.certificates-carousel .certificate-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 32px;
}

.certificates-carousel .certificate-image-wrapper:hover .certificate-overlay { opacity: 1; }

.certificates-carousel .certificate-caption {
    padding: 15px;
    text-align: center;
    height: 80px;
}

.certificates-carousel .certificate-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.certificates-carousel .certificate-desc {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* Публикации в карусели */
.publications-carousel .publication-card {
    margin: 10px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.publications-carousel .publication-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.publications-carousel .publication-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 2;
}

.publications-carousel .publication-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.publications-carousel .publication-content h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.publications-carousel .publication-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.publications-carousel .publication-content h3 a:hover { color: var(--primary); }

.publications-carousel .publication-content p {
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
}

.publications-carousel .publication-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.publications-carousel .publication-link:hover { color: var(--primary-dark, #0056b3); }

.publications-carousel .publication-link i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.publications-carousel .publication-link:hover i { transform: translateX(5px); }

/* Услуги в карусели */
.services-carousel .owl-item > * {
    flex: 1;
    height: 100%;
}

.services-carousel .service-card_ {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
}

.services-carousel .service-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.services-carousel .service-content p { flex-grow: 1; }

.services-carousel .service-price,
.services-carousel .service-button { margin-top: auto; }

/* Галерея в карусели */
.gallery-carousel { padding: 20px 0 60px; }

.gallery-carousel .gallery-item {
    margin: 10px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-carousel .gallery-image-wrapper {
    position: relative;
    background: #f5f5f5;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 12px;
}

.gallery-carousel .gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-carousel .gallery-image-wrapper:hover img {
    transform: scale(1.1);
}

.gallery-carousel .gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 32px;
}

.gallery-carousel .gallery-image-wrapper:hover .gallery-overlay { opacity: 1; }

.gallery-carousel .gallery-zoom {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-carousel .gallery-image-wrapper:hover .gallery-zoom {
    transform: scale(1);
}

.gallery-carousel .owl-nav {
    position: absolute;
    top: -20px;
    right: 0;
}

.gallery-carousel .owl-prev,
.gallery-carousel .owl-next {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    background: #333 !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-carousel .owl-prev:hover,
.gallery-carousel .owl-next:hover { background: #666 !important; }

.gallery-carousel .owl-prev:before,
.gallery-carousel .owl-next:before {
    color: #fff !important;
    font-size: 20px;
    line-height: 40px;
    text-align: center;
}

.gallery-carousel .owl-prev:before { content: "‹"; }
.gallery-carousel .owl-next:before { content: "›"; }

.gallery-carousel .owl-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.gallery-carousel .owl-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #ddd;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-carousel .owl-dot.active {
    background: #333;
    width: 30px;
    border-radius: 5px;
}

/* ============================================
   ШАПКА ПРОФИЛЯ ЭКСПЕРТА
   ============================================ */
@media (max-width: 1200px) {
    .expert-profile-header { gap: 30px !important; }
    .expert-personal-sidebar { flex: 0 0 240px !important; }

    .expert-content { grid-template-columns: 170px 1fr; }
    .expert-photo-container { grid-column: 1; grid-row: 1; }
    .expert-info { grid-column: 2; grid-row: 1; }
    .expert-experience { grid-column: span 2; grid-row: 2; }
}

@media (max-width: 992px) {
    .publications-swiper { padding: 0 30px; }

    .expert-profile-header {
        flex-direction: column !important;
        align-items: center !important;
    }

    .expert-info-single,
    .expert-personal-sidebar {
        flex: 1 1 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .expert-photo-single {
        flex: 0 0 auto !important;
        max-width: 70% !important;
    }

    .expert-personal-sidebar {
        background: rgba(255, 255, 255, 0.15) !important;
        margin-top: 20px !important;
        order: 3;
    }

    .expert-info-single { order: 2; }
}

@media (max-width: 768px) {
    .filter-tag { text-align: center; }

    .expert-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .expert-photo-container {
        grid-column: 1;
        grid-row: 1;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .expert-info {
        grid-column: 1;
        grid-row: 2;
        padding: 40px 15px;
    }

    .expert-info_ { grid-column: 1; }

    .publications-hero .hero-title { font-size: 2rem; }

    .owl-carousel .owl-stage { padding: 0 !important; }

    .expert-name:after { left: 50%; transform: translateX(-50%); }

    .expert-experience {
        grid-column: 1;
        grid-row: 3;
        text-align: left;
    }

    .expert-experience-title:after { left: 50%; transform: translateX(-50%); }

    .publications-swiper { padding: 0 5px; }

    .expert-description { text-align: left; }

    .owl-carousel .owl-nav {
        top: -20px;
        right: 50%;
        transform: translateX(50%);
    }

    .owl-carousel .owl-prev,
    .owl-carousel .owl-next {
        width: 35px;
        height: 35px;
        margin: 0 5px;
    }

    .owl-carousel .owl-prev:before,
    .owl-carousel .owl-next:before {
        font-size: 18px;
        line-height: 35px;
    }

    .owl-carousel .owl-dots {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 20px;
    }

    .video-slide-title { font-size: 14px; min-height: auto; }
    .certificates-carousel .certificate-title { font-size: 14px; }
    .certificates-carousel .certificate-desc { font-size: 12px; }
    .publications-carousel .publication-content h3 { font-size: 16px; }
    .publications-carousel .publication-content p { font-size: 14px; }

    .gallery-carousel .owl-nav { top: -50px; }

    .gallery-carousel .owl-prev,
    .gallery-carousel .owl-next {
        width: 35px;
        height: 35px;
    }

    .gallery-carousel .owl-prev:before,
    .gallery-carousel .owl-next:before {
        font-size: 18px;
        line-height: 35px;
    }

    .services-carousel .owl-item { margin-bottom: 15px; }
}

@media (max-width: 576px) {
    .expert-card { padding: 25px 20px; }
    .expert-tags { justify-content: center; }

    .publications-swiper { padding: 0 40px 40px 20px; }

    .publications-swiper-prev,
    .publications-swiper-next {
        width: 30px;
        height: 30px;
        margin-top: -15px;
    }

    p.expp {
        padding: 15px 20px 0 !important;
        margin-bottom: -10px !important;
        margin-top: -30px !important;
    }

    .expert-profile-header { gap: 5px !important; }

    .expert-name-single,
    .section-title {
        font-size: 18px !important;
        text-align: center !important;
        line-height: 120%;
    }

    .expert-position { text-align: center !important; }
    .expert-spheres { text-align: center !important; }
    .expert-contacts-header { text-align: center !important; }

    .expert-contacts-header p,
    .expert-contacts-header a {
        display: block !important;
        margin: 8px 0 !important;
    }

    .expert-personal-sidebar { padding: 20px 15px !important; }

    .owl-carousel .owl-prev,
    .owl-carousel .owl-next {
        width: 32px;
        height: 32px;
    }

    .owl-carousel .owl-prev:before,
    .owl-carousel .owl-next:before {
        font-size: 16px;
        line-height: 32px;
    }
}