/*
Theme Name: Gewerbeverein Schwamendingen
Theme URI: https://gewerbe-schwamendingen.ch
Author: Marco Henninger - IT Services
Author URI: https://marco-henninger.ch
Description: Individuelles, performantes und nDSG-konformes Theme ohne Inline-Styles.
Version: 1.0.0
*/

/* ==========================================================================
   1. MODERNES CSS-RESET & VARIABLEN
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --accent: #e21c21; /* Klassisches Rot aus dem Logo */
    --border-color: #e2e8f0;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. HEADER & HAUPTNAVIGATION
   ========================================================================== */
.main-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo-Container: Bild und Text nebeneinander ausrichten */
.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.logo-icon {
    max-height: 55px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.logo:hover .logo-text {
    color: var(--accent);
}

/* Menüliste horizontal ausrichten */
.main-nav ul,
.main-header ul {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav a,
.main-header ul a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-header ul a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ==========================================================================
   3. SEKTIONEN & SEITEN-LAYOUTS
   ========================================================================== */
.hero-section {
    padding: 80px 0 60px;
    /* Angepasster Gradient für helles Theme */
    background: radial-gradient(circle at top right, rgba(215, 25, 32, 0.05), transparent 40%);
}

.hero-section h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 680px;
}

.content-section,
.events-preview-section,
.cta-section {
    padding: 50px 0;
}

.events-preview-section {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg); /* Leicht abgesetzter Hintergrund */
}

.cta-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    margin: 40px auto 80px;
    max-width: 1200px;
    text-align: center;
    padding: 60px 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Leichter Schatten für die Box */
}

.cta-section h2 {
    margin-bottom: 12px;
}

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==========================================================================
   4. INHALTSBEREICH (TYPOGRAFIE AUS DEM EDITOR)
   ========================================================================== */
.entry-content {
    margin: 40px 0;
}

.entry-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.entry-content h2, 
.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.entry-content ul, 
.entry-content ol {
    margin-left: 20px;
    margin-bottom: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 15px;
    margin: 1.5rem 0;
    color: var(--text-muted);
}

/* ==========================================================================
   5. BUTTONS & INTERAKTIONEN
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #b0141a; /* Etwas dunkleres Rot für Hover */
    text-decoration: none;
    transform: translateY(-1px);
}

.events-more {
    margin-top: 24px;
}

.events-more .btn {
    color: var(--accent);
    padding-left: 0;
}

.events-more .btn:hover {
    text-decoration: underline;
}

/* ==========================================================================
   6. FOOTER LAYOUT
   ========================================================================== */
.main-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding-top: 50px;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3,
.footer-col h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-col p,
.footer-col address {
    color: var(--text-muted);
    font-style: normal;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   7. BURGER-MENÜ (REINES CSS) & RESPONSIVE DESIGN
   ========================================================================== */

/* Burger-Button: Auf Desktop unsichtbar */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

/* Die 3 Striche */
.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Verwandlung in ein "X" beim Öffnen */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- STUFE 2 & 3: TABLET & SMARTPHONE (Ab 860px abwärts) --- */
@media screen and (max-width: 860px) {
    .menu-toggle {
        display: flex;
    }

    /* Navigation als Dropdown-Menü ausklappen */
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .main-nav.active {
        max-height: 350px;
        padding: 20px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); /* Leichter Schatten fürs Menü */
    }

    .main-nav ul,
    .main-header ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .main-nav a,
    .main-header ul a {
        font-size: 1.05rem;
        display: block;
        width: 100%;
    }

    /* Layout-Anpassungen */
    .hero-section {
        padding: 50px 0 40px;
    }

    .cta-section {
        margin: 30px 15px 50px;
        padding: 40px 20px;
    }
}

/* --- STUFE 1: REINE SMARTPHONES (Ab 480px abwärts) --- */
@media screen and (max-width: 480px) {
    .logo {
        gap: 10px;
    }

    .logo-icon {
        max-height: 45px;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .hero-section h1 {
        font-size: 1.85rem;
    }

    .lead {
        font-size: 1.05rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .footer-grid {
        gap: 30px;
    }
}