/* Box sizing rules */
*{
    --brand-color: hsl(46, 100%, 50%);
}
.my-card,
.my-card::before,
.my-card::after {
    box-sizing: border-box;
}

/* Remove default margin */
.my-contact-card,
h2.text-card,
p.text-card {
    margin: 0;
}

/* GLOBAL STYLES */
.my-contact-card {
    display: grid;
    place-items: center;
    /* height: 100vh; */
}

h2.text-card {
    font-size: 2.25rem;
    font-family: var(--font-title);
    color: var(--white);
    line-height: 1.1;
}

p.text-card {
    padding-top: 20px;
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--white);
}

.flow > * + * {
    margin-top: var(--flow-space, 1em);
}

/* CARD COMPONENT */

.card {
    display: grid;
    place-items: center;
    width: 100%;
    height: 400px;
    /* width: 80vw;
    max-width: 21.875rem; */
    /* height: 28.125rem; */
    overflow: hidden;
    border-radius: 0.625rem;
    box-shadow: 0.25rem 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
}

.card > * {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.card__background {
    object-fit: cover;
    max-width: 100%;
    height: 100%;
}

.card__content {
    --flow-space: 0.9375rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: flex-end;
    height: 100%;
    width: 100%;
    padding: 12% 1.25rem 1.875rem;
    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;
    width: -moz-fit-content; /* Prefijo necesario para Firefox  */
}

.card__title::after {
    content: "";
    position: absolute;
    height: 0.3125rem;
    width: calc(100% + 1.25rem);
    bottom: calc((1.25rem - 0.5rem) * -1);
    left: -1.25rem;
    background-color: var(--brand-color);
}

.card__button {
    padding: 0.75em 1.6em;
    width: fit-content;
    width: -moz-fit-content; /* Prefijo necesario para Firefox  */
    font-variant: small-caps;
    font-weight: bold;
    border-radius: 0.45em;
    border: none;
    background-color: var(--brand-color);
    font-family: var(--font-title);
    font-size: 1.125rem;
    color: var(--black);
}

.card__button:focus {
    outline: 2px solid black;
    outline-offset: -5px;
}

@media (max-width: 451px) {
    p.text-card {
        font-size: 0.75rem;
    }
}

@media (any-hover: hover) and (any-pointer: fine) {
    .card__content {
    transform: translateY(62%);
    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;
    } */
}

.cover{
    background: #ffffff;
    padding: 20px 20px; 
    margin: 15px 15px;
    border: 3pt solid rgb(12 65 11 / 45%);
    border-radius: 15px;
}

.overview{
    margin-top: 20px;
}

.paragraph-m{
    font-size: 18px;
}

.row{
    margin: 0px;
}
.img{
    padding: 0px;
}
.text{
    margin-top: 15px;
}
.footer{
    margin-top: 0px;
}

@media only screen and (Max-width: 540px) {
    .card{
        margin-bottom: 50px; 
    }
}

@media only screen and (max-width: 768px) and (min-width: 540px){
    .card{
        margin-bottom: 50px; 
    }
}