@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300&display=swap');

:root {
    --primary-color: #E63946;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --bg-light: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E5E7EB;
    --accent-color: #1D4ED8;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .headline {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    color: #111827;
}

.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    max-width: 1280px;
    padding-left: 20px;
    padding-right: 20px;
}

a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-color);
}

/* Custom spacing utilities */
.py-5 { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
.my-5 { margin-top: 3.5rem !important; margin-bottom: 3.5rem !important; }

/* Top Header */
.top-header {
    background: #0F172A;
    color: #E2E8F0;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-header a {
    color: #94A3B8;
}
.top-header a:hover {
    color: #FFFFFF;
}
.top-header .breaking-label {
    background: var(--primary-color);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Main Site Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(8px);
}
.site-header .navbar-brand {
    font-weight: 900;
    font-size: 2.4rem;
    color: var(--primary-color) !important;
    letter-spacing: -1.5px;
    display: flex;
    align-items: center;
}
.site-header .navbar-brand i {
    margin-right: 8px;
}
.site-header .nav-link {
    color: #374151 !important;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 22px 16px !important;
    text-transform: uppercase;
    position: relative;
    transition: var(--transition);
}
.site-header .nav-link:hover {
    color: var(--primary-color) !important;
}
.site-header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    border-radius: 3px 3px 0 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header .nav-link:hover::after, 
.site-header .nav-link.active::after {
    transform: scaleX(1);
}

/* Search input header */
.search-wrapper input {
    background: #F1F5F9 !important;
    border: 1px solid transparent !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition) !important;
}
.search-wrapper input::placeholder {
    color: var(--text-muted);
}
.search-wrapper input:focus {
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15) !important;
    border: 1px solid var(--primary-color) !important;
}

/* Breaking News Ticker */
.breaking-ticker-wrap {
    background: var(--primary-color);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 42px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}
.breaking-label {
    background: #111827;
    color: #FFFFFF;
    padding: 0 20px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    height: 100%;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}
.breaking-ticker {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
.ticker-content {
    display: inline-block;
    animation: ticker 35s linear infinite;
    padding-left: 100%;
}
.breaking-ticker:hover .ticker-content { 
    animation-play-state: paused; 
}
.ticker-content a {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    margin-right: 40px;
    transition: opacity 0.2s;
}
.ticker-content a:hover {
    opacity: 0.9;
    text-decoration: none;
}
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Section Titles */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 30px;
}
.section-title h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    font-family: 'Inter', sans-serif;
    color: #111827;
    letter-spacing: -0.5px;
}
.section-title h4::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    height: 3px;
    width: 70px;
    background: var(--primary-color);
    border-radius: 2px;
}
.section-title .view-all {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Inter', sans-serif;
}
.section-title .view-all:hover {
    color: var(--text-dark);
}

/* Horizontal News Card */
.news-card-hz {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.news-card-hz:last-child {
    margin-bottom: 0;
}
.news-card-hz:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-6px);
}
.news-card-hz .img-wrapper {
    width: 32%;
    aspect-ratio: 4/3;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
}
.news-card-hz img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.news-card-hz:hover img {
    transform: scale(1.04);
}
.news-card-hz .content {
    width: 68%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.news-card-hz .category {
    font-size: 11px;
    font-weight: 800;
    color: #FFFFFF;
    background: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    align-self: flex-start;
}
.news-card-hz h5 {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 10px;
}
.news-card-hz h5 a {
    color: var(--text-dark);
}
.news-card-hz h5 a:hover {
    color: var(--primary-color);
}
.news-card-hz .meta {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Mini List Cards for Sidebar and Top Stories */
.news-list-card {
    display: flex;
    gap: 15px;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 15px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.news-list-card:last-child {
    margin-bottom: 0;
}
.news-list-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}
.news-list-card .img-wrapper {
    width: 90px;
    height: 70px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.news-list-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.news-list-card:hover img {
    transform: scale(1.08);
}
.news-list-card .content {
    flex-grow: 1;
}
.news-list-card h6 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
    font-family: 'Merriweather', serif;
}
.news-list-card h6 a {
    color: var(--text-dark);
}
.news-list-card h6 a:hover {
    color: var(--primary-color);
}
.news-list-card .meta {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* Premium Grid Cards */
.news-card-grid {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    box-shadow: var(--shadow-sm);
}
.news-card-grid:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}
.news-card-grid .img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
}
.news-card-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.news-card-grid:hover img {
    transform: scale(1.04);
}
.news-card-grid .content {
    padding: 20px;
}
.news-card-grid .category {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.news-card-grid h5 {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 10px;
}
.news-card-grid h5 a {
    color: var(--text-dark);
}
.news-card-grid h5 a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-wrapper {
    margin-bottom: 48px;
}
.hero-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 520px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-main:hover img {
    transform: scale(1.03);
}
.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.45) 60%, transparent 100%);
    padding: 60px 40px 40px;
    color: #FFFFFF;
}
.hero-caption .headline {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    font-family: 'Merriweather', serif;
}
.hero-caption .headline a {
    color: #FFFFFF;
}
.hero-caption .headline a:hover {
    color: var(--primary-color);
}
.hero-caption p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    line-height: 1.6;
}
.hero-caption .meta {
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    gap: 15px;
}
.hero-caption .badge {
    border-radius: 4px;
    letter-spacing: 1px;
}

