/* Navigation (index + ru) */
.nav-links {
gap: 0.5rem;
align-items: center;
flex-wrap: wrap;
}
.nav-links a {
display: inline-flex;
flex-shrink: 0;
line-height: 0;
}
.nav-links .nav-icon {
height: 40px;
width: auto;
display: block;
margin: 0;
box-shadow: none;
border-radius: 0;
max-width: none;
}
.header .logo img {
height: 50px;
width: auto;
margin-left: 30px;
}
.header-spacer {
height: 5rem;
}
.lang-switch {
color: rgba(255, 255, 255, 0.6);
font-size: 0.875rem;
text-decoration: none;
}
.lang-switch:hover,
.lang-switch.active {
color: #ffd700;
}
.nav-links .lang-switch::after,
.nav-links .lang-switch.active::after {
display: none;
content: none;
}
.nav-lang {
margin-left: 0.5rem;
white-space: nowrap;
font-size: 0.875rem;
}
@media (max-width: 768px) {
.header .nav {
position: relative;
height: auto;
min-height: 3rem;
padding: 0.35rem 0;
justify-content: flex-start;
}
.header .logo {
flex: 0 0 auto;
}
.header .menu-button {
display: block;
flex: 0 0 auto;
margin-left: auto;
margin-right: 30px;
}
.header .nav-links:not(.active) {
display: none !important;
}
.header .logo img {
height: 32px !important;
margin-left: 30px;
}
.header .nav-links.active {
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 0.25rem 0.35rem;
}
.header .nav-links .nav-icon {
height: 40px !important;
width: auto !important;
max-width: none !important;
}
.header .nav-lang {
flex: 0 0 100%;
text-align: center;
margin: 0.25rem 0 0;
font-size: 0.75rem;
}
.header-spacer {
height: 3.25rem;
}
}

/* Index / home page */
:root {
    --background: #000;
    --foreground: #ffffff;
    --muted: rgba(255, 255, 255, 0.6);
    --primary: #ffd700;
    --border-color: rgba(255, 255, 255, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: #0a0b1b;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    scroll-behavior: auto;
    overflow-x: hidden;
}

.news-item:focus {
    scroll-margin: 0;
    scroll-padding: 0;
}

#new-news-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Desktop: 3 колонки Masonry с отступами */
@media (min-width: 768px) {
    #new-news-container {
        column-count: 3;
        column-gap: 20px;
        column-fill: balance;
    }

    #new-news-container .news-item {
        margin: 0 0 20px 0;
        max-width: none;
        break-inside: avoid;
        page-break-inside: avoid;
        display: inline-block;
        width: 100%;
        vertical-align: top;
    }
}

/* Tablet: 2 колонки с отступами */
@media (min-width: 480px) and (max-width: 767px) {
    #new-news-container {
        column-count: 2;
        column-gap: 15px;
        column-fill: balance;
    }

    #new-news-container .news-item {
        margin: 0 0 15px 0;
        break-inside: avoid;
        page-break-inside: avoid;
        display: inline-block;
        width: 100%;
        vertical-align: top;
    }
}

/* Mobile: вертикально с отступами */
@media (max-width: 479px) {
    #new-news-container {
        display: block;
        padding: 12px;
        box-sizing: border-box;
    }
    
    #new-news-container .news-item {
        margin: 0 0 15px 0;
    }
}

#news-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Desktop: 3 колонки */
@media (min-width: 768px) {
    #news-container {
        column-count: 3;
        column-gap: 20px;
        column-fill: balance;
    }
}

/* Tablet: 2 колонки */
@media (min-width: 480px) and (max-width: 767px) {
    #news-container {
        column-count: 2;
        column-gap: 15px;
        column-fill: balance;
    }
}

/* Mobile: вертикально */
@media (max-width: 479px) {
    #news-container {
        display: block;
    }
}

.news-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 20px;
    margin: 0 0 20px 0;
    max-width: 900px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    width: 100%;
    vertical-align: top;
    box-sizing: border-box;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Скрываем новость до загрузки фото/видео */
