/* 
 * Recreated Design for Obst- und Gartenbauverein
 * Based on analysis of local files
 */

:root {
    --primary-green: #128249;
    --secondary-lime: #b4be1a;
    --text-dark: #616161;
    --bg-gray: #e6e6e6;
    --white: #ffffff;
    --font-main: 'Lato', sans-serif;
    --max-width: 1200px;
}

/* Base Styles */
html {
    overflow-y: scroll;
    /* Forces scrollbar to appear to prevent layout shift */
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.4;
    background-color: var(--white);
}

.width {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-lime);
}

img {
    max-width: 100%;
    height: auto;
}

.clear {
    clear: both;
}

/* Typography */
h1 {
    font-size: 30px;
    font-weight: 300;
    color: var(--primary-green);
    margin: 0 0 35px 0;
}

h2 {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-dark);
    margin: 0 0 15px 0;
}

h3 {
    font-size: 20px;
    font-weight: 400;
    color: var(--primary-green);
    margin: 0;
}

p {
    font-size: 16px;
    margin-bottom: 28px;
    line-height: 1.4;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Header */
.header {
    padding: 10px 0;
}

.header .width {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 80px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    color: var(--primary-green);
    font-weight: 300;
    line-height: 1.2;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    min-width: 200px;
}

.search-form {
    display: flex;
    background: var(--bg-gray);
    border-radius: 20px;
    padding: 2px 10px;
    align-items: center;
}

.suchfeld-header {
    border: none;
    background: transparent;
    padding: 5px;
    font-size: 14px;
    width: 120px;
    outline: none;
}

.search-button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--primary-green);
}

/* Base styles for Google Search */
.gcse-search {
    width: 100%;
}

.header-links ul li {
    display: inline-block;
    margin-left: 10px;
}

.header-links a {
    color: var(--primary-green);
    font-size: 16px;
}

.mobile-only {
    display: none;
}



/* Navigation */
.menu-top {
    background: var(--primary-green);
    border-bottom: 5px solid var(--white);
    position: relative;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-site-title {
    display: none;
    color: var(--white);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.2;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 10px 0;
}

.menu-toggle .bar {
    width: 30px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.menu-top ul li {
    display: inline-block;
    margin: 0;
}

.menu-top ul li a {
    color: var(--white);
    font-size: 18px;
    font-weight: 300;
    padding: 10px;
    display: inline-block;
}

.menu-top ul li.active a,
.menu-top ul li a:hover {
    background: var(--secondary-lime);
    color: var(--white);
}

/* Hero / gallery */
.bildergalerie {
    position: relative;
    margin-bottom: 40px;
}

.bildergalerie .hero-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}


.bildergalerie .teaser {
    position: absolute;
    bottom: 20%;
    right: 15%;
    text-align: right;
    background: rgba(255, 255, 255, 0.8);
    /* Added for readability on placeholder */
    padding: 20px;
    border-radius: 5px;
}

.bildergalerie .teaser h2 {
    font-size: 35px;
    font-weight: 300;
    color: var(--primary-green) !important;
    /* Changed from white for better visibility on placeholder */
    margin: 0;
    line-height: 1.2;
}

/* 3-Column Blocks */
.blocks-container {
    margin-top: -40px;
    /* Overlap effect */
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
}

.block-grid {
    display: flex;
    gap: 30px;
}

.block {
    flex: 1;
    background: var(--white);
    box-shadow: 0 -3px 6px -4px #000;
    border-radius: 5px 5px 0 0;
}

.block .head {
    background-color: var(--primary-green);
    padding: 10px 0;
    border-radius: 5px 5px 0 0;
    text-align: center;
}

.block .head h2 {
    color: var(--white);
    margin: 0;
    font-size: 24px;
}

.block .bild {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.block .bild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.block .bild .zusatz {
    position: absolute;
    top: 0;
    width: 100%;
    background: var(--secondary-lime);
    padding: 5px 0;
    text-align: center;
}

.block .bild .zusatz p {
    color: var(--white);
    margin: 0;
    font-style: italic;
    font-size: 15px;
}

/* Main Content Grid */
.content-grid {
    display: flex;
    gap: 40px;
}

/* Component Base Styles */
app-header,
app-navigation,
app-sidebar,
app-footer {
    display: block;
}

app-header {
    min-height: 100px;
    height: auto;
    background-color: var(--white);
    position: relative;
    display: block;
    padding: 10px 0;
}

/* Skeleton logo - absolute so it doesn't push content */
app-header::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-585px);
    /* Align with .width container - approx position */
    top: 20px;
    width: 60px;
    height: 60px;
    background-color: #f5f5f5;
    border-radius: 5px;
    z-index: 0;
}

