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

:root {
    --bg:           #0d0f14;
    --bg-card:      #161920;
    --bg-nav:       #10121a;
    --border:       #1e2230;
    --accent:       #00c8ff;
    --accent-dim:   #0096c7;
    --text:         #e0e6f0;
    --text-muted:   #7a8299;
    --text-dim:     #4a5270;
    --radius:       8px;
    --radius-lg:    14px;
    --font:         'Inter', system-ui, -apple-system, sans-serif;
    --max-width:    1200px;
    --transition:   .2s ease;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

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

ul { list-style: none; }

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-main { flex: 1; }

/* ===== HEADER ===== */
.site-header {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    color: var(--text);
}
.site-logo:hover { color: var(--accent); }

.logo-vr {
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: .85rem;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: .05em;
}

.logo-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

/* ===== NAV ===== */
.main-nav { flex: 1; }

.nav-list {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
}

.nav-item > a {
    display: block;
    padding: .45rem .75rem;
    color: var(--text-muted);
    font-size: .875rem;
    font-weight: 500;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
}
.nav-item > a:hover { color: var(--text); background: var(--border); }

.nav-item { position: relative; }

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    padding: .5rem 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

.nav-item:hover > .dropdown { display: block; }

.dropdown li { position: relative; }

.dropdown a {
    display: block;
    padding: .5rem 1rem;
    color: var(--text-muted);
    font-size: .875rem;
    transition: background var(--transition), color var(--transition);
}
.dropdown a:hover { background: var(--border); color: var(--accent); }

.dropdown-deep {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    padding: .5rem 0;
    z-index: 300;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.dropdown li:hover > .dropdown-deep { display: block; }

/* ===== LANG TOGGLE ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: var(--text-dim);
}
.lang-toggle a { color: var(--text-muted); font-weight: 600; }
.lang-toggle a.active { color: var(--accent); }
.lang-toggle a:hover { color: var(--text); }

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero { padding: 3rem 0; }

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

.hero-image a { display: block; border-radius: var(--radius-lg); overflow: hidden; }
.hero-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform .4s ease;
}
.hero-image a:hover img { transform: scale(1.03); }

.hero-content { display: flex; flex-direction: column; gap: 1rem; }

.hero-badge {
    display: inline-block;
    background: rgba(0,200,255,.1);
    color: var(--accent);
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    width: fit-content;
}

.hero-content h1 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; }
.hero-content h1 a { color: var(--text); }
.hero-content h1 a:hover { color: var(--accent); }

.hero-summary { color: var(--text-muted); font-size: .95rem; }

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* ===== ARTICLE GRID ===== */
.latest-articles { padding: 2rem 0 4rem; }

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), transform var(--transition);
}
.article-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }

.card-image { display: block; overflow: hidden; }
.card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform .4s ease;
}
.card-image:hover img { transform: scale(1.05); }

.card-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.card-category {
    font-size: .7rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.card-body h2, .card-body h3 { font-size: 1rem; line-height: 1.4; }
.card-body h2 a, .card-body h3 a { color: var(--text); }
.card-body h2 a:hover, .card-body h3 a:hover { color: var(--accent); }

.card-body p { font-size: .875rem; color: var(--text-muted); flex: 1; }

.article-date { font-size: .75rem; color: var(--text-dim); margin-top: auto; }

/* ===== CATEGORY PAGE ===== */
.page-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin: 2rem 0 1.5rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: .4rem .9rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.tab-btn:hover, .tab-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0,200,255,.06);
}

.empty-msg { color: var(--text-muted); padding: 3rem 0; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.5rem;
    justify-content: center;
}

.page-btn {
    padding: .4rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem;
    color: var(--text-muted);
    transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0,200,255,.06);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: var(--text-dim);
    padding: 1.25rem 0 .5rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ===== ARTICLE PAGE ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 4rem;
}

.article-header { margin: 1.5rem 0; }

.article-category-badge {
    display: inline-block;
    background: rgba(0,200,255,.1);
    color: var(--accent);
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .75rem;
}

.article-header h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); line-height: 1.25; margin-bottom: .75rem; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .85rem;
    color: var(--text-dim);
}

.source-link {
    font-size: .8rem;
    padding: .2rem .6rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
}
.source-link:hover { border-color: var(--accent); color: var(--accent); }

.article-featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}
.article-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    max-width: 760px;
}
.article-content h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; color: var(--text); }
.article-content h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.article-content p { margin-bottom: 1rem; }
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-content li { margin-bottom: .35rem; }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: .75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
    font-style: italic;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: .85rem;
    color: var(--text-muted);
}

.tag {
    padding: .25rem .7rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: .8rem;
    color: var(--text-muted);
}

.lang-hint {
    margin-top: 1.5rem;
    font-size: .875rem;
}

/* ===== RELATED ARTICLES ===== */
.related-articles h2 { font-size: 1.15rem; margin-bottom: 1.25rem; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-nav);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

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

.footer-brand p { font-size: .875rem; color: var(--text-muted); margin-top: .75rem; max-width: 300px; }

.footer-nav h4, .footer-lang h4 {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
    margin-bottom: .75rem;
}

.footer-nav ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-nav a { font-size: .875rem; color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }

.lang-toggle-footer { display: flex; gap: .75rem; }
.lang-toggle-footer a { font-size: .875rem; color: var(--text-muted); }
.lang-toggle-footer a.active { color: var(--accent); font-weight: 600; }
.lang-toggle-footer a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    font-size: .8rem;
    color: var(--text-dim);
}

/* ===== ERROR STATES ===== */
.error-msg { padding: 4rem 0; color: var(--text-muted); font-size: 1.1rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-nav);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        z-index: 99;
    }
    .main-nav.open { display: block; }

    .nav-list { flex-direction: column; gap: 0; }
    .nav-item > a { padding: .65rem .75rem; }

    .dropdown {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 1rem;
    }
    .nav-item.open > .dropdown { display: block; }

    .dropdown-deep {
        display: block !important;
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 1rem;
    }

    .article-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .article-layout { gap: 2rem; }
}

@media (max-width: 480px) {
    .site-header .container { height: 56px; }
    .logo-name { display: none; }
    .hero { padding: 1.5rem 0; }
    .hero-content h1 { font-size: 1.25rem; }
    .page-title { font-size: 1.4rem; }
}
