:root {
    --ecology-color: #54AE31;
    --social-color: #FF8033;
    --economy-color: #7317E6;
    --red-warning: #FF5A5F;
}

.nachhaltigkeit-header {
    text-align: center;
    padding: 85px 0 30px;
}

.nachhaltigkeit-header h1 {
    margin-bottom: 15px;
    font-size: 35pt;
    font-weight: bold;
    line-height: 1.2;
    padding: 20px;
}

.nachhaltigkeit-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 16pt;
}

.nachhaltigkeit-category {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px 10px;
    text-align: center;
    line-height: 1.2;
}

.nachhaltigkeit-category:not(.active):hover {
    transform: scale(1.05);
}

.nachhaltigkeit-category:hover,
.nachhaltigkeit-category.active {
    text-shadow: 0 0 0.7px currentColor, 0 0 0.7px currentColor;
}

.nachhaltigkeit-category[data-category="ecology"]:hover,
.nachhaltigkeit-category[data-category="ecology"].active {
    color: var(--ecology-color);
}

.nachhaltigkeit-category[data-category="social"]:hover,
.nachhaltigkeit-category[data-category="social"].active {
    color: var(--social-color);
}

.nachhaltigkeit-category[data-category="economy"]:hover,
.nachhaltigkeit-category[data-category="economy"].active {
    color: var(--economy-color);
}

.nachhaltigkeit-intro-text {
    max-width: 850px;
    margin: 0 auto 20px;
    text-align: center;
    font-size: 14pt;
    line-height: 1.5;
    padding: 20px;
}

.nachhaltigkeit-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 70px;
}

.nachhaltigkeit-submit-button {
    display: inline-block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16pt;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.button-1 {
    background-color: var(--ecology-color);
}

.button-1:hover {
    background-color: transparent;
    color: var(--ecology-color);
    border-color: var(--ecology-color);
}

.button-2 {
    color: var(--economy-color);
    border-color: var(--economy-color);
}

.button-2:hover {
    background-color: var(--economy-color);
    color: white;
    border-color: transparent;
}

#nachhaltigkeit-container-ecology.active,
#nachhaltigkeit-container-social.active,
#nachhaltigkeit-container-economy.active,
#nachhaltigkeit-svgCanvas-ecology.active,
#nachhaltigkeit-svgCanvas-social.active,
#nachhaltigkeit-svgCanvas-economy.active {
    display: block;
}

#nachhaltigkeit-container-social,
#nachhaltigkeit-container-economy {
    display: none;
}

.nachhaltigkeit-svgCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.nachhaltigkeit-wrapper {
    position: relative;
    min-height: 400px;
}

.loading-animation {
    position: absolute;
    inset: 0;
    background-color: #FCFCFC;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    border-top-color: var(--ecology-color);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.nachhaltigkeit-container {
    position: relative;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    z-index: 100;
}

.nachhaltigkeit-image-container {
    position: absolute;
    width: 15%;
    min-width: 150px;
    transition: all 0.3s ease-out;
    z-index: 20;
}

.nachhaltigkeit-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nachhaltigkeit-image:hover {
    transform: scale(1.05);
}

.nachhaltigkeit-title {
    width: fit-content;
    text-align: center;
    margin: -40px auto 0;
    padding: 5px;
    background-color: rgba(252, 252, 252, 0.7);
    box-shadow: 0 0 5px 5px rgba(252, 252, 252, 0.7);
    font-size: 12pt;
    font-weight: bold;
    line-height: 1.5;
    border-radius: 20px;
}

.nachhaltigkeit-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.nachhaltigkeit-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 50px;
    border-radius: 8px;
    max-width: 70%;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    text-align: center;
    font-size: 14pt;
}

.nachhaltigkeit-close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 50px;
    cursor: pointer;
}

#nachhaltigkeit-popup-image {
    width: 90%;
    max-width: 500px;
    height: auto;
    margin-bottom: 15px;
}

#popup-nachhaltigkeit-title {
    font-size: 24pt;
    margin-bottom: 20px;
    font-weight: bold;
}

#popup-nachhaltigkeit-slogan {
    font-size: 18pt;
    margin-bottom: 40px;
    font-style: italic;
    font-weight: normal;
    line-height: 1.5;
}

#nachhaltigkeit-popup-text {
    text-align: justify;
    margin-bottom: 20px;
    line-height: 1.5;
}

#nachhaltigkeit-popup-logo {
    max-width: 150px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.nachhaltigkeit-contact-form {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
    text-align: left;
    font-size: 14pt;
    line-height: 1.5;
}

.nachhaltigkeit-contact-form h2 {
    font-size: 28pt;
    margin-bottom: 40px;
    font-weight: bold;
}

