@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@700&display=swap");

:root {
    --black: hsl(0, 0%, 0%);
    --white: hsl(0, 0%, 100%);
    --font-title: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

h2{
    margin: 0;
}

/* GLOBAL STYLES */
h2 {
    font-size: 1.5rem;
    font-family: var(--font-title);
    color: var(--white);
    line-height: 1.1;
}


.flow > * + * {
    margin-top: var(--flow-space, 1em);
}

/* CARD COMPONENT */

.card {
    position: relative;
    overflow: hidden;
    border-radius: 0.625rem;
    box-shadow: 0.25rem 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
}

.card__background {
    width: 100%;
    height: auto;
}

.card__content {
    --flow-space: 0.9375rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(180deg, hsla(0, 0%, 0%, 0) 0%, hsla(0, 0%, 0%, 0.3) 10%, hsl(0, 0%, 0%) 100%);
}

.card__content--container {
    --flow-space: 1.25rem;
}

.card__title {
    position: relative;
    width: fit-content;
}

@media (any-hover: hover) and (any-pointer: fine) {
    .card__content {
        transform: translateY(100%);
        transition: transform 500ms ease-out;
        transition-delay: 500ms;
    }

    .card__title::after {
        opacity: 0;
        transform: scaleX(0);
        transition: opacity 1000ms ease-in, transform 500ms ease-out;
        transition-delay: 500ms;
        transform-origin: right;
    }

    .card__background {
        transition: transform 500ms ease-in;
    }

    .card__content--container > :not(.card__title),
    .card__button {
        opacity: 0;
        transition: transform 500ms ease-out, opacity 500ms ease-out;
    }

    .card:hover,
    .card:focus-within {
        transform: scale(1.05);
        transition: transform 500ms ease-in;
    }

        .card:hover .card__content,
        .card:focus-within .card__content {
            transform: translateY(0);
            transition: transform 500ms ease-in;
        }

        .card:focus-within .card__content {
            transition-duration: 0ms;
        }

        .card:hover .card__background,
        .card:focus-within .card__background {
            transform: scale(1.3);
        }

        .card:hover .card__content--container > :not(.card__title),
        .card:hover .card__button,
        .card:focus-within .card__content--container > :not(.card__title),
        .card:focus-within .card__button {
            opacity: 1;
            transition: opacity 500ms ease-in;
            transition-delay: 1000ms;
        }

        .card:hover .card__title::after,
        .card:focus-within .card__title::after {
            opacity: 1;
            transform: scaleX(1);
            transform-origin: left;
            transition: opacity 500ms ease-in, transform 500ms ease-in;
            transition-delay: 500ms;
        }
}


.row.justify-content-center {
    display: flex;
    flex-wrap: wrap;
    margin: -15px; /* Para compensar el padding de las columnas */
}

.col-lg-4 {
    width: 33.33%; /* Tres tarjetas por fila */
    padding: 15px; /* Espaciado entre tarjetas */
}

.card {
    margin-bottom: 15px; /* Espaciado entre filas de tarjetas */
}

@media (min-width: 1200px) {
    .col-xl-3 {
        width: 25%; /* 4 cards per row on extra large screens */
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .col-lg-4 {
        width: 33.33%; /* 3 cards per row on large screens */
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .col-md-6 {
        width: 50%; /* 2 cards per row on medium screens */
    }
}

@media (max-width: 767px) {
    .col-sm-12 {
        width: 100%; /* 1 card per row on small screens */
    }
}



/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close {
    position: absolute;
    top: 10px; /* Adjusted for better visibility on small screens */
    right: 10px; /* Adjusted for better visibility on small screens */
    color: #fff;
    font-size: 30px; /* Adjusted for better visibility on small screens */
    font-weight: bold;
    transition: 0.3s;
}

    .close:hover,
    .close:focus {
        color: #bbb;
        text-decoration: none;
        cursor: pointer;
    }

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }

    .close {
        font-size: 24px; /* Further adjustment for small screens */
    }
}