/* Custom Properties */
:root {
    /* Light Theme Base Colors */
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    
    /* Branding */
    --brand-primary: #3b82f6;
    --brand-hover: #2563eb;
    --accent-red: #ef4444;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    
    /* Animations & Transitions */
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s ease-in-out;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;

    /* Glassmorphism Dark Mode */
    --glass-bg: rgba(30, 41, 59, 0.75);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    transition: background-color var(--transition-slow), color var(--transition-slow);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-logo {
    font-family: 'Outfit', sans-serif;
}

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

ul {
    list-style: none;
}

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

/* Glassmorphism Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-slow);
}

.navbar.scrolled {
    box-shadow: var(--glass-shadow);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding var(--transition-slow);
}

.navbar.scrolled .nav-container {
    padding: 0.8rem 2rem;
}

.brand-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--brand-primary);
    border-radius: 3px;
    transition: width var(--transition-slow);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle, .menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--brand-primary);
    transform: rotate(20deg);
}

.menu-toggle {
    display: none;
}

/* Layout */
.main-content {
    max-width: 1300px;
    margin: 8rem auto 2rem;
    padding: 0 2rem;
}

/* Hero Section */
.hero-section {
    margin-bottom: 4rem;
}

.hero-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 550px;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 20px 40px rgba(0,0,0, 0.1);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.hero-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 50px rgba(0,0,0, 0.15);
}

.hero-img-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

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

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: linear-gradient(to top, rgba(0,0,0, 0.95), transparent);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    color: white;
    max-width: 800px;
}

.category-tag {
    display: inline-block;
    background-color: var(--accent-red);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
}

/* Micro Animations */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.hero-excerpt {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
}

.article-meta i {
    margin-right: 0.4rem;
    color: var(--brand-primary);
}

/* Grid Layout container */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3.5rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.section-header h2 {
    font-size: 2rem;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -0.92rem;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--brand-primary);
    border-radius: 2px;
}

.view-all {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.view-all:hover {
    color: var(--brand-hover);
}

/* News Cards */
.news-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--surface-color);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0, 0.08); border-color: var(--brand-primary);
}

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

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

.card-content {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--surface-color);
    position: relative;
    z-index: 2;
}

.card-tag {
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.35;
}

.card-title a {
    color: var(--text-primary);
}

.card-title a:hover {
    color: var(--brand-primary);
}

.card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-meta i {
    color: var(--brand-primary);
}

/* Sidebar Widgets */
.widget {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    box-shadow: var(--glass-shadow);
}

.widget h3 {
    margin-bottom: 2rem;
    font-size: 1.6rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 45px;
    height: 4px;
    background-color: var(--accent-red);
    border-radius: 2px;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trending-item {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.trending-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--border-color);
    line-height: 1;
    font-family: 'Outfit';
    transition: color var(--transition-fast);
}

.trending-item:hover .trending-number {
    color: var(--brand-primary);
}

.trending-info h4 {
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

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

.trending-info h4 a:hover {
    color: var(--brand-primary);
}

.trending-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.newsletter-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 1rem 1.2rem;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.newsletter-form button {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    font-family: 'Inter';
}

.newsletter-form button:hover {
    background: var(--brand-hover);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #f8fafc;
    padding-top: 5rem;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.footer-brand h2 span {
    color: var(--brand-primary);
}

.footer-brand p {
    color: #94a3b8;
    max-width: 350px;
    font-size: 1.05rem;
}

.footer-links h4, .footer-social h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: var(--brand-primary);
}

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    color: white;
    font-size: 1.2rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.social-icons a:hover {
    background-color: var(--brand-primary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
}

/* Responsive Styles */
@media (max-width: 1100px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-content {
        padding: 2rem;
    }
    .hero-card {
        height: 450px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}
