/* ==========================================================================
   News Detail Page - Professional & Responsive Design
   ========================================================================== */

/* General Styles */
.news-detail-container {
    width: 100%;
    margin: 0 auto;
    padding: 2rem 15px;
}

/* ==========================================================================
   1. Breadcrumb Navigation
   ========================================================================== */

.news-breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #666;
    padding: 0 0.5rem;
}

.news-breadcrumb .breadcrumb-item a {
    color: #FFA914;
    text-decoration: none;
}

.news-breadcrumb .breadcrumb-item a:hover {
    color: #E6950F;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    display: inline-block;
}

/* ==========================================================================
   2. News Article Header
   ========================================================================== */

.news-article {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.news-header {
    padding: 2rem 2rem 1rem;
}

.news-category-badge {
    margin-bottom: 1rem;
}

.news-category-badge .category-link {
    display: inline-block;
    background: #FFA914;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.news-category-badge .category-link:hover {
    background: #E6950F;
    color: white;
    transform: translateY(-1px);
}

.news-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #191919;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.news-date {
    font-weight: 500;
}

.news-source-count {
    position: relative;
    padding-left: 1rem;
}

.news-source-count::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #FFA914;
}

/* ==========================================================================
   3. News Image
   ========================================================================== */

.news-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 1;
}

/* ==========================================================================
   4. News Content
   ========================================================================== */

.news-content {
    padding: 2rem;
}

.news-detail {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 3rem;
}

.news-detail p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   5. Modern Bias Score Indicator - Enhanced Design for Detail Page
   ========================================================================== */

.bias-score-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.bias-score-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #22c55e 0%, #f59e0b 50%, #ef4444 100%);
    opacity: 0.7;
}

.bias-score-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #191919;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bias-score-title::before {
    content: '📊';
    font-size: 1.5rem;
}

/* Enhanced Bias Indicator for Detail Page */
.detail-bias-indicator {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.detail-bias-indicator:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.detail-bias-indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.detail-bias-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-bias-score-number {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #333;
    min-width: 80px;
    text-align: center;
}

.detail-bias-progress-container {
    position: relative;
    height: 16px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.detail-bias-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.detail-bias-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.4) 100%);
    animation: detailShimmer 3s infinite;
}

.detail-bias-description {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    border-left: 4px solid transparent;
}

/* Enhanced Color Themes for Detail Page */
.detail-bias-unbiased .detail-bias-text {
    color: #22c55e;
}