/* Sidebar Trending Widget */
.trending-numbered {
    counter-reset: trending;
}
.trending-numbered .trend-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.trending-numbered .trend-item:last-child {
    margin-bottom: 0;
}
.trending-numbered .trend-item::before {
    counter-increment: trending;
    content: counter(trending, decimal-leading-zero);
    font-size: 1.8rem;
    font-weight: 900;
    color: #E2E8F0;
    font-family: 'Inter', sans-serif;
    line-height: 1;
    min-width: 40px;
    transition: var(--transition);
}
.trending-numbered .trend-item:hover::before {
    color: var(--primary-color);
}
.trending-numbered h6 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.4;
}
.trending-numbered h6 a {
    color: var(--text-dark);
}
.trending-numbered h6 a:hover {
    color: var(--primary-color);
}

/* Editor Picks */
.editor-pick-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.editor-pick-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: var(--transition);
}
.editor-pick-card:hover img {
    transform: scale(1.04);
}
.editor-pick-card .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(11, 15, 25, 0.8) 40%, rgba(11, 15, 25, 1) 100%);
    padding: 40px 18px 15px;
    color: #FFFFFF;
}
.editor-pick-card h6 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}
.editor-pick-card h6 a {
    color: #FFFFFF;
}
.editor-pick-card h6 a:hover {
    color: var(--primary-color);
}

/* Sidebar Widgets Generic Redesign */
.col-lg-4 .bg-light.border.rounded.p-3 {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius) !important;
    padding: 24px !important;
}

/* Live Badge */
.live-badge {
    background: var(--primary-color);
    color: #FFFFFF;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.5px;
    animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

/* Article Detail Page Design */
.article-header {
    padding: 40px 0 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 35px;
}
.article-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #111827;
}
.article-meta-bar {
    font-size: 13.5px;
    color: var(--text-muted);
}
.article-featured-img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 35px;
    box-shadow: var(--shadow);
}
.article-content {
    font-size: 1.15rem;
    line-height: 1.95;
    color: #374151;
}
.article-content p {
    margin-bottom: 1.6rem;
}
.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
}

/* Breadcrumbs */
.custom-breadcrumb {
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 20px;
}
.custom-breadcrumb .breadcrumb-item a {
    color: var(--text-muted);
}
.custom-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary-color);
}
.custom-breadcrumb .breadcrumb-item.active {
    color: var(--primary-color);
}

/* Category Page Header */
.category-header-box {
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}
.category-header-icon {
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 140px;
    color: rgba(0,0,0,0.03);
    z-index: 0;
}
.page-title {
    font-size: 3.2rem;
    font-weight: 900;
    font-family: 'Merriweather', serif;
    color: #111827;
    margin-bottom: 15px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}
.category-description {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Print/Share Elements */
.sticky-share {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sticky-share .btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}
.sticky-share .btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Advertisement placeholders */
.ad-banner {
    background: #F1F5F9 !important;
    border: 1px dashed #CBD5E1 !important;
    color: #64748B !important;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 16px !important;
    text-align: center;
    transition: var(--transition);
}

/* Buttons style */
.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
    font-weight: 700;
    border-radius: 30px;
    transition: var(--transition);
}
.btn-outline-danger:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
}

