/* ========================================
   ACHIEVEMENT POP-UP MODAL STYLES
   ======================================== */

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

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal Content Box */
.modal-content {
    background-color: #ffffff;
    padding: 3rem 4rem;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s ease;
}

/* Close Button (X) */
.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    font-weight: normal;
    color: #000;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-button:hover {
    color: #666;
}

/* Heading */
.modal-content h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: normal;
    margin: 0 0 2.5rem 0;
    line-height: 1.4;
}

.modal-content h2 strong {
    font-weight: bold;
}

/* Awards Grid */
.awards-grid {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

/* Individual Award Item */
.award-item {
    text-align: center;
    flex: 1;
    max-width: 180px;
}

.award-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.award-item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.award-item p strong {
    font-weight: bold;
}

/* Nominations Section */
.nominations {
    text-align: center;
    margin-top: 2rem;
}

.nominations p {
    margin: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.nominations p:first-child {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .awards-grid {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .award-item {
        flex: 0 0 calc(50% - 1rem);
    }

    .award-item img {
        width: 100px;
        height: 100px;
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }

    .close-button {
        font-size: 2rem;
        top: 15px;
        right: 20px;
    }
}

@media (max-width: 480px) {

    /* Modal darf scrollen statt aus dem Bildschirm zu laufen */
    .modal-content{
        width: 92%;
        max-height: 88vh;
        overflow-y: auto;
        padding: 1.6rem 1.2rem;
    }

    /* 2x2 Grid statt untereinander */
    .awards-grid{
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem 1rem;
        justify-items: center;
        margin-bottom: 1.5rem;
    }

    /* Cards sauber zentriert */
    .award-item{
        max-width: none;
        width: 100%;
    }

    /* Icons etwas kleiner */
    .award-item img{
        width: 92px;
        height: 92px;
        margin-bottom: 0.6rem;
    }

    /* Text kompakter */
    .award-item p{
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .modal-content h2{
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }

    .nominations p{
        font-size: 0.95rem;
    }
}

/* Pop-up: verhindert globale "img-card" Styles */
#achievementModal .award-item{
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

#achievementModal .award-item img{
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    filter: none !important;
}

.modal-content{
    padding-top: 3.5rem;
}


@media (max-width: 480px){
    .close-button{
        top: 12px;
        right: 14px;
        font-size: 1.8rem;
    }

    .modal-content{
        padding-top: 3.1rem; /* genug Platz fürs X */
    }
}