/* ========================================
   Roxy Boost - Стили раздела новостей
   ======================================== */

/* Страница листинга новостей */
.news-page {
    min-height: 60vh;
    padding: 120px 20px 60px;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
}

.news-page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-color-strong);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.news-card-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.news-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-link {
    margin-top: 15px;
    color: var(--accent-green);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Пагинация */
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.news-pagination button {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.news-pagination button:hover {
    color: var(--text-primary);
    border-color: var(--border-color-strong);
}

.news-pagination button.active {
    background: var(--accent-green);
    color: #000;
    border-color: var(--accent-green);
}

.news-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.news-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px;
    font-size: 1.1rem;
}

/* Страница статьи */
.article-page {
    min-height: 60vh;
    padding: 120px 20px 60px;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 30px;
}

.article-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.article-h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

/* Контент статьи — типографика */
.article-content {
    position: relative;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.article-content .article-tariff-placeholder {
    box-sizing: border-box;
    overflow: hidden;
}

.article-content .article-tariff-scaler {
    transform-origin: top left;
}

.article-content .article-tariff-placeholder .pricing-card:hover {
    transform: none;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 35px 0 15px;
    color: var(--text-primary);
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 30px 0 12px;
    color: var(--text-primary);
}

.article-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 25px 0 10px;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 18px;
}

.article-content a {
    color: var(--accent-green);
    text-decoration: underline;
    text-decoration-color: rgba(255, 106, 53, 0.3);
    transition: text-decoration-color var(--transition-fast);
}

.article-content a:hover {
    text-decoration-color: var(--accent-green);
}

.article-content ul,
.article-content ol {
    margin-bottom: 18px;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.article-content .article-cta-btn {
    display: inline-block;
    padding: 16px 44px;
    background: linear-gradient(135deg, var(--accent-green), #e04d1a);
    color: #000;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    border-radius: 50px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 25px rgba(255, 106, 53, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-content .article-cta-btn:hover {
    box-shadow: 0 8px 35px rgba(255, 106, 53, 0.5);
    transform: translateY(-3px);
    text-decoration: none;
}

.article-content strong {
    font-weight: 600;
}

.article-content s {
    color: var(--text-muted);
}

/* Создатель букв — выделение стилизованного текста */
.article-content .rx-text {
    border-radius: 3px;
    padding: 0 2px;
}

.article-content .rx-text:hover {
    box-shadow: 0 0 0 1px rgba(255, 106, 53, 0.2);
}

/* ========================================
   Кастомный видеоплеер для новостей
   ======================================== */
.article-content .custom-video-player-wrapper {
    position: relative;
    width: 100%;
    margin: 25px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.article-content .custom-video-player {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.article-content .custom-video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
}

.article-content .custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 10px 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.article-content .custom-video-player:hover .custom-video-controls {
    opacity: 1;
}

.article-content .custom-video-progress-container {
    width: 100%;
    height: 6px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.article-content .custom-video-progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    transition: height 0.1s ease;
}

.article-content .custom-video-progress-container:hover .custom-video-progress-bar {
    height: 6px;
}

.article-content .custom-video-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-green);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.article-content .custom-video-controls-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-content .custom-video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.article-content .custom-video-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.article-content .custom-video-btn:active {
    transform: scale(0.95);
}

.article-content .custom-video-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
}

.article-content .custom-video-duration {
    opacity: 0.7;
}

.article-content .custom-video-volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.article-content .custom-video-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.article-content .custom-video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.article-content .custom-video-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.article-content .custom-video-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.article-content .custom-video-volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Fullscreen стили */
.article-content .custom-video-player:fullscreen {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-content .custom-video-player:fullscreen .custom-video {
    max-height: none;
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.article-content .custom-video-player:fullscreen .custom-video-controls {
    padding: 15px 20px 20px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .article-content .custom-video-volume-slider {
        width: 60px;
    }

    .article-content .custom-video-btn {
        width: 32px;
        height: 32px;
    }

    .article-content .custom-video-btn svg {
        width: 16px;
        height: 16px;
    }
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-green);
    font-weight: 500;
    margin-top: 40px;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.article-back:hover {
    opacity: 0.8;
}

.article-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px;
    font-size: 1.1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-page-title {
        font-size: 1.5rem;
    }

    .article-h1 {
        font-size: 1.6rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.3rem;
    }

    .article-content h3 {
        font-size: 1.15rem;
    }
}