/*
=======================================================================================
                                        LAYOUT
=======================================================================================
*/

* {
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background-color: #ffffff;
}

::-webkit-scrollbar-thumb {
    background-color: #1e452a;
    -webkit-border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #2e7d32;
}

body {
    font-family: 'Verdana', sans-serif;
    margin: 0;
    background-color: #f4f8f4;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    color: #2f3e2f;
    line-height: 1.6;

    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Universeller Container */
.container {
    margin-left: auto;
    margin-right: auto;
    width: 95%;
    max-width: 1100px;
    background-color: #ffffff !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    padding: 2rem;
    flex: 1;
}

/*Text-Vorschau-Kuerzungen*/
.text-mobile {
    display: none;
}

.text-desktop {
    display: block;
}

/*
=======================================================================================
                                 KOPFZEILE & NAVIGATION
=======================================================================================
*/
header {
    position: relative;
    background: #2e7d32;
    color: #ffffff;
    padding: 1rem 1.5rem;
}

.logo-bereich h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.logo-bereich h2 {
    display: none;
}

/* BENUTZERSTATUS & DROPDOWN*/
.benutzer-status {
    font-size: 0.85rem;
    opacity: 0.9;
    float: right;
    display: flex;
    align-items: center;
    gap: 8px;
    bottom: 0.5rem;
}

#benutzerStatusTrigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 9999;
}

.dropdown-optionen {
    display: block;
    color: #333;
    text-decoration: none;
    border-bottom: 2px solid #c5e1a5;
    margin-bottom: 5px;
}

#benutzerDropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 1000;
    min-width: 150px;
}

/* NAVIGATION */
nav {
    display: flex;
    align-items: center;
    justify-items: flex-start;
    margin-top: 1em;
    margin-bottom: 1em;
}

nav a {
    align-content: center;
    color: white;
    margin-right: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    transition: color 0.2s, border-color 0.2s;
}

nav a:hover {
    color: #a3dca3;
    border-bottom: 2px solid #a3dca3;
    position: relative;
    z-index: 9999;
}

.kopfzeilen-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    display: none;
    filter: invert(1) brightness(2);
}

.kopfzeile-suche-box {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

.kopfzeile-suche-formular {
    margin: 0;
    padding: 0;
}

/* Das Eingabefeld (Eindeutige ID) */
#kopfzeile-suchleiste {
    padding: 10px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid transparent;
    color: transparent;
    border-radius: 999px;
    box-sizing: border-box;
    outline: none;
    transition: width 0.2s ease-in, background 0.2s, border-color 0.2s, border-radius 0.2s, color 0.2s;
}

#kopfzeile-suchleiste::placeholder {
    color: transparent;
    background: transparent;
    transition: color 0.3s ease;
}

.kopfzeile-suche-box:hover #kopfzeile-suchleiste::placeholder,
.kopfzeile-suche-box.offen #kopfzeile-suchleiste::placeholder {
    color: #1b5e20;
}

.kopfzeile-suche-box:hover #kopfzeile-suchleiste,
.kopfzeile-suche-box.offen #kopfzeile-suchleiste {
    width: 250px;
    background: #ffffff;
    border: 1px solid #c5e1a5;
    color: #000000;

    border-radius: 10px;
    transition: width 0.5s ease-out, background 0.5s, border-color 0.5s, border-radius 0.5s, color 0.5s;
}

.kopfzeile-suche-icon-button {
    background: #f9fbf9;
    border: 2px solid #c5e1a5;
    border-radius: 999px;
    color: #2e7d32;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    line-height: 1;
    text-decoration: none;
}

.kopfzeile-suche-icon-button:hover {
    background: #e8f5e9;
    border-color: #2e7d32;
}

/*
=======================================================================================
                               BLOG-BEITRAEGE & UEBERSICHT
=======================================================================================
*/
/*FILTER*/
.beitrags-filter {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.sortier-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: bold;
}

.filter-button {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    background: #f9fbf9;
    border: 1px solid #c5e1a5;
    border-radius: 999px;
    color: #2e7d32;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
}

.filter-button:hover,
.filter-button.aktiv {
    background: #e8f5e9;
    border-color: #2e7d32;
}

.pflege-filter {
    position: relative;
}

.pflege-filter summary {
    list-style: none;
}

.pflege-filter summary::-webkit-details-marker {
    display: none;
}

