/*
Theme Name: Newsportal Modern
Theme URI: https://newsportal.local/
Author: OpenAI
Description: Eigenstaendiges Editorial-Theme fuer eine moderne Nachrichtenplattform.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Text Domain: newsportal-modern
*/

:root {
    --bg: #f5f0e8;
    --paper: #fffaf2;
    --surface: #f0e8dc;
    --surface-strong: #dfd4c4;
    --ink: #16110d;
    --muted: #5f5449;
    --line: rgba(22, 17, 13, 0.12);
    --line-strong: rgba(22, 17, 13, 0.24);
    --accent: #bb3e03;
    --accent-soft: #f3d4c0;
    --accent-alt: #003049;
    --success: #1f6f50;
    --max-width: 1240px;
    --content-width: 760px;
    --gutter: clamp(18px, 3vw, 34px);
    --shadow: 0 18px 40px rgba(22, 17, 13, 0.08);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(187, 62, 3, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(0, 48, 73, 0.08), transparent 22%),
        linear-gradient(180deg, #f7f2ea 0%, #f5f0e8 100%);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 18px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
    top: 32px;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

p {
    margin: 0 0 1.15rem;
}

ul,
ol {
    margin: 0 0 1.25rem;
    padding-left: 1.4rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-mark,
.nav-links,
.button,
.section-kicker,
.ticker-label,
.post-chip,
.meta-row,
.footer-title {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.75rem;
    line-height: 1.03;
    letter-spacing: -0.04em;
}

button,
input,
textarea,
select {
    font: inherit;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-shell {
    width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(255, 250, 242, 0.84);
    border-bottom: 1px solid rgba(22, 17, 13, 0.08);
}

.topline {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 250, 242, 0.82);
}

.topline-inner,
.masthead,
.footer-grid,
.footer-bottom {
    width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
    margin: 0 auto;
}

.topline-inner {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 18px;
    min-height: 46px;
    font-size: 13px;
    color: var(--muted);
}

.ticker-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    color: var(--accent);
}

.ticker-track {
    display: flex;
    gap: 16px;
    overflow: auto hidden;
    scrollbar-width: none;
    white-space: nowrap;
}

.ticker-track::-webkit-scrollbar {
    display: none;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ticker-item::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.ticker-date {
    font-variant-numeric: tabular-nums;
}

.masthead {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.brand-block {
    display: grid;
    gap: 8px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.45rem, 2.5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.06em;
}

.brand-mark::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: linear-gradient(135deg, var(--accent), #f77f00);
    box-shadow: 0 0 0 6px rgba(187, 62, 3, 0.12);
}

.brand-tagline {
    max-width: 62ch;
    color: var(--muted);
    font-size: 15px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 14px;
    font-weight: 500;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;
    padding-bottom: 6px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}

.nav-links a:hover::after,
.nav-links .current-menu-item a::after,
.nav-links .current-menu-ancestor a::after {
    transform: scaleX(1);
}

.main-content {
    padding: 28px 0 72px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.72fr);
    gap: 28px;
    align-items: stretch;
}

.hero-lead,
.hero-sidebar,
.section-panel,
.story-card,
.archive-header,
.single-article,
.sidebar-block,
.footer-newsletter {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 242, 0.78);
    box-shadow: var(--shadow);
}

.hero-lead {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    padding: 32px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(22, 17, 13, 0.64) 80%),
        radial-gradient(circle at top right, rgba(247, 127, 0, 0.3), transparent 28%),
        linear-gradient(135deg, #3d2b1f 0%, #0f1720 100%);
    color: #fff8f1;
}

.hero-lead.has-image {
    background-size: cover;
    background-position: center;
}

.hero-copy {
    position: relative;
    max-width: 620px;
    z-index: 1;
}

.section-kicker,
.post-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    font-weight: 700;
}

.section-kicker::before,
.post-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.hero-copy .section-kicker {
    color: #ffd7bf;
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(2.6rem, 5vw, 5rem);
    max-width: 10ch;
    margin-bottom: 18px;
}

.hero-excerpt {
    max-width: 54ch;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(255, 248, 241, 0.86);
    margin-bottom: 22px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: inherit;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent);
    color: #fff9f3;
}

.button-secondary {
    background: rgba(255, 248, 241, 0.08);
    border-color: rgba(255, 248, 241, 0.18);
    color: #fff8f1;
}

.hero-sidebar {
    padding: 24px;
    display: grid;
    gap: 18px;
    align-content: start;
    background:
        linear-gradient(180deg, rgba(255, 250, 242, 0.88), rgba(240, 232, 220, 0.92)),
        repeating-linear-gradient(135deg, transparent 0 10px, rgba(0, 48, 73, 0.03) 10px 20px);
}

