/* CSS nur für index.html */
.counter-wrapper {
    text-align: center;
    -webkit-font-smoothing: antialiased;
}

.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding: 20px;
}

.section {
    width: 100%;
}

/* For full-width sections like the counter */
.section.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.counter {
    font-family: "Avenir", monospace;
    font-size: clamp(1.5rem, 5vw, 3rem);
    line-height: 1.2;
    height: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    letter-spacing: 0.03em;
}

.digit-wrapper {
    position: relative;
    width: 0.7em;
    height: 1em;
    display: inline-block;
    overflow: hidden;
    max-width: 28.8px;
}

.digit {
    position: absolute;
    left: 0;
    width: auto;
    height: 1em;
    line-height: 1;
    transform-origin: center;
}

.digit.static {
    position: relative;
}

.digit.old {
    animation: slideUp 0.3s ease-in-out forwards;
    opacity: 1;
}

.digit.new {
    transform: translateY(100%);
    animation: slideIn 0.3s ease-in-out forwards;
    opacity: 1;
}

@keyframes slideUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes slideIn {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.counter-info {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--text-secondary);
}

.aufforderung {
    text-align: center;
    color: red;
    font-size: 28px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .nebeneinander {
        flex-direction: column;
    }
}

@media (max-width: 580px) {
    .sdg {
        flex-direction: column;
    }
}

.nebeneinander {
    display: flex;
    gap: 15px;
}

.no-iframe {
    width: calc(100% - 20px);
    height: auto;
    max-height: 600px;
    border-radius: 5px;
    border: 0;
    background-color: var(--secondary-container-color);
    padding: 10px;
}

.no-iframe h2 {
    margin-top: 0;
}

.chart {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chart svg {
    position: absolute;
    top: 0;
    left: 0;
}

.legend-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 5px;
    padding: 5px;
    font-size: 12px;
}

.legend-item {
    padding: 2px 4px;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.legend-item:hover {
    background: var(--hover-color);
}

.legend-item.highlighted {
    background: var(--hover-color);
    color: var(--on-hover-color);
}

.definitions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.definition-box {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--secondary-container-color);
}

.definition-box h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    margin: 0;
}

.definition-box p {
    color: var(--text-color);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .definition-box {
        flex: 100%;
    }
}
.mitte-title {
    font-size: 24px;
    margin: 0;
    background: -webkit-linear-gradient(var(--gradient-degree), var(--gradient-color1), var(--gradient-color2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.highlight-slider {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100vw;
    height: 500px;
    object-fit: cover;
}

.slide-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background: white;
}
