/* Страница новостей в стиле истории изменений */
.news-page {
    min-height: 100vh;
    padding: calc(var(--header-height) + 2rem) 0 4rem;
    background: linear-gradient(132deg, #000000, #1C1C1C, #131313, #282828);
    position: relative;
}

.news-page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.news-page-title {
    font-family: 'Druk Wide', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.news-search-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.news-search-input {
    flex: 1;
    min-width: 300px;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s var(--ease);
}

.news-search-input:focus {
    outline: none;
    border-color: var(--yellow);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.1);
}

.news-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.news-sort-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    font-size: 0.95rem;
}

.news-sort-btn:hover {
    background: rgba(255, 180, 0, 0.1);
    border-color: var(--yellow);
    color: var(--yellow);
}

/* Визуализация изменений */
.changes-visualization {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.changes-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.legend-square {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-square.legend-added {
    background: #2ecc71;
}

.legend-square.legend-fixed {
    background: #e74c3c;
}

.legend-square.legend-changed {
    background: #3498db;
}

.changes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20px, 1fr));
    gap: 4px;
    margin-bottom: 1.5rem;
    max-width: 100%;
    overflow: hidden;
}

.change-square {
    aspect-ratio: 1;
    border-radius: 3px;
    transition: transform 0.2s ease;
}

.change-square:hover {
    transform: scale(1.2);
    z-index: 10;
    position: relative;
}

.changes-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.changes-range {
    flex: 1;
    max-width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.changes-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--yellow);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.changes-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 180, 0, 0.5);
}

.changes-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--yellow);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.changes-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 180, 0, 0.5);
}

/* Временная шкала новостей */
.news-timeline {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.news-timeline::before {
    content: '';
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--yellow), transparent);
    opacity: 0.3;
}

.news-timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    padding-left: 1rem;
    animation: fadeInUp 0.6s var(--ease);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-date {
    flex-shrink: 0;
    width: 100px;
    text-align: right;
    padding-top: 0.5rem;
}

.date-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.date-full {
    color: var(--yellow);
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.news-update-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.news-update-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--yellow);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s var(--ease);
}

.news-update-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--yellow);
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.news-update-card:hover::before {
    transform: scaleY(1);
}

.update-title {
    font-family: 'Druk Wide', sans-serif;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.3;
    position: relative;
    padding-left: 1.5rem;
}

.update-title::before {
    content: '#';
    position: absolute;
    left: 0;
    color: var(--yellow);
    font-size: 1.2rem;
}

.update-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.update-images-preview {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.preview-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.preview-image:hover {
    transform: scale(1.1);
    border-color: var(--yellow);
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-image-more {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: rgba(255, 180, 0, 0.1);
    border: 1px solid var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yellow);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more-btn {
    background: transparent;
    border: 2px solid var(--yellow);
    color: var(--yellow);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.read-more-btn:hover {
    background: var(--yellow);
    color: var(--black);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 180, 0, 0.3);
}

/* Модальные окна (используем стили из основного файла, но адаптируем) */
.news-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s var(--ease);
}

.news-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s var(--ease);
}

.news-modal-header {
    background: linear-gradient(135deg, var(--yellow), #ff8c00);
    padding: 1.5rem 2rem;
    position: relative;
}

.news-modal-header h3 {
    color: var(--black);
    font-family: 'Druk Wide', sans-serif;
    font-size: 1.4rem;
    margin: 0;
    padding-right: 3rem;
    line-height: 1.3;
}

.news-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: var(--black);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
    font-size: 1.2rem;
}

.news-modal-close:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: rotate(90deg);
}

.news-modal-body {
    padding: 2rem;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.news-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.news-meta-item i {
    color: var(--yellow);
    width: 16px;
}

.news-full-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.news-external-link {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.no-news {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-news i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-news h3 {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    font-family: 'Druk Wide', sans-serif;
}

/* Карусель изображений (из основного файла) */
.news-images-carousel {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.carousel-container {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s var(--ease);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: none;
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s var(--ease);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.02);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
    backdrop-filter: blur(10px);
    z-index: 10;
    font-size: 1.2rem;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.indicator.active {
    background: var(--yellow);
    transform: scale(1.2);
}

.carousel-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .news-page {
        padding: calc(var(--header-height) + 1rem) 0 2rem;
    }

    .news-page-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .news-search-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .news-search-input {
        min-width: 100%;
    }

    .changes-visualization {
        padding: 1.5rem;
    }

    .changes-legend {
        gap: 1rem;
    }

    .news-timeline::before {
        left: 60px;
    }

    .news-timeline-item {
        gap: 1rem;
        padding-left: 0.5rem;
    }

    .timeline-date {
        width: 60px;
    }

    .date-time {
        font-size: 0.75rem;
    }

    .date-full {
        font-size: 0.8rem;
    }

    .news-update-card {
        padding: 1.5rem;
    }

    .update-title {
        font-size: 1.2rem;
        padding-left: 1.2rem;
    }

    .update-description {
        font-size: 0.95rem;
    }

    .preview-image {
        width: 60px;
        height: 60px;
    }

    .preview-image-more {
        width: 60px;
        height: 60px;
        font-size: 0.8rem;
    }

    .news-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    .news-modal-body {
        padding: 1.5rem;
        max-height: calc(85vh - 150px);
    }

    .carousel-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .news-page-title {
        font-size: 1.5rem;
    }

    .news-timeline::before {
        display: none;
    }

    .news-timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-date {
        width: 100%;
        text-align: left;
    }

    .update-title {
        font-size: 1.1rem;
    }

    .carousel-container {
        height: 250px;
    }

    .carousel-nav {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
}