@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap");

/* Animazione di entrata per tutta la pagina */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


* {
    box-sizing: border-box;
}

/* 1. Rendi la pagina fluida senza bloccarne l'altezza */

html {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-image: url("background.webp");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    /* Rimozione margini per il footer a tutta larghezza */
    margin: 0;
    padding: 0;
    /* Sostituto flessibile a height: 100% per non bloccare lo zoom */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    text-align: center;
}

img{
    width: 90%;
    display: block;
    margin: auto;
    margin-bottom: 3%;
}

a:hover{
    color: chartreuse
}


.privacybody {
    background-color: beige;
}

header {
    background-color: transparent;
    width: 100%;
    margin-bottom: 30px;
}

header img{
   width: 15%;
}

@media (max-width:768px){
    header img{
        width: 40%;
    }
}

@media (max-width: 1023px) and (min-width: 769px){
    header  img{
        width: 30%;
    }
}


h1, h2, h3, p, a {
    font-family: "Quicksand";
    font-weight: normal;
    color: white;
}

nav h4 {
    margin: 0;
    padding: 0;
}

/* footer */

footer {
    background-color: rgb(72, 89, 62);
    width: 100%;
    margin-top: 10%;
    border-top: 3px solid black;
    /* Mantieni il bordo solo sopra se ai lati ti creava spazi bianchi */
    font-family: Arial, Helvetica, sans-serif;
    font-weight: normal;
    padding: 20px;
    flex-shrink: 0;
}

footer p, a {
    color: white;
}

footer a:hover {
    color: burlywood;
}

/* navbar */

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #008cff00;
    border-left: none;
    border: none;
}

nav ul li {
    float: left;
}

nav ul li a {
    display: block;
    color: lightgray;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
}

nav ul li a:hover {
    background-color: rgb(169, 169, 169, 0.4);
    color: lightgray;
}

section ul {
    font-family: "Quicksand";
    list-style-type: disc;
    color: white;
}

#gallery {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.image-box {
    width: 100%;
}

#gallery img {
    display: block;
    width: 80%;
    max-width: 800px;
    height: auto;
    margin-left: 20%;
    margin-top: 10px;
}

#gallery input[type="text"] {
    font-size: 20px;
    width: 300px;
    padding: 8px;
}

#gallery .image-title {
    font-size: 40px;
    font-weight: bold;
    margin-top: 5px;
    margin-left: 20%;
}

.logout {
    display: block;
    margin: 20px 0;
}

section {
    max-width: 800px;
    margin: 15px auto;
    text-align: left;
    background-color: rgb(88, 105, 88);
    padding: 15px;
    border: 3px solid black;
    border-radius: 20px;
}

main {
    flex: 1 0 auto;
    font-size: 120%;
}

/* PORTFOLIO */

body .portfolio-page main{
    max-width: 1600px;
}

body.portfolio-page {
    background-color: #555;
    background-image: none;
}

.portfolio-page, .portfolio-section, .portfolio-grid{
    width: 100%;
    max-width: none;
    background-color: transparent;
    border: none;
}

.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

.portfolio-grid .image-card {
    flex: 0 1 calc(25% - 20px);
    min-width: 0;
}

.portfolio-grid .image-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .portfolio-grid .image-card {
        flex-basis: calc(100% - 10px);
    }
    main {
        padding: 5%;
    }

    .portfolio-page{
        font-size: 90%;
    }
}

@media (max-width: 900px) and (min-width: 768px) {
    .portfolio-grid .image-card {
        flex-basis: calc(50% - 10px);
    }
}

.portfolio-section {
    width: 100%;
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 25px 0;
}

.filter-button {
    width: 20%;
    padding: 10px 18px;
    border: 1px solid #555;
    color: white;
    border-radius: 6px;
    background-color:darkolivegreen ;
    cursor: pointer;
    transition: background-color 0.5s ease, color 0.5s ease;
    text-transform: uppercase;
}

.filter-button:hover,
.filter-button.active {
    background-color: #333;
    color: #fff;
}

.image-card[style*="display: none"] {
    display: none !important;
}

/* images */

/* images - Portfolio Cards */
.image-card {
    width: 100%;
    background: rgba(88, 105, 88, 0.5); /* Sfondo in vetro */
    backdrop-filter: blur(8px);        /* Sfocatura del vetro */
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;               /* Angoli arrotondati */
    overflow: hidden;                  /* Importante per non far uscire l'immagine */
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    padding-bottom: 15px;              /* Spazio sotto il titolo */
}

/* Effetto quando passi il mouse sopra */
.image-card:hover {
    transform: translateY(-10px);      /* Si solleva */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6); /* Ombra profonda */
    background: rgba(88, 105, 88, 0.8); /* Diventa un po' più scuro */
}

