/* 
 * Telex.hu Visual Replica Architecture
 */

:root {
    /* Color System */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F3F4F6;
    --color-base: #111827; /* Dark almost black for text */
    --color-meta: #4B5563; /* Gray for summaries/meta */
    --color-border: #E5E7EB; /* Thin separators */
    
    /* Branding */
    --color-header-navy: #0F172A; /* Dark navy for main header */
    --color-top-bar: #1F2937; /* Slightly lighter/different dark for top bar */
    --color-accent: #2563EB; /* Bright accent for labels/buttons */
    --color-alert: #EF4444; /* Red for breaking */
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Layout */
    --container-max-width: 1200px;
    --grid-gap: 24px;
}

/* -------------------------------------
 * Reset & Basics
 * ------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--color-base);
    background-color: var(--color-bg);
    line-height: 1.4;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 800; /* Heavy sans-serif headlines */
    line-height: 1.15;
    color: var(--color-base);
    letter-spacing: -0.02em;
}

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

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

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

/* -------------------------------------
 * Header & Navigation
 * ------------------------------------- */
.top-category-bar {
    background-color: var(--color-top-bar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 8px 0;
}

.top-nav a {
    color: #9CA3AF;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.top-nav a:hover { color: #FFFFFF; }

.header-main-area {
    background-color: var(--color-header-navy);
    padding: 16px 0;
    color: #FFFFFF;
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.hamburger {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

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

.site-logo {
    font-size: 2.5rem;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: -0.05em;
    text-transform: lowercase; /* like "telex" */
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.search-icon {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1.2rem;
    cursor: pointer;
}

.login-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
}
.login-link:hover { color: var(--color-accent); }

.btn-cta {
    background-color: var(--color-accent);
    color: #FFFFFF !important;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 3px;
}
.btn-cta:hover { background-color: #1D4ED8; }

/* Hamburger Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.menu-drawer {
    position: absolute;
    top: 0; left: -320px;
    width: 300px;
    height: 100%;
    background: var(--color-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding: 30px;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}
.menu-overlay.is-open .menu-drawer {
    left: 0;
}
.menu-close {
    position: absolute;
    top: 20px; right: 20px;
    background: none; border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-meta);
}
.menu-drawer-title {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--color-meta);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}
.menu-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}
.menu-drawer-nav a {
    font-size: 1.25rem;
    font-weight: 700;
}
.menu-drawer-nav a:hover { color: var(--color-accent); }
.menu-drawer-footer {
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 600;
    color: var(--color-meta);
}

/* -------------------------------------
 * Grid Architectures
 * ------------------------------------- */
.top-news-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; /* 25% | 50% | 25% */
    gap: var(--grid-gap);
    margin: 32px 0;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border);
}

.column-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid var(--color-border);
    padding-right: var(--grid-gap);
}

.column-center {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
}

.column-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-left: 1px solid var(--color-border);
    padding-left: var(--grid-gap);
}

/* Category Ribbons Grid */
.category-block {
    margin: 40px 0;
}

.category-header {
    border-top: 3px solid var(--color-base);
    padding-top: 12px;
    margin-bottom: 20px;
}
.category-header h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    font-weight: 900;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
}

/* -------------------------------------
 * Card Designs (Dense & Journalistic)
 * ------------------------------------- */
.card {
    display: flex;
    flex-direction: column;
}

.card-image-link {
    margin-bottom: 10px;
    display: block;
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Tag */
.tag {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 6px;
    display: inline-block;
}

/* Lead Story Card (Center) */
.card-lead .card-image {
    margin-bottom: 16px;
}
.card-lead .card-title {
    font-size: 2.5rem;
    margin-bottom: 12px;
}
.card-lead .card-excerpt p {
    font-size: 1.15rem;
    color: var(--color-meta);
    font-weight: 400; /* Regular weight summaries */
    margin: 0 0 12px;
    line-height: 1.5;
}

/* Small Cards (Left/Right) */
.card-small .card-title {
    font-size: 1.1rem;
    line-height: 1.25;
}
.card-small .card-image {
    margin-bottom: 8px;
}

/* Titles Hover */
.card-title a:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    color: var(--color-accent);
}

