/* Synverta B2B News Portal - Base Styles */

:root {
    --bg-page: #f5f7fb;
    --bg-header: #ffffff;
    --bg-header-accent: #0f172a;
    --bg-main: #f9fafb;
    --bg-card: #ffffff;
    --bg-badge: #eff6ff;
    --bg-tag: #e0f2fe;
    --bg-footer: #020617;

    --primary: #1e293b;
    --secondary: #334155;
    --accent: #2563eb;
    --accent-soft: #dbeafe;
    --accent-strong: #1d4ed8;
    --muted: #6b7280;
    --border-subtle: #e5e7eb;
    --border-strong: #d1d5db;

    --headline: #0f172a;
    --danger: #b91c1c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
    background: radial-gradient(circle at top left, #eff6ff 0, #f5f7fb 45%, #f9fafb 100%);
    color: var(--primary);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-strong);
}

/* Header */
header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Site Header (new homepage style) */
.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
    position: relative;
}

.site-header .logo {
    text-decoration: none;
}

.site-header .logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--headline);
    text-decoration: none;
}

.site-header .logo-subtitle {
    display: none; /* Hidden per requirement */
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-right: 3rem; /* Make room for language switcher */
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    flex-wrap: nowrap;
    align-items: center;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: inline-block;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--accent);
    background: var(--bg-badge);
}

.main-nav a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

/* Language Switcher - Top Right Corner */
.lang-switcher {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
}

.lang-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: var(--bg-badge);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.lang-switcher a:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    transform: scale(1.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--headline);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

nav li {
    margin: 0;
}

nav a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 3rem 2rem;
    text-align: center;
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    margin-bottom: 2rem;
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.hero p {
    margin: 0;
    font-size: 1.125rem;
    opacity: 0.9;
}

.hero-featured {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-featured h2 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.hero-featured ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-featured .news-item {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
}

.hero-featured .news-item:hover {
    background: #ffffff;
}

/* Main Container */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Section Styles */
.section {
    margin-bottom: 3rem;
}

.section-latest {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-latest h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--headline);
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
}

.section-categories {
    margin-bottom: 3rem;
}

.section-categories .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-block {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.category-block h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--headline);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.category-block .news-list {
    margin-bottom: 1rem;
}

.category-block .news-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.category-block .news-item:last-child {
    border-bottom: none;
}

.category-block .news-item:hover {
    box-shadow: none;
    transform: none;
    background: var(--bg-badge);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 4px;
}

.category-block .news-title {
    font-size: 1rem;
}

.category-block .news-meta {
    font-size: 0.75rem;
}

.category-block .news-summary {
    display: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--headline);
    margin: 0;
}

.section-kicker {
    font-size: 0.875rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

/* News List */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.news-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--headline);
    margin-bottom: 0.5rem;
    display: block;
}

.news-title:hover {
    color: var(--accent);
}

.news-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.news-category {
    background: var(--bg-badge);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.news-tag {
    background: var(--bg-tag);
    color: var(--accent-strong);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.news-summary {
    color: var(--secondary);
    line-height: 1.6;
}

.news-featured-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Article Page */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--headline);
    margin: 0 0 1rem;
    line-height: 1.3;
}

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

.article-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 2rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--headline);
    margin: 2rem 0 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--bg-footer);
    color: #ffffff;
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer a {
    color: var(--accent-soft);
}

footer a:hover {
    color: #ffffff;
}

/* More Link */
.more-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 600;
    transition: color 0.2s;
}

.more-link:hover {
    color: var(--accent-strong);
}

/* Empty State */
.empty-state {
    color: var(--muted);
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-container .lang-switcher {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }

    .site-header .header-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem 0;
    }

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

    .main-nav {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }

    .main-nav ul {
        justify-content: center;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .main-nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .lang-switcher {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }

    nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    main {
        padding: 0 1rem;
    }

    .section-latest {
        padding: 1.5rem;
    }

    .section-categories .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .news-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .main-nav a {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .news-title {
        font-size: 1.125rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .category-block {
        padding: 1rem;
    }
}
