@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,700;1,400&display=swap');
/* Variables  */
:root {
    --primary:#436343;
    --accent: #B78C19;
    --light: #F7E9D8;
    --dark: #1D1200;
    --medium: #7F6663;
    --light-grey: #F1F1F1; /* #e6e6e6;*/
    --dark-grey: #6c757d;
    --main-border-radius: 12px/6px;
}

/* Main structure */
html, body{
    font-family: 'Poppins', sans-serif;     
    margin:0;
    padding:0;
    width: 100%;
    height: 100%;
    position: relative;
    font-size: 1rem;
    color: #fff;
}
/* Accessibility of smooth scrolling */
html {
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
}

/* utility classes  */
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}
.text-center {
    text-align: center;
}

/* links  */
a {
    color: var(--primary);
}
a:hover,
a:focus,
a:active {
    color: var(--accent);
}
/* a:visited {
    color: var(--medium);
} */
a:focus-visible {
    color: var(--accent);
    outline: 1px solid var(--accent);
    padding: 2px 0;
    border-radius: 4px;
}

/* Basic image styles  */
.img-responsive {
    /* width: 100%; */
    max-width: 100%;
    height: auto;
}
.photo {
    border-radius: 80% 40%;
    border: solid var(--light);
    border-width: 5px 20px 5px 20px;
    padding: 0.5rem;
    box-sizing: border-box;
}
figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
figure img {
    margin: 0 auto;
}
figcaption {
    text-align: right;
    font-size: 0.75rem;
}
.main-row-invert figcaption {
    text-align: left;
}

/* Blockquote  */
blockquote {
    position: relative;
    font-style: italic;
    text-align: right;
    font-size: 95%;
    padding: 0.5rem;
    max-width: max-content;
    margin-top: 2rem;
    margin-left: auto;
    margin-right: 0;
    color: var(--dark);
}
blockquote::before {
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: var(--main-border-radius);
    box-shadow: -2px -2px 1px hsl(0 0% 100%), 2px 2px 4px hsl(0 0% 0% / 20%);
}
blockquote::after {
    content: "❝";
    position: absolute;
    z-index: 1;
    left: -1rem;
    top: 0;
    width: 1.5rem;
    height: 1rem;
    background: white;
    box-shadow: 0 4px 5px -1px hsla(0 0% 0% / 20%);
    border-radius: 50%;
    display: grid;
    place-content: center;
    /* padding-top: .5em; */
    color: var(--accent);
    font-size: 36px;
    font-style: normal;
    text-indent: 0;
}

/* Buttons  */
.button {
    /* padding: 1rem 1.5rem; */
    /* border-radius: 80% 40%; */
    padding: 0.5rem 1rem;
    border-radius: var(--main-border-radius);
    width: max-content;
    text-transform: capitalize;
    font-variant: small-caps;
    text-decoration: none;
    transition: all 0.5s ease-in-out;
}
.button-main {
    background-color: var(--light);
    color: var(--dark);
    border: solid var(--dark);
    border-width: 1px 3px 1px 3px;
}
.button-main:hover,
a.button-main:hover {
    background-color: var(--medium);
    color: var(--light);
    /* border: solid var(--light); */
    border-width: 1px 3px 1px 3px;
}
.button-small {
    padding: 0.25rem 0.75rem;
}

/* languages  */
.lang {
    max-width: 35px;
    transition: all 0.3s ease-in-out;
}
.lang:hover {
    transform: scale(1.1);
    transition: all 0.3s ease-in-out;
}
.lang-switcher {
    position: absolute;
    top: 20px;
    right: 1rem;
}

/* typography  */
h1,
h2 {
    margin-top: 1rem;
}
p {
    line-height: 1.7;
    margin-top: 0;
    margin-bottom: 1.25rem;
}
.card-title {
    font-size: 1.5rem;
    font-weight: bold;
    font-variant: small-caps;
    margin-bottom: 1rem;
}
.card-title.with-subtitle {
    margin-bottom: 0.2rem;
}
.card-subtitle {
    font-size: 1.2rem;
    font-weight: bold;
    font-variant: small-caps;
    margin-bottom: 1rem;
    margin-top: 0;
}

/* code examples  */
pre code {
    display: block;
    white-space: pre-wrap;
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid var(--light);
    background-color: var(--dark);
    border-radius: var(--main-border-radius);
}

/* Torna su  */
#torna-su {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: var(--light);
    color: var(--medium);
    opacity: 0.5;
    padding: 0.12rem 0.5rem;
    border-radius: 50%;
}
.hide {
    display: none;
}
.show {
    display: block;
}

/* Navigation  */
nav {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
nav .lang {
    margin-left: 1.5rem;
}
nav .button {
    padding: 0.35rem 0.75rem;
    border-radius: var(--main-border-radius);
}
nav .button.active {
    background-color: var(--medium);
    color: var(--light);
}
nav .button.active:hover,
nav .button.active:focus,
nav .button.active:visited {
    background-color: var(--medium);
    color: var(--light);
}
nav .nav-logo {
    margin-right: auto;
}
nav .nav-logo img {
    max-width: 45px;
}
.navbar-toggler {
    display: none;
}
#navigation {
    margin-right: 45px;
}

