/* ================================================== */
/* Article Gallery Styles - sys-articles.css */
/* Reusable image slider/gallery for articles */
/* ================================================== */

:root {
    --article-primary: #2563eb;
    --article-primary-dark: #1e40af;
    --article-text: #1f2937;
    --article-text-light: #6b7280;
    --article-border: #e5e7eb;
    --article-bg: #ffffff;
    --article-bg-alt: #f9fafb;
    --article-radius: 8px;
    --article-radius-lg: 12px;
    --article-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --article-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --article-transition: all 0.2s ease;
}

/* Image Gallery Styles */
.article-gallery {
    margin-bottom: 24px;
    border-radius: var(--article-radius-lg);
    overflow: hidden;
    box-shadow: var(--article-shadow);
    display: block !important;
    visibility: visible !important;
}

.article-gallery-empty {
    background: var(--article-bg-alt);
    border-radius: var(--article-radius-lg);
    padding: 48px 24px;
    text-align: center;
}

.article-gallery-placeholder {
    color: var(--article-text-light);
}

.article-gallery-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.article-gallery-placeholder p {
    margin: 0;
    font-size: 14px;
}

.article-gallery-main {
    position: relative;
    border-radius: var(--article-radius-lg) var(--article-radius-lg) 0 0;
    overflow: hidden;
    background: #000 !important;
    min-height: 200px;
    display: block !important;
    visibility: visible !important;
}

.article-gallery-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block !important;
    margin: 0 auto;
    visibility: visible !important;
}

.article-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--article-primary-dark);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--article-transition);
    z-index: 10;
    box-shadow: var(--article-shadow);
}

.article-gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--article-shadow-lg);
}

.article-gallery-prev {
    left: 16px;
}

.article-gallery-next {
    right: 16px;
}

.article-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.article-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 24px 16px 12px;
    font-size: 14px;
    min-height: 20px;
}

.article-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--article-bg);
    overflow-x: auto;
    border-radius: 0 0 var(--article-radius-lg) var(--article-radius-lg);
}

.article-gallery-thumb {
    flex: 0 0 80px;
    height: 60px;
    border-radius: var(--article-radius);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--article-transition);
    border: 3px solid transparent;
}

.article-gallery-thumb:hover {
    opacity: 0.9;
}

.article-gallery-thumb.active {
    opacity: 1;
    border-color: var(--article-primary);
}

.article-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article Detail Styles */
.article-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.article-detail header {
    margin-bottom: 24px;
}

.article-detail h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--article-text);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--article-text-light);
}

.article-meta .menu,
.article-meta .submenu {
    color: var(--article-primary);
}

.article-meta .date {
    font-weight: 500;
}

.article-meta .author {
    font-style: italic;
}

.article-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--article-text);
}

.article-body p {
    margin-bottom: 16px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--article-radius);
    margin: 16px 0;
}

.article-detail footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--article-border);
}

.article-detail footer .source {
    font-size: 14px;
    color: var(--article-text-light);
    font-style: italic;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .article-gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .article-gallery-prev {
        left: 8px;
    }
    
    .article-gallery-next {
        right: 8px;
    }
    
    .article-gallery-thumb {
        flex: 0 0 60px;
        height: 45px;
    }
    
    .article-gallery-image {
        max-height: 350px;
    }
    
    .article-detail {
        padding: 16px;
    }
    
    .article-detail h1 {
        font-size: 24px;
    }
    
    .article-body {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .article-gallery-thumbs {
        padding: 8px;
        gap: 6px;
    }
    
    .article-gallery-thumb {
        flex: 0 0 50px;
        height: 38px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Print Styles */
@media print {
    .article-gallery-nav,
    .article-gallery-counter {
        display: none;
    }
    
    .article-gallery {
        box-shadow: none;
    }
    
    .article-gallery-thumbs {
        display: none;
    }
}
