/*
Theme Name: Altmühltaler Bergdeifl'n
Theme URI: https://altmuehltaler-bergdeifln.de
Author: AI Assistant
Description: Ein düsteres, atmosphärisches Theme für den Brauchtumsverein Altmühltaler Bergdeifl'n. Mit Kalender, Galerie und geschütztem Mitgliederbereich inklusive RSVP-Funktion.
Version: 1.0.0
Text Domain: bergdeifln
*/

:root {
    --bg-color: transparent;
    --bg-secondary: rgba(22, 22, 22, 0.85);
    --text-color: #e0e0e0;
    --text-muted: #888888;
    --accent-red: #8B0000; /* Blood / Fire Red */
    --accent-hover: #aa0000;
    --border-color: #333333;
    
    --font-heading: 'Cinzel', serif; /* A mystic/traditional looking font */
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

a {
    color: var(--accent-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: var(--accent-red);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-family: var(--font-heading);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
}

.btn-secondary:hover {
    background-color: var(--accent-red);
    color: #fff;
}

/* Header */
.site-header {
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.site-logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
}

.site-logo span {
    color: var(--accent-red);
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.main-navigation a:hover {
    color: var(--accent-red);
}

/* Dropdown Menu Styles */
.has-dropdown {
    position: relative;
}

.has-dropdown > ul {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    background-color: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-red);
    min-width: 200px;
    padding: 10px 0;
    display: none;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.has-dropdown:hover > ul {
    display: flex;
}

.has-dropdown > ul li {
    padding: 10px 20px;
}

.has-dropdown > ul li a {
    display: block;
    width: 100%;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* Mobile Navigation & Layout Styles */
@media screen and (max-width: 850px) {
    .site-header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
    }
    .site-branding {
        width: 100%;
    }
    .site-logo a {
        font-size: clamp(0.9rem, 4vw, 1.2rem) !important; 
        white-space: nowrap;
    }
    .menu-toggle {
        display: block;
    }
    .main-navigation {
        width: 100%;
        display: none; /* hidden by default on mobile */
        padding-top: 20px;
        padding-bottom: 10px;
    }
    .main-navigation.toggled {
        display: block;
    }
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
    .has-dropdown > ul {
        position: static;
        display: none;
        border: none;
        border-top: none;
        border-left: 2px solid var(--accent-red);
        background: transparent;
        padding-left: 20px;
        box-shadow: none;
        margin-top: 10px;
    }
    .has-dropdown.toggled > ul {
        display: flex;
    }
    
    /* Layout Adjustments for taller mobile header */
    .site-content {
        padding-top: 130px !important;
    }
    
    /* Typography Fixes for very small screens */
    h1 { font-size: 1.6rem !important; line-height: 1.2 !important; }
    h2 { font-size: 1.4rem !important; line-height: 1.3 !important; }
    h3 { font-size: 1.2rem !important; }
    
    .hero-content h1 { font-size: clamp(1.6rem, 6vw, 2.2rem) !important; margin-bottom: 10px !important; }
    .page-title { font-size: clamp(1.4rem, 5vw, 1.8rem) !important; }
    .section-title { font-size: clamp(1.4rem, 5vw, 1.8rem) !important; }
    .entry-title { font-size: 1.3rem !important; }
    
    .hero-content p { font-size: 0.95rem !important; line-height: 1.4 !important; margin-bottom: 15px !important; }
}

/* Page padding to account for fixed header */
.site-content {
    padding-top: 100px;
    min-height: 80vh;
}

/* Footer */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Card Style for Events/Gallery */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-red);
}

/* Member Form Elements */
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    margin-bottom: 15px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-red);
}

/* Helpers */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

/* Sponsoren Kategorien */
.sponsor-card-gold { width: 100%; max-width: 350px; }
.sponsor-logo-gold { width: 300px; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 0 auto; }
.sponsor-logo-gold img { object-fit: contain; width: 100%; height: 100%; }
.sponsor-title-gold { font-size: 1.5rem; }

.sponsor-card-silber { width: 100%; max-width: 250px; }
.sponsor-logo-silber { width: 200px; height: 100px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 0 auto; }
.sponsor-logo-silber img { object-fit: contain; width: 100%; height: 100%; }
.sponsor-title-silber { font-size: 1.2rem; }

.sponsor-card-bronze { width: 100%; max-width: 180px; }
.sponsor-logo-bronze { width: 140px; height: 70px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 0 auto; }
.sponsor-logo-bronze img { object-fit: contain; width: 100%; height: 100%; }
.sponsor-title-bronze { font-size: 1rem; }

/* Rotating Gold Sponsors Frontpage */
.gold-sponsors-rotator {
    width: 250px;
    height: 400px;
    position: relative;
    overflow: hidden;
    margin-left: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
}

.gold-sponsor-slide {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gold-sponsor-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.gold-sponsor-item {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.gold-sponsor-item img {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
}

.gold-sponsor-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
}

@media screen and (max-width: 850px) {
    .gold-sponsors-rotator {
        margin-left: 0;
        margin-top: 40px;
        width: 100%;
        max-width: 300px;
    }
}
