/* ========================================
   Калачинск Онлайн - Страница новости
   Полный CSS: news-detail.css
   ======================================== */

/* ========================================
   ПЕРЕМЕННЫЕ (наследуются из new-design.css)
   ======================================== */
/* 
   :root {
       --primary-color: #3B82F6;
       --primary-hover: #2563EB;
       --text-dark: #1F2937;
       --text-body: #374151;
       --text-gray: #6B7280;
       --text-light: #9CA3AF;
       --bg-light: #F3F4F6;
       --border-color: #E5E7EB;
       --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
       --radius-md: 10px;
       --radius-lg: 12px;
   }
*/

/* ========================================
   BREADCRUMB
   ======================================== */
.news-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.news-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.news-breadcrumb a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.news-breadcrumb .separator {
    color: var(--text-light);
    font-size: 0.8rem;
    opacity: 0.8;
}

.news-breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* ========================================
   LAYOUT GRID
   ======================================== */
.news-detail-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 24px;
    align-items: start;
}

.news-main-content {
    min-width: 0;
}

/* ========================================
   ARTICLE CARD
   ======================================== */
.news-article-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Article Header */
.news-article-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
}

.news-article-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0 0 1rem 0;
}

.news-article-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-tag {
    display: inline-block;
    background: #F3F4F6;
    color: var(--text-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    width: fit-content;
}

.news-meta-info {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.news-meta-info span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.news-meta-info i {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ========================================
   ARTICLE IMAGE / GALLERY SLIDER
   ======================================== */
.news-article-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin: 0 1.75rem 1.5rem;
}

.news-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
}

/* Slider Container */
.news-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slide */
.news-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.news-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* Slider Controls */
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-dark);
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
}

.news-image-slider:hover .slider-prev,
.news-image-slider:hover .slider-next {
    opacity: 1;
}

.slider-prev:hover,
.slider-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    color: var(--primary-color);
}

.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot:hover {
    background: white;
}

.slider-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* ========================================
   ARTICLE BODY
   ======================================== */
.news-article-body {
    padding: 0 1.75rem 1.75rem;
}

.news-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-body);
}

.news-content p {
    margin: 0 0 1.25rem 0;
}

.news-content p:last-child {
    margin-bottom: 0;
}

.news-content strong {
    font-weight: 700;
    color: var(--text-dark);
}

.news-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.news-content a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ========================================
   ARTICLE FOOTER & SHARE
   ======================================== */
.news-article-footer {
    padding: 1.5rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: #FAFAFA;
}

.news-share-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-share-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.news-share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-link {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1.5px solid var(--border-color);
    color: var(--text-gray);
    font-size: 1.1rem;
    transition: all 0.2s;
    text-decoration: none;
}

.share-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.share-link.copy-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.04);
}

.share-link.share-tg:hover {
    background: #229ED9;
    color: white;
    border-color: #229ED9;
}

.share-link.share-vk:hover {
    background: #0077FF;
    color: white;
    border-color: #0077FF;
}

.share-link.share-ok:hover {
    background: #EE8208;
    color: white;
    border-color: #EE8208;
}

/* ========================================
   SIDEBAR
   ======================================== */
.news-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========================================
   AFISHA SLIDER (330x644px)
   ======================================== */
.sidebar-afisha-block {
    width: 330px;
    height: 644px;
    background: white;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.afisha-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 5;
    pointer-events: none;
}

.afisha-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    z-index: 1;
}

.afisha-slide.active {
    opacity: 1;
    z-index: 2;
}

.afisha-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    cursor: pointer;
}

.afisha-dots {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.afisha-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.afisha-dot:hover {
    background: white;
}

.afisha-dot.active {
    background: white;
    width: 18px;
    border-radius: 3px;
}

.afisha-empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #60A5FA);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
}

.afisha-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.afisha-empty h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: white;
}

.afisha-empty p {
    font-size: 0.875rem;
    opacity: 0.9;
    color: white;
}

/* ========================================
   OTHER NEWS SIDEBAR BLOCK
   ======================================== */
.sidebar-other-news {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.other-news-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.other-news-item {
    display: block;
    padding: 0.875rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.other-news-item:last-child {
    border-bottom: none;
}

.other-news-item:hover {
    background: var(--bg-light);
}

.other-news-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.375rem 0;
    line-height: 1.4;
}

.other-news-item:hover .other-news-title {
    color: var(--primary-hover);
}

.other-news-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.other-news-date i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.other-news-date .fa-arrow-right {
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--primary-color);
}

.other-news-item:hover .other-news-date .fa-arrow-right {
    opacity: 1;
}

/* ========================================
   ALL CATEGORIES SECTION
   ======================================== */
.all-categories-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.all-categories-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.all-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem 2rem;
}

.category-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    border-radius: 4px;
}

.category-list-item:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.category-list-item .cat-name {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 500;
}

.category-list-item:hover .cat-name {
    color: var(--primary-color);
}

.category-list-item .cat-count {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
    background: var(--bg-light);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 32px;
    text-align: center;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet: 1024px */
@media (max-width: 1024px) {
    .news-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .news-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .sidebar-afisha-block {
        width: 100%;
        height: 400px;
        flex: 1;
        min-width: 280px;
    }
    
    .sidebar-other-news {
        width: calc(50% - 0.5rem);
        flex: 1;
        min-width: 280px;
    }
    
    .all-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: 768px */
@media (max-width: 768px) {
    .news-breadcrumb {
        font-size: 0.85rem;
    }
    
    .news-article-title {
        font-size: 1.4rem;
    }
    
    .news-meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .news-article-header,
    .news-article-body,
    .news-article-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .news-article-image {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }
    
    .sidebar-afisha-block {
        height: 300px;
        width: 100%;
    }
    
    .sidebar-other-news {
        width: 100%;
    }
    
    .all-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem 1rem;
    }
    
    /* Slider controls on mobile */
    .slider-prev,
    .slider-next {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        opacity: 1;
    }
    
    .slider-prev { left: 0.5rem; }
    .slider-next { right: 0.5rem; }
    
    .slider-dots {
        padding: 0.4rem 0.6rem;
        bottom: 0.75rem;
    }
    
    .slider-dot {
        width: 6px;
        height: 6px;
    }
    
    .slider-dot.active {
        width: 18px;
    }
}

/* Small Mobile: 480px */
@media (max-width: 480px) {
    .news-article-title {
        font-size: 1.25rem;
    }
    
    .news-tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    
    .news-share-buttons {
        gap: 0.375rem;
    }
    
    .share-link {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .all-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-list-item {
        padding: 0.5rem 0;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .news-sidebar,
    .news-share-buttons,
    .slider-prev,
    .slider-next,
    .slider-dots,
    .afisha-dots {
        display: none !important;
    }
    
    .news-article-image {
        max-height: none;
        margin: 0;
    }
    
    .news-main-image {
        height: auto;
        max-height: 400px;
    }
    
    .news-detail-layout {
        display: block;
    }
}