.nachhaltigkeit-contact-form h3 {
    font-size: 24pt;
    margin-top: 50px;
    margin-bottom: 18px;
}

.nachhaltigkeit-contact-form ol,
.nachhaltigkeit-contact-form ul {
    padding-left: 40px;
    margin-bottom: 20px;
}

.nachhaltigkeit-contact-form ul {
    list-style-type: disc;
}

.nachhaltigkeit-contact-form li {
    margin-bottom: 10px;
}

.wpcf7-form {
    max-width: 1000px;
    margin: 60px 0 0;
}

.wpcf7-form label {
    display: block;
    margin: -28px 0 5px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14pt;
    color: black;
    margin-bottom: 5px;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    border-color: var(--ecology-color);
    background-color: #fff;
    color: black;
    outline: none;
}

.two-column {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.two-column label {
    flex: 1;
}

.wpcf7-submit,
.add-initiative-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--ecology-color) !important;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14pt;
    border: 2px solid transparent !important;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: none !important;
    max-width: 100%;
    width: auto;
}

.wpcf7-submit:hover,
.add-initiative-btn:hover {
    background-color: white !important;
    color: var(--ecology-color) !important;
    border-color: var(--ecology-color) !important;
    text-decoration: none;
}

.category-ecology { color: var(--ecology-color); }
.category-social { color: var(--social-color); }
.category-economy { color: var(--economy-color); }

.initiatives-form {
    margin-bottom: 20px;
}

.initiative {
    background-color: #f0f0f0;
    border-radius: 5px;
    padding: 15px;
    margin: 5px 0 20px;
    transition: background-color 0.3s ease;
}

.initiative.ecology { background-color: rgba(84, 174, 49, 0.2); }
.initiative.social { background-color: rgba(255, 128, 51, 0.2); }
.initiative.economy { background-color: rgba(115, 23, 230, 0.2); }

.initiative h3 {
    color: black;
    margin-top: 0;
}

.initiative select,
.initiative input[type="text"],
.initiative textarea {
    display: block;
    margin-bottom: 11pt;
}

.initiative[data-initiative-number="1"] select,
.initiative[data-initiative-number="1"] input[type="text"],
.initiative[data-initiative-number="1"] textarea {
    margin-bottom: -10pt;
}

.initiative textarea {
    min-height: 200px;
    width: 100%;
    margin-bottom: 2px;
}

.initiative-kategorie {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14pt;
    color: black;
    background-color: white;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.initiative-kategorie:focus {
    border-color: var(--ecology-color);
    background-color: white !important;
    color: black !important;
    outline: none;
}

.initiative-kategorie option {
    padding: 10px;
    background-color: white;
    color: black;
}

button.delete-initiative {
    background-color: var(--red-warning) !important;
}

.initiative .word-count {
    display: inline-block;
    width: 100%;
    text-align: right;
    margin-left: -2px;
    color: #808080;
}

.codedropz-btn-wrap {
    font-size: 16pt;
    padding-top: 15px;
}

.cd-upload-btn {
    color: var(--ecology-color) !important;
}

.wpcf7-response-output {
    margin: 0 !important;
    padding: 10px 0 !important;
    border: none !important;
    line-height: 1.5;
    font-size: 16pt;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
    color: var(--red-warning);
}

.wpcf7 form.sent .wpcf7-response-output {
    color: var(--ecology-color);
}

@media (max-width: 1400px) {
    .nachhaltigkeit-header {
        padding: 40px 0 30px;
    }
}

@media (max-width: 768px) {
    .nachhaltigkeit-close-popup {
        margin-top: 20px;
        margin-right: 20px;
    }

    .nachhaltigkeit-popup-content {
        padding: 25px;
        max-width: 80%;
        max-height: 78vh;
    }
}

@media (max-width: 689px) {
    .nachhaltigkeit-header {
        padding: 25px 0 30px;
    }
    
    .nachhaltigkeit-categories,
    .nachhaltigkeit-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .nachhaltigkeit-category,
    .nachhaltigkeit-submit-button {
        width: 80%;
    }
    
    .nachhaltigkeit-category:hover,
    .nachhaltigkeit-submit-button:hover,
    .add-initiative-btn:hover,
    .wpcf7-submit:hover {
        -webkit-tap-highlight-color: transparent;
    }

    #add-initiative,
    .wpcf7-submit {
        display: block;
        margin: 0 auto;
    }
}

@media (min-width: 769px) {
    .nachhaltigkeit-text-content {
        display: none !important;
    }
}

@media (min-width: 1920px) {
    .nachhaltigkeit-title {
        font-size: 14pt;
    }
}