/* Современный дизайн страницы новости в стиле news.php */

/* Hero секция для отдельной новости */
.news-detail-hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.news-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="0,100 100,0 200,50 300,0 400,80 500,20 600,60 700,0 800,40 900,0 1000,30 1000,100"/></svg>') repeat-x;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(0px); }
    50% { transform: translateX(-50px); }
}

.news-detail-hero-content {
    position: relative;
    z-index: 2;
}

.news-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.news-detail-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.news-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.news-detail-meta-item i {
    font-size: 1rem;
}

/* Breadcrumbs */
.news-breadcrumbs {
    background: #f8fafc;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumbs-content {
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumbs-content a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs-content a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumbs-content span {
    color: #374151;
    font-weight: 500;
}

/* Основной контент */
.news-detail-main {
    padding: 3rem 0;
    background: #f9fafb;
}

.news-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.news-detail-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Медиа контейнер */
.media-container {
    margin-bottom: 2rem;
}

/* Контент статьи */
.news-article-content {
    padding: 2.5rem;
}

.news-content-formatted {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: #374151;
    font-size: 1.1rem;
}

.news-content-formatted h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content-formatted .highlight {
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f8ff 100%);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.news-content-formatted .emoji {
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.news-content-formatted .highlight-text {
    flex: 1;
    font-size: 1.05rem;
    color: #374151;
    font-weight: 500;
}

.news-content-formatted .news-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.news-content-formatted .news-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.news-content-formatted .news-list li:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.news-content-formatted .checkmark {
    color: #10b981;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.news-content-formatted .news-list li span:last-child {
    flex: 1;
    color: #4b5563;
    line-height: 1.6;
}

.news-content-formatted p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.news-content-formatted p:first-of-type {
    font-size: 1.15rem;
    font-weight: 500;
    color: #1f2937;
}

/* Дата в конце новости */
.news-detail-date {
    text-align: right;
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Карусель медиафайлов */
.media-carousel {
    position: relative;
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.media-carousel-container {
    overflow: hidden;
    background: #000;
}

.media-carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.media-carousel-slide {
    min-width: 100%;
    cursor: pointer;
    position: relative;
}

.media-carousel-slide img,
.media-carousel-slide video {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.media-carousel-slide:hover .video-indicator {
    background: rgba(59, 130, 246, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 12px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: rgba(59, 130, 246, 0.8);
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav.prev {
    left: 15px;
}

.carousel-nav.next {
    right: 15px;
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #3b82f6;
    transform: scale(1.2);
}

.carousel-counter {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Галерея для небольшого количества медиафайлов */
.media-gallery {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.media-gallery.single-item {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 2rem auto;
}

.media-gallery.two-items {
    grid-template-columns: repeat(2, 1fr);
}

.media-gallery.three-items {
    grid-template-columns: repeat(3, 1fr);
}

.media-gallery-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #000;
}

.media-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.media-gallery-item img,
.media-gallery-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Placeholder для отсутствующих медиа */
.news-no-media {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    margin: 2rem 0;
    padding: 3rem 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.news-no-media i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    display: block;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-content img,
.modal-content video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 80vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    background: rgba(239, 68, 68, 0.8);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 20px 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-nav:hover {
    background: rgba(59, 130, 246, 0.8);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
}

/* Секция связанных новостей */
.related-news-section {
    margin-top: 3rem;
}

.related-news-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.related-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.related-news-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.related-news-category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.related-news-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-news-title-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-excerpt {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
}

.related-news-date {
    font-size: 0.8rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .news-detail-title {
        font-size: 1.8rem;
    }
    
    .news-detail-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .news-article-content {
        padding: 1.5rem;
    }
    
    .news-content-formatted {
        font-size: 1rem;
    }
    
    .news-content-formatted h3 {
        font-size: 1.2rem;
    }
    
    .news-content-formatted .highlight {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .media-carousel-slide img,
    .media-carousel-slide video {
        height: 250px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 70%;
    }
    
    .close {
        font-size: 30px;
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .modal-nav {
        padding: 15px 10px;
        font-size: 20px;
    }

    .related-news-grid {
        grid-template-columns: 1fr;
    }

    .media-gallery.two-items,
    .media-gallery.three-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .news-detail-title {
        font-size: 1.5rem;
    }
    
    .news-article-content {
        padding: 1rem;
    }
    
    .news-content-formatted h3 {
        font-size: 1.1rem;
    }

    .news-detail-container {
        padding: 0 1rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Социальные кнопки */
.social-share {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.social-share h4 {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.social-icon.telegram {
    background: #0088cc;
}

.social-icon.vk {
    background: #4680c2;
}

.social-icon.telegram:hover {
    background: #006699;
}

.social-icon.vk:hover {
    background: #365899;
}