* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, serif;
    background-color: #111;
    color: white;
}


main {
    text-align: center;
}

html,
body {
    min-height: 100%;
    height: auto;
    overflow-y: auto;
}

/* VISOR */

.visor {
   
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.visor img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.visor-contingut {
    text-align: center;
    max-width: 80%;
}

.visor-contingut img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
}

#descripcio-foto {
    margin-top: 15px;
    margin-bottom: 0;
    color: white;
    font-size: 16px;
    letter-spacing: 1px;
}

.tancar {
    position: absolute;
    top: 20px;
    right: 30px;

    font-size: 40px;
    color: white;
    background: none;
    border: none;

    cursor: pointer;
    z-index:1001;
}
.anterior,
.seguent {
    position: absolute;
    top: 50%;

    font-size: 50px;
    color: white;
    background: none;
    border: none;

    cursor: pointer;
    z-index: 1001;
}

.anterior {
    left: 30px;
}

.seguent {
    right: 30px;
}

/* PAGINA BENVINGUDA */

.benvinguda {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
    padding: 20px;
    
    background-image: url("web-inici.JPG");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

}

.logo-benvinguda {
    width: min(750px, 80vw);
    height: auto;
    display: block;
    opacity: 0.72;
    margin-bottom: 20px;
}

.benvinguda h1 {
    font-size: 60px;
    margin: 0 0 20px 0;
}

.benvinguda p {
    font-size: 22px;
    margin: 5px 0;
}

.benvinguda .especialitat {
    color: white;
    margin-bottom: 40px;
}

.benvinguda a {
    display: inline-block;

    padding: 14px 35px;

    color: white;
    text-decoration: none;

    border: 1px solid white;
    transition: 0.3s;
}

.benvinguda a:hover {
    background-color: white;
    color: #111;
}

/* PAGINA D'INICI */

.pagina-inici {
    color: #111;
    background-color: #f5f5e9;
    background-image: url("fons-bokeh.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.presentacio-inici {
    min-height: 100vh;

    display: flex;
    align-items: center;

    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;

    gap: 80px;
}

.presentacio-foto {
    width: 50%;
}

.presentacio-foto img {
    width: 100%;
    height: 650px;

    object-fit: cover;
    display: block;
    border-radius: 12px;

}

.presentacio-text {
    width: 50%;
}

.presentacio-text .subtitol {
    font-size: 35px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.presentacio-text h1 {
    font-size: 40px;
    margin: 0 0 30px 0;
}

.presentacio-text p {
    font-size: 20px;
    text-align: justify;
    line-height: 1.7;
}

.enllacos-inici {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-top: 60px;
}

.enllacos-inici a {
    color: #111;
    text-decoration: none;

    font-size: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;

    padding-bottom: 5px;
    border-bottom: 1px solid #111;

    transition: opacity 0.3s;
}

.enllacos-inici a:hover {
    opacity: 0.5;
}

/* CATEGORIES DE LA GALERIA */

.pagina-galeria {
    background-color: #f5f5e9;
    background-image: url("fons-bokeh.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #111;
}

.galeria-categories {
    max-width: 1400px;
    margin: 0 auto;
    padding: 70px 40px;

}

.galeria-categories h1 {
    text-align: center;
    font-size: 48px;
    margin: 0 0 60px 0;
}

.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    border-radius: 12px;
}

.categoria {
    position: relative;
    display: block;
    overflow: hidden;
}

.categoria img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    display: block;
}

.categoria span {
    position: absolute;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    color: white;
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 3px;

    z-index: 2;
}

.categoria::after {
    content: "";
    position: absolute;

    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.25);
}

.categoria img {
    transition: transform 0.5s;
}

.categoria:hover img {
    transform: scale(1.04);
}

.tornar {
    display: inline-block;
    color: #111;
    text-decoration: none;

    font-size: 14px;
    letter-spacing: 1px;

    margin-bottom: 30px;
}

.tornar:hover {
    opacity: 0.5;
}

.pagina-categoria {
    background-color: white;
    color: #111;
}

/* GALERIA */

.galeria-fotos {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;

}

.galeria-fotos h1 {
    text-align: center;
    font-size: 48px;
    margin: 20px 0 10px 0;
}

.introduccio-galeria {
    text-align: center;
    color: #666;
    margin-bottom: 60px;
}

.fotos-categoria {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;

}

