/**
 * WorldNexa24 News - Main Stylesheet
 * BBC-Style Professional News Design
 */

/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */

:root {
    --primary-red: #c62828;
    --primary-blue: #1976d2;
    --text-dark: #222;
    --text-gray: #5a5a5a;
    --text-light: #999;
    --border-color: #e4e4e4;
    --bg-light: #f6f6f6;
    --bg-white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

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

a:hover {
    color: var(--primary-red);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.top-bar {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 8px 0;
    font-size: 13px;
    width: 100%;
    overflow-x: hidden;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.live-badge {
    background: var(--primary-red);
    color: var(--bg-white);
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.current-date {
    opacity: 0.8;
}

.top-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-links a {
    color: var(--bg-white);
    font-size: 14px;
    opacity: 0.8;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 1;
    color: var(--primary-red);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-main {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo h1 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.site-logo a {
    color: var(--primary-red);
}

.site-tagline {
    display: none; /* Hidden - logo includes tagline */
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 5px;
    font-weight: 400;
}

.header-search {
    position: relative;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-red);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 16px;
}

/* Navigation */
.main-navigation {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.nav-menu li a:hover,
.nav-menu li.active a {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

/* ==========================================================================
   Breaking News Ticker
   ========================================================================== */

.breaking-news {
    background: var(--primary-red);
    color: var(--bg-white);
    padding: 12px 0;
    overflow: hidden;
}

.breaking-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breaking-label {
    background: var(--text-dark);
    padding: 6px 15px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    animation: ticker 40s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    white-space: nowrap;
    padding-right: 60px;
    color: var(--bg-white);
    font-size: 14px;
}

.ticker-item:hover {
    text-decoration: underline;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    padding: 30px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 40px;
}

.hero-news {
    position: relative;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-news img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: var(--bg-white);
}

.hero-category {
    display: inline-block;
    background: var(--primary-red);
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-title a {
    color: var(--bg-white);
}

.hero-excerpt {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 15px;
    line-height: 1.5;
}

.hero-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    opacity: 0.8;
}

.hero-meta i {
    margin-right: 5px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.news-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.news-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.news-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-red);
    color: var(--bg-white);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.news-content {
    padding: 18px;
}

.news-category {
    display: inline-block;
    color: var(--primary-red);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.news-title a {
    color: var(--text-dark);
}

.news-excerpt {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.news-meta i {
    margin-right: 4px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 25px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-red);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary-red);
}

/* Trending Widget */
.trending-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trending-number {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary-red);
    line-height: 1;
    width: 35px;
    flex-shrink: 0;
}

.trending-thumb {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-info h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
}

.trending-info h4 a {
    color: var(--text-dark);
}

.trending-time {
    font-size: 11px;
    color: var(--text-light);
}

/* Categories Widget */
.category-item {
    margin-bottom: 8px;
}

.category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.category-item a:hover {
    background: var(--primary-red);
    color: var(--bg-white);
}

.category-count {
    background: var(--bg-white);
    color: var(--text-gray);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-red);
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #ccc;
    font-size: 14px;
    transition: var(--transition);
}

.footer-widget ul li a:hover {
    color: var(--bg-white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: #999;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .logo-image {
        height: 45px;
    }
    
    .site-logo h1 {
        font-size: 32px;
    }
    
    .header-search {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li a {
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }
    
    .nav-menu li a:hover,
    .nav-menu li.active a {
        border-left-color: var(--primary-red);
        border-bottom-color: var(--border-color);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-news {
        height: 400px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-30 { margin-top: 30px; }
.mb-30 { margin-bottom: 30px; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-red);
    color: var(--bg-white);
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #a01f1f;
    color: var(--bg-white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: var(--bg-white);
}


/* ==========================================================================
   Logo Image Styles
   ========================================================================== */

.site-logo {
    flex: 0 0 auto;
}

.site-logo a {
    display: inline-block;
    line-height: 0;
}

.logo-image {
    height: 200px;
    width: auto;
    max-width: 750px;
    object-fit: contain;
    display: block;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    gap: 40px;
    flex-wrap: nowrap;
}

.header-search {
    flex: 0 0 auto;
    min-width: 350px;
    margin-left: auto;
}

/* Mobile Logo Adjustment */
@media (max-width: 1200px) {
    .logo-image {
        height: 160px;
        max-width: 650px;
    }
    
    .header-search {
        min-width: 300px;
    }
}

@media (max-width: 992px) {
    .logo-image {
        height: 160px;
        max-width: 600px;
    }
    
    .header-search {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .logo-image {
        height: 140px;
        max-width: 550px;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px 0;
    }
    
    .header-search {
        width: 100%;
        min-width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 120px;
        max-width: 480px;
    }
}


/* ==========================================================================
   Full Width Fix for Zoom Out
   ========================================================================== */

html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.top-bar,
.site-header,
.header-main,
.main-navigation,
.breaking-news,
.site-footer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
}

.site-footer {
    width: 100% !important;
    overflow-x: hidden !important;
}

.site-header {
    width: 100% !important;
    overflow-x: hidden !important;
}

.main-navigation {
    width: 100% !important;
    overflow-x: hidden !important;
}


/* ==========================================================================
   Navigation Two-Line Fix
   ========================================================================== */

.main-navigation .nav-menu {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.main-navigation .nav-menu li {
    flex: 0 0 auto;
}

.main-navigation .nav-menu li a {
    padding: 12px 15px !important;
    font-size: 13.5px !important;
    display: block;
}

@media (min-width: 1200px) {
    .main-navigation .nav-menu li a {
        padding: 13px 16px !important;
        font-size: 14px !important;
    }
}

@media (min-width: 1400px) {
    .main-navigation .nav-menu li a {
        padding: 14px 18px !important;
    }
}