/* L'immagine dentro la card */
/* L'immagine dentro la card - Formato 16:9 */
.image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Zoom dell'immagine quando passi il mouse */
.image-card:hover img {
    transform: scale(1.05); 
}

/* Il titolo dell'opera */
.image-card h3 {
    margin: 15px 15px 0 15px;          /* Margini laterali */
    padding: 0;
    font-size: 1.2rem;
    line-height: 1.3;
    text-align: center;
    color: white;
}

.contact-list {
    list-style-type: none;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.contact-list li {
    float: left;
}

.contact-list a {
    color: lightblue;
    padding: 15px;
}

.contact-list li a:hover {
    color: crimson;
}

/* Hamburger */

/*animation*/

@media (max-width: 1023px) {
    #nav-menu {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: 0;
        padding: 0 4px;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;

        transition:
            max-height 0.4s ease,
            opacity 0.3s ease,
            visibility 0.4s ease;
    }

    #nav-menu.active {
        max-height: 600px;
        padding: 4px;
        opacity: 1;
        visibility: visible;
    }

    #nav-menu a{
        margin: 0 40%;
        padding: 20 px;
        
    }

}

/* desktop */

.hamburger {
    display: none;
    background-color: rgb(50, 63, 38);
    border: 2px solid greenyellow;
    border-radius: 10px;
    color: white;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hamburger:hover {
    color: darkslategray;
    background-color: greenyellow;
    border: 2px solid rgb(50, 63, 38);
}

nav {
    display: flex;
    justify-content: center;
    margin-bottom: 35px;
}

@media (max-width: 768px){

    nav{
        margin-bottom: 0;
    }
}

#nav-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
    border: none;
    margin: 0;
    padding: 0;


}

#nav-menu a {
    font-size: 1.3rem;
    text-decoration: none;
    border: 2px solid black;
    border-radius: 10px;
    background-color: darkslategrey;
    color: chartreuse;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#nav-menu a:hover{
    background-color:greenyellow;
    color: darkgreen;
}

@media (max-width: 768px){
    #nav-menu a{
        margin-left: 30%;
        margin-right: 30%;
        font-size: 150%;
    }
}

/* Responsive navigation */

/* tablet */
@media (max-width: 1023px) {
    nav {
        display: flex;
        flex-direction: column;
        position: relative;
        align-items: stretch;
        margin-top: 40px;
        padding-top: 55px;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 0;
        left: auto;
        right: 0;
        margin: 0;
        font-size: 50px;
        cursor: grab;
        touch-action: pan-y;
        user-select: none;
        z-index: 10;
    }

    

    #nav-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 420px;
        max-height: 0;
        overflow: hidden;
        margin: 0 auto;
        padding: 0;

        margin-top: 30px;
    }

    #nav-menu.active {
        max-height: 1200px;
    }

    #nav-menu li {
        width: 100%;
        list-style: none;
    }

    #nav-menu li a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        min-height: 65px;
        box-sizing: border-box;
        margin: 0;
        padding: 12px 20px;
        font-size: 1.8rem;
        text-align: center;
    }
}
/* blog */

.blog-card-content a,
.blog-post,
.blog-post h1,
.blog-content,
.back-to-blog,
.back-to-blog a {
    font-family: "Quicksand";
    font-weight: normal;
    color: white;
}

.blog-card {
    margin-bottom: 50px;
    margin-top: 15px;
    text-align: center;
    background-color: rgb(88, 105, 88);
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    border: 3px solid;
    border-radius: 25px;
}

.blog-card a {
    text-transform: uppercase;
}

.blog-card a:hover {
    color: lawngreen;
}

article img {
    width: 15%;
}