.fotos-categoria img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    transition: transform 0.4s;
}

.fotos-categoria a {
    display: block;
    overflow: hidden;
    border-radius: 12px;
}

.fotos-categoria img:hover {
    transform: scale(1.03);
}


/* 7 FOTOS O MÉS */

@media (min-width: 701px) {

    .fotos-categoria:has(> a:nth-of-type(7)) {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .fotos-categoria:has(> a:nth-of-type(7)) img {
        height: 320px;
    }

}

/* PÀGINA BIO */

.pagina-bio {
    background-color: #f5f5e9;
    background-image: url("fons-bokeh.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #111;
}

.bio-pagina {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 40px;
}

.contingut-bio {
    max-width: 900px;
    margin: 40px auto;
    text-align: justify;
    hyphens: auto;
}

.imatge-bio {
    text-align: center;
    margin-bottom: 25px;
}

.imatge-bio img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.contingut-bio p {
    font-size: 19px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 25px;
}

/* PÀGINA CONTACTE */

.pagina-contacte {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f5e9;
    background-image: url("fons-bokeh.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #111;
}

.contacte-pagina {
    flex: 1;
}

.titol-contacte {
    text-align: center;
    font-size: 48px;
    margin: 30px 0 70px 0;
}

.contacte-pagina > p {
    font-size: 20px;
    line-height: 1.5;
    letter-spacing: 0.5px;
    color: #444;
    margin-bottom: 10px;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 35px;
}

.correu-contacte {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    font-size: 20px;
    letter-spacing: 1px;
    color: #111;
}

.correu-contacte .icona-contacte {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

/* MEDIA ADAPTACIO A MOBILS */

@media (max-width: 700px) {

  /* BENVINGUDA */

      .benvinguda {
        padding: 20px;
     }

      .benvinguda h1 {
         font-size: 40px;
     }

      .benvinguda p {
         font-size: 18px;
     }

      .benvinguda .especialitat {
         margin-bottom: 30px;
     }

      .benvinguda a {
         padding: 12px 28px;
     }  

     .presentacio-inici {
        flex-direction: column;
        padding: 30px 20px;
        gap: 40px;
    }

    .presentacio-foto,
    .presentacio-text {
        width: 100%;
    }

    .presentacio-foto img {
        height: 450px;
    }

   .categories {
        grid-template-columns: 1fr;
        gap: 20px;
   }

   .categoria img {
       height: 400px;
   }

    .galeria-categories {
        padding: 40px 20px;
   }

    .galeria-categories h1 {
        font-size: 36px;
        margin-bottom: 40px;
    }

    .contingut-bio {
      margin: 40px auto;
      text-align: left;
    }

/* PAISATGES - FAUNA - FLORA */

   .galeria-fotos {
        padding: 40px 20px;
    }

   .galeria-fotos h1 {
       font-size: 36px;
    }

    .introduccio-galeria {
        margin-bottom: 40px;
    }

    .fotos-categoria {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fotos-categoria img {
        height: 350px;
    }

/* VISOR DE FOTOS */

   .visor-contingut {
       max-width: 85%;
   }

   .visor-contingut img {
    max-height: 70vh;
   }

   .anterior,
   .seguent {
    font-size: 32px;
   }

   .anterior {
    left: 8px;
   }

   .seguent {
    right: 8px;
   }

    .tancar {
    top: 10px;
    right: 15px;
    font-size: 30px;
   }

   #descripcio-foto {
    font-size: 14px;
    padding: 0 10px;
}
/* BIO */

   .bio-pagina {
    padding: 40px 20px;
    }

    .contingut-bio {
    margin: 40px auto;
    }

    .titol-bio {
    font-size: 36px;
    }

    .imatge-bio img {
    width: 100%;
    height: auto;
    }

    .contingut-bio p {
    font-size: 17px;
    line-height: 1.7;
    }

}

/* COPYRIGHT */
    .copyright {
    text-align: center;
    padding: 30px 20px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #777;
    }

   .copyright p {
    margin: 0;
   }


/* EFECTE DIFUMINAT AL VISOR */

#foto-gran.animar-foto {
    animation: enfocarFoto 1.0s ease-out;
}

@keyframes enfocarFoto {
    from {
        opacity: 0.2;
        filter: blur(15px);
    }

    to {
        opacity: 1;
        filter: blur(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #foto-gran.animar-foto {
        animation: none;
    }
}

