/* =========================================
   VARIABLES & THEME
   ========================================= */
   :root {
    /* Colors - Dark Blue/Navy theme for a premium editorial look */
    --primary-color: #0f172a; /* Slate 900 */
    --secondary-color: #2563eb; /* Blue 600 - Accent */
    --secondary-hover: #1d4ed8;
    
    --bg-color: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-dark: #0f172a;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    
    --border-color: #e2e8f0;
    
    /* Category Colors */
    --cat-tech: #3b82f6;
    --cat-world: #ef4444;
    --cat-economy: #10b981;
    --cat-sports: #f97316;
    --cat-business: #8b5cf6;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --max-width: 1280px;
    --header-height: 80px;
    --ticker-height: 40px;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.icon-btn {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.icon-btn:hover {
    background-color: var(--bg-subtle);
}

.full-width {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
}

.badge-red { background-color: var(--cat-world); }
.badge-blue { background-color: var(--cat-tech); }
.badge-green { background-color: var(--cat-economy); }
.badge-orange { background-color: var(--cat-sports); }
.badge-purple { background-color: var(--cat-business); }

/* =========================================
   BREAKING NEWS TICKER
   ========================================= */
.breaking-news {
    background-color: var(--primary-color);
    color: white;
    height: var(--ticker-height);
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.breaking-news-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-move {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

.ticker-move p {
    margin: 0;
    color: #cbd5e1;
}

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

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.main-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform var(--transition-normal), box-shadow var(--transition-fast);
}

.main-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a, .logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary-color);
}

.desktop-nav ul {
    display: flex;
    gap: 2rem;
}

.desktop-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: var(--primary-color);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-fast);
}

.desktop-nav a:hover::after, .desktop-nav a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: right var(--transition-normal);
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav {
    padding: 2rem 1.5rem;
    flex: 1;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.mobile-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding: 4rem 0;
    background-color: var(--bg-subtle);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

.category-badge {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

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

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.publish-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.05);
}

/* =========================================
   NEWS SECTION (MAIN + SIDEBAR)
   ========================================= */
.news-section {
    padding: 5rem 1.5rem;
}

.news-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

.section-header.center {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border-bottom: none;
    text-align: center;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0;
}

.subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.view-all:hover {
    text-decoration: underline;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    group: card;
}

.card-img-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.card-img-wrapper .badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

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

.card-title {
    font-size: 1.25rem;
    line-height: 1.3;
}

.card-title a {
    background-image: linear-gradient(to right, var(--primary-color), var(--primary-color));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size var(--transition-normal);
}

.news-card:hover .card-title a {
    background-size: 100% 2px;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}

.card-meta i {
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.card-meta i:hover {
    color: var(--secondary-color);
}

/* Sidebar Trending */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trending-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.trending-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--border-color);
    line-height: 1;
}

.trending-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    transition: color var(--transition-fast);
}

.trending-content h4:hover {
    color: var(--secondary-color);
}

.trending-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Editorial Widget */
.editorial-widget {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--bg-subtle);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.editorial-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.editorial-widget p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.link-arrow:hover i {
    transform: translateX(4px);
}

.link-arrow i {
    transition: transform var(--transition-fast);
}

/* =========================================
   CATEGORIES SECTION
   ========================================= */
.categories-section {
    padding: 4rem 1.5rem;
    background-color: var(--bg-color);
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cat-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
}

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

.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 50%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.cat-card-overlay h4 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    transform: translateY(10px);
    transition: transform var(--transition-fast);
}

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

.cat-card:hover .cat-card-overlay h4 {
    transform: translateY(0);
}

/* =========================================
   SUBSCRIBE SECTION
   ========================================= */
.subscribe-section {
    background-color: var(--primary-color);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.subscribe-container {
    max-width: 800px;
}

.subscribe-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subscribe-content p {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.subscribe-form {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.subscribe-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.subscribe-form input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5);
}

.subscribe-terms {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
}

.subscribe-terms a {
    color: #cbd5e1;
    text-decoration: underline;
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding-top: 5rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.brand-col p {
    color: var(--text-muted);
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-subtle);
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: var(--bg-subtle);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* =========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================= */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .news-layout {
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .desktop-nav, .header-actions .btn-primary {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
    }
    
    .hero-image-wrapper {
        order: -1; /* Image on top */
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .news-layout {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}