.detail-bias-unbiased .detail-bias-progress-bar {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.detail-bias-unbiased .detail-bias-description {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.detail-bias-unbiased .detail-bias-indicator-icon::before {
    content: '✅';
    font-size: 1.2rem;
}

.detail-bias-moderate .detail-bias-text {
    color: #f59e0b;
}

.detail-bias-moderate .detail-bias-progress-bar {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.detail-bias-moderate .detail-bias-description {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.detail-bias-moderate .detail-bias-indicator-icon::before {
    content: '⚠️';
    font-size: 1.2rem;
}

.detail-bias-high .detail-bias-text {
    color: #ef4444;
}

.detail-bias-high .detail-bias-progress-bar {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.detail-bias-high .detail-bias-description {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.detail-bias-high .detail-bias-indicator-icon::before {
    content: '🚨';
    font-size: 1.2rem;
}

/* Enhanced Animations */
@keyframes detailShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes detailFadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.detail-bias-indicator {
    animation: detailFadeInScale 0.6s ease-out;
}

/* Bias Score Explanation Section */
.bias-explanation {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bias-explanation-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bias-explanation-title::before {
    content: '💡';
    font-size: 1.1rem;
}

.bias-explanation-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   6. Standard Bias Indicator Component (For Related News)
   ========================================================================== */

.bias-indicator {
    position: relative;
    margin-top: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.bias-indicator:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.bias-indicator-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bias-text {
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bias-score-number {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #666;
    font-weight: 500;
}

.bias-progress-container {
    position: relative;
    height: 8px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bias-progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bias-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    animation: shimmer 2s infinite;
}

/* Standard Bias Indicator Themes */
.bias-unbiased .bias-text {
    color: #22c55e;
}

.bias-unbiased .bias-progress-bar {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.bias-unbiased .bias-indicator-icon::before {
    content: '✓';
    color: #22c55e;
    font-weight: bold;
}

.bias-moderate .bias-text {
    color: #f59e0b;
}

.bias-moderate .bias-progress-bar {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.bias-moderate .bias-indicator-icon::before {
    content: '⚠';
    color: #f59e0b;
    font-weight: bold;
}

.bias-high .bias-text {
    color: #ef4444;
}

.bias-high .bias-progress-bar {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.bias-high .bias-indicator-icon::before {
    content: '⚡';
    color: #ef4444;
    font-weight: bold;
}

/* Tooltip */
.bias-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bias-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.bias-indicator:hover .bias-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 8px);
}

/* Standard Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bias-indicator {
    animation: fadeInScale 0.5s ease-out;
}

/* ==========================================================================
   7. Section Titles
   ========================================================================== */

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #191919;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #FFA914;
    display: inline-block;
}

/* ==========================================================================
   7. Questions & Answers Section
   ========================================================================== */

.qa-section {
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.qa-loading, .qa-empty, .related-loading, .related-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FFA914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.accordion {
    border: none;
}

.accordion-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-header {
    background: none;
}

.accordion-button {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #191919;
    padding: 1.2rem 1.5rem;
    font-size: 1rem;
    box-shadow: none;
    border-radius: 0;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.accordion-button:not(.collapsed) {
    background: #FFA914;
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 169, 20, 0.25);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23191919'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 1.5rem;
    background: white;
    color: #555;
    line-height: 1.6;
}

.accordion-collapse {
    transition: height 0.3s ease-in-out;
}

/* ==========================================================================
   8. Related News Section
   ========================================================================== */

.related-news-section {
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 100%;
}

.related-news-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.related-news-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.related-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-news-item:hover .related-news-image img {
    transform: scale(1.05);
}

.related-news-content {
    padding: 1.5rem;
}

.related-news-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #191919;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.related-news-summary {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   9. Error State
   ========================================================================== */

.error-state {
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 2rem;
}

.error-content h1 {
    font-size: 2rem;
    color: #191919;
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.btn-primary {
    background: #FFA914;
    border-color: #FFA914;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #E6950F;
    border-color: #E6950F;
    transform: translateY(-1px);
    text-decoration: none;
}

/* ==========================================================================
   10. Layout Override Prevention
   ========================================================================== */

/* Prevent news-detail styles from affecting the main layout category bar */
.category-bar .category-link {
    /* Restore original layout styles - DO NOT MODIFY */
    font-family: "Open Sans", sans-serif !important;
    font-weight: 600 !important;
    color: white !important;
    font-size: 15px !important;
    padding: 10px 12px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    position: relative !important;
    background: none !important;
    border-radius: 0 !important;
    white-space: nowrap !important;
    display: block !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transform: none !important;
}

.category-bar .category-link:hover {
    color: var(--primary-color, #FFA914) !important;
    background: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

/* ==========================================================================
   11. Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .news-detail-container {
        padding: 1rem 10px !important;
        margin-top: 0 !important;
    }

    .news-header {
        padding: 1rem 1rem 0.5rem !important;
    }

    .news-title {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }

    .news-category-badge .category-link {
        padding: 0.3rem 0.75rem !important;
        font-size: 0.75rem !important;
        border-radius: 15px !important;
    }

    .news-meta {
        font-size: 0.8rem !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }

    .news-image-container {
        height: 250px !important;
        margin: 0 !important;
    }

    .news-content {
        padding: 1rem !important;
    }

    .news-detail {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }

    .bias-score-section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 1rem 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
        overflow: visible !important;
    }

    .bias-score-title {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
        font-weight: 600 !important;
    }

    .bias-score-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .bias-score-bar {
        width: 100% !important;
        height: 15px !important;
        background: #e9ecef !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        margin-bottom: 0.75rem !important;
    }

    .bias-score-fill {
        height: 100% !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: width 0.8s ease !important;
        position: relative !important;
    }

    .bias-score-text {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        color: white !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        white-space: nowrap !important;
    }

    .bias-explanation {
        margin-top: 1rem !important;
        padding: 0.75rem !important;
        background: rgba(248, 249, 250, 0.8) !important;
        border-radius: 8px !important;
    }

    .bias-explanation-title {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }

    .bias-explanation-text {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }

    .section-title {
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }

    .related-news-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .breadcrumb-item.active {
        max-width: 200px !important;
    }
}

@media (max-width: 480px) {
    .news-detail-container {
        padding: 0.5rem 8px !important;
    }

    .news-title {
        font-size: 1.2rem !important;
        line-height: 1.1 !important;
    }

    .news-header {
        padding: 0.75rem 0.75rem 0.5rem !important;
    }

    .news-content {
        padding: 0.75rem !important;
    }

    .news-image-container {
        height: 200px !important;
    }

    .bias-score-section {
        padding: 0.75rem !important;
        margin: 0.75rem 0 !important;
    }

    .bias-score-title {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .bias-score-bar {
        height: 12px !important;
    }

    .bias-score-text {
        font-size: 0.7rem !important;
    }

    .bias-explanation {
        padding: 0.5rem !important;
    }

    .bias-explanation-title {
        font-size: 0.9rem !important;
    }

    .bias-explanation-text {
        font-size: 0.8rem !important;
    }

    .related-news-grid {
        gap: 1rem !important;
    }

    .accordion-button {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .accordion-body {
        padding: 1rem;
    }
} 