/* Basierend auf magazin/style.css */
:root {
    --primary-color: #c0392b;
    --secondary-color: #2c3e50;
    --background-color: #f9f9f9;
    --text-color: #333;
    --light-grey: #e0e0e0;
    --white: #ffffff;
    --font-heading: 'Roboto Slab', serif;
    --font-body: 'Roboto', sans-serif;
    --spacing: 1rem;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #c0392b;
    --info-color: #3498db;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;

    /* Sticky Footer */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

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

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

/* Header (Identisch zu Magazin) */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-top: 5px solid var(--primary-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo .logo-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--secondary-color);
    font-weight: bold;
    line-height: 1.2;
}

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

.logo .highlight {
    color: var(--primary-color);
}

.logo p {
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-banner-placeholder {
    width: 728px;
    height: 90px;
    background-color: #f0f0f0;
    border: 1px dashed #999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
    font-weight: bold;
}

@media (max-width: 900px) {
    .site-header .container {
        flex-direction: column;
        text-align: center;
    }

    .ad-banner-placeholder {
        width: 100%;
        max-width: 728px;
    }
}

.main-nav {
    margin-top: 1.5rem;
    border-top: 1px solid var(--light-grey);
    border-bottom: 1px solid var(--light-grey);
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.main-nav li a.active,
.main-nav li a:hover {
    color: var(--primary-color);
}

.site-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
}

.site-footer a {
    color: #bdc3c7;
}

.site-footer a:hover {
    color: var(--white);
}

.site-footer p {
    margin-bottom: 1rem;
}

/* --- Elements Grid Specific Styles --- */

.elements-page-title {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.element-section {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.element-section h2,
.element-section h3 {
    font-family: var(--font-heading);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-size: 1.25rem;
}

/* Typography Helpers */
.typo-box>* {
    margin-bottom: 0.5rem;
}

.text-muted {
    color: #7f8c8d;
}

.text-primary {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

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

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

.btn-primary,
.btn-primary:hover,
.btn-primary:visited,
.btn-primary:active {
    color: var(--white) !important;
}

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

.btn-secondary:hover {
    background-color: #1a252f;
    color: var (--white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-disabled {
    background-color: var(--light-grey);
    color: #7f8c8d;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-grey);
    border-radius: 4px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.alert-info {
    background-color: #eaf6ff;
    color: #2980b9;
    border-left-color: var(--info-color);
}

.alert-success {
    background-color: #eafaf1;
    color: #27ae60;
    border-left-color: var(--success-color);
}

.alert-warning {
    background-color: #fef9e7;
    color: #d35400;
    border-left-color: var(--warning-color);
}

.alert-error {
    background-color: #fdedec;
    color: #c0392b;
    border-left-color: var(--error-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    margin-right: 0.5rem;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-secondary {
    background-color: var(--secondary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
    color: #333;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th,
.custom-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--light-grey);
}

.custom-table th {
    background-color: #f2f2f2;
    font-weight: 700;
}

.custom-table tr:hover {
    background-color: #f9f9f9;
}

/* --- Layout Grid System --- */

.layout-section-title {
    grid-column: 1 / -1;
    font-family: var(--font-heading);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.col-12 {
    grid-column: span 12;
}

.col-9 {
    grid-column: span 9;
}

.col-6 {
    grid-column: span 6;
}

.col-4 {
    grid-column: span 4;
}

/* 3 boxes */
.col-3 {
    grid-column: span 3;
}

/* 4 boxes */
.col-2 {
    grid-column: span 2;
}

/* Visual Helper for Layout Demo */
.demo-box {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    color: var(--secondary-color);
    padding: 1rem;
    text-align: center;
    border-radius: 4px;
    font-weight: bold;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-box.highlight {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: #a93226;
}

.demo-box.secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: #1a252f;
}

/* --- Topic Navigation Cards --- */
.topic-nav-card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    /* Ensure link underline is gone */
}

.topic-nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.topic-nav-card h2,
.topic-nav-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.topic-nav-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    position: relative;
    overflow: hidden;
}

/* --- Intro Box --- */
.intro-box {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 4rem;
    text-align: center;
    border-top: 4px solid var(--primary-color);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

/* Decorative background circle */
.intro-box::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background-color: rgba(192, 57, 43, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.intro-box::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background-color: rgba(44, 62, 80, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.intro-box .intro-content {
    position: relative;
    z-index: 1;
}

.intro-box h1,
.intro-box h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.intro-box p.lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.intro-box p {
    color: #666;
    font-size: 1.05rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Content Modules for SEO --- */
.content-wrapper {
    margin-top: 2rem;
}

.content-section {
    margin-bottom: 3rem;
    /* Neu: Basisschriftgröße setzen, damit Text ohne p-Tag identisch aussieht */
    font-size: 1.05rem;
    color: #444;
}

.content-section h2.bordered-title {
    font-family: var(--font-heading);
    color: var (--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-grey);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* New: h2 uses the style previously for h3 */
.content-section h2,
.content-section h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
    font-weight: bold;
    /* Explicitly set bold as h3 usually implies it */
    border-bottom: none;
    /* Reset potential border from generic h2 */
    display: block;
    /* Reset potential inline-block */
    padding-bottom: 0;
}

.content-section p {
    margin-bottom: 1rem;
    /* font-size: 1.05rem;  <-- Entfernt, erbt nun von .content-section */
    /* color: #444; <-- Entfernt, erbt nun */
}

.content-section ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

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

.content-image-placeholder {
    background-color: #eee;
    width: 100%;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* --- Special Intro Section (Article Mode) --- */
.intro-text-section {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    padding: 1.5rem 3rem;
    margin-bottom: 3rem;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--secondary-color);
}

.intro-text-section h1 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    text-align: left;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    display: block;
    font-size: 2rem;
    line-height: 1.2;
}

.intro-text-section p {
    margin-bottom: 2.5rem;
    margin-bottom: 2.5rem;
    margin-top: 2.5rem;
}

/* --- Article & Ad Styles --- */

.content-section.article-mode {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    padding: 1.5rem 3rem;
    margin-bottom: 3rem;
}

.content-section.article-mode>*:first-child {
    margin-top: 0;
}

.content-section.article-mode>*:last-child {
    margin-bottom: 0;
}

/* KORREKTUR: Schriftgröße für normale Artikel-Abschnitte normalisieren */
.content-section.article-mode p {
    /* 
       Vorher war hier font-size: 1.3rem für alles. 
       Jetzt entfernen wir das, damit es standard (1.05rem) ist.
       Nur die Farbe passen wir für bessere Lesbarkeit auf weißem Grund an.
    */
    color: #333;
    /* margin und size werden von .content-section p geerbt oder sind standard */
}

/* Links im Content-Bereich: Immer Primärfarbe, keine Unterstreichung */
.content-section.article-mode a,
.content-section.article-mode a:hover,
.content-section.article-mode a:active,
.content-section.article-mode a:visited,
.content-section p a,
.content-section p a:hover,
.content-section p a:active,
.content-section p a:visited,
.content-section li a,
.content-section li a:hover,
.content-section li a:active,
.content-section li a:visited,
.intro-box p a,
.intro-box p a:hover,
.intro-box p a:active,
.intro-box p a:visited,
.topic-nav-card p a,
.topic-nav-card p a:hover,
.topic-nav-card p a:active,
.topic-nav-card p a:visited {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- 404 / Error page layout tweaks --- */
.content-section.error-404 {
    /* align box width similar to single-column article intro */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;

    /* ensure inner text is centered */
    text-align: center;
}

.content-section.error-404 p {
    text-align: center;
}

.content-section.error-404 .error-404-icon {
    display: flex;
    justify-content: center;
}

.error-404-tram {
    width: 375px;
    height: 375px;
    color: #333;
    margin-bottom: 2rem;
}