/* ============================================================
   GALE PRIME - PREMIUM NEWS & ANALYSIS STYLES (V2 - LIGHT)
   Institutional-Grade Editorial Design
   ============================================================ */

:root {
    --news-gold: #c5a059;
    --news-gold-light: #e0c38c;
    --news-dark: #0a0e14;
    --news-light-bg: #f8fbff;
    --news-card-bg: #ffffff;
    --news-glass-border: rgba(197, 160, 89, 0.2);
    --news-text-main: #051429;
    --news-text-muted: #585858;
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global Section Overrides --- */
.news-page-wrapper {
    background-color: var(--news-light-bg);
    color: var(--news-text-main);
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

.news-page-wrapper main.container {
    padding: 100px 0;
}

.news-terminal-section {
    margin-bottom: 100px;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

/* --- Hero Section V2 (Centered) --- */
.news-hero {
    position: relative;
    height: 90vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/backgrounds/news-hero-bg-v2.png') no-repeat center center/cover;
    padding-top: 100px;
    text-align: center;
}

.news-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(10, 14, 20, 0.6) 0%, rgba(10, 14, 20, 0.9) 100%);
    z-index: 1;
}

.news-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.news-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid var(--news-gold);
    border-radius: 50px;
    color: var(--news-gold);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
}

.news-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 25px;
    color: #ffffff;
}

.news-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 700px;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
}

/* --- Ticker Styling --- */
.market-ticker-v2 {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    z-index: 99;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* --- Section Headers --- */
.section-header {
    margin-bottom: 50px;
    position: relative;
    text-align: center;
    padding-top: 20px;
}

.section-tag {
    color: var(--news-gold);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--news-text-main);
}

/* --- Premium Cards (Light Mode) --- */
.news-card-v2 {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 30px;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0, 20, 137, 0.03);
}

.news-card-v2:hover {
    transform: translateY(-12px);
    border-color: var(--news-gold);
    box-shadow: 0 30px 70px rgba(0, 20, 137, 0.08);
}

.news-card-img {
    height: 240px;
    overflow: hidden;
    position: relative;
}

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

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

.news-card-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--news-gold);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.news-card-body {
    padding: 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-card-date {
    color: var(--news-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.news-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.3;
    color: var(--news-text-main);
    transition: var(--transition-smooth);
}

.news-card-v2:hover .news-card-title {
    color: var(--news-gold);
}

.news-card-excerpt {
    color: var(--news-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--news-gold);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    margin-top: auto;
}

/* --- Intelligence Dashboard Layout --- */
.intelligence-dashboard {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    margin-top: 50px;
}

.featured-analysis {
    display: flex;
    flex-direction: column;
}

.secondary-feed {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* --- Refined Card Styles --- */
.analysis-card-premium {
    background: #ffffff;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 45px rgba(0, 20, 137, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
    height: 100%;
}

.analysis-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 20, 137, 0.1);
    border-color: var(--news-gold);
}

.analysis-card-premium.featured {
    height: 100%;
    min-height: 600px;
}

.featured-img-box {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.featured-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
}

.analysis-card-premium:hover .featured-img-box img {
    transform: scale(1.05);
}

.featured-content-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(5, 20, 41, 0.95) 0%, rgba(5, 20, 41, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    color: #ffffff;
}

.analysis-card-premium.small {
    display: grid;
    grid-template-columns: 140px 1fr;
    padding: 20px;
    gap: 25px;
    align-items: center;
}

.small-img-box {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    overflow: hidden;
}

.small-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.analysis-card-premium.small:hover .small-img-box img {
    transform: scale(1.1);
}

.small-content h4 {
    font-size: 1.25rem;
    font-weight: 750;
    margin-bottom: 10px;
    color: var(--news-text-main);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.analysis-card-premium.small:hover .small-content h4 {
    color: var(--news-gold);
}

.small-content .date {
    font-size: 0.85rem;
    color: var(--news-text-muted);
    font-weight: 600;
}

/* --- Filter Bar --- */
.analysis-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 12px 30px;
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--news-text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--news-gold);
    color: #fff;
    border-color: var(--news-gold);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
}

