/* ==========================================================================
   SchwarzWeiss Stylesheet for SvenBarth.de
   Based on modern-style.css / infokarten-style.css
   ========================================================================== */

/* CSS Reset (vereinfacht) */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
    /* Basis für rem Einheiten */
}

body {
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    /* Entspricht 16px bei Standard-Browser-Einstellung */
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    /* Heller Hintergrund wie Startseite */
    -webkit-font-smoothing: antialiased;
    /* Bessere Schriftglättung */
    -moz-osx-font-smoothing: grayscale;
}

/* Globale Variablen für Farben und Abstände (identisch zur Startseite) */
:root {
    --primary-color: #6a9f79;
    --secondary-color: #4a7c59;
    --dark-color: #2c3e50;
    --light-color: #ffffff;
    --grey-color: #f0f0f0;
    --light-grey-color: #f8f8f8;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-light-color: #555;
    --section-padding: 4rem;
    --container-width: 1140px;
    --border-radius: 8px;
    --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Container (identisch zur Startseite) */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Typografie (Basis identisch zur Startseite) */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

h3 {
    font-size: 1.3rem;
}

/* Etwas kleiner für die Karten */
h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hilfsklassen (identisch zur Startseite) */
.section-padding {
    padding: var(--section-padding) 0;
}

/* Header Styles (identisch zur Startseite) */
.site-header {
    background-color: var(--light-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 90px;
    /* Höhe wie auf Startseite eingestellt */
    width: auto;
    display: block;
    filter: brightness(10%);
    /* Abdunklung wie auf Startseite */
    transition: filter 0.3s ease;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-color);
    text-decoration: none;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.main-nav a:hover,
.main-nav li.active a {
    /* Aktiven Link hervorheben */
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* ==========================================================================
   SchwarzWeiss Specific Styles
   ========================================================================== */

.sw-gallery-section h2 {
    /* Styling für die Hauptüberschrift "SchwarzWeiss E-Books" */
    /* Ist bereits durch globale h2-Regel abgedeckt */
}

.sw-grid {
    /* Grid für die SchwarzWeiss-Karten */
    display: grid;
    /* 1-spaltig auf kleinen, bis zu 2-spaltig auf großen Screens */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Mindestbreite anpassen */
    gap: 2rem;
    /* Größerer Abstand zwischen den Karten */
}

.sw-card {
    /* Styling für eine einzelne SW-Karte - ähnlich category-card */
    position: relative;
    /* Für das Overlay */
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    /* Stellt sicher, dass der Link die Karte füllt */
    flex-direction: column;
}

.sw-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.sw-card a {
    /* Styling für den Link, der die Karte umschließt */
    display: block;
    color: inherit;
    /* Erbt Textfarbe, falls nötig */
    text-decoration: none;
    flex-grow: 1;
    /* Stellt sicher, dass der Link den verfügbaren Platz einnimmt */
}

.sw-card a:hover {
    color: inherit;
    /* Verhindert Farbänderung des Links selbst */
}


.sw-card img {
    /* Styling für das Bild in der Karte */
    width: 100%;
    height: auto;
    /* Höhe automatisch anpassen */
    /* Optional: Feste Höhe mit object-fit, falls alle Bilder gleich hoch sein sollen */
    /* height: 250px; */
    /* object-fit: cover; */
    display: block;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    /* Oben abrunden */
    transition: transform 0.4s ease;
}

.sw-card:hover img {
    transform: scale(1.05);
    /* Leichter Zoom-Effekt beim Hovern der Karte */
}

.sw-card-overlay {
    /* Styling für den Text-Overlay über dem Bild (wie bei category-card) */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 10%, rgba(0, 0, 0, 0.1) 90%);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    text-align: left;
    transition: background 0.3s ease;
}

.sw-card:hover .sw-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 15%, rgba(0, 0, 0, 0.15) 95%);
}

.sw-card-overlay h3 {
    /* Styling für den Titel im Overlay */
    color: var(--light-color);
    margin: 0;
    font-size: 1.3rem;
    /* Angepasste Größe */
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}


/* Quote Section Styles (identisch zur Startseite) */
.quote-section {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.quote-section blockquote {
    font-size: 1.6rem;
    font-style: italic;
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.5;
    position: relative;
    padding: 1rem 0;
}

.quote-section blockquote::before,
.quote-section blockquote::after {
    content: '"';
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    position: absolute;
    line-height: 1;
}

.quote-section blockquote::before {
    top: 0;
    left: -10px;
}

.quote-section blockquote::after {
    bottom: 0;
    right: -10px;
}

.quote-section cite {
    display: block;
    margin-top: 1.5rem;
    font-size: 1rem;
    font-style: normal;
    color: rgba(255, 255, 255, 0.6);
}


/* Footer Styles (identisch zur Startseite) */
.site-footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding-top: calc(var(--section-padding) / 2);
    padding-bottom: calc(var(--section-padding) / 2);
}

.footer-logo {
    max-height: 30px;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.site-footer p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #aaa;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-nav a {
    color: #aaa;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--light-color);
}


/* ==========================================================================
   Responsive Design (Basis identisch zur Startseite)
   ========================================================================== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* Mobile Navigation (identisch zur Startseite) */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--light-color);
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0.5rem 0;
        gap: 0;
    }

    .main-nav li {
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav a:hover,
    .main-nav li.active a {
        background-color: var(--light-grey-color);
        border-bottom-color: var(--border-color);
        /* Behält Trennlinie bei Hover */
        color: var(--primary-color);
    }

    .main-nav li:last-child a {
        border-bottom: none;
    }

    .nav-toggle {
        display: block;
    }

    /* Mobile Nav Button anzeigen */

    /* Anpassungen für SchwarzWeiss */
    .sw-grid {
        /* Evtl. weniger Spalten auf Tablets */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .sw-card-overlay h3 {
        font-size: 1.2rem;
    }


    .quote-section blockquote {
        font-size: 1.3rem;
    }

    .quote-section blockquote::before,
    .quote-section blockquote::after {
        font-size: 2rem;
    }

    .section-padding {
        padding: 2.5rem 0;
    }

    :root {
        --section-padding: 2.5rem;
    }

    /* Variable für konsistenten Mobile-Abstand */
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    /* Sicherstellen, dass Karten auf sehr kleinen Bildschirmen gut passen */
    .sw-grid {
        grid-template-columns: 1fr;
        /* Eine Spalte */
        gap: 1.5rem;
        /* Beibehaltung des Abstands */
    }

    .sw-card-overlay h3 {
        font-size: 1.1rem;
    }

    .sw-card-overlay {
        padding: 1.5rem 1rem 1rem 1rem;
    }

    /* Weniger Padding auf Mobile */
}