﻿
a {
    text-decoration:none;
}

.heading {
    display: inline-block;
    padding: 1.125rem 0px 0px 0px;
    margin-inline: 5%;
}

.heading h1 {
    font-size: 1.75rem;
    font-weight: 500;
    color: #111;
    margin: 0;
}

.underline {
    width: 100%;
    height: 4px;
    background-color: #3ec8c8;
    margin-top: 4px;
}

.heading h1:hover {
    color: #ef4565;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    /*gap: 23px;*/
    justify-content: space-between;
    padding: 2.5rem 0px 35px;
    margin-inline: 5%;
}

.card {
    display: flex;
    flex-direction: column;
    height: fit-content;
    background-color: #000;
    color: #fff;
    width: 32%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    .card:hover {
        transition: transform 0.5s ease, box-shadow 0.3s ease;
        transform: scale(1.05);
    }

    .card-overlay:hover {
        transition: transform 0.5s ease, box-shadow 0.3s ease;
        transform: scale(1.03);
    }

.details h2:hover {
    color: #ef4565;
}

.details h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em; /* line height */
    min-height: 2.8em; /* reserve space for 2 lines */
}

.details button:hover,
.card-overlay:hover button {
    background: white;
    color: #ef4565;
}

.details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-overlay {
    height:35rem;
    position: relative;
    width: 66%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .card-overlay img {
        width: 100%;
        object-fit: cover;
        display: block;
        height: 100%;
    }

.overlay-content {
    position: absolute;
    top: -25px;
    left: 0;
    height: 100%;
    width: -webkit-fill-available;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 2.7), transparent);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
}

    .overlay-content h3 {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: -10px;
        color: white;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* limit to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4em; /* line height */
        min-height: 2.8em; /* reserve space for 2 lines */
    }

    .overlay-content p {
        margin-bottom: -6px;
    }

    .overlay-content button {
        background-color: #3ac7d1;
        font-weight: 600;
        padding: 9px 17px;
        border-radius: 11px;
        cursor: pointer;
        font-size: 1rem;
        width: fit-content;
        margin-top: 22px;
        text-decoration: none;
        border: none;
    }

.card-container {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-inline: 5%;
}

.card h2 {
    font-size: 20px;
    margin: 18px 20px 0px;
    cursor: pointer;
    color: white;
}

.card p {
    font-size: 0.9em;
    margin: 0 20px;
}

.card button {
    background-color: #3ac7d1;
    border: none;
    padding: 10px 18px;
    margin: 0px 20px 15px;
    border-radius: 11px;
    cursor: pointer;
    width: fit-content;
    font-weight: 600;
    font-size: 1rem;
}

.card img {
    width: 100%;
    object-fit: cover;
    height: 250px;
}

@media (max-width: 1111px) {
    .card-overlay {
        height: 30rem;
    }

    .card {
        width: 31%;
    }
}

@media (max-width: 769px) {

    .cards-container {
        padding: 1.5rem 0px;
    }

    .heading {
        padding: 0px;
    }
    .card {
        width: 48%;
    }

    .card-overlay {
        height: unset;
        width: 48%;
    }
}

@media (max-width: 576px) {

    .card button {
        padding: 8px 15px;
    }

    .cards-container,
    .card-container{
        margin-inline:2%;
    }

    .heading {
        margin-left: 2%;
    }
}

@media (max-width: 616px) {
    .card {
        width: 100%;
    }

    .card-overlay {
        width: 100%;
        margin-top: 5%;
        height: 195px;
    }

    .cards-container {
        padding-bottom: 5%;
    }
}