/* Metadata */
.card-meta {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--color-meta);
    font-weight: 600;
}
.card-author { color: var(--color-base); font-weight: 700; }

/* Latest Feed inside right column */
.sidebar-list {
    list-style: none; padding: 0; margin: 0;
}
.sidebar-item {
    border-top: 1px solid var(--color-border);
    padding: 12px 0;
    display: flex;
    gap: 12px;
}
.sidebar-item:first-child { border-top: none; padding-top: 0; }

.sidebar-item time {
    font-weight: 800;
    color: var(--color-accent);
    font-size: 0.85rem;
}
.sidebar-item a {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
}
.sidebar-item a:hover {
    color: var(--color-accent);
}

/* -------------------------------------
 * Ads (Separated Rectangular Spaces)
 * ------------------------------------- */
.ad-space {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-meta);
    font-size: 0.75rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 32px 0;
    min-height: 120px;
}

/* -------------------------------------
 * Footer
 * ------------------------------------- */
.site-footer {
    background-color: var(--color-base);
    color: #9CA3AF;
    padding: 40px 0;
    font-size: 0.85rem;
    margin-top: 60px;
}
.site-footer a { color: #FFFFFF; }
.site-footer a:hover { color: var(--color-accent); }

/* -------------------------------------
 * Responsiveness
 * ------------------------------------- */
@media (max-width: 900px) {
    .top-news-grid {
        grid-template-columns: 1fr;
    }
    .column-left, .column-right {
        border: none;
        padding: 0;
    }
    .column-center {
        order: -1; /* Move center lead story to top */
        padding: 0;
        margin-bottom: 24px;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 24px;
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-lead .card-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    .top-nav {
        display: none; /* Hide dense top nav on mobile */
    }
    .header-inner {
        grid-template-columns: auto 1fr auto;
    }
}

/* -------------------------------------
 * Single Post (Article Layout)
 * ------------------------------------- */
.article-container {
    max-width: 1200px;
}

.post-full {
    margin: 40px auto;
}

.post-full-header {
    margin-bottom: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.post-full-tags {
    margin-bottom: 16px;
}

.post-full-title {
    font-size: 3.25rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
    font-weight: 900;
}

.post-full-custom-excerpt {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-meta);
    line-height: 1.4;
    margin-bottom: 24px;
}

.post-full-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--color-meta);
}

.post-author-info strong {
    color: var(--color-base);
    font-weight: 800;
}

.post-full-meta-date {
    font-weight: 600;
}

.post-full-image {
    margin: 32px auto;
    max-width: 1000px;
}

.post-full-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-body-layout {
    display: grid;
    grid-template-columns: 8fr 4fr; /* 66% / 33% split */
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.post-content-column {
    font-size: 1.15rem;
    color: var(--color-base);
    line-height: 1.7;
}

.post-full-content p {
    margin-bottom: 24px;
}

.post-full-content h2, .post-full-content h3 {
    margin-top: 40px;
    margin-bottom: 16px;
}

.post-full-content a {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 600;
}

.post-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.post-tags-list {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 700;
    font-size: 0.9rem;
}

.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    background-color: var(--color-bg-alt);
    color: var(--color-base);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}
.tag-pill:hover {
    background-color: var(--color-border);
}

.post-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

@media (max-width: 900px) {
    .post-body-layout {
        grid-template-columns: 1fr;
    }
    .post-full-title {
        font-size: 2.5rem;
    }
    .post-full-custom-excerpt {
        font-size: 1.25rem;
    }
}

/* Koenig Editor specific classes */
.kg-width-wide { width: 100%; margin: 2rem auto; }
.kg-width-full { width: 100%; margin: 2rem auto; }