.blog-sort button {    
    border: 2px solid black;
    border-radius: 10px;
    background-color:darkolivegreen;
    padding: 10px;
    color: white;
    font-size: 20px;
    margin-top: 35px;
    margin-bottom: 25px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.blog-sort form {
    text-align: center;
}

.blog-sort button:hover {
    background-color: darkslategrey;
    color: chartreuse;
}

@media (max-width: 768px) {
    article img {
        width: 70%;
        height: auto;
    }
    .blog-content{
        width: 90%;
    }
    .blog-content p {
        font-size: 18px;
        line-height: 1.6;
    }
    .blog-post h1 {
        font-size: 32px;
    }
    .blog-post h2 {
        font-size: 26px;
    }
    .blog-post h3 {
        font-size: 22px;
    }
}

.blog-post {
    text-align: center;
    background-color: rgb(88, 105, 88);
    padding: 15px;
    border: 5px solid black;
    max-width: 800px;
    margin: auto;
    margin-top: 5%;
    border-radius: 25px;
}

.blog-content {
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    
}

.blog-grid{
    background-color: transparent;
    border: none;
}



/* images zoom */

.image-card a img {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.image-card a img:hover {
    opacity: 0.8;
}

/* VIEW-IMAGE */

body.viewer-body{
    background-color: #555;
    background-image: none
}

.viewer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

/* Sfondo a gradiente per la pagina di visualizzazione dell'opera */

.viewer-image {
    display: block;
    width: 100%;
    max-width: 1200px;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
    margin-bottom: 20px;
}
/* Il titolo dell'opera d'arte */

.viewer-title {
    margin-top: 25px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.image-viewer-description{
       background-color: rgb(88, 105, 88);
       border-radius: 25px;
}

/* Il pulsante per chiudere la scheda */

.back-btn {
    margin-top: 30px;
    margin: auto;
    display: block;
    width: fit-content;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background-color: white;
    color: black;
}

/* blog */

.blog-post-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin: 30px auto;
}

.blog-post-image {
    display: flex;
    margin: auto;
    margin-bottom: 4%;
    width: 90%;
    max-width: 900px;
    height: auto;
    object-fit: contain;
}

/* Anteprima nella pagina del blog */

.blog-card > img {
    display: block;
    width: 20%;
    height: auto;
    object-fit: contain;
    margin: auto;
}

@media (max-width: 768px) {
    .blog-card > img {
        display: block;
        width: 40%;
        height: auto;
        object-fit: contain;
        margin: auto;
    }
}

textarea, input {
    background-color: rgb(169, 169, 169, 0.2);
    color: white;
}

.form-input {
    background-color: transparent;
    color: white;
    font-size: 20px;
    padding: 5px;
    border: none;
}

.form-input:hover {
    background-color: rgb(169, 169, 169, 0.2);
    color: white;
    font-size: 20px;
    padding: 5px;
}

span {
    font-family: "Quicksand";
}

/* contact form */

/* Center the form container on the page */

.contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centers items horizontally */
    justify-content: center;
    max-width: 450px;
    /* Keeps the form from getting too wide */
    margin: 0 auto;
    /* Centers the entire form section horizontally */
    padding: 20px;
}

/* Style the headings/labels inside the form */

.contact-form h3 {
    margin-bottom: 5px;
    margin-top: 15px;
    text-align: center;
}

/* Center error messages underneath fields */

.contact-form span {
    font-size: 14px;
    text-align: center;
    display: block;
    /* Forces error message on its own line */
}

/* Style the submit button */

.contact-form .form-input {
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
}


@media (max-width: 1023px) and (min-width:768px){
    
    .contact-form{
        font-size: 120%;
    }
}
/* banner */

.cookie-banner[hidden],
#cookie-settings[hidden],
#cookie-save[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    z-index: 99999;
    bottom: 20px;
    left: 20px;
    width: min(440px, calc(100% - 40px));
    padding: 24px;
    color: inherit;
    background: grey;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    font-family: inherit;
}

.cookie-banner h2 {
    margin: 0 30px 12px 0;
    font-size: 1.3rem;
}

.cookie-banner p {
    line-height: 1.5;
}

#cookie-settings label {
    color: white;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cookie-actions button {
    padding: 10px 14px;
    cursor: pointer;
    font: inherit;
    background-color: transparent;
    color: white;
}

.cookie-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 25px;
    cursor: pointer;
}

/* footer responsiveness */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px 40px;
    padding: 24px 5%;
    text-align: center;
}

.footer-info,
.footer-cookies,
.footer-assets {
    flex: 0 1 220px;
    min-width: 0;
}

.site-footer p {
    margin: 8px 0;
}

.site-footer a {
    overflow-wrap: anywhere;
}

@media (max-width:768px) {
    .site-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 20px 16px;
    }
    .footer-info,
.footer-cookies,
.footer-assets {
        width: 100%;
        flex: none;
    }

    footer{
      margin-top: 15%;
    }
}

/* inputs */

/* Bigger checkbox */

.image-box input[type="checkbox"] {
    width: 400px;
    height: 400px;
    accent-color: #2f6fed;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 10px;
}

/* filters */

.portfolio-filters,
.filter-button {
    width: auto;
    max-width: 100%;
    min-width: 0;
    height: auto;
    padding: 10px 16px;
    font-size: 16px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
    flex: 0 1 auto;
}

/* mobile */

@media (max-width: 768px) {
    .portfolio-filters {
        gap: 8px;
        padding: 8px 4px;
    }
    .portfolio-filters .filter-button {
        flex: 1 1 130px;
        max-width: 100%;
        padding: 10px 8px;
        font-size: 14px;
    }
}

/* Keep the footer at the bottom on portrait tablets when content is short. */

@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {

  footer{
        margin-top: 30%;
        margin-bottom: 0;
  }
}