.cards-bottom-popup-widget {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.cards-bottom-popup-widget .heading {
    color: var(--Gray-Gray-700, #DDD);
    font-family: Urbanist;
    font-size: 80px;
    font-style: normal;
    font-weight: 900;
    line-height: 115%;
    margin: 0;
}

.cards-bottom-popup-widget.type-grid .cards-list {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cards-bottom-popup-widget .card {
    width: calc((100% - (24px * 3)) / 4);
    height: auto;
    aspect-ratio: 89 / 67;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.5) 100%);
    transition: background 0.3s;
}

.cards-bottom-popup-widget .card:hover {
    /* On hover, increase the background fusion */
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.75) 100%);
    transition: background 0.3s;
}

/* Overlay for dark background on hover */
.cards-bottom-popup-widget .card .principal-img {
    position: relative;
    z-index: 0;
    transition: filter 0.3s;
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
}

.cards-bottom-popup-widget .card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
    pointer-events: none;
}

.cards-bottom-popup-widget .card:hover::after {
    opacity: 1;
}

.cards-bottom-popup-widget .card .view-details {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: fit-content;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    text-decoration: underline;
    text-underline-offset: 10px;
    cursor: pointer;
    z-index: 2;
    color: var(--Color-Palette-Yellow-Yellow-500, #FFC432);
    opacity: 0;
    transition: 0.3s;
}

.cards-bottom-popup-widget .card:hover .view-details {
    opacity: 1;
    pointer-events: auto;
    transition: 0.3s;
}

.cards-bottom-popup-widget .card .view-details:hover {
    color: var(--Color-Palette-Blue-Blue-500, #25B1E1);
    transition: 0.3s;
}

.cards-bottom-popup-widget .cards-list {
    position: relative;
}

.cards-bottom-popup-widget .pop-up {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 1140px;
    padding: 48px;
    background-color: var(--Gray-Gray-100, #161616);
    display: flex;
    flex-direction: column;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    border-radius: 16px 16px 0 0;
    z-index: 1000;
    transition: 0.3s;
}

.cards-bottom-popup-widget .pop-up.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
    transition: 0.3s;
}

.cards-bottom-popup-widget .pop-up .first-row {
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.cards-bottom-popup-widget .pop-up .image-container {
    height: 240px;
    width: 240px;
    border-radius: 8px;
    overflow: hidden;
}

.cards-bottom-popup-widget .pop-up .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.cards-bottom-popup-widget .pop-up .info {
    width: calc(100% - 24px - 240px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cards-bottom-popup-widget .pop-up .info h6{
    color: var(--Default-White, #FFF);
    font-family: "Hanken Grotesk";
    font-size: 32px;
    font-weight: 700;
    line-height: 150%;
    margin: 0;
}

.cards-bottom-popup-widget .pop-up .info p{
    color: var(--Gray-Gray-900, #FAFAFA);
    font-family: "Hanken Grotesk";
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
}

.cards-bottom-popup-widget .call-to-action {
    padding: 24px;
    background-color: var(--Gray-Gray-200, #242424);
    border-radius: 12px;
}

.cards-bottom-popup-widget .call-to-action a {
    display: flex;
    width: fit-content;
    justify-self: center;
    color: black;
    padding: 8px 24px;
    border-radius: 27px;
    font-size: 20px;
    font-weight: 700;
    background-color: var(--Color-Palette-Yellow-Yellow-500, #FFC432);
    transition: 0.3s;
}

.cards-bottom-popup-widget .call-to-action a:hover {
    background-color: var(--Color-Palette-Blue-Blue-500, #25B1E1);
    transition: 0.3s;
}

.cards-bottom-popup-widget .pop-up .close{
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--Color-Palette-Yellow-Yellow-500, #FFC432);
    mask-image: url(assets/close.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(assets/close.svg);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.cards-bottom-popup-widget .pop-up .close:hover {
    background-color: var(--Color-Palette-Blue-Blue-500, #25B1E1);
    border-color: #3B82F6;
}

@media (max-width: 1200px) {
    .cards-bottom-popup-widget.type-grid .cards-list {
        gap: 24px;
    }
    .cards-bottom-popup-widget .card {
        width: calc((100% - (24px * 2)) / 3);
        aspect-ratio: unset;
        line-height: 0;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .cards-bottom-popup-widget .card .principal-img {
        height: auto;
        aspect-ratio: 89 / 67;
        border-radius: 16px;
    }
    .cards-bottom-popup-widget .card .view-details {
        position: initial;
        margin: 20px 0;
        opacity: 1;
        transform: none;
    }
    .cards-bottom-popup-widget .pop-up {
        width: calc(100% - 48px);
    }
}

@media (max-width: 768px) {
    .cards-bottom-popup-widget .heading {
        font-size: 32px;
    }
    .cards-bottom-popup-widget .card {
        width: calc((100% - (24px * 1)) / 2);
    }
    .cards-bottom-popup-widget .pop-up{
        width: calc(100% - 24px);
        padding: 24px;
    }
    .cards-bottom-popup-widget .pop-up .first-row {
        flex-direction: column;
    }
    .cards-bottom-popup-widget .pop-up .info {
        width: 100%;
    }
    .cards-bottom-popup-widget .pop-up .image-container {
        width: 180px;
        height: 180px;
    }
    .cards-bottom-popup-widget .pop-up .close{
        width: 32px;
        height: 32px;
    }
    .cards-bottom-popup-widget .call-to-action a {
        padding: 4px 16px;
        font-size: 14px;
    }
}