@import url('https://fonts.googleapis.com/css2?family=Cantarell:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Advent+Pro:wght@100;200;300;400;500;600;700&display=swap');

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

/* Custom Properties, update these for your own design */
:root {
    --ff-primary: 'Advent Pro', sans-serif;
    --ff-secondary: 'Cantarell', sans-serif;
    --fw-reg: 200;
    --fw-bold: 700;

    --clr-light: #fff;
    --clr-opaco: #f2f2f2;
    --clr-mattone: #B22222;
    --clr-oxford: #002B5C;
    --clr-indigo: #134969;
    --clr-robbia: #BA3C3C; 
    --clr-midnight: #030347;
 
    --fs-h1:3rem;
    --fs-h2:2rem;
    --fs-h3:1.25rem;
    --fs-body: 1.2rem;
    --bs: 0.25em 0.25em 0.75em rgba(0, 0, 0, .25), 0.125em 0.125em 0.25em rgba(0, 0, 0, .15);
}

@media (min-width:800px) {
    :root {
        --fs-h1:4.5rem;
        --fs-h2:3.75rem;
        --fs-h3:1.5rem;
        --fs-body: 1.125rem;
    }

}

body {
    background: var(--clr-opaco);
    color: var(--clr-oxford);
    margin: 0!important;
    padding: 0!important;
    height: 100vh;
    width: 100vw;
    font-family: var(--ff-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
}

section {
    padding: 5em 2em;
}

img {
    display: block;
    padding: .5em;
    filter: saturate(120%);
}

strong {
    font-weight: var(--fw-bold);
    color: var(--clr-robbia);
    text-transform: uppercase;
}

:focus {
    outline: 3px solid var(--clr-indigo);
    outline-offset: 3px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: .5em 2.5em;
    background: var(--clr-robbia);
    color: var(--clr-oxford);
    text-decoration: none;
    cursor: pointer;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: var(--fw-bold);
    transition: transform 200ms ease-in-out;
}

.btn:hover {
    transform: scale(1.1);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--ff-secondary);
    line-height: 1;
    margin: 0;
}

h3 {
    color: var(--clr-oxford);
}

h1 {
    font-size: var(--fs-h1)
}

h2 {
    font-size: var(--fs-h2)
}

h3 {
    font-size: var(--fs-h3)
}


a {
    color:var(--clr-mattone);
    text-decoration: none;
}

a:hover, a:focus {
    color:var(--clr-robbia);
}

/* grid */
.grid-container {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto;

	grid-template-areas: 
    "header"
	"carousello"
	"texto";
    padding-bottom: 30px; /* Spazio per footer fisso */
}

.carousello {
    grid-area: carousello;
    margin-top: 2em; /* 2em dal header sempre */
    max-height: 40vh;
    overflow: hidden;
}
 .carousello  img {   
    width: 100%;
    height: 40vh;
    object-fit: cover;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: var(--clr-oxford);
    color: white;
    padding: 0 2rem;
    height: 30px;
    z-index: 1000;
    cursor: pointer;
}

/* Il disclaimer dei cookie si sovrappone al footer quando attivo */
.fixed--bottom {
    bottom: 0 !important;
}

.footer p {
    margin: 0;
    font-weight: 400;
    font-size: 11px;
}

/* Layout per il link TRANSLATE semplice */
.goog-te-gadget-simple {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.goog-te-gadget-simple span {
    color: white !important;
    font-size: 11px !important;
    text-transform: uppercase;
    font-weight: 400;
}

.goog-te-gadget-icon, .goog-te-menu-value img, .goog-te-menu-value span:nth-child(3), .goog-te-menu-value span:nth-child(5), #google_translate_element img {
    display: none !important;
}

.goog-te-banner-frame.skiptranslate, .goog-logo-link {
    display: none !important;
}

body {
    top: 0 !important;
}

.texto {
    grid-area: texto;
    margin:1em;
    padding: 1em;
    height: auto;
}

/* header */
header {
    grid-area: header;
    background-color: var(--clr-oxford);
    display: flex;
    justify-content: space-between;
    min-height: 10vh;
}

.logo {
    max-width: 200px;
    font-style: italic;
}

.logo img {
    max-width: 70vw;
    padding: 1em;
}
.nav {
    position: fixed;
    background: linear-gradient(135deg, var(--clr-robbia) 12%, var(--clr-light) 12%, var(--clr-light) 90%, var(--clr-oxford) 90%);
    color: var(--clr-robbia);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
}

.nav p {
    color: var(--clr-oxford);
    text-align: center;
    font-weight: 400;
    font-size: var(--fs-h3);
}

.nav__list {
    list-style: none;
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: inherit;
    font-size: var(--fs-h3);
    text-decoration: none;
}

.nav__link:hover {
    color: var(--clr-robbia);
}

.nav-toggle {
    padding: .5em;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: absolute;
    right: 1em;
    top: 2em;
    z-index: 1000;
}

.nav-open .nav {
    transform: translateX(0);
}

.nav-open .nav-toggle {
    position: fixed;
}

.nav-open .hamburger {
    transform: rotate(.625turn);
}

.nav-open .hamburger::before {
    transform: rotate(90deg) translateX(-6px);
}

.nav-open .hamburger::after {
    opacity: 0;
}

.hamburger {
    display: block;
    position: relative;
}

