/* ---------------------------------------------------------------------- */
/* --- MODERN MASTERPIECE: LIGHT & FRIENDLY BASE --- */
/* ---------------------------------------------------------------------- */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Orbitron:wght@500;700;900&display=swap');

:root {
    /* --- COLOR PALETTE VARIABLES (DEFAULTS) --- */
    --theme-primary: #333333; /* Default dark text/accent */
    --theme-secondary: #666666;
    --theme-accent: #333333;
    
    /* --- SURFACE COLORS (LIGHT) --- */
    --bg-deep: #f4f7f6; /* Very light cool gray/white */
    --glass-bg: rgba(255, 255, 255, 0.9); /* White Glass */
    --glass-border: rgba(0, 0, 0, 0.05);
    --card-hover-bg: #ffffff;
    
    /* --- TEXT COLORS --- */
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #ffffff; /* For buttons/dark areas */

    /* --- SHADOWS (Soft) --- */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px -5px rgba(0,0,0,0.1);
    --shadow-glow: 0 5px 15px rgba(0,0,0,0.1);
    
    /* --- TYPOGRAPHY --- */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* --- SPACING & SIZES --- */
    --container-width: 1200px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

/* ---------------------------------------------------------------------- */
/* --- RESET & BODY --- */
/* ---------------------------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    
    /* DEFAULT STARTPAGE BACKGROUND (Village View) */
    background-image: url('../images/bg_start_1200.jpg');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
}

/* ---------------------------------------------------------------------- */
/* --- HEADER AREA --- */
/* ---------------------------------------------------------------------- */

.header {
    background: transparent;
    padding: 5px 20px 0px;
    text-align: center;
    position: relative;
    z-index: 100;
}

.header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 2.2rem); /* Significantly smaller to prevent wrap */
    font-weight: 800;
    margin: 0;
    
    /* Dynamic coloring handles in themes. Default is sleek dark. */
    color: var(--text-main);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px rgba(255,255,255,1), 0px 5px 15px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
}

/* ---------------------------------------------------------------------- */
/* --- NAVIGATION --- */
/* ---------------------------------------------------------------------- */

.navbar {
    position: sticky;
    top: 10px; /* Reduced sticky top slightly */
    z-index: 1000;
    margin: 0 auto 5px; /* Reduced bottom margin to minimum */
    width: 95%;
    max-width: 900px;
    
    /* Removed background and styling */
    background: transparent;
    border: none;
    box-shadow: none;
}

.main-menu {
    list-style: none;
    padding: 15px 20px; /* Increased vertical padding for balance */
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: #000000;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-shadow: none;
}

.main-menu > li > a:hover,
.main-menu > li > a:focus {
    background: var(--theme-primary);
    color: #000000;
    box-shadow: var(--shadow-element);
    transform: translateY(-2px);
    text-shadow: none;
}

/* Hauptmenü-Schrift immer schwarz halten (unabhängig von geladenem Theme-CSS) */
#main-nav .main-menu > li > a,
#main-nav .main-menu > li > a i,
#main-nav .submenu li a,
#main-nav .submenu li a i,
#main-nav .main-menu > li > a:hover,
#main-nav .main-menu > li > a:focus,
#main-nav .main-menu > li > a:hover i,
#main-nav .main-menu > li > a:focus i,
#main-nav .submenu li a:hover,
#main-nav .submenu li a:focus,
#main-nav .submenu li a:hover i,
#main-nav .submenu li a:focus i {
    color: #000000 !important;
}

/* Submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%; /* Position directly below */
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    padding: 10px;
    min-width: 220px;
    list-style: none;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    z-index: 1001;
    margin-top: 15px; /* Visual gap */
}

/* Invisible bridge to prevent closing when moving mouse */
.submenu::after {
    content: '';
    position: absolute;
    top: -30px; /* Extend upwards to cover the gap and overlap parent */
    left: 0;
    width: 100%;
    height: 30px;
    background: transparent;
}