/* Category Badge */
.category-badge {
    background: var(--card-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
    display: inline-block;
}
.category-badge:hover, .category-badge.active {
    background: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Footer redesign */
.site-footer {
    background: #0F172A;
    color: #94A3B8;
    padding: 70px 0 30px;
    margin-top: 70px;
    border-top: 4px solid var(--primary-color);
}
.site-footer h5 {
    color: #FFFFFF;
    font-weight: 800;
    margin-bottom: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer ul li {
    margin-bottom: 14px;
}
.site-footer ul li a {
    color: #94A3B8;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.site-footer ul li a:hover {
    color: #FFFFFF;
    padding-left: 6px;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 50px;
    padding-top: 30px;
    font-size: 13.5px;
    font-weight: 500;
}

/* Dark Mode redesign */
[data-theme="dark"] body {
    background-color: #0B0F19;
    color: #F1F5F9;
}
[data-theme="dark"] .site-header {
    background: #111827;
    border-color: #1F2937;
}
[data-theme="dark"] .site-header .nav-link {
    color: #E2E8F0 !important;
}
[data-theme="dark"] .site-header .nav-link:hover {
    color: var(--primary-color) !important;
}
[data-theme="dark"] .search-wrapper input {
    background: #1F2937 !important;
    color: #F1F5F9;
}
[data-theme="dark"] .search-wrapper input:focus {
    background: #111827 !important;
}
[data-theme="dark"] .news-card-grid {
    background: #111827;
    border-color: #1F2937;
}
[data-theme="dark"] .news-card-hz {
    background: #111827;
    border-color: #1F2937;
}
[data-theme="dark"] .news-list-card {
    background: #111827;
    border-color: #1F2937;
}
[data-theme="dark"] .category-badge {
    background: #111827;
    border-color: #1F2937;
    color: #F1F5F9;
}
[data-theme="dark"] .news-card-hz h5 a, 
[data-theme="dark"] .news-card-grid h5 a, 
[data-theme="dark"] .trending-numbered h6 a,
[data-theme="dark"] .news-list-card h6 a {
    color: #F1F5F9;
}
[data-theme="dark"] .news-card-hz h5 a:hover, 
[data-theme="dark"] .news-card-grid h5 a:hover, 
[data-theme="dark"] .trending-numbered h6 a:hover,
[data-theme="dark"] .news-list-card h6 a:hover {
    color: var(--primary-color);
}
[data-theme="dark"] .section-title {
    border-bottom-color: #1F2937;
}
[data-theme="dark"] .section-title h4 {
    color: #FFFFFF;
}
[data-theme="dark"] .article-content {
    color: #E2E8F0;
}
[data-theme="dark"] .top-header {
    background: #090D16;
}
[data-theme="dark"] .col-lg-4 .bg-light.border.rounded.p-3 {
    background: #111827 !important;
    border-color: #1F2937 !important;
}
[data-theme="dark"] .ad-banner {
    background: #1E293B !important;
    border-color: #334155 !important;
    color: #94A3B8 !important;
}

/* Responsive updates */
@media (max-width: 991px) {
    .hero-main { height: 380px; }
    .hero-caption { padding: 40px 24px 24px; }
    .hero-caption .headline { font-size: 1.8rem; }
    .article-title { font-size: 2.2rem; }
    .news-card-hz { gap: 16px; margin-bottom: 20px; padding-bottom: 20px; }
    .news-card-hz .img-wrapper { width: 120px; }
    .news-card-hz .content { width: calc(100% - 136px); }
    .news-card-hz h5 { font-size: 1.05rem; }
    
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #FFFFFF;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        display: flex;
        justify-content: space-around;
        padding: 12px 0;
        z-index: 1050;
        border-top: 1px solid var(--border-color);
    }
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 600;
    }
    .mobile-bottom-nav a.active {
        color: var(--primary-color);
    }
    .mobile-bottom-nav i {
        font-size: 20px;
        margin-bottom: 3px;
    }
    body { padding-bottom: 75px; }
    [data-theme="dark"] .mobile-bottom-nav {
        background: #111827;
        border-color: #1F2937;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    }
}