.hamburger, .hamburger::before, .hamburger::after {
    background: var(--clr-robbia);
    width: 2em;
    height: 3px;
    border-radius: 1em;
    transition: transform 250ms ease-in-out;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.hamburger::before {
    top: 6px;
}

.hamburger::after {
    bottom: 6px;
}



/* banner eu */
.fixed {
  position: fixed;
  will-change: transform;
}

.fixed--bottom {
  bottom: 0;
  left: 0;
  right: 0;
}



.cookie-disclaimer button {
  background-color: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  margin: 0;
  padding: 0;
}

.cookie-disclaimer .button {
  border-style: solid;
  border-width: 0.0625em;
  padding: 0.5em 1em;
  position: relative;
}




/* modules/cookie-disclaimer.css */

.cookie-disclaimer {
  z-index: 2000;
  background-color: rgba(0,0,0,0.9);
  color: #fff;
  font-size: inherit;
  font-size: 0.75rem;
  opacity: 0;
  padding: 12px;
  padding: 0.75rem;
  -webkit-transform: translateY(100%);
          transform: translateY(100%);
  -webkit-transition: opacity 0.3s, -webkit-transform 0.5s;
  transition: opacity 0.3s, -webkit-transform 0.5s;
  transition: opacity 0.3s, transform 0.5s;
  transition: opacity 0.3s, transform 0.5s, -webkit-transform 0.5s;
}

.cookie-disclaimer.is-active {
  opacity: 1;
  -webkit-transform: translateY(0);
          transform: translateY(0);
}

.cookie-disclaimer :first-child {
  margin-top: 0;
}

.cookie-disclaimer :last-child {
  margin-bottom: 0;
}

/* modules/media.css */

.media {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.media-center {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.media-object--left {
  margin-right: 2em;
}

.media-object--right {
  margin-left: 2em;
  -webkit-box-ordinal-group: 2;
      -ms-flex-order: 1;
          order: 1;
}

.media-body {
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
}

.media-body p {
  font-size: 1.3em;
}

.media-body a {
  color: orange;
}




@media (min-width:600px) {
    .nav {
        position: fixed;
        background: linear-gradient(135deg, var(--clr-robbia) 12%, var(--clr-light) 12%, var(--clr-light) 90%, var(--clr-oxford) 90%);   
        color: var(--clr-robbia);
        top: 0;
        bottom: 0;
        left: 50%;
        right: 0;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
    }

	.grid-container {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: auto 1fr;
		
		grid-template-areas: 
		"header header"
		"carousello texto";
        height: calc(100vh - 30px);
	}

    .carousello {
        grid-area: carousello;
        margin-top: 2em;
        height: auto;
        max-height: none;
    }

    .carousello img {   
        height: calc(100vh - 30px - 2em - 11vh);
        object-fit: cover;
    }

    .texto {
        grid-area: texto;
        height: auto;
        overflow-y: auto;
    }

    header {
        grid-area: header;
        min-height: 11vh;
    }

    .logo img {
        max-width: 25vw;
    }
}








/* CAROUSEL */
.carousel {
    position: relative;
    height: 100%;
    width: 100%;
}

.carousel .carousel-item,
.carousel .carousel-item-hidden {
    display: none;
}

.carousel .carousel-item-visible {
    display: block;
    animation: fadeVisibility 0.5s;
    height: 100%;
}

.carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel .carousel-actions {
    display: flex;
    width: 100%;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none; /* Permette di non intercettare click fuori dai bottoni */
}

.carousel .carousel-actions button {
    pointer-events: auto; /* Riabilita il click sui bottoni */
    border-radius: 50px;
    background-color: var(--clr-robbia);
    border: 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    color: white;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.carousel .carousel-actions button:hover {
    opacity: 1;
}

.carousel .carousel-actions button#carousel-button-prev {
    margin-left: 20px;
}

.carousel .carousel-actions button#carousel-button-next {
    margin-right: 20px;   
}

@keyframes fadeVisibility {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


/* EFFETTI CSS */
 
.color-change-2x {
    -webkit-animation: color-change-2x 2s linear infinite alternate both;
            animation: color-change-2x 2s linear infinite alternate both;
}

.rotate-scale-up  {
    -webkit-animation: rotate-scale-up 0.65s linear both;
            animation: rotate-scale-up 0.65s linear both;
}

.fromsx {
     animation: fromsx 3s linear;
}

.fromdx {
     animation: fromdx 3s linear;
}


.fadeIn {
        -webkit-animation: fade 0.8s;
        animation: fade 0.8s;
        visibility: visible !important;
    }


/* KEYFRAMES*/

@keyframes fade {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }

}


@keyframes fromsx {
    0% {
        transform: translateX(200%);
    }

    100% {
         transform: translateX(0);
    }

}


@keyframes fromdx {
    0% {
        transform: translateY(200%);
    }

    100% {
         transform: translateY(0);
    }

}


@-webkit-keyframes rotate-scale-up {
  0% {
    -webkit-transform: scale(1) rotateZ(0);
            transform: scale(1) rotateZ(0);
  }
  50% {
    -webkit-transform: scale(2) rotateZ(180deg);
            transform: scale(2) rotateZ(180deg);
  }
  100% {
    -webkit-transform: scale(1) rotateZ(360deg);
            transform: scale(1) rotateZ(360deg);
  }
}
@keyframes rotate-scale-up {
  0% {
    -webkit-transform: scale(1) rotateZ(0);
            transform: scale(1) rotateZ(0);
  }
  50% {
    -webkit-transform: scale(2) rotateZ(180deg);
            transform: scale(2) rotateZ(180deg);
  }
  100% {
    -webkit-transform: scale(1) rotateZ(360deg);
            transform: scale(1) rotateZ(360deg);
  }
}




@-webkit-keyframes color-change-2x {
  0% {
    background: #fff;
  }
  100% {
    background: #000;
  }
}
@keyframes color-change-2x {
  0% {
    background: #000;
  }
  100% {
    background: #fff;
  }
}


