* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Toggle Button */
.toggle-container {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.toggle-button {
    background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.toggle-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

/* Top Section */
.top-section {
    text-align: center;
    margin-bottom: 40px;
}

.main-tile {
    background: #00447D;
    color: white;
    border: none;
    padding: 30px 60px;
    font-size: 28px;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.main-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

/* Categories Section */
.categories-wrapper {
    position: relative;
}

.categories-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.categories-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 95%;
    max-width: 800px;
    background-image: url('Firian_Bildzeichen_WS_sRGB.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.categories-section.hide-logo::before {
    opacity: 0;
    visibility: hidden;
}

.category {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-header {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
    color: #2d3748;
    padding-bottom: 15px;
    border-bottom: 3px solid #e2e8f0;
}

.sdg-tile::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.sdg-tile:hover::after {
    width: 200px;
    height: 200px;
}

.sdg-tile:hover {
    transform: translateY(-5px) rotate(2deg) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
}

.sdg-tile:active {
    transform: translateY(-2px) rotate(0deg) scale(1.02);
    padding-bottom: 15px;
    border-bottom: 3px solid #e2e8f0;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sdg-tile {
    padding: 20px;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.sdg-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Bottom Section */
.bottom-wrapper {
    position: relative;
}

.bottom-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    grid-auto-rows: 1fr;
    position: relative;
}

.bottom-column {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.achieved-column {
    position: relative;
}

.achieved-column::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    height: 95%;
    background-image: url('Firian_Bildzeichen_WS_sRGB.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.achieved-column.hide-logo::before {
    opacity: 0;
    visibility: hidden;
}

.info-tile {
    width: 100%;
    padding: 20px;
    margin-bottom: 12px;
    background: #00447D;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(79, 172, 254, 0.3);
    text-align: left;
}

.info-tile:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.info-tile:last-child {
    margin-bottom: 0;
}

/* Bottom Column Headers */
.bottom-column h3 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
    color: #2d3748;
    padding-bottom: 15px;
    border-bottom: 3px solid #e2e8f0;
}

/* Images Column */
.images-column {
    display: flex;
    flex-direction: column;
}

.images-column h3 {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.image-wrapper {
    height: 125px;
    overflow: hidden;
    border-radius: 10px;
    background: #ffffff;
}

.image-wrapper:first-of-type {
    margin-bottom: 12px;
}

.bottom-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Achieved Column */
.achieved-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.achieved-tile {
    padding: 20px;
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 50px;
    border-radius: 20px;
    width: 90%;
    max-width: 1400px;
    height: auto;
    max-height: 85vh;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Modal Grid for Nachhaltig managen */
.modal-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 40px;
    margin-top: 20px;
    align-items: center;
}

.modal-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-left h2,
.modal-right h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2d3748;
}

.modal-left p {
    font-size: 16px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 15px;
    text-align: justify;
}

.modal-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.goals-image {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

/* SDG Modal Grid */
.sdg-modal-color-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 20px;
}

.sdg-modal-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 40px;
    margin-top: 20px;
    align-items: center;
}

.sdg-modal-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sdg-modal-left h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2d3748;
}

.sdg-modal-left p {
    font-size: 16px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 15px;
    text-align: justify;
}

.sdg-modal-left ul {
    margin: 15px 0;
    padding-left: 25px;
}

.sdg-modal-left li {
    font-size: 16px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 10px;
    list-style-type: disc;
}

.sdg-modal-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
    background: transparent;
    padding: 20px 0;
}

.sdg-image {
    width: 100%;
    height: auto;
    max-height: 30vh;
    object-fit: contain;
    display: block;
}

/* SDG Content Styles */
#sdgContent h2,
#infoContent h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #2d3748;
}

#sdgContent p,
#infoContent p {
    font-size: 16px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 15px;
}

#sdgContent img,
#infoContent img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .categories-section {
        grid-template-columns: 1fr;
    }

    .bottom-section {
        grid-template-columns: 1fr;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .main-tile {
        padding: 25px 45px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-tile {
        padding: 20px 35px;
        font-size: 20px;
    }

    .category-header,
    .achieved-column h3 {
        font-size: 18px;
    }

    .tiles-grid {
        grid-template-columns: 1fr;
    }

    .achieved-tiles {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 25px;
        margin: 10% auto;
    }

    .close {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .main-tile {
        padding: 15px 25px;
        font-size: 18px;
    }

    .sdg-tile,
    .info-tile {
        font-size: 14px;
        padding: 15px;
    }

    .modal-content {
        padding: 20px;
    }

    #sdgContent h2,
    #infoContent h2 {
        font-size: 24px;
    }
}
