@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:100,300,400,700');
@import url('https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i');

@import url('https://fonts.googleapis.com/css2?family=Homemade+Apple&family=Outfit:wght@100..900&family=Poiret+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ballet:opsz@16..72&family=Darumadrop+One&family=Micro+5&family=The+Girl+Next+Door&display=swap');

.projectsSection {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    /* Center the section */
    padding: 80px 0;
}

.projectsSection h3 {
    font-family: Homemade Apple;
    font-weight: 300;
    font-size: 32px;
    text-align: center;
    margin-bottom: 60px;
    color: #333;
}

.cards {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    cursor: pointer;
}

.card {
    width: 32%;
    /* Each card will take up 32% width to fit 3 cards in a row */
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 13px 10px -7px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0, 1);
    /* Smooth transition on hover */
}

/* Zooming Effect for Image */
.card__img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 500px;
    /* Set height of image */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease;
    /* Image zooming and opacity change */
}

/* Info Section */
.card__info {
    padding: 16px 24px;
    background-color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Text color transition */
}

.card__category {
    font-family: 'Raleway', sans-serif;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 2px;
    font-weight: 500;
    color: #868686;
}

.card__title {
    font-family: 'Roboto Slab', serif;
    font-size: 18px;
    font-weight: 700;
    margin-top: 5px;
    margin-bottom: 10px;
}

.card__by {
    font-size: 12px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}

.card__author {
    font-weight: 600;
    text-decoration: none;
    color: #AD7D52;
}

/* Hover Effects */
.card:hover .card__img {
    transform: scale(1.2);
    /* Zoom the image */
    opacity: 0.7;
    /* Make image a bit transparent */
}

.card:hover .card__info {
    background-color: transparent;
    /* Remove white background */
    color: #fff;
    /* Change text color to white */
}

.card:hover .card__title,
.card:hover .card__category,
.card:hover .card__by {
    color: #fff;
    /* Change text color to white */
}

/* Adding Card Shadow Effect */
.card:hover {
    box-shadow: 0px 20px 25px -5px rgba(0, 0, 0, 0.15);
    /* Deeper shadow for floating effect */
    transform: scale(1.05);
    /* Slightly enlarge the card */
}

/* Ensure the cards stay in a row */
.card__info {
    background-color: rgba(255, 255, 255, 0.8);
    /* Default background for text section */
}

.card__info:hover {
    background-color: transparent;
    /* Background disappears on hover */
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .cards {
        flex-direction: column;
        /* Stack cards vertically on small screens */
        align-items: center;
        /* Center the cards */
    }

    .card {
        width: 90%;
        /* Cards take up more space on mobile */
        margin-bottom: 20px;
        /* Space between cards */
    }
}