.news-item-pending {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-media {
    max-width: 100%;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.news-media.video {
    width: 100%;
    height: auto;
    background: #000;
    object-fit: contain;
}

/* YouTube embed container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

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

/* Плавное появление видео после загрузки превью */
video[poster] {
    background-size: cover;
    background-position: center;
}

.news-text {
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.7;
}

.news-date {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.news-date::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('/iconmedia/time.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 8px;
}

#pagination-container {
    margin-top: 40px;
    padding: 0 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination a {
    text-decoration: none;
    color: #000;
    background: #ffd700;
    padding: 12px 25px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(208, 137, 7, 0.3);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.pagination a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208, 137, 7, 0.5);
}

.pagination strong {
			color: #000;
    background: #ffd700;
    padding: 12px 25px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.load-more-btn {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(208, 137, 7, 0.3);
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(208, 137, 7, 0.4);
}

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

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.no-more-news {
    text-align: center;
    color: var(--muted);
    padding: 20px;
    font-style: italic;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(2, 3, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    font-size: 0.1rem;
    font-weight: bold;
    color: #ffd700;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover {
    color: var(--foreground);
}

.nav-links a.active {
    color: #ffd700;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffd700;
    border-radius: 1px;
}

.menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.8rem;
}

.page-title {
    text-align: center;
    margin: 80px 0 30px 0;
    font-size: 2.5rem;
    color: #ffd700;
    font-weight: bold;
}

.page-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.news-footer-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 165, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    object-fit: cover;
}

.author-name {
    color: #4a9eff;
    font-size: 14px;
    font-weight: 600;
}

/* Social Share Styles */
.social-share {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.share-btn {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: #ffd700;
    border: 2px solid #ffd700;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 2;
    transition: color 0.4s ease;
}

.share-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: #ffd700;
    transition: height 0.4s ease;
    z-index: -1;
    border-radius: 25px;
}

.share-btn:hover {
    color: #ffffff;
}

.share-btn:hover::before {
    height: 100%;
}

.share-btn:active {
    transform: scale(0.98);
}

.share-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: rgba(20, 20, 40, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 8px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.social-share:hover .share-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.social-share.active .share-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.share-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.share-item svg {
    flex-shrink: 0;
}

.share-item span {
    color: #fff;
}

/* Цвета для разных соц сетей */
.share-item:nth-child(1):hover {
    background: rgba(0, 136, 204, 0.2); /* Telegram */
}

.share-item:nth-child(2):hover {
    background: rgba(29, 161, 242, 0.2); /* X (Twitter) */
}

.share-item:nth-child(3):hover {
    background: rgba(24, 119, 242, 0.2); /* Facebook */
}

.share-item:nth-child(4):hover {
    background: rgba(0, 119, 255, 0.2); /* VK */
}

.share-item:nth-child(5):hover {
    background: rgba(102, 126, 234, 0.2); /* Copy Link */
}

.share-close-btn {
    display: none;
}

/* ===== МОБИЛЬНАЯ ОПТИМИЗАЦИЯ ПРОИЗВОДИТЕЛЬНОСТИ ===== */
@media (max-width: 768px) {
    /* backdrop-filter: blur() — главная причина тормозов скролла на мобиле.
       Перерисовывается на каждый кадр, убиваем везде. */
    .header,
    .slider-btn,
    .share-menu,
    .shorts-play-icon,
    .news-play-icon,
    .shorts-item,
    .shorts-modal-content {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Заменяем полупрозрачный размытый фон хедера непрозрачным */
    .header {
        background: rgba(2, 3, 20, 0.98) !important;
        /* GPU-слой для fixed элемента — не перерисовывается при скролле */
        will-change: transform;
    }

    /* transition:all вызывает layout recalculation — заменяем на конкретные свойства */
    .news-item {
        transition: box-shadow 0.2s ease !important;
    }

    .share-item {
        transition: background 0.15s ease !important;
    }

    .slider-dot {
        transition: background 0.2s ease !important;
    }

    /* Hover-трансформы на мобиле не нужны (нет hover) и могут вызывать reflow */
    .news-item:hover,
    .share-item:hover,
    .related-post-card:hover {
        transform: none !important;
    }

    /* Промоция карусели шортов в GPU слой */
    .shorts-carousel {
        will-change: scroll-position;
    }
}

/* ===== МОБИЛЬНЫЙ SHARE BOTTOM SHEET (≤768px) ===== */

@media (max-width: 768px) {
    /* Bottom sheet для всего мобила — только transform, без opacity/visibility конфликта */
    .share-menu {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto !important;
        border-radius: 16px 16px 0 0;
        min-width: auto;
        width: 100%;
        padding: 36px 12px 24px;
        /* Полностью убираем opacity/visibility анимацию — только transform */
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(110%) !important;
        transition: transform 0.3s ease !important;
        z-index: 10002;
        max-height: 65vh;
        overflow-y: auto;
    }

    .social-share.active .share-menu {
        transform: translateY(0) !important;
    }

    /* Drag handle */
    .share-menu::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 2px;
    }

    /* Кнопка закрытия */
    .share-close-btn {
        display: flex !important;
        position: absolute;
        top: 8px;
        right: 12px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.6);
        font-size: 20px;
        cursor: pointer;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        padding: 0;
        line-height: 1;
        z-index: 10003;
    }

    .share-close-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    /* Компактные пункты меню — все 5 влезают */
    .share-item {
        padding: 10px 12px;
        font-size: 13px;
        gap: 10px;
        margin-bottom: 2px;
    }

    .share-item svg {
        width: 16px !important;
        height: 16px !important;
    }

    .news-footer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .social-share {
        width: 100%;
        justify-content: flex-end;
    }

    .share-btn {
        padding: 8px 18px;
        font-size: 12px;
    }
}

@media (min-width: 769px) {
    .share-menu::before,
    .share-close-btn {
        display: none !important;
    }
}

.loading {
    text-align: center;
    padding: 50px;
    color: var(--muted);
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
}

@media (max-width: 768px) {
    .menu-button {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(2, 3, 20, 0.98);
        padding: 0.5rem 0.75rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.25rem 0.35rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        display: flex;
    }

    .page-title {
        font-size: 2rem;
        margin: 70px 0 20px 0;
    }

    #new-news-container {
        padding: 12px;
        box-sizing: border-box;
    }

    .news-item {
        margin: 0 0 15px 0;
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Видео и медиа — не выходят за экран */
    .news-video-wrap,
    .news-video-wrap.single-media,
    .news-media,
    .news-media.video,
    video,
    .news-item img.news-media,
    .news-item img.single-media,
    .news-video-wrap img.news-media {
        max-width: 100%;
        width: 100%;
    }

    /* Карусель медиа */
    .media-carousel,
    .carousel-container {
        max-width: 100%;
        overflow: hidden;
    }

    /* Текст новостей */
    .news-text {
        font-size: 14px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Заголовок при фильтре по тегу */
    .page-subtitle {
        font-size: 0.9rem;
        padding: 0 12px;
        text-align: center;
    }

    .pagination a {
        padding: 10px 20px;
        margin: 0 5px;
        font-size: 13px;
    }
}

a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.stats {
    text-align: center;
    margin: 20px 0;
    color: var(--muted);
    font-size: 14px;
}

.media-album {
    display: grid;
    gap: 8px;
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
}

.media-album.single {
    grid-template-columns: 1fr;
}

.media-album.single img,
.media-album.single video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.media-album.double {
    grid-template-columns: 1fr 1fr;
}

.media-album.triple {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.media-album.triple :nth-child(1) {
    grid-row: 1 / -1;
}

.media-album.triple :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.media-album.triple :nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.media-album.quad {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.media-album.grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

@media (min-width: 768px) {
    .media-album.triple {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr;
    }

    .media-album.triple :nth-child(1) {
        grid-row: 1;
        grid-column: 1;
    }

    .media-album.triple :nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .media-album.triple :nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }

    .media-album.quad {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
    }

    .media-album.grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
    }
}

.media-album img,
.media-album video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-album img:hover,
.media-album video:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.media-album video {
    background: #000;
}

.media-type-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.media-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.media-item.play-button::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.single-media {
    border-radius: 10px;
    margin: 15px 0;
}

/* Контейнер для изображений с водяным знаком */
.media-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 15px 0;
}

.media-wrapper img.news-media,
.media-wrapper img.carousel-media {
    display: block;
    width: 100%;
    height: auto;
}

/* Водяной знак */
.media-watermark {
    position: absolute;
    bottom: 50px;
    right: 50px;
    width: auto;
    height: 40px;
    opacity: 0.7;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.media-wrapper:hover .media-watermark {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .media-watermark {
        bottom: 20px;
        right: 20px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .media-watermark {
        bottom: 15px;
        right: 15px;
        height: 25px;
    }
}

/* Стили для карусели */
.media-carousel {
    position: relative;
    width: 100%;
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.carousel-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-media {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.carousel-media.video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 5px;
    transition: background 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicators .indicator.active {
    background: #ffffff;
    width: 12px;
    height: 12px;
}

.carousel-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    .carousel-btn {
        font-size: 24px;
        padding: 8px 12px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel-counter {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* Search Section */
.search-section {
    max-width: 800px;
    margin: 40px auto 20px auto;
    padding: 0 20px;
}

.search-form-main {
    width: 100%;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 5px;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: #ffd700;
    box-shadow: 0 5px 20px rgba(255, 165, 0, 0.3);
    background: rgba(255, 165, 0, 0.05);
}

.search-input-main {
    flex: 1;
    padding: 15px 20px;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: #fff;
    outline: none;
}

.search-input-main::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-btn-main {
    position: relative;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    border: 0px solid #ffd700;
}

.search-btn-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #ffd700;
    transition: width 0.4s ease;
    z-index: -1;
}

.search-btn-main:hover::before {
    width: 100%;
}

.search-btn-main:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
}

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

@media (max-width: 768px) {
    .search-section {
        margin: 20px auto 15px auto;
    }
    
    .search-wrapper {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .search-input-main {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .search-btn-main {
        padding: 12px 25px;
        width: 100%;
    }
}

/* Hero Slider Styles */
.hero-slider-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 500px;
    margin: 40px auto 40px auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.slider-item.active {
    opacity: 1;
    z-index: 1;
}

.slider-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.slider-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 40px 30px 44px;
    z-index: 2;
}

.slider-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 40px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: 5px;
    transition: background 0.3s ease;
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.slider-dot.active {
    background: #ffd700;
    border-color: #fff;
    width: 14px;
    height: 14px;
}

@media (max-width: 768px) {
    .hero-slider-container {
        height: 260px;
        /* Фикс overflow: width:100% + margin по бокам = выход за экран */
        width: auto;
        margin: 70px 10px 20px;
        border-radius: 12px;
    }

    .slider-text {
        font-size: 1rem;
        padding: 15px 12px 12px;
    }

    .slider-btn {
        font-size: 26px;
        padding: 8px 12px;
        /* Убираем backdrop-filter — тяжело для мобильного GPU */
        backdrop-filter: none;
    }

    .slider-prev {
        left: 8px;
    }

    .slider-next {
        right: 8px;
    }

    .slider-overlay {
        padding: 20px 15px 24px;
    }
}

/* Shorts Carousel Styles */
.shorts-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.shorts-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 18px 5px;
    letter-spacing: 0.5px;
}

.shorts-carousel-wrapper {
    position: relative;
    padding: 0 60px;
}

.shorts-carousel {
    display: flex;
    gap: 30px;
    overflow: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

.shorts-item {
    flex: 0 0 200px;
    width: 200px;
    height: 360px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #111;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shorts-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}

.shorts-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shorts-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    padding-left: 3px;
}

.shorts-item.playing .shorts-play-icon {
    opacity: 0;
}

/* Иконка play для видео в ленте новостей */
.news-video-wrap {
    position: relative;
    display: block;
    line-height: 0;
}

.news-video-wrap.single-media {
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
}

.news-video-wrap .news-media.video {
    display: block;
    margin: 0;
    border-radius: 0;
}

.news-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
    padding-left: 3px;
    z-index: 2;
}

.news-video-wrap.playing .news-play-icon {
    opacity: 0;
}

/* Контролы видео */
.shorts-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 24px 8px 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.shorts-item:hover .shorts-controls,
.shorts-item.playing .shorts-controls {
    opacity: 1;
    pointer-events: all;
}

/* Прогресс-бар перемотки */
.shorts-seek {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    display: block;
    margin-bottom: 7px;
    position: relative;
}

.shorts-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0,0,0,0.6);
}

.shorts-seek::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.shorts-seek::-webkit-slider-runnable-track {
    background: linear-gradient(
        to right,
        #fff var(--seek-fill, 0%),
        rgba(255,255,255,0.3) var(--seek-fill, 0%)
    );
    height: 3px;
    border-radius: 2px;
}

/* Нижняя строка кнопок */
.shorts-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shorts-vol-btn,
.shorts-fs-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 4px;
    line-height: 1;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}

.shorts-vol-btn:hover,
.shorts-fs-btn:hover {
    transform: scale(1.2);
}

.shorts-vol-btn svg,
.shorts-fs-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.shorts-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    font-size: 38px;
    width: 50px;
    height: 70px;
    cursor: pointer;
    z-index: 10;
    border-radius: 10px;
    transition: background 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.shorts-btn:hover {
    background: rgba(0,0,0,0.9);
}

.shorts-prev {
    left: 0;
}

.shorts-next {
    right: 0;
}

.shorts-more-wrap {
    text-align: center;
    width: 100%;
    margin: 18px 0 6px;
    padding: 0 40px;
}

.shorts-more-btn {
    display: inline-block;
    background: #ffd700;
    color: #000;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(208, 137, 7, 0.3);
}

.shorts-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(208, 137, 7, 0.4);
    color: #000;
}

.shorts-more-btn .btn-text {
    color: #000;
}

@media (max-width: 768px) {
    .shorts-carousel-wrapper {
        padding: 0 40px;
    }

    .shorts-btn {
        width: 36px;
        height: 80px;
        font-size: 28px;
    }

    .shorts-section {
        padding: 0 10px;
    }
}

/* Модальное окно для shorts */
.shorts-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.shorts-modal.active {
    display: flex;
}

.shorts-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 85vh;
    max-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shorts-modal-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.8);
}

