.modal-card {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.modal-card.active {
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-card-content {
    position: relative;
    padding: 20px;
    width: 558px;
    height: 90%;
    top: 20px;
    margin: auto;
    transform: scale(0.8);
    opacity: 0;
    border-radius: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow-y: auto;
    background-color: rgb(32, 32, 32, 0.8);
}

/* Стили для скроллбара */
.modal-card-content::-webkit-scrollbar {
    width: 8px;
}

.modal-card-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-card-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.modal-card-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Для Firefox */
.modal-card-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

.modal-card.active .modal-card-content {
    transform: scale(1);
    opacity: 1;
}

.modal-card-close {
    position: fixed;
    right: 40px;
    top: 40px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
    z-index: 2001;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-card.active .modal-card-close {
    opacity: 1;
    transform: translateY(0);
}

#modalCardContent {
    margin-top: 20px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
}

#modalCardContent img {
    max-width: 500px;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#modalCardContent h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 2em;
}

#modalCardContent p {
    margin: auto;
    max-width: 800px;
    text-align: left;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 15px;
    font-size: 1.1em;
    white-space: break-spaces;
}

#modalCardContent a {
    color: #fff;
    text-decoration: none;
    margin-top: 10px;
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#modalCardContent a:hover {
    background: rgba(255, 255, 255, 0.2);
}

#modalCardContent .date {
    text-align: center;
    color: #aaa;
    margin-bottom: 15px;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .modal-card {
        width: 100%;
    }

    .modal-card-content {
        width: auto;
    }
    
    #modalCardContent {
        max-width: 100%;
        padding: 10px;
    }

    #modalCardContent img {
        width: 100%;
    }
    
    #modalCardContent h2 {
        font-size: 1.5em;
    }
    
    #modalCardContent p {
        font-size: 1em;
    }

    .modal-card-close {
        position: absolute;
        right: 20px;
        top: 30px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
}