/* footer  */  
footer {
    background-color: var(--primary);
}
.footer-container {
    padding: 1rem 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-content: space-between;
}
.footer-container a {
    color: white;
}
.footer-container a:hover {
    color: var(--light);
}
.footer-container .logo img {
    max-width: 180px;
}
.footer-container .social {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    font-size: 1.5rem;
    gap: 1rem;
}
/* book shape divider bottom  */
main.with-shape-divider {
    position: relative;
    padding-bottom: 0; /*calc(1rem + 81px);*/
}
.book-shape-divider {
    /* position: absolute;
    bottom: -1px;
    left: 0; */
    width: 100%;
    overflow: hidden;
    line-height: 0;
    background-color: transparent;
    transform: rotate(180deg);
}
.book-shape-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 81px;
    background-color: transparent;
}
.book-shape-divider .shape-fill {
    fill: var(--primary);
}

/* Home page  */
.home-header {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem 2rem;
}
.home-container {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    place-items: center;
    overflow: hidden;
}
#main-container {
    /* display: grid;
    grid-template-rows: max-content 100% max-content; */
    min-height: 100vh;
}
.home-container,
#main-container {
    background-image: url(../img/spirit-bg.jpg);
    background-position: left top;
    background-size: 150%;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.home-left, 
.home-right {
    padding: 1rem;
}
.home-left {
    text-align: center;
}
.home-left .logo {
    max-width: 300px;
    height: auto;
}
.home-left p {
    font-size: 1.15rem;
    margin: 0 0 2.5rem 0;
}
.home-left .social {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1.5rem;
    margin-bottom: 3rem;
}
.home-left .social a {
    color: white;
    text-decoration: none;
}
.home-left .social a:hover {
    color: var(--light);
    text-decoration: none;
}
.home-left .menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.home-right {
    display: flex;
    justify-content: center;
}
.home-right .photo {
    filter: brightness(1.05) saturate(1.4);
}

/* main page styles  */
#main-container {
    position: relative;
}
main {
    /* padding: 1rem; */
}
.main-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
}
.main-row .images {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.main-row .card {
    width: calc(100% - 2.5rem);
}
.header-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-flex-between > * {
    height: max-content;
}
.header-flex-between .button {
    white-space: nowrap;
}
.horizontal-center {
    display: flex;
    justify-content: center;
}
.position-right {
    display: flex;
    justify-content: flex-end
}

/* cards  */
.card {
    border-radius: var(--main-border-radius);
    background-color: white;
    color: var(--dark);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    max-width: 768px;    
    justify-self: center;
}

/* icons  */
.icons-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 2rem;
    margin-top: 2.5rem;
}