.submenu::before {
    /* Arrow up */
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-left: 1px solid rgba(0,0,0,0.1);
    border-top: 1px solid rgba(0,0,0,0.1);
}

.main-menu > li:hover .submenu,
.main-menu > li:focus-within .submenu {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.main-menu > li.submenu-closed:hover .submenu,
.main-menu > li.submenu-closed:focus-within .submenu {
    display: none !important;
}

.submenu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-family: var(--font-body);
    font-weight: 500;
}

.submenu li a:hover {
    background: #f0f0f0;
    color: var(--theme-primary);
    padding-left: 25px;
}

/* ---------------------------------------------------------------------- */
/* --- CONTENT CONTAINER --- */
/* ---------------------------------------------------------------------- */

.container {
    width: 95%;
    max-width: var(--container-width);
    margin: 0 auto;
    flex: 1 0 auto;
    padding-bottom: 60px;
}

/* Clean White Cards */
.info-box, .welcome-box, .cms-page {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-lg);
    padding: 50px;
    margin-bottom: 40px;
    /* Stronger shadow for better contrast against light bg */
    box-shadow: 0 20px 50px rgba(0,0,0,0.15), 0 5px 15px rgba(0,0,0,0.05);
    /* Top Border Highlight */
    border-top: 5px solid var(--theme-primary);
    position: relative;
    overflow: hidden;
}

/* GLOBAL HEADER STYLE FOR LOADED CONTENT */
.cms-page h1 {
    /* Reset local margins to hit the edges of the parent container padding */
    margin: -50px -50px 25px -50px;
    
    /* Full width banner adjustments */
    padding: 15px 50px;
    
    /* Colors */
    background-color: var(--theme-primary);
    color: #ffffff !important; /* Force white text */
    
    /* Typography */
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.4rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6); /* Added shadow for contrast */
    letter-spacing: 1px;
    
    /* Box Model */
    width: calc(100% + 100px); /* Counteract the padding of parent */
    border-radius: 0; 
}

/* Typography Inside Content */
.page-headline {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--theme-primary);
    margin-top: 0;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.page-headline::after {
    /* Underline decoration */
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--theme-primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--theme-primary);
    margin: 30px 0 15px;
    border-left: 4px solid var(--theme-primary);
    padding-left: 15px;
    background: linear-gradient(90deg, rgba(0,0,0,0.02), transparent);
}

p, li {
    font-size: 1.1rem;
    color: #444;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

a {
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

a:hover {
    color: var(--theme-secondary);
    text-decoration: underline;
}

/* Images */
.info-box img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: block;
    margin: 20px auto;
}

/* ---------------------------------------------------------------------- */
/* --- FOOTER (Neutral Dark for Grounding OR Light) --- */
/* ---------------------------------------------------------------------- */

.footer {
    background: #222; /* Keep dark for contrast/grounding even in light theme */
    color: #999;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: auto;
    border-top: none;
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------------------------------------------------------------- */
/* --- QUICK LINKS (WELCOME PAGE) --- */
/* ---------------------------------------------------------------------- */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.quick-links .card {
    display: block;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.quick-links .card h2 {
    font-family: var(--font-heading);
    color: var(--theme-primary); /* Defaults to dark, overridden by JS/CSS specifics */
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.quick-links .card p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

.quick-links .card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    background: #fafafa;
    border-color: rgba(0,0,0,0.1);
}

/* Mobile Menu Button */
#mobile-menu-btn {
    display: none;
}

/* Animations included */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px) translateX(-50%); }
    to { opacity: 1; transform: translateY(0) translateX(-50%); }
}

/* ---------------------------------------------------------------------- */
/* --- PERMANENT MENU COLORS (Specific Branding) --- */
/* ---------------------------------------------------------------------- */

