:root {
    /* Premium Palette */
    --primary-red: #cc0000;
    /* Darker, more authoritative red */
    --primary-black: #121212;
    --secondary-gray: #f4f4f4;
    --text-dark: #222222;
    --text-gray: #555555;
    --border-color: #e0e0e0;
    --bg-white: #ffffff;

    /* Layout */
    --container-width: 1280px;
    --header-height: 70px;

    /* Typography */
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg-white: #121212;
    --text-dark: #eeeeee;
    --text-gray: #bbbbbb;
    --primary-black: #ffffff;
    --secondary-gray: #1e1e1e;
    --border-color: #333333;
}

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

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

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

/* --- HEADER --- */
header {
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* slightly stronger shadow for depth */
    display: flex;
    flex-direction: column;
}

/* Layer 1: Utility Bar */
.header-utility {
    background: var(--primary-black);
    color: #ffffff;
    font-size: 11px;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.utility-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.utility-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Layer 2: Branding Area */
.header-branding {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.branding-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.logo img {
    height: 60px;
    /* appropriately sized logo */
    width: auto;
    display: block;
    margin-bottom: 10px;
}

.slogan {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-gray);
    font-size: 14px;
}

/* Mobile Toggle Hamburger */
.mobile-menu-toggle {
    display: none;
    /* hidden on desktop */
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.hamburger-bar {
    width: 24px;
    height: 3px;
    background-color: var(--primary-black);
    border-radius: 2px;
}

/* Layer 3: Navigation Bar */
.header-nav {
    background: var(--bg-white);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu ul {
    display: flex;
    justify-content: center;
    /* Center navigation items */
    gap: 35px;
    list-style: none;
    padding: 15px 0;
}

.nav-menu a {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-black);
    padding-bottom: 15px;
    /* give some room for border */
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--primary-red);
    transition: width 0.3s ease;
}

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

.nav-menu a.active {
    color: var(--primary-red);
}

/* Mobile Overlay Menu */
.mobile-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    z-index: 2000;
    /* above header */
    overflow-y: auto;
    flex-direction: column;
    padding: 30px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: flex;
    opacity: 1;
}

.close-mobile-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 40px;
    line-height: 1;
    color: var(--primary-black);
    cursor: pointer;
}

.mobile-menu-logo {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.mobile-menu-logo img {
    height: 50px;
    width: auto;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.mobile-nav li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav a {
    display: block;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-black);
}

.mobile-edition-selector h4 {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-gray);
    text-transform: uppercase;
}

.mobile-edition-selector ul {
    margin-left: 0;
    padding-left: 0;
}

.mobile-flags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-flags li {
    width: calc(50% - 5px);
}

.mobile-flags a {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--secondary-gray);
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* --- HERO GRID (Homepage) --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px;
}

.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 400px 200px;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.hero-2 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.hero-3 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
}

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

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

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
}

.hero-content .meta {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--primary-red);
    font-weight: 800;
    margin-bottom: 8px;
    display: block;
}

.hero-content h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-2 .hero-content h2,
.hero-3 .hero-content h2 {
    font-size: 1.2rem;
}

/* --- MAIN CONTENT & SIDEBAR --- */
.main-content-area {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    /* 70% - 30% split */
    gap: 50px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

/* Feed Items */
.feed h3.section-title {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.article-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.article-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 2px;
}

.article-info h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.article-info p {
    font-size: 14px;
    color: var(--text-gray);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar */
.sidebar-title {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-black);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.trending-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.trending-item .rank {
    font-size: 30px;
    font-weight: 800;
    color: #eee;
    line-height: 1;
    float: left;
    margin-right: 15px;
}

.trending-item h4 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
}

/* --- ARTICLE PAGE SPECIFIC --- */
.article-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
    /* Fix: Override global header sticky behavior */
    position: static !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.article-header .meta {
    color: var(--primary-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    display: block;
    margin-bottom: 15px;
}

.article-header h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--primary-black);
}

.article-header .lede {
    font-size: 1.25rem;
    color: var(--text-gray);
    line-height: 1.5;
    font-style: italic;
    max-width: 90%;
    margin: 0 auto 30px;
}

.article-body {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
}

.article-body p {
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 768px) {

    /* Header & Nav */
    .header-utility {
        display: none;
        /* Hide utility bar on mobile to save space */
    }

    .branding-container {
        padding: 15px 20px;
    }

    .logo img {
        height: 40px;
        /* smaller logo on mobile */
        margin-bottom: 0;
    }

    .slogan {
        display: none;
        /* hide slogan on mobile */
    }

    .mobile-menu-toggle {
        display: flex;
        /* show hamburger */
    }

    .header-nav {
        display: none;
        /* hide desktop nav entirely */
    }

    /* Hero Section */
    .hero-section {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }

    .hero-section {
        grid-template-rows: auto;
        /* Reset grid rows */
    }

    .hero-card {
        height: 250px;
        /* Fixed height for Hero Cards on mobile */
    }

    .hero-1 {
        height: 300px;
        /* Main hero slightly taller */
    }

    .hero-content h2 {
        font-size: 1.4rem;
        /* Smaller hero titles */
    }

    /* Main Content */
    .main-content-area {
        display: flex;
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
    }

    /* Article List Items */
    .article-item {
        grid-template-columns: 1fr;
        gap: 10px;
        border-bottom: 1px solid #eee;
    }

    .article-item img {
        height: 220px;
        width: 100%;
    }

    .article-info h3 {
        font-size: 1.4rem;
        /* Readable titles */
    }

    /* Article Detail Page */
    .article-header h1 {
        font-size: 1.8rem;
        /* Better fit */
        line-height: 1.25;
    }

    .article-container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .article-header .lede {
        font-size: 1.1rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        /* Stack footer columns */
        gap: 30px;
        text-align: center;
    }
}

/* --- FOOTER --- */
footer {
    background: var(--primary-black);
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

/* Footer Sütunları ve Başlıklar */
.footer-col h4 {
    font-family: var(--font-sans);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: #fff;
    font-weight: 700;
}

/* Sütun 1: Marka */
.brand-col .footer-logo img {
    height: 45px;
    margin-bottom: 20px;
}

.brand-desc {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

/* Sütun 2 & 3: Linkler */
.links-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-col li {
    margin-bottom: 12px;
}

.links-col a {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.links-col a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

/* Sütun 4: Edisyonlar */
.footer-editions {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.footer-editions a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.footer-editions a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Footer Alt Bilgi */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #64748b;
}

.footer-bottom strong {
    color: #fff;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .brand-col .footer-logo img {
        margin: 0 auto 20px;
    }

    .social-links {
        justify-content: center;
    }

    .links-col a:hover {
        padding-left: 0;
        /* Mobilde kayma efektini kaldır */
        color: var(--primary-red);
    }

    .footer-editions {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}