/* News Hub Layout */
.news-hub-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    /* Reduced from 20px */
    color: var(--text-primary);
}

/* Hero Section: 2/3 + 1/3 Grid */
.hub-hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    /* Reduced from 20px */
    margin-bottom: 40px;
    /* Reduced from 50px */
    height: 500px;
}

@media (max-width: 900px) {
    .hub-hero-section {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Featured Card */
.hub-featured-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.hub-featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hub-featured-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0) 80%);
    padding: 25px;
    /* Slightly reduced */
    width: 100%;
}

.hub-featured-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.hub-featured-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hub-featured-meta {
    color: #cbd5e1;
    font-size: 0.9rem;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Top Headlines Sidebar */
.hub-headlines-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Reduced */
    height: 100%;
}

.hub-headline-card {
    flex: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hub-headline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.hub-headline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.6) 100%);
    z-index: 1;
}

.hub-headline-content {
    position: relative;
    z-index: 2;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.hub-headline-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-headline-meta {
    font-size: 0.75rem;
    color: #cbd5e1;
    display: flex;
    gap: 8px;
    align-items: center;
}

.hub-pill {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pill-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.pill-green {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.pill-cyan {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

/* Category Rails */
.hub-section-title {
    font-size: 1.2rem;
    color: #f1f5f9;
    margin-bottom: 10px;
    /* Reduced */
    padding-left: 10px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hub-section-link {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-decoration: none;
}

.hub-rail-container {
    display: flex;
    gap: 12px;
    /* Reduced gap */
    overflow-x: auto;
    padding-bottom: 15px;
    padding-top: 5px;
    margin-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.hub-rail-card {
    flex: 0 0 320px;
    height: 280px;
    scroll-snap-align: start;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Internal Glow Pseudo-element (matches feature-card) */
.hub-rail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--card-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.hub-rail-card:hover {
    transform: translateY(-5px);
}

.hub-rail-card:hover::before {
    opacity: 0.15;
}

.hub-rail-img {
    display: none;
}

.hub-rail-content {
    padding: 20px;
    position: relative;
    z-index: 1;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0) 100%);
    width: 100%;
}

.hub-rail-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-rail-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Masonry Feed */
.hub-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    /* Reduced from 25px */
    margin-bottom: 40px;
}

.hub-feed-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

.hub-feed-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

.hub-feed-img {
    width: 100%;
    height: 220px;
    /* Increased from 180px */
    object-fit: cover;
}

.hub-feed-content {
    padding: 12px;
    /* Reduced from 20px */
}

/* Color Definitions (defining --card-color) */
.hub-rail-card.color-blue {
    --card-color: #3b82f6;
}

.hub-rail-card.color-green {
    --card-color: #10b981;
}

.hub-rail-card.color-purple {
    --card-color: #8b5cf6;
}

.hub-rail-card.color-orange {
    --card-color: #f59e0b;
}

.hub-rail-card.color-teal {
    --card-color: #14b8a6;
}

.hub-rail-card.color-red {
    --card-color: #f43f5e;
}

.hub-rail-card.color-indigo {
    --card-color: #6366f1;
}

.hub-rail-card.color-pink {
    --card-color: #ec4899;
}

.hub-rail-card.color-cyan {
    --card-color: #06b6d4;
}

/* Specific Hover Glows (matching feature-card style) */
.hub-rail-card.color-blue:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.4), 0 0 15px rgba(59, 130, 246, 0.2);
}

.hub-rail-card.color-green:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4), 0 0 15px rgba(16, 185, 129, 0.2);
}

.hub-rail-card.color-purple:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.4), 0 0 15px rgba(139, 92, 246, 0.2);
}

.hub-rail-card.color-orange:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.4), 0 0 15px rgba(245, 158, 11, 0.2);
}

.hub-rail-card.color-teal:hover {
    border-color: rgba(20, 184, 166, 0.6);
    box-shadow: 0 10px 30px -5px rgba(20, 184, 166, 0.4), 0 0 15px rgba(20, 184, 166, 0.2);
}

.hub-rail-card.color-red:hover {
    border-color: rgba(244, 63, 94, 0.6);
    box-shadow: 0 10px 30px -5px rgba(244, 63, 94, 0.4), 0 0 15px rgba(244, 63, 94, 0.2);
}

.hub-rail-card.color-indigo:hover {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.4), 0 0 15px rgba(99, 102, 241, 0.2);
}

.hub-rail-card.color-pink:hover {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 10px 30px -5px rgba(236, 72, 153, 0.4), 0 0 15px rgba(236, 72, 153, 0.2);
}

.hub-rail-card.color-cyan:hover {
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 10px 30px -5px rgba(6, 182, 212, 0.4), 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Sub-Nav Tabs (News Page) */
.news-tabs-nav {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.news-tab-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 500;
    padding: 0 0 15px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    font-family: inherit;
}

.news-tab-btn:hover {
    color: #cbd5e1;
}

.news-tab-btn.active {
    color: #3b82f6;
    font-weight: 600;
}

.news-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3b82f6;
    box-shadow: 0 -2px 10px rgba(59, 130, 246, 0.5);
}

/* Large Visual Tabs section removed - styles are now centralized in style.css to support global theming */

/* Tags Button & Modal Styles */
.tags-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    /* Push to right if in flex container */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.tags-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4), inset 0 0 10px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}

/* Modal Overlay */
.tags-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tags-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Content Card */
.tags-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tags-modal-overlay.active .tags-modal-content {
    transform: scale(1);
}

/* Close Button */
.tags-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tags-modal-close:hover {
    color: white;
}

/* Typography */
.tags-modal-title {
    color: white;
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Tags Grid */
.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.modal-tag-pill {
    background: rgba(59, 130, 246, 0.1);
    color: #bfdbfe;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s;
}

.modal-tag-pill:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}