/* ============================================
   CERYX.DE - GAZETTE CULTURELLE
   Online-Kulturmagazin
   CSS-Prefix: cx-
   ============================================ */

/* ---- VARIABLEN ---- */
:root {
    --cx-primary: #722F37;
    --cx-secondary: #5C6B73;
    --cx-accent: #C9A0A0;
    --cx-bg: #F5F0E8;
    --cx-text: #2D2A26;
    --cx-white: #FFFFFF;
    --cx-border: #D4CBC0;
    --cx-font-heading: 'Vollkorn', serif;
    --cx-font-body: 'Rubik', sans-serif;
    --cx-max-width: 1200px;
    --cx-radius: 4px;
    --cx-shadow: 0 2px 8px rgba(0,0,0,0.04);
    --cx-shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
}

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

body {
    font-family: var(--cx-font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--cx-text);
    background: var(--cx-bg);
    overflow-x: hidden;
}

a { color: var(--cx-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cx-secondary); }

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

/* ---- TYPOGRAFIE ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--cx-font-heading);
    font-weight: 700;
    color: var(--cx-text);
    line-height: 1.3;
}

h1 { font-size: 2.5rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.8rem; font-weight: 600; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1.25rem; }

ul, ol { margin-bottom: 1.25rem; padding-left: 1.75rem; }
li { margin-bottom: 0.5rem; }

/* ---- HEADER ---- */
.cx-header {
    background: var(--cx-white);
    border-bottom: 3px solid var(--cx-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.cx-header-inner {
    max-width: var(--cx-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.cx-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--cx-border);
}

.cx-logo img {
    height: 52px;
    width: auto;
}

.cx-header-meta {
    font-size: 0.85rem;
    color: var(--cx-secondary);
}

.cx-nav {
    display: flex;
    gap: 0;
}

.cx-nav a {
    display: block;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cx-text);
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.cx-nav a:hover,
.cx-nav a.cx-active {
    color: var(--cx-primary);
    border-bottom-color: var(--cx-primary);
}

/* ---- BREADCRUMB ---- */
.cx-breadcrumb {
    max-width: var(--cx-max-width);
    margin: 0 auto;
    padding: 16px 24px;
    font-size: 0.85rem;
    color: var(--cx-secondary);
}

.cx-breadcrumb a { color: var(--cx-secondary); }
.cx-breadcrumb a:hover { color: var(--cx-primary); }
.cx-breadcrumb span { color: var(--cx-text); }

/* ---- FEATURED ARTICLE ---- */
.cx-hero {
    max-width: var(--cx-max-width);
    margin: 40px auto;
    padding: 0 24px;
}

.cx-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: var(--cx-white);
    border-radius: var(--cx-radius);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.cx-featured-img {
    min-height: 380px;
    background-size: cover;
    background-position: center;
}

.cx-featured-content {
    padding: 40px 40px 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cx-rubrik-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--cx-primary);
    border: 1px solid var(--cx-primary);
    padding: 4px 12px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.cx-featured-content h1 {
    font-family: var(--cx-font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--cx-text);
}

.cx-featured-content p {
    color: var(--cx-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.cx-read-more {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--cx-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cx-read-more:hover { gap: 10px; }

/* ---- SECTION DIVIDER ---- */
.cx-divider {
    max-width: var(--cx-max-width);
    margin: 48px auto 32px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cx-divider::before,
.cx-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cx-border);
}

.cx-divider h3 {
    font-family: var(--cx-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--cx-secondary);
    white-space: nowrap;
    margin: 0;
}

/* ---- CARD GRID ---- */
.cx-content {
    max-width: var(--cx-max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
}

.cx-card {
    background: var(--cx-white);
    border-radius: var(--cx-radius);
    overflow: hidden;
    box-shadow: var(--cx-shadow);
    transition: box-shadow 0.3s, transform 0.3s;
}

.cx-card:hover {
    box-shadow: var(--cx-shadow-hover);
    transform: translateY(-2px);
}

.cx-card-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cx-font-heading);
    font-size: 0.95rem;
    color: var(--cx-white);
    background-size: cover;
    background-position: center;
}

.cx-card-img.cx-kunst { background: linear-gradient(135deg, #8B6F5A, #5C6B73); }
.cx-card-img.cx-literatur { background: linear-gradient(135deg, #722F37, #A0525A); }
.cx-card-img.cx-sprache { background: linear-gradient(135deg, #5C6B73, #7A8B93); }
.cx-card-img.cx-musik { background: linear-gradient(135deg, #6B5A4F, #8B7A6F); }
.cx-card-img.cx-medien { background: linear-gradient(135deg, #4A5560, #6B7A85); }
.cx-card-img.cx-extra { background: linear-gradient(135deg, #7A5C4F, #9B7A6A); }

.cx-card-body { padding: 20px; }

.cx-card-body .cx-rubrik-tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    margin-bottom: 10px;
}

.cx-card-body h4 {
    font-family: var(--cx-font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    margin-top: 0;
}

.cx-card-body h4 a { color: var(--cx-text); }
.cx-card-body h4 a:hover { color: var(--cx-primary); }

.cx-card-body p {
    font-size: 0.9rem;
    color: var(--cx-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.cx-card-meta {
    padding: 12px 20px;
    border-top: 1px solid var(--cx-border);
    font-size: 0.8rem;
    color: var(--cx-secondary);
}

/* ---- ARTICLE LAYOUT ---- */
.cx-article {
    max-width: var(--cx-max-width);
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.cx-article-main {
    background: var(--cx-white);
    padding: 40px;
    border-radius: var(--cx-radius);
    box-shadow: var(--cx-shadow);
}

.cx-article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---- ARTICLE HEADER ---- */
.cx-article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cx-border);
}

.cx-article-header h1 { margin-top: 12px; }

.cx-article-meta {
    font-size: 0.85rem;
    color: var(--cx-secondary);
    margin-top: 12px;
}

.cx-article-meta span::after {
    content: '\00B7';
    margin: 0 8px;
}

.cx-article-meta span:last-child::after { content: ''; }

.cx-series-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cx-secondary);
    border: 1px solid var(--cx-border);
    padding: 3px 10px;
    margin-top: 8px;
}

/* ---- ARTICLE BODY ---- */
.cx-article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--cx-bg);
    border-left: 4px solid var(--cx-primary);
    border-radius: 0 var(--cx-radius) var(--cx-radius) 0;
    font-family: var(--cx-font-heading);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--cx-text);
}

.cx-article-body blockquote p:last-child { margin-bottom: 0; }

.cx-article-body figure { margin: 2rem 0; }

.cx-article-body figure img {
    width: 100%;
    height: auto;
    border-radius: var(--cx-radius);
}

.cx-article-body figcaption {
    font-size: 0.85rem;
    color: var(--cx-secondary);
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--cx-border);
}

.cx-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    display: block;
    overflow-x: auto;
}

.cx-article-body th,
.cx-article-body td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--cx-border);
}

.cx-article-body th {
    font-weight: 600;
    color: var(--cx-primary);
    background: var(--cx-bg);
    font-family: var(--cx-font-heading);
    font-size: 0.9rem;
}

/* ---- INHALTSVERZEICHNIS ---- */
.cx-toc {
    background: var(--cx-bg);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    padding: 20px 24px;
    margin: 0 0 32px;
}

.cx-toc h4 {
    font-family: var(--cx-font-heading);
    font-size: 0.95rem;
    margin-bottom: 12px;
    margin-top: 0;
    color: var(--cx-primary);
}

.cx-toc ol { margin-bottom: 0; padding-left: 1.25rem; }
.cx-toc li { margin-bottom: 4px; font-size: 0.9rem; }
.cx-toc a { color: var(--cx-secondary); }
.cx-toc a:hover { color: var(--cx-primary); }

/* ---- INFO BOX ---- */
.cx-info-box {
    background: var(--cx-bg);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    padding: 24px;
    margin: 2rem 0;
}

.cx-info-box h3 {
    font-family: var(--cx-font-heading);
    font-size: 1.1rem;
    margin-bottom: 12px;
    margin-top: 0;
    color: var(--cx-primary);
}

/* ---- SIDEBAR ---- */
.cx-sidebar-box {
    background: var(--cx-white);
    padding: 24px;
    border-radius: var(--cx-radius);
    box-shadow: var(--cx-shadow);
}

.cx-sidebar-box h3 {
    font-family: var(--cx-font-heading);
    font-size: 1.05rem;
    color: var(--cx-primary);
    margin-bottom: 16px;
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cx-accent);
}

.cx-sidebar-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.cx-sidebar-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--cx-border);
    margin-bottom: 0;
}

.cx-sidebar-list li:last-child { border-bottom: none; }
.cx-sidebar-list a { color: var(--cx-text); font-size: 0.9rem; }
.cx-sidebar-list a:hover { color: var(--cx-primary); }

/* ---- VERWANDTE BEITRÄGE ---- */
.cx-related {
    max-width: var(--cx-max-width);
    margin: 0 auto 48px;
    padding: 0 24px;
}

.cx-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

/* ---- HERAUSGEBER-NOTIZ ---- */
.cx-editor-note {
    max-width: var(--cx-max-width);
    margin: 48px auto;
    padding: 0 24px;
}

.cx-editor-note-inner {
    background: var(--cx-white);
    border-left: 4px solid var(--cx-primary);
    padding: 32px 40px;
    border-radius: 0 var(--cx-radius) var(--cx-radius) 0;
}

.cx-editor-note-inner h3 {
    font-family: var(--cx-font-heading);
    font-size: 1.3rem;
    color: var(--cx-primary);
    margin-bottom: 12px;
    margin-top: 0;
}

.cx-editor-note-inner p {
    color: var(--cx-secondary);
    line-height: 1.8;
}

.cx-editor-note-inner .cx-signature {
    margin-top: 16px;
    font-style: italic;
    color: var(--cx-text);
}

/* ---- ZITAT-BLOCK ---- */
.cx-quote {
    max-width: 800px;
    margin: 48px auto;
    padding: 0 24px;
    text-align: center;
}

.cx-quote blockquote {
    font-family: var(--cx-font-heading);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--cx-primary);
    line-height: 1.6;
    position: relative;
    padding: 0 40px;
}

.cx-quote blockquote::before {
    content: '\201E';
    font-size: 4rem;
    position: absolute;
    left: 0;
    top: -10px;
    color: var(--cx-accent);
    font-style: normal;
}

.cx-quote cite {
    display: block;
    margin-top: 16px;
    font-size: 0.9rem;
    font-family: var(--cx-font-body);
    font-style: normal;
    color: var(--cx-secondary);
}

/* ---- ARCHIV / HUB ---- */
.cx-archive {
    max-width: var(--cx-max-width);
    margin: 40px auto;
    padding: 0 24px;
}

.cx-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.cx-archive-header h1 { margin-bottom: 16px; }

.cx-archive-header p {
    color: var(--cx-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.cx-filter-pills {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.cx-pill {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--cx-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--cx-secondary);
    transition: all 0.2s;
}

.cx-pill:hover,
.cx-pill.cx-active {
    background: var(--cx-primary);
    border-color: var(--cx-primary);
    color: var(--cx-white);
}

/* ---- LEGAL ---- */
.cx-legal {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--cx-white);
    border-radius: var(--cx-radius);
    box-shadow: var(--cx-shadow);
}

.cx-legal h1 { margin-bottom: 24px; }
.cx-legal h2 { margin-top: 2.5rem; }
.cx-legal h2:first-of-type { margin-top: 0; }

.cx-legal address {
    font-style: normal;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ---- 404 ---- */
.cx-error-page {
    text-align: center;
    padding: 80px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.cx-error-page h1 {
    font-size: 6rem;
    color: var(--cx-accent);
    margin-bottom: 16px;
}

.cx-error-page h2 {
    font-family: var(--cx-font-heading);
    font-size: 1.8rem;
    margin-bottom: 16px;
    margin-top: 0;
}

.cx-error-page p {
    font-size: 1.1rem;
    color: var(--cx-secondary);
    margin-bottom: 32px;
}

.cx-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--cx-radius);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

.cx-btn-primary {
    background: var(--cx-primary);
    color: var(--cx-white);
}

.cx-btn-primary:hover {
    background: #5A252C;
    color: var(--cx-white);
}

/* ---- FOOTER ---- */
.cx-footer {
    background: var(--cx-text);
    color: #C4BCB4;
    margin-top: 64px;
    padding: 48px 24px 24px;
}

.cx-footer-inner {
    max-width: var(--cx-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.cx-footer h4 {
    font-family: var(--cx-font-heading);
    font-size: 1.1rem;
    color: var(--cx-white);
    margin-bottom: 16px;
}

.cx-footer ul { list-style: none; padding-left: 0; }
.cx-footer ul li { margin-bottom: 8px; }
.cx-footer ul li a { color: #C4BCB4; font-size: 0.9rem; }
.cx-footer ul li a:hover { color: var(--cx-accent); }

.cx-footer-bottom {
    max-width: var(--cx-max-width);
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #4A4440;
    text-align: center;
    font-size: 0.8rem;
    color: #8A827A;
}

/* ---- RESPONSIVE: TABLET (<=1023px) ---- */
@media (max-width: 1023px) {
    .cx-article { grid-template-columns: 1fr; }
    .cx-article-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
    .cx-content { grid-template-columns: 1fr 1fr; }
    .cx-related-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- RESPONSIVE: MOBILE (<=768px) ---- */
@media (max-width: 768px) {
    .cx-featured { grid-template-columns: 1fr; }
    .cx-featured-img { min-height: 220px; }
    .cx-content { grid-template-columns: 1fr; }
    .cx-footer-inner { grid-template-columns: 1fr; }
    .cx-nav { flex-wrap: wrap; }
    .cx-nav a { padding: 10px 14px; font-size: 0.8rem; }
    .cx-header-top { flex-direction: column; text-align: center; gap: 8px; }
    .cx-article-sidebar { grid-template-columns: 1fr; }
    .cx-related-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.8rem; }
    .cx-article-main { padding: 24px; }
    .cx-legal { padding: 24px; margin: 24px auto; }
    .cx-error-page h1 { font-size: 4rem; }
    .cx-featured-content { padding: 24px; }
    .cx-article-body blockquote { padding: 1rem 1.25rem; }
}

/* ---- RESPONSIVE: SMALL MOBILE (<=480px) ---- */
@media (max-width: 480px) {
    .cx-nav a { padding: 8px 10px; font-size: 0.75rem; letter-spacing: 0.5px; }
    .cx-card-body { padding: 16px; }
}

/* ---- PRINT ---- */
@media print {
    .cx-header, .cx-footer, .cx-article-sidebar,
    .cx-nav, .cx-breadcrumb, .cx-toc, .cx-related { display: none; }
    .cx-article { display: block; }
    .cx-article-main { box-shadow: none; padding: 0; }
    a { color: var(--cx-text); }
}
