/* ========================================
   NEWS ARTICLE VIEW STYLES
   Consistent with site design (dark theme)
   ======================================== */

.news-view-container {
    /* Removed - using Bootstrap container */
}

.news-content-wrapper {
    /* Removed - using Bootstrap row */
}

.news-main-content {
    /* Width handled by Bootstrap col-12 col-lg-9 */
}

.article-hero {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--HM-border);
}

.article-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    position: relative;
    background: var(--HM-bg-dark);
}

.article-hero-image[src=""],
.article-hero-image[src*="data:image/svg"],
.article-hero-image:not([src]) {
    opacity: 0;
}

.article-hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--HM-bg-dark);
    z-index: -1;
}

.article-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%);
}

.article-hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.article-club-badge {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.article-club-badge .club-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(249, 115, 22, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.article-club-badge .club-link:hover {
    background: rgba(234, 88, 12, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.article-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    max-width: 800px;
    line-height: 1.2;
}

.article-category-badge {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--HM-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--HM-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-name:hover {
    color: var(--HM-primary);
}

.article-date {
    font-size: 0.9rem;
    color: var(--HM-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-share .btn-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--HM-text-muted);
    font-size: 1.2rem;
}

.article-share .btn-share i {
    font-size: 1.32rem;
}

.article-share .btn-share:hover {
    color: var(--HM-primary);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--HM-text);
    background: var(--HM-card-bg);
    padding: 2rem;
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--HM-border);
    border-bottom: none;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--HM-text);
}

.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    color: var(--HM-text);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-gallery {
    margin: 3rem 0;
    background: var(--HM-card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--HM-border);
}

.article-gallery h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--HM-text);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid var(--HM-border);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--HM-card-bg);
    border-left: 1px solid var(--HM-border);
    border-right: 1px solid var(--HM-border);
    border-top: 1px solid var(--HM-border);
}

.article-rating-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
}

.article-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--HM-text-muted);
    font-size: 0.9rem;
}

.rating-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--HM-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-btn i {
    font-size: 1.1rem;
}

.rating-btn.btn-like:hover,
.rating-btn.btn-like.active {
    color: #4CAF50;
}

.rating-btn.btn-dislike:hover,
.rating-btn.btn-dislike.active {
    color: #f44336;
}

.article-tags-section {
    background: var(--HM-card-bg);
    padding: 1rem 1.5rem;
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--HM-border);
    border-top: 1px solid var(--HM-border);
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-tags i {
    color: var(--HM-text-muted);
}

.article-tags .tag {
    background: var(--HM-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* ========================================
   SIDEBAR & RELATED
   ======================================== */

.news-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-section {
    background: var(--HM-card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--HM-border);
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--HM-text);
}

.related-articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article-card {
    background: var(--HM-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--HM-border);
}

.related-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.related-article-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.related-article-image {
    width: 100%;
    height: 80px;
    overflow: hidden;
    background: var(--HM-bg-dark);
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-article-image img::before,
.related-article-image img::after {
    display: none !important;
}

.related-article-card:hover .related-article-image img {
    transform: scale(1.1);
}

.related-article-content {
    padding: 0.6rem;
}

.related-article-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--HM-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-date {
    font-size: 0.8rem;
    color: var(--HM-text-muted);
}

.no-related {
    text-align: center;
    color: var(--HM-text-muted);
    padding: 2rem 0;
}

/* ========================================
   RESPONSIVE DESIGN (Article & Sidebar)
   ======================================== */

@media (max-width: 1200px) {
    .news-content-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }
}

@media (max-width: 968px) {
    .news-content-wrapper {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        position: static;
    }

    .article-hero {
        height: 400px;
    }

    .article-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 640px) {
    .article-hero {
        height: 300px;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-category-badge {
        top: 1rem;
        right: 1rem;
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .article-club-badge {
        top: 1rem;
    }

    .article-club-badge .club-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .article-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .article-rating-actions {
        flex-direction: column;
        width: 100%;
    }

    .rating-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================
   NEWS EDIT PAGE — state badges
   ========================= */

.badge-state {
    display: inline-block;
    padding: .3rem .75rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
}

.badge-state--draft     { background: var(--HM-border);        color: var(--HM-text-muted); }
.badge-state--pending   { background: var(--HM-warning-soft);  color: var(--HM-warning);    border: 1px solid var(--HM-warning-border); }
.badge-state--approved  { background: var(--HM-info-soft);     color: var(--HM-info);       border: 1px solid var(--HM-info-border); }
.badge-state--published { background: rgba(34,197,94,.15);    color: #16a34a;              border: 1px solid rgba(34,197,94,.3); }
.badge-state--returned  { background: var(--HM-danger-soft);  color: var(--HM-danger);     border: 1px solid var(--HM-danger-border); }

[data-theme="dark"] .badge-state--published { color: #4ade80; }

/* =========================
   NEWS CREATE PAGE
   ========================= */

/* Cover image overlay — hover controls shown over the preview image */
.nc-cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    opacity: 0;
    transition: opacity .15s;
}

#nc-cover-preview-container:hover .nc-cover-overlay {
    opacity: 1;
}

.nc-cover-btn {
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 8px;
    padding: .45rem .9rem;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s;
}

.nc-cover-btn:hover {
    background: rgba(255, 255, 255, .25);
}

.nc-cover-btn--danger {
    background: rgba(239, 68, 68, .7);
    border-color: rgba(239, 68, 68, .8);
}

.nc-cover-btn--danger:hover {
    background: rgba(239, 68, 68, .9);
}

/* Quill editor min-height for the news article content editor */
#nc-quill-editor .ql-container {
    min-height: 320px;
}

#nc-quill-editor .ql-editor {
    min-height: 320px;
    line-height: 1.7;
}

