.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    display: flex;
    flex-direction: row; 
    gap: 2rem;
    width: 70dvw;
    max-width: 1000px;
    height: auto;
    min-height: 500px;
    background: #1c1c1c;
    border-radius: 32px;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.content.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.content_text_wrapper {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
    padding-top: 1rem;
}

.content h2 {
    background-color: rgb(230, 151, 6);
    color: #000000;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    width: fit-content;
}

.text_block {
    background-color: #2b2b2b;
    border-radius: 24px;
    padding: 1.5rem;
    height: 100%;
    margin-top: 0;
}

.content p {
    color: #a0a0a0;
    line-height: 1.6;
    font-size: 1.225rem;
    margin: 0;
    text-align: left;
}

.content p a {
    color: rgb(230, 151, 6);
}

.close_button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close_content_button:hover {
    opacity: 1;
    background-color: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .cards_container {
        flex-direction: column;
        padding-bottom: 2rem;
    }

    .card {
        width: 60dvw;
        height: 30dvh;
    }

    .content {
        flex-direction: column;
        width: 90dvw;
        height: 85dvh;
        overflow-y: auto;
    }
    
    .content_image {
        min-height: 200px;
        flex: none;
    }
    
    .content h2 {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}