.pflege-filter-formular {
    position: absolute;

    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #d9ead9;
    border-radius: 8px;

    top: 100%;
    left: 0;
    z-index: 100;
    min-width: max-content;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.pflege-filter-formular select {
    width: auto;
    min-width: 120px;
    padding: 6px 8px;
    font-size: 0.88rem;
}

.pflege-filter-formular button.filter-button {
    background: #388e3c;
    border-color: #388e3c;
    color: white;
}

.filter-zuruecksetzen {
    color: #5d6f5d;
}

.filter-ergebnis {
    margin: 1rem 0 0;
    color: #666;
    font-weight: bold;
}

.leerer-zustand {
    padding: 1.5rem;
    background: #f9fbf9;
    border: 1px dashed #c5e1a5;
    border-radius: 8px;
    text-align: center;
    color: #466046;
}

/*BEITRAEGE*/
.blog-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 1.5rem;
}

.beitrags-karte {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e0e8e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow-wrap: break-word;
    word-wrap: break-word;
    transition: transform .2s;
}

.beitrags-karte h2 {
    margin: 0;
    color: #1b5e20;
}

.beitrags-karte:not(.detailansicht):not(.team-karte) {
    cursor: pointer;
}

.beitrags-karte:not(.detailansicht):not(.team-karte):hover {
    transform: scale(1.02);
}

.beitrags-bild img {
    width: 100%;
    aspect-ratio: 21/7;
    object-position: center;
    object-fit: cover;
    border-radius: 6px;
    margin: 1rem 0;
}