@media (max-width: 1100px) {
    .intelligence-dashboard {
        grid-template-columns: 1fr;
    }
}

/* --- News Terminal (High-Fidelity Dashboard) --- */
.terminal-wrapper {
    background: #ffffff;
    border-radius: 40px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 40px 80px rgba(0, 20, 137, 0.05);
    position: relative;
    overflow: hidden;
}

.terminal-inner {
    background: #ffffff;
    border-radius: 40px;
    display: grid;
    grid-template-columns: 1fr 300px;
    height: 700px;
    overflow: hidden;
}

.terminal-main {
    padding: 40px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.terminal-sidebar {
    background: #fafbfc;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--news-text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.sidebar-item {
    padding: 15px;
    background: #fff;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.sidebar-item:hover {
    border-color: var(--news-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.item-symbol {
    font-weight: 700;
    font-size: 0.9rem;
}

.item-price {
    font-weight: 600;
    color: #4caf50;
}

.item-price.down {
    color: #f44336;
}

.terminal-pro-cta {
    margin-top: auto;
    padding: 25px;
    background: rgba(197, 160, 89, 0.08);
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(197, 160, 89, 0.15);
}

.pro-badge {
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--news-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pro-text {
    font-size: 0.85rem;
    color: var(--news-text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
}

.pro-link {
    font-size: 0.9rem;
    justify-content: center;
}

/* --- Responsive Refinements --- */
@media (max-width: 1200px) {
    .container {
        padding-left: 25px;
        padding-right: 25px;
    }

    .terminal-wrapper,
    .terminal-inner {
        border-radius: 0px;
    }

}

@media (max-width: 1100px) {
    .intelligence-dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1000px) {

    .terminal-inner {
        grid-template-columns: 1fr;
        height: auto;
    }

    .terminal-main {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        min-height: 500px;
    }

    .terminal-sidebar {
        height: auto;
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .news-hero {
        height: auto;
        min-height: 400px;
        padding: 140px 0px 60px;
    }

    .news-hero-content {
        background: transparent;
        backdrop-filter: none;
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .news-hero h1 {
        font-size: 2.4rem;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .news-hero h1 br {
        display: none;
    }

    .news-hero p {
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.85);
        margin-bottom: 35px;
    }

    .hero-actions .glow-btn {
        width: auto;
        display: inline-block;
        padding: 15px 40px;
    }

    .news-hero-badge {
        font-size: 0.8rem;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .market-ticker-v2 {
        top: 60px;
        /* Adjust for mobile header height if different */
    }

    .featured-content-overlay {
        padding: 30px;
    }

    .featured-content-overlay h3 {
        font-size: 1.8rem !important;
    }

    .analysis-card-premium.small {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .small-img-box {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }

    .read-more-link {
        justify-content: center;
    }

    .terminal-wrapper,
    .terminal-inner {
        border-radius: 0px;
    }

    .terminal-main {
        padding: 20px;
        min-height: 450px;
    }

    .terminal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }

    .terminal-brand-icon {
        display: none;
    }

    .mb-100 {
        margin-bottom: 60px;
    }

    main.container {
        padding: 60px 0 !important;
    }
}

@media (max-width: 480px) {
    .news-hero h1 {
        font-size: 2rem;
    }

    .news-hero-badge {
        font-size: 0.75rem;
        letter-spacing: 1px;
        padding: 6px 15px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .news-card-body {
        padding: 25px;
    }

    .news-card-title {
        font-size: 1.2rem;
    }

    .terminal-sidebar {
        padding: 25px 15px;
    }

    .education-grid {
        padding: 0px 10px;
    }



    /* Education grid refinement for very small screens */
    .education-grid {
        grid-template-columns: 1fr !important;
        gap: 25px;
    }


}

/* --- Touch Device Optimization --- */
@media (hover: none) {

    .news-card-v2:active,
    .analysis-card-premium:active {
        transform: scale(0.98);
        transition: transform 0.2s ease;
    }
}