@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@700&display=swap");

:root {
    /* Colors */
    --brand-color: #deaa00;
    --black: hsl(0, 0%, 0%);
    --white: hsl(0, 0%, 100%);
    /* Fonts */
    --font-title: "Montserrat", sans-serif;
    --font-text: "Lato", sans-serif;
}

/* RESET */

/* Box sizing rules */
*,
*::before,
*::after {
    /*box-sizing: border-box;*/
}

/* Remove default margin */
body,
h2,
p {
    margin: 0;
}

/* GLOBAL STYLES */
/*body {*/
/*    display: grid;*/
/*    place-items: center;*/
/*    height: 100vh;*/
/*}*/

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

.carta p {
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--white);
}

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

/* CARD COMPONENT */

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

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

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

.carta__content {
    --flow-space: 0.9375rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: flex-end;
    height: 75%;
    padding: 0 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%
    );
}

.carta__content--container {
    --flow-space: 1.25rem;
}

.carta__description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.carta__title {
    position: relative;
    width: fit-content;
    width: -moz-fit-content; /* Prefijo necesario para Firefox  */
}

.carta__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);
}

.carta__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);
}

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

@media (any-hover: hover) and (any-pointer: fine) {
    .carta__content {
        transform: translateY(62%);
        transition: transform 500ms ease-out;
        transition-delay: 500ms;
    }

    .carta__title::after {
        opacity: 0;
        transform: scaleX(0);
        transition: opacity 1000ms ease-in, transform 500ms ease-out;
        transition-delay: 500ms;
        transform-origin: right;
    }

    .carta__background {
        transition: transform 500ms ease-in;
    }

    .carta__content--container > :not(.carta__title),
    .carta__button {
        opacity: 0;
        transition: transform 500ms ease-out, opacity 500ms ease-out;
    }

    .carta:hover,
    .carta:focus-within {
        transform: scale(1.05);
        transition: transform 500ms ease-in;
    }

    .carta:hover .carta__content,
    .carta:focus-within .carta__content {
        transform: translateY(0);
        transition: transform 500ms ease-in;
    }

    .carta:focus-within .carta__content {
        transition-duration: 0ms;
    }

    .carta:hover .carta__background,
    .carta:focus-within .carta__background {
        transform: scale(1.3);
    }

    .carta:hover .carta__content--container > :not(.carta__title),
    .carta:hover .carta__button,
    .carta:focus-within .carta__content--container > :not(.carta__title),
    .carta:focus-within .carta__button {
        opacity: 1;
        transition: opacity 500ms ease-in;
        transition-delay: 1000ms;
    }

    .carta:hover .carta__title::after,
    .carta:focus-within .carta__title::after {
        opacity: 1;
        transform: scaleX(1);
        transform-origin: left;
        transition: opacity 500ms ease-in, transform 500ms ease-in;
        transition-delay: 500ms;
    }
}

/* @media (min-width: 768px) { */
    .owl-carousel .owl-nav {
        top: -webkit-calc(60% - 2.5em) !important;
        top: calc(60% - 2.5em) !important;
    }
/* } */

/*.header-2 .header-content .title {*/
/*    font-family: inherit;*/
/*    !*text-transform: none;*!*/
/*    !*letter-spacing: 3px;*!*/
/*    !*font-size: 6rem;*!*/
/*    !*font-weight: 500;*!*/
/*     -webkit-transform: rotate(0deg);*/
/*     transform: rotate(0deg);*/
/*}*/

/*.header-2 {*/
/*    height: 750px;*/
/*    width: 100%;*/
/*    background-color: rgba(0,0,0,.15);*/
/*    border-bottom: none;*/
/*}*/

/*@media (max-width: 575px) {*/
/*    .header-2 .header-content .title {*/
/*        font-size: 1.7rem;*/
/*    }*/
/*}*/

/*.slide {*/
/*    box-shadow: rgba(0, 0, 0, 0.45) 0px 12px 10px -6px;*/
/*}*/

/*.header-2 {*/
/*    box-shadow: rgba(0, 0, 0, 0.45) 0px 12px 10px -6px;*/
/*}*/



/* Logo IFF affiancato a destra del logo Palermo (solo desktop) */
.palermo-navbar .logo-double img.iff-logo {
    width: auto;
    object-fit: contain;
}

.navbar-brand.logo-double img {
    border: 0;
    border-bottom: 1px solid #000;
    box-sizing: border-box;
}