.metadaten {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.beitrag-aktionen {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.index-ansicht .pflanzen-details {
    display: none;
}

.weiterlesen-link {
    color: #2e7d32;
    font-weight: bold;
    text-decoration: none;
}
.weiterlesen-link:hover {
    text-decoration: underline;
}

.absenden-container {
    margin-top: 20px;
}

/* ZURUECK ZU INDEX */
.zurueck-container {
    margin-bottom: 10px;
}

.zurueck-link {
    text-decoration: none;
    color: #2e7d32;
    font-weight: bold;
}

.zurueck-link:hover {
    text-decoration: underline;
}

/* SEITE UMBLAETTERN */
.umblaettern {
    text-align: center;
    margin-top: 1rem;
}

.umblaettern-button {
    padding: 0 11px 5px 11px;
    background: #f9fbf9;
    border: 1px solid #c5e1a5;
    border-radius: 999px;
    color: #2e7d32;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
}

.umblaettern-button:hover {
    background: #e8f5e9;
    border-color: #2e7d32;
}

.umblaettern-button.davor {
    margin-right: 12px;
}

.umblaettern-button.danach {
    margin-left: 12px;
}

/*
=======================================================================================
                        KOMMENTARE & ANTWORTEN BEARBEITUNG/LÖSCHUNG
=======================================================================================
*/
.kommentieren,
.antwort_absenden {
    margin-top: 0.2em;
    border-top: 0.2em solid #e8f5e9;
    padding-top: 0.5em;
}

.kommentar-formular {
    margin-top: 0.5em;
    padding-top: 0.5em;
    max-width: 100%;
}

.kommentar {
    background: #f9fbf9;
    position: relative;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 4px solid #81c784;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kommentar img {
    position: absolute;
    right: 15px;
    top: 15px;
}

.kommentar p {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.kommentar small {
    color: #777;
    display: block;
    overflow-wrap: anywhere;
}

.kommentar a {
    color: #d32f2f; /* Rote Farbe für den Kommentar-Löschen-Link */
    font-size: 0.85rem;
    text-decoration: none;
}

.kommentar a:hover {
    text-decoration: underline;
}

/* BEARBEITEN/LOESCHEN ICONS */
.kommentar-aktionen {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-self: flex-end;
    order: -1;
}

.kommentar-aktionen a {
    margin-left: 0;
    display: inline-flex;
    align-items: center;
}

.kommentar-aktionen img {
    position: static;
    display: block;
}

.kommentar-bearbeiten-details-inline {
    max-width: 100%;
}

.kommentar-bearbeiten-formular-inline {
    max-width: min(420px, 100%);
}

/* ANTWORTEN / VERSCHACHELTE KOMMENTARE */
.antworten {
    margin-top: 15px;
    margin-left: 0;
    padding-left: 10px;
    border-left: 3px solid #c5e1a5;
    max-width: 100%;
    min-width: 0;
}

.kommentar.antwort {
    background: #f1f8e9;
    margin-top: 10px;
    border: none;
    min-width: 0;
}

/* ANTWORT AUFKLAPPEN */
.antwort-details {
    margin-top: 10px;
}

.antwort-details summary {
    list-style: none;
}

.antwort-details summary::-webkit-details-marker {
    display: none;
}

.kommentar-bearbeiten-details-inline summary {
    list-style: none;
}

.antwort-button {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c5e1a5;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
}

.antwort-button:hover {
    background: #c8e6c9;
}

.antwort-formular {
    margin-top: 10px;
    padding: 12px;
    background: #f9fbf9;
    border-radius: 6px;
    max-width: 100%;
}

/* EINRUECKUNG NACH TIEFE */
.tiefe-1 {
    margin-top: 0.5em;
    margin-left: 0;
}

.tiefe-2 {
    margin-top: 0.5em;
    margin-left: 0;
}

.tiefe-3,
.tiefe-4,
.tiefe-5 {
    margin-top: 0.5em;
    margin-left: 0;
}

/*
=======================================================================================
                                FORMULARE & BUTTONS
=======================================================================================
*/
.eingabe-gruppe {
    margin-bottom: 1.5rem;
}

.eingabe-gruppe label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #2e7d32;
}

button, input[type="submit"] {
    background: #388e3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.2s;
}

button:hover, input[type="submit"]:hover {
    background: #2e7d32;
}

/*
=======================================================================================
                                      UEBER UNS
=======================================================================================
*/
.team-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 1.5rem;
}

.team-karte {
    display: flex;
    gap: 25px;
    align-items: center;
}

.team-bild img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.team-info {
    flex: 1;
}

.team-info h3 {
    margin-top: 0;
    color: #1b5e20;
}

.team-karte.rechts-gerichtet {
    flex-direction: row-reverse;
    text-align: right;
}

/*
=======================================================================================
                                       FUSSZEILE
=======================================================================================
*/

footer {
    background-color: #2e7d32;
    text-align: center;
    padding: 1rem 1.5rem;
    margin-top: auto;
}

footer a, footer p {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

footer a {
    margin-right: 15px;
    font-weight: bold;
}

footer a:hover {
    color: #a3dca3;
}

.impressum {
    padding: 1.5rem;
}

/*
=======================================================================================
                                UI-KOMPONENTEN & ICONS
=======================================================================================
*/
#nach-oben-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f9fbf9;
    border: 2px solid #c5e1a5;
    color: #2e7d32;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color .3s, border-color .3s, opacity .5s, visibility .5s;
    opacity: 0;
    visibility: hidden;
}

#nach-oben-button:hover {
    background: #e8f5e9;
    border-color: #2e7d32;
}

#nach-oben-button:active {
    background: #c8e6c9;
}

#nach-oben-button.show {
    opacity: 1;
    visibility: visible;
}

/* ICONS */
.icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.stay {
    filter: invert(1) brightness(2);
}

.icon-button {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    display: none;
    filter: invert(1) brightness(2);
}

/*
=======================================================================================
                                      SUCHLEISTE
=======================================================================================
*/
.suchleiste-box {
    margin: 20px 0;
}

.suchleiste-box .suchleiste {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0 24px;
}