/* Reileifzen Button (Always Gold/Amber) */
.main-menu > li.verkehrsverein-btn > a {
    background-color: #ffce31;
    color: #000000;
    border-color: #ffce31;
}

.main-menu > li.verkehrsverein-btn > a:hover,
.main-menu > li.verkehrsverein-btn > a:focus {
    background-color: #ffce31;
    color: #000000;
    border-color: #ffce31;
    box-shadow: 0 5px 15px rgba(176, 141, 0, 0.4);
}

/* Gänsetränke Button (Always Blue/Cyan) */
.main-menu > li.gaensetranke-btn > a {
    background-color: #0277bd;
    color: #000000;
    border-color: #0277bd;
}

.main-menu > li.gaensetranke-btn > a:hover,
.main-menu > li.gaensetranke-btn > a:focus {
    background-color: #0277bd;
    color: #000000;
    border-color: #0277bd;
    box-shadow: 0 5px 15px rgba(2, 119, 189, 0.4);
}

/* Feuerwehr Button (Always Red/Orange) */
.main-menu > li.feuerwehr-btn > a {
    background-color: #D32F2F;
    color: #000000;
    border-color: #D32F2F;
}

.main-menu > li.feuerwehr-btn > a:hover,
.main-menu > li.feuerwehr-btn > a:focus {
    background-color: #D32F2F;
    color: #000000;
    border-color: #D32F2F;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.4);
}

/* ---------------------------------------------------------------------- */
/* --- START PAGE SPECIFICS --- */
/* ---------------------------------------------------------------------- */

.start-page-content {
    background: transparent !important; /* Override white content box if needed */
    box-shadow: none !important;
    border: none !important;
    padding-top: 20px;
}

.start-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3vw;
    margin-bottom: 50px;
    padding-top: 20px;
    flex-wrap: nowrap; /* Force single row if screen allows, else wrap */
}

@media (max-width: 900px) {
    .start-hero {
        flex-wrap: wrap;
        flex-direction: column;
    }
    .side-images {
        flex-direction: row !important; 
    }
}

.main-crest img {
    height: 280px; /* Dominant center */
    width: auto;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.5));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.main-crest img:hover {
    transform: scale(1.1);
}

.side-images {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.side-images img {
    width: 220px; 
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border: 3px solid #ffffff;
    transition: all 0.3s ease;
}

.side-images img:hover {
    transform: scale(1.05);
    z-index: 5;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

/* Stagger rotations for "thrown photos" look */
.side-images.left img:nth-child(1) { transform: rotate(-3deg); }
.side-images.left img:nth-child(2) { transform: rotate(2deg); }
.side-images.right img:nth-child(1) { transform: rotate(3deg); }
.side-images.right img:nth-child(2) { transform: rotate(-2deg); }

.side-images.left img:nth-child(1):hover { transform: scale(1.1) rotate(0); }
.side-images.left img:nth-child(2):hover { transform: scale(1.1) rotate(0); }
.side-images.right img:nth-child(1):hover { transform: scale(1.1) rotate(0); }
.side-images.right img:nth-child(2):hover { transform: scale(1.1) rotate(0); }


.welcome-text-box {
    background: #fefeca;
    backdrop-filter: blur(10px);
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    border-top: 5px solid #333; /* Default neutral accent */
}

.welcome-text-box h3 {
    font-family: var(--font-heading);
    color: #333;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 20px;
}

.welcome-text-box strong {
    color: #000;
}

/* Gallery Styles added for Das Dorf */
.image-gallery, .historical-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.image-gallery img, .historical-images img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: block;
}

.historical-images figure {
    margin: 0;
    text-align: center;
    background: white;
    padding: 10px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.historical-images figcaption {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.4;
}

.logos {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.logos img {
    max-height: 80px;
    width: auto;
}

h3 {
      color: #cc0000;
      font-size: 1.6em;
      font-weight: bold;
      text-align: center;
      margin: 40px 0 10px;
      text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