/* Ensure the actual header content sits on top */
app-header header {
    position: relative;
    z-index: 1;
    width: 100%;
}

app-navigation {
    min-height: 48px;
    background-color: var(--primary-green);
    border-bottom: 5px solid var(--white);
}

/* Subtle fade-in for components to hide the snap */
app-header,
app-navigation,
app-sidebar,
app-footer {
    animation: fadeInComponent 0.1s ease-out;
}

@keyframes fadeInComponent {
    from {
        opacity: 0.9;
    }

    to {
        opacity: 1;
    }
}

/* Sidebar */
app-sidebar {
    width: 300px;
    flex-shrink: 0;
    /* Reserve space immediately to prevent layout shift */
    min-height: 1px;
}

.sidebar {
    width: 100%;
}

.suche {
    background: var(--bg-gray);
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
}

.suchfeld {
    flex: 1;
    border: none;
    padding: 5px;
    font-style: italic;
    font-weight: 300;
}

.button {
    background: var(--secondary-lime);
    border: none;
    color: white;
    width: 30px;
    cursor: pointer;
}

.tipp {
    margin-bottom: 30px;
}

.tipp .head {
    background: var(--primary-green);
    padding: 10px 15px;
    border-radius: 5px 5px 0 0;
}

.tipp .head h3 {
    color: var(--white);
}

.tipp .text {
    background: var(--bg-gray);
    padding: 10px 15px;
}

.more-link {
    background: var(--secondary-lime);
    color: var(--white);
    padding: 4px 10px 5px 10px;
    display: inline-block;
}

.more-link:hover {
    background: var(--primary-green);
    color: var(--white);
}

/* Content */
.content {
    flex: 1;
}

.block-beitrag {
    background: var(--bg-gray);
    padding: 35px 45px;
    margin-top: 30px;
}

.block-beitrag h2 {
    color: var(--primary-green);
    margin-bottom: 25px;
}

.bild-float {
    float: left;
    margin: 0 15px 10px 0;
    width: 45%;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 50px;
    padding: 20px 0;
}

.footer-links ul {
    text-align: center;
}

.footer-links ul li {
    display: inline-block;
    padding: 0 10px;
}

.copyright {
    text-align: center;
    margin-top: 20px;
    color: var(--text-dark);
    font-size: 14px;
}


/* Contact Form */
.contact-form-container {
    margin-top: 40px;
    background: var(--bg-gray);
    padding: 35px 45px;
}

.contact-form-container h2 {
    color: var(--primary-green);
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 300;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: var(--text-dark);
}

.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 16px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 5px rgba(18, 130, 73, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 5px;
    width: auto;
}

.checkbox-group label {
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.6;
}

.submit-button {
    background: var(--secondary-lime);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
}

.submit-button:hover {
    background: var(--primary-green);
}

.form-feedback {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 700;
}

.form-feedback.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-feedback.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    app-header::before {
        display: none;
        /* Hide skeleton on mobile to prevent misalignment */
    }

    app-header {
        min-height: 80px;
    }

    .logo-text {
        display: none;
        /* Text moves to nav on mobile */
    }

    .logo-img {
        height: 60px;
        /* Logo slightly larger again since text is gone */
    }

    .search-container {
        min-width: 150px;
    }

    .mobile-site-title {
        display: block;
        /* Show text in green band */
    }

    .nav-container.menu-open .mobile-site-title {
        display: none;
        /* Hide when menu is active */
    }

    .menu-toggle {
        display: flex;
        margin: 5px 0;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--primary-green);
    }

    .nav-list.active {
        display: flex;
    }

    .menu-top ul li {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-top ul li a {
        display: block;
        width: 100%;
        padding: 15px;
    }

    .header-links {
        display: none;
    }

    .menu-top ul li.mobile-only {
        display: block;
    }

    .block-grid,
    .content-grid {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    app-sidebar {
        width: 100%;
        order: 2;
    }

    .content {
        order: 1;
    }
}