.leer-box {
    background-color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 30px 20px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.leer-box span {
    font-size: 16px;
    color: #666666;
    font-weight: 500;
}

.suchleiste {
    flex: 1;
    font-size: 16px;
}

.suchergebnis-titel,
.suchergebnis-begriff {
    max-width: 100%;
}

.suchergebnis-titel {
    overflow-wrap: anywhere;
}

.suchergebnis-begriff {
    display: inline-block;
    max-width: 40ch;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

h2 .text-desktop {
    display: inline; }

/* Der Lupe-Button */
.suche-icon-button:hover {
    background-color: #c5e1a5;
}

.ausklappen-box {
    background-color: #ffffff;
    border: 1px solid #c5e1a5;
    border-radius: 6px;
    padding: 12px;
    margin: 20px 0;
    cursor: pointer;
}

.ausklappen-box:hover {
    background-color: #f1f8e9;
}

.ausklappen-box summary {
    font-weight: bold;
    color: #2e7d32;
    cursor: pointer;
}

.plus.ausklappen-box summary {
    list-style: none;
}

.plus.ausklappen-box summary::before {
    content: "+ ";
    font-size: 18px;
    font-weight: bold;
}

.plus.ausklappen-box[open] summary::before {
    content: "- ";
    font-size: 18px;
    font-weight: bold;
}

.ausklappen-inhalt {
    margin-top: 0.2em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.bild-hochladen {
    margin: 15px 0;
}

#beitrag_bild {
    display: none;
}

.icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    max-width: 400px;
    height: 150px;

    border: 2px dashed #c5e1a5;
    background-color: #fafafa;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.icon-box:hover {
    background-color: #f1f8e9;
    border-color: #2e7d32;
}

.gross-icon {
    width: 40px;
    height: 40px;
    opacity: 0.6;
}

.icon-box span {
    font-size: 14px;
    color: #666;
}

#reset-bild {
    margin-top: 5px;
    background: #e0e0e0;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
}

.toast-box {
    position: fixed;
    bottom: 20px;
    display: none;
    background-color: #ffffff;
    color: #2f3e2f;
    padding: 16px 24px;
    border-width: 2px;
    border-radius: 8px;
    border-style: dashed;
    border-color: #2f3e2f;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    font-weight: 500;
    font-family: sans-serif;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Schicker "Bounce"-Effekt */
}

.toast-box.show {
    display: block;
    right: 20px;
}

/*
=======================================================================================
                                 MOBILE GERAETE ANSICHT
=======================================================================================
*/
@media screen and (max-width: 1130px) {
    .pflege-filter {
        width: 100%;
    }

    .pflege-filter-formular {
        flex-direction: column;
    }

    .pflege-filter-formular select,
    .pflege-filter-formular .filter-button {
        width: 100%;
        justify-content: center;
    }

    /*SUCHERGEBNIS*/
    h2 .text-mobile {
        display: inline;
    }

    h2 .text-desktop {
        display: none;
    }
}

@media screen and (max-width: 835px) {
    #kopfzeile-suchleiste {
        display: none;
    }
}

@media screen and (max-width: 600px) {
    .text-desktop {
        display: none;
    }

    .text-mobile {
        display: block;
    }

    main {
        padding: 1rem;
    }

    /*KOPFZEILE*/
    .logo-bereich h1 {
        display: none;
    }

    .logo-bereich h2 {
        display: block;
        margin: 0;
    }

    .kopfzeilen-text, .text-button {
        display: none;
    }

    .kopfzeilen-icon, .icon-button {
        color: white;
        display: inline-block;
    }

    .icon {
        width: 16px;
        height: 16px;
    }


    /*FILTER*/
    .beitrags-filter,
    .sortier-buttons,
    .pflege-filter-formular {
        align-items: flex-start;
    }

    .pflege-filter {
        width: 100%;
    }

    .pflege-filter-formular {
        flex-direction: column;
    }

    .pflege-filter-formular select,
    .pflege-filter-formular .filter-button {
        width: 100%;
        justify-content: center;
    }

    .index-ansicht .pflanzen-details,
    .index-ansicht .ausklappen-box {
        display: none;
    }

    .suchergebnis-begriff {
        max-width: 18ch;
    }

    /* BLOGBEITRAEGE & KOMMENTARE*/
    .beitrags-bild img {
        aspect-ratio: 21/9;
    }

    .kommentar {
        padding: 12px;
    }

    .kommentar-aktionen {
        position: static;
        justify-content: flex-end;
        margin-bottom: 8px;
        gap: 6px;
    }

    .kommentar-bearbeiten-details-inline {
        max-width: 100%;
    }

    .kommentar-bearbeiten-formular-inline {
        width: 100%;
        max-width: 100%;
    }

    .antworten {
        margin-left: 0;
        padding-left: 8px;
    }

    .tiefe-1,
    .tiefe-2,
    .tiefe-3,
    .tiefe-4,
    .tiefe-5 {
        margin-left: 0;
    }

    .antwort-formular {
        padding: 10px;
    }

    /*UEBER UNS*/
    .team-karte,
    .team-karte.rechts-gerichtet {
        flex-direction: column;
        text-align: center;
    }

    .team-bild {
        margin-bottom: 5px;
    }
}