/* website showcase  */
.box-sito {
    background-color: #E8E8E8;
    color: var(--dark);
    border-radius: var(--main-border-radius);
}
.box-sito img {
    aspect-ratio: 16 / 9;
    border-top-left-radius: var(--main-border-radius);
    border-top-right-radius: var(--main-border-radius);
}
.sito-description {
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 1rem;
    border-radius: var(--main-border-radius);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
p.sito-titolo {
    font-size: 1.2rem;
    font-variant: small-caps;
    margin-bottom: 0;
}
p.sito-date {
    font-size: 0.9rem;
    margin-bottom: 0;
}
p.sito-url {
    margin-bottom: 0;
}
.sito-description.no-flex {
    display: block;
}

/* Slick slider  */
/* To prevend slider from getting too big */
* {
    min-height: 0;
    min-width: 0;
}
/* slick slider override  */
.slick-dots {
    position: relative;
    bottom: 0px;
}
.slick-prev {
    left: 12px;
    top: 12px;
    z-index: 100;
}
.slick-next {
    right: 12px;
    top: 12px;
    z-index: 100;
}
.slick-prev::before, 
.slick-next::before {
    font-size: 25px;
    color: var(--medium);
}
.slick-prev::before {
    content: '❮';
}
.slick-next::before {
    content: '❯';
}
.slick-dotted.slick-slider {
    margin-bottom: 0;
}
.slick-dots li button {
    position: relative;
    top: 0;
    width: 15px;
    height: 15px;
    opacity: 0.75;
    background-color: var(--medium);
    border-radius: var(--main-border-radius);
    border: none;
    box-shadow: 1px 1px 3px var(--dark);
}
.slick-dots li.slick-active button {
    opacity: 1;
    background-color: var(--light);
    border-radius: var(--main-border-radius);
    border: 1px solid var(--light);
    box-shadow: 2px 2px 4px var(--medium);
}
.slick-dots li button::before {
    color: transparent;
}
.slick-dots li.slick-active button::before {
    opacity: 1;
    color: transparent;
}
.slick-list, 
.slick-slide.box-sito {
    border-radius: var(--main-border-radius);
}

/* Book showcase 3D */
.main-row .images.books {
    justify-content: space-evenly;
}
.book-container {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 600px;
}  
@keyframes initAnimation {
    0% {
      transform: rotateY(0deg);
    }
    100% {
      transform: rotateY(-30deg);
    }
}  
.book {
    width: 200px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-30deg);
    transition: 1s ease;
    animation: 1s ease 0s 1 initAnimation;
}
.book:hover {
    transform: rotateY(0deg);
}
.book > :first-child {
    position: absolute;
    top: 0;
    left: 0;
    background-color: red;
    width: 200px;
    height: 300px;
    transform: translateZ(25px);
    background-color: #01060f;
    border-radius: 0 2px 2px 0;
    box-shadow: 5px 5px 20px #666;
}
.book::before {
    position: absolute;
    content: ' ';
    background-color: blue;
    left: 0;
    top: 3px;
    width: 48px;
    height: 294px;
    transform: translateX(172px) rotateY(90deg);
    background: linear-gradient(90deg, 
      #fff 0%,
      #f9f9f9 5%,
      #fff 10%,
      #f9f9f9 15%,
      #fff 20%,
      #f9f9f9 25%,
      #fff 30%,
      #f9f9f9 35%,
      #fff 40%,
      #f9f9f9 45%,
      #fff 50%,
      #f9f9f9 55%,
      #fff 60%,
      #f9f9f9 65%,
      #fff 70%,
      #f9f9f9 75%,
      #fff 80%,
      #f9f9f9 85%,
      #fff 90%,
      #f9f9f9 95%,
      #fff 100%
      );
}
.book::after {
    position: absolute;
    top: 0;
    left: 0;
    content: ' ';
    width: 200px;
    height: 300px;
    transform: translateZ(-25px);
    background-color: #01060f;
    border-radius: 0 2px 2px 0;
    box-shadow: -10px 0 50px 10px #666;
}

/* media queries  */
@media all and (max-width: 1200px) {
    .home-container {
        width: 100%;
        min-height: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, max-content);
        gap: 3rem;
        overflow: auto;
    }
    .home-container, #main-container {
        background-size: cover;
      }
    .home-right {
        padding-bottom: 3rem;
    }
    .home-right .photo {
        max-width: 800px;
    }
}
@media all and (max-width: 992px) {
    .main-row {
        grid-template-columns: 1fr;
          
        margin-bottom: 1rem;
    }
    .main-row-invert figure,
    .main-row-invert .images {
        order: 2;
    }
    .main-row-invert figcaption {
        text-align: right;
    }
    .home-right .photo {
        max-width: 100%;
    }
    .main-row .images.books {
        padding-bottom: 3rem;
        gap: 3rem;
    }
    blockquote {
        width: auto;
        margin-right: 0;
    }
    blockquote::after {
        left: 0;
    }
}
@media all and (max-width: 800px) {
    .navbar-toggler {
        display: initial;
        cursor: pointer;
        padding: 0.5rem 1.25rem;
        font-size: 1.35rem;
        /* margin-right: auto; */
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translate(-50%);
    }
    #navigation.show {
        display: flex;
        margin-right: 0;
        z-index: 10;
    }
    #navigation {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 65px;
        align-items: center;
        gap: 0.25rem;
        background: rgba(67, 99, 67, 0.95);
        padding: 1rem;
        left: 0;
        right: 0;
        border-bottom: 1px solid var(--primary);
    }
    #navigation .button {
        text-align: center;
        border: none;
        background: transparent;
        color: var(--light);
        font-size: 1.2rem;
        transition: none;
    }
    #navigation .button.active,
    #navigation .button:hover {
        background-color: var(--light);
        color: var(--dark);
        border-radius: 0;
        width: 100%;
        transition: none;
    }
    .card {
        max-width: unset;
        width: unset;
    }
    .main-row .images.books {
        row-gap: 6rem;
    }
}
@media all and (max-width: 700px) {
    .sito-description {
        flex-direction: column;
    }
}
@media all and (max-width: 576px) {
    .photo {
        border-width: 3px 10px 3px 10px;
    }
    .home-left {
        padding-top: 3rem;
    }
    .home-header {
        padding: 1rem;
    }
    .home-right .photo {
        /* max-width: 100%; */
        max-width: calc(100% - 2rem);
    }
    .header-flex-between {
        flex-direction: column;
        margin-bottom: 1rem;
    }
    .footer-container {
        grid-template-columns: 1fr;
        justify-content: center;
    }
    .footer-container .logo,
    .footer-container .social {
        text-align: center;
        justify-content: center;
    }
}
@media all and (max-width: 480px) {
    .home-left .logo {
        max-width: 100%;
        height: auto;
    }
    .main-row {
        padding: 0;
    }    
}