.sidebar-eyebrow {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

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

.sidebar-note {
    font-size: 13px;
    color: var(--muted);
}

.compact-list {
    display: grid;
    gap: 16px;
}

.compact-item {
    display: grid;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.compact-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.compact-title {
    font-size: 1.08rem;
    line-height: 1.22;
}

.compact-title a:hover,
.story-title a:hover,
.feed-title a:hover {
    color: var(--accent);
}

.section-stack {
    display: grid;
    gap: 26px;
    margin-top: 34px;
}

.section-panel {
    padding: 26px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 20px;
}

.section-head h2,
.archive-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.section-summary,
.archive-description,
.entry-summary,
.empty-state {
    max-width: 62ch;
    color: var(--muted);
}

.split-feed {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 24px;
}

.story-card {
    overflow: hidden;
    display: grid;
    min-height: 100%;
    background: rgba(255, 250, 242, 0.92);
}

.story-image {
    position: relative;
    min-height: 240px;
    background:
        radial-gradient(circle at top right, rgba(247, 127, 0, 0.24), transparent 28%),
        linear-gradient(135deg, #314455 0%, #151b23 100%);
}

.story-image img,
.archive-thumb img,
.single-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-card.has-image .story-image {
    background: none;
}

.story-body {
    display: grid;
    gap: 14px;
    padding: 22px;
}

.story-title,
.feed-title {
    font-size: clamp(1.45rem, 2vw, 2.15rem);
}

.feed-column {
    display: grid;
    gap: 18px;
}

.feed-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.feed-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.feed-index {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.3rem;
    line-height: 1;
    color: rgba(0, 48, 73, 0.22);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.news-grid .story-card .story-body {
    padding-top: 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.category-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.42);
}

.category-panel .compact-list {
    margin-top: 18px;
}

.archive-shell,
.search-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
}

.archive-header {
    padding: 28px;
    margin-bottom: 22px;
}

.archive-list {
    display: grid;
    gap: 18px;
}

.archive-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(255, 250, 242, 0.84);
    box-shadow: var(--shadow);
}

.archive-thumb {
    min-height: 100%;
    background:
        radial-gradient(circle at top right, rgba(247, 127, 0, 0.24), transparent 28%),
        linear-gradient(135deg, #26313d 0%, #19110d 100%);
}

.archive-body {
    padding: 24px;
    display: grid;
    gap: 14px;
    align-content: center;
}

.archive-title a,
.entry-title a {
    color: inherit;
}

.single-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 32px;
    align-items: start;
}

.single-article {
    overflow: hidden;
    background: rgba(255, 250, 242, 0.82);
}

.single-cover {
    min-height: 360px;
    background:
        radial-gradient(circle at top right, rgba(247, 127, 0, 0.26), transparent 30%),
        linear-gradient(135deg, #28333f 0%, #130f0d 100%);
}

.single-entry {
    padding: 34px;
}

.single-title {
    font-size: clamp(2.4rem, 4vw, 4.3rem);
    max-width: 13ch;
    margin-bottom: 16px;
}

.single-deck {
    max-width: 60ch;
    color: var(--muted);
    font-size: 1.08rem;
    margin-bottom: 20px;
}

.entry-content {
    max-width: var(--content-width);
    font-size: 1.08rem;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 2rem;
}

.entry-content a {
    text-decoration: underline;
    text-decoration-color: rgba(187, 62, 3, 0.35);
    text-underline-offset: 0.14em;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 0 0 0 1.2rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-size: 1.15rem;
}

.sidebar-stack {
    display: grid;
    gap: 18px;
}

.sidebar-block {
    padding: 22px;
}

.sidebar-block h3 {
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.topic-list,
.inline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.topic-list a,
.inline-list a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.topic-list li:last-child a,
.inline-list li:last-child a {
    padding-bottom: 0;
    border-bottom: 0;
}

.topic-list span:last-child,
.inline-list span:last-child {
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 250, 242, 0.82);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.pagination .current,
.pagination .page-numbers:hover {
    background: var(--accent);
    color: #fff9f3;
    border-color: var(--accent);
}

.footer-newsletter {
    margin: 24px auto 0;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
    background:
        linear-gradient(135deg, rgba(0, 48, 73, 0.95), rgba(34, 53, 74, 0.98)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    color: #fff8f1;
}

.footer-newsletter p {
    color: rgba(255, 248, 241, 0.8);
    margin-bottom: 0;
}

.site-footer {
    padding: 56px 0 26px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr 0.9fr;
    gap: 28px;
    margin-top: 24px;
}

.footer-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.empty-state {
    padding: 26px 0;
}

.wp-block-image,
.wp-block-gallery {
    margin: 1.6rem 0;
}

.wp-caption {
    max-width: 100%;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 1120px) {
    .hero-grid,
    .split-feed,
    .archive-shell,
    .search-shell,
    .single-shell,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    body {
        font-size: 17px;
    }

    body.admin-bar .site-header {
        top: 46px;
    }

    .topline-inner,
    .masthead,
    .footer-newsletter {
        grid-template-columns: 1fr;
    }

    .masthead {
        padding: 16px 0;
    }

    .nav-links {
        justify-content: flex-start;
        gap: 14px;
    }

    .hero-lead {
        min-height: 520px;
        padding: 24px;
    }

    .hero-title,
    .single-title {
        max-width: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .feed-item,
    .archive-card {
        grid-template-columns: 1fr;
    }

    .archive-thumb {
        min-height: 220px;
    }

    .single-entry,
    .section-panel,
    .archive-header,
    .sidebar-block,
    .hero-sidebar {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