.shorts-modal-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.shorts-modal-title {
    position: absolute;
    bottom: 110px;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    max-height: 120px;
    overflow-y: auto;
    text-align: left;
    z-index: 5;
}

.shorts-modal-title::-webkit-scrollbar {
    width: 4px;
}

.shorts-modal-title::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.shorts-modal-title::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.shorts-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.shorts-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.shorts-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 70px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.shorts-modal-nav:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.05);
}

.shorts-modal-nav-prev {
    left: 10px;
}

.shorts-modal-nav-next {
    right: 10px;
}

.shorts-modal-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 40px 20px 20px;
}

.shorts-modal-seek {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    display: block;
    margin-bottom: 12px;
}

.shorts-modal-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0,0,0,0.7);
}

.shorts-modal-seek::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.shorts-modal-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shorts-modal-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease;
}

.shorts-modal-btn:hover {
    transform: scale(1.2);
}

.shorts-modal-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

@media (max-width: 768px) {
    .shorts-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
    }

    .shorts-modal-video-container {
        border-radius: 0;
    }

    .shorts-modal-nav {
        width: 60px;
        height: 100%;
        border-radius: 0;
        background: transparent;
    }

    .shorts-modal-nav-prev {
        left: 0;
    }

    .shorts-modal-nav-next {
        right: 0;
    }
}
