/* News Page Styles */

/* Override body background for news page */
body {
    background: #307be7 !important;
}

/* Force white text for page title */
h1[class*="page-title"],
h1[class="page-title"],
.page-title,
.news-list-header h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
    background: transparent !important;
    background-image: none !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

/* Header/Navbar Consistency */
.header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(48, 123, 231, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.nav-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

.news-main {
    min-height: 100vh;
    padding-top: 80px;
    background: #307be7 !important;
    color: white;
    position: relative;
    overflow: hidden;
}

.news-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="news-pattern" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="50" cy="50" r="1.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23news-pattern)"/></svg>');
    opacity: 0.3;
}

.article-container,
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Simple Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 400;
}

.breadcrumb-link {
    color: #666 !important;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
}

.breadcrumb-link:hover {
    color: #307be7 !important;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 0.25rem;
    font-size: 0.8rem;
}

.breadcrumb-current {
    color: #333 !important;
    font-weight: 600;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* News List Styles */
.news-list-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.news-list-header h1,
.news-list-header .page-title,
h1.page-title {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
    font-weight: 700 !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

.news-list-header p,
.news-list-header .page-subtitle {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    opacity: 1 !important;
}

.page-title {
    font-size: 3rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

.page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: white;
    margin: 16px auto 0;
    border-radius: 2px;
}

.page-subtitle {
    font-size: 1.2rem !important;
    color: white !important;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    opacity: 1 !important;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* Single Article Styling */
.news-article {
    position: relative;
    z-index: 1;
}

.article-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Article Header */
.article-header {
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-category {
    background: #1976d2;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.article-category.technology { background: #1976d2; }
.article-category.policy { background: #388e3c; }
.article-category.market { background: #f57c00; }
.article-category.innovation { background: #7b1fa2; }
.article-category.environment { background: #00796b; }
.article-category.business { background: #d32f2f; }

.article-date {
    color: #666;
    font-size: 0.9rem;
}

.article-read-time {
    color: #307be7;
    font-size: 0.9rem;
    background: rgba(48, 123, 231, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.article-excerpt {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 2rem;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #1a1a1a;
}

.author-title {
    font-size: 0.9rem;
    color: #666;
}

/* Featured Image with Gallery */
.article-image-wrapper {
    margin-bottom: 3rem;
}

.article-image {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.article-image:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: opacity 0.15s ease;
}

.image-zoom-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(48, 123, 231, 0.9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.article-image:hover .image-zoom-icon {
    opacity: 1;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #307be7 #f1f5f9;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #307be7;
    border-radius: 3px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    overflow: hidden;
    transition: all 0.3s ease;
}

.thumbnail-item:hover {
    border-color: #64748b;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: #307be7;
    box-shadow: 0 4px 12px rgba(48, 123, 231, 0.4);
    transform: scale(1.05);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-count {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(48, 123, 231, 0.1);
    border-radius: 8px;
    color: #307be7;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    border: 1px solid rgba(48, 123, 231, 0.2);
    display: inline-flex;
}

.gallery-count svg {
    color: #307be7;
}

/* Image Lightbox */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    color: #1a202c;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: #307be7;
    color: white;
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #444;
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* Article Footer */
.article-footer {
    border-top: 1px solid #333;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(100, 181, 246, 0.1);
    color: #64b5f6;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-text {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(100, 181, 246, 0.2);
    transform: translateY(-2px);
}

/* Related Articles */
.related-articles {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    margin: 2rem auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 1200px;
}

.related-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.related-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.related-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-image {
    height: 200px;
    overflow: hidden;
}

.related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-img {
    transform: scale(1.05);
}

.related-content {
    padding: 1.5rem;
}

.related-category {
    display: inline-block;
    background: #1976d2;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.related-category.technology { background: #1976d2; }
.related-category.policy { background: #388e3c; }
.related-category.market { background: #f57c00; }
.related-category.innovation { background: #7b1fa2; }
.related-category.environment { background: #00796b; }
.related-category.business { background: #d32f2f; }

.related-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.related-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

/* News List View */
.news-list {
    padding: 2rem 0 4rem;
}

.news-list-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.news-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg, 20px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #307be7 0%, #1976d2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.news-card:hover::before {
    transform: scaleX(1);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(48, 123, 231, 0.15);
    border-color: rgba(48, 123, 231, 0.3);
    background: rgba(255, 255, 255, 1);
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-img {
    transform: scale(1.08);
}

.news-card-category,
.news-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.news-card-content {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 12px;
    color: #666;
}

.news-read-time {
    background: rgba(48, 123, 231, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 500;
    color: #307be7;
}

.news-author {
    font-weight: 500;
}

.news-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.read-more {
    font-size: 12px;
    font-weight: 600;
    color: #307be7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-arrow {
    color: #307be7;
    transition: transform 0.3s ease;
}

.news-card:hover .news-arrow {
    transform: translateX(4px);
}

.news-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar.mini {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.author-name {
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* Footer */
.footer {
    background: #0d1117;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

.footer-description {
    color: #b0b0b0;
    line-height: 1.6;
}

.footer-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #64b5f6;
}

.contact-info p {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
    }
    
    .featured-image {
        height: 250px;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .breadcrumb-current {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .article-container {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
}