:root {
  --color-principal: #3f6f4e; /* verd principal */
  --color-secundari: #b08a4f; /* marró càlid */
  --color-fons: #f5f4ef;
  --color-text: #2b2b2b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Georgia', serif;
  color: var(--color-text);
  background-color: var(--color-fons);
  line-height: 1.6;
}

header {
  background-color: var(--color-principal);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

.hero {
  background-size: cover;
  background-position: center;
  min-height: 350px;
    padding: 6rem 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

main {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

section h3 {
  color: var(--color-principal);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.activitats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
}

.card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  min-height: 350px;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-content h4 {
  margin-top: 0;
  color: var(--color-principal);
}

.card-content a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--color-principal);
  text-decoration: none;
  font-weight: bold;
}

.card-content a:hover {
  text-decoration: underline;
}


.activitatsh {
  display: grid;
  grid-template-files: repeat(5, 1fr);
  gap: 2rem;
}

.cardh {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: files;
  min-widtht: 350px;
  transition: transform 0.2s;
}

.cardh:hover {
  transform: translateY(-5px);
}

.cardh img {
  width: 180px;
  height: 100%;
  object-fit: cover;
}

.cardh-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: file;
  justify-content: space-between;
}

.cardh-content h4 {
  margin-top: 0;
  color: var(--color-principal);
}

.cardh-content a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--color-principal);
  text-decoration: none;
  font-weight: bold;
}

.cardh-content a:hover {
  text-decoration: underline;
}






/* Par défaut : caché pour mobile */
  .section-bureau {
    display: none;
  }

  /* À partir de 768px (tablettes/PC) : affiché */
  @media screen and (min-width: 767px) {
    .section-bureau {
      display: block; /* ou flex, grid... */
    }
  }



  /* Cache l'élément quand l'écran dépasse 768px */
@media screen and (max-width: 767px) {
  .section-mobile {
    display: block;
  }
}

@media screen and (min-width: 768px) {
  .section-mobile {
    display: none;
  }
}

  





.container {
  text-align: center;
}


.containerv {
  text-align: center;
max-width: 450px;
  width: 90%;
  aspect-ratio: 15 / 9;       /* 🔹 proporció horitzontal clàssica de fotografia */
  margin: 2rem auto;
  background: #eae6db;       /* fons visible (marc) */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;             /* marge uniforme a tots els costats */
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;

}





footer {
  background-color: var(--color-principal);
  color: white;
  padding: 2rem;
  text-align: center;
}

footer a {
  color: var(--color-secundari);
  text-decoration: none;
  margin: 0 0.5rem;
}

/* Formulari i Google Forms */
main section iframe {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background-color: white;
  width: 100%;
  max-width: 700px;
  margin: 1rem auto;
  display: block;
}

/* Responsivitat */
@media (max-width: 1200px) {
  .activitats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .hero {
    padding: 4rem 1rem;
  }
  .activitats {
    grid-template-columns: repeat(2, 1fr);
  }
  .activitatsh {
    grid-template-files: repeat(2, 1fr);
  }


}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .activitats {
    grid-template-columns: 1fr;
  }
  .activitatsh {
    grid-template-columns: 1fr;
  }
}


/* ===== GALERIA FIXA ===== */

/* CONTENIDOR GENERAL */
.galeriaf {
  max-width: 900px;
  margin: 2rem auto;
}

/* IMATGE PRINCIPAL */
.galeriaf-main {
  max-width: 900px;
  width: 90%;
  aspect-ratio: 3 / 2;       /* 🔹 proporció horitzontal clàssica de fotografia */
  margin: 2rem auto;
  background: #eae6db;       /* fons visible (marc) */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;             /* marge uniforme a tots els costats */
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  
.galeriaf-main {
    aspect-ratio: 3 / 2;
    padding: 0.5rem;         /* marge uniforme */
  }

.galeriaf-main img {
    padding: 1px;            /* deixa un petit marge per a horitzontals */
  }
}



/* ===== GALERIA FIXA PETITA===== */

/* CONTENIDOR GENERAL */
.galeriafp {
  max-width: 450px;
  margin: 2rem auto;
}

/* IMATGE PRINCIPAL */
.galeriafp-main {
  max-width: 450px;
  width: 90%;
  aspect-ratio: 3 / 2;       /* 🔹 proporció horitzontal clàssica de fotografia */
  margin: 2rem auto;
  background: #eae6db;       /* fons visible (marc) */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;             /* marge uniforme a tots els costats */
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  
.galeriafp-main {
    aspect-ratio: 3 / 2;
    padding: 0.5rem;         /* marge uniforme */
  }

.galeriafp-main img {
    padding: 1px;            /* deixa un petit marge per a horitzontals */
  }
}






/* ===== GALERIA CAROUSEL ===== */
/* CONTENIDOR GENERAL */
.carousel {
  max-width: 900px;
  margin: 2rem auto;
}

/* IMATGE PRINCIPAL */
.carousel-main {
  max-width: 900px;
  width: 90%;
  aspect-ratio: 3 / 2;
  margin: 2rem auto 1rem;
  background: #eae6db;
  padding: 1rem;
  border-radius: 12px;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;

   box-sizing: border-box;  /* HI ERA AL PRIMER */
}

/* Imatge activa per defecte (horitzontals) */
.carousel-main img {
  width: 100%;    /* HI ERA AL PRIMER */
  height: 100%;     /* HI ERA AL PRIMER */
 /* max-width: 100%;*/    /* NO HI ERA AL PRIMER */
  /*max-height: 100%;*/     /* NO HI ERA AL PRIMER */
  /*width: auto;*/          /* NO HI ERA AL PRIMER */
   /*height: auto;*/          /* NO HI ERA AL PRIMER */

  object-fit: cover;
  display: block;

  background: inherit;  /* HI ERA AL PRIMER */
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);


 /* millora qualitat a Chrome */
  image-rendering: auto;
  -webkit-image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;


}



/* Posters verticals */
.carousel-main img.poster {
  object-fit: contain;       /* es veu sencera dins del marc */
  width: auto;
  height: 100%;              /* ocupa tota l’alçada del marc */
 
}
/* ===== Miniatures ===== */
.carousel-thumbs-wrapper {
  margin-top: 1rem;
  overflow: hidden;
}

.carousel-thumbs {
  display: flex;
  align-items: center;
  gap: 6px;

  overflow-x: scroll;
  scrollbar-gutter: stable;

  padding: 0.5rem 12px;
  cursor: grab;
}

.carousel-thumbs.dragging {
  cursor: grabbing;
}

/* 👇 AQUESTA LÍNIA ÉS CLAU */
.carousel-thumbs img {
  height: 70px;
  width: auto;
  object-fit: contain;
  user-select: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}
.carousel-thumbs img.active {
  opacity: 1;
  transform: scale(1.05);
}/* Espai normal a desktop */



/* Evita que el contingut quedi “menjat” */
.carousel-thumbs::-webkit-scrollbar {
  height: 6px;
}

.carousel-thumbs::-webkit-scrollbar-thumb {
  background-color: #b08a4f;
  border-radius: 4px;
}



/* Espai més petit a mòbil */
@media (max-width: 600px) {
  
.carousel-main {
    aspect-ratio: 3 / 2;
    padding: 0.5rem;         /* marge uniforme */
  }

.carousel-main img {
    padding: 1px;            /* deixa un petit marge per a horitzontals */
  }

  .carousel-thumbs img {
    height: 50px;        /* miniatures més petites */
  }





}

/* ===== Fletxes ===== */
.thumb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  font-size: 1.5rem;
  padding: 0.3rem 0.6rem;
  cursor: pofile:///C:/Users/David/Documents/Escampillem/P%C3%A0gina%20web/web%202026/img/und/u5.jpginter;
  z-index: 5;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.thumb-arrow.left { left: 5px; }
.thumb-arrow.right { right: 5px; }




/* Responsive */
@media (max-width: 768px) {
  .carousel-main {
    <!--aspect-ratio: 4 / 3;-->
    max-width: 100%;
  }


}


/* Cartells verticals */
.carousel-main img.poster {
  object-fit: contain;
  background-color: var(--color-fons); /* o blanc */
}


.carousel-thumbs.dragging {
  cursor: grabbing;
}

.carousel-thumbs img {
  cursor: grab;
  user-select: none;
}





/* ===== GALERIA CAROUSEL PETITA===== */
/* CONTENIDOR GENERAL */
.carouselp {
  max-width: 450px;
  margin: 2rem auto;
}

/* IMATGE PRINCIPAL */
.carouselp-main {
  max-width: 450px;
  width: 90%;
  aspect-ratio: 3 / 2;       /* 🔹 proporció horitzontal clàssica de fotografia */
  margin: 2rem auto;
  background: #eae6db;       /* fons visible (marc) */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;             /* marge uniforme a tots els costats */
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}


/* Imatge activa per defecte (horitzontals) */
.carouselp-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* cobreix tot el marc, retalla si cal */
  display: block;
  background: inherit;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}




/* Posters verticals */
.carouselp-main img.poster {
  object-fit: contain;       /* es veu sencera dins del marc */
  width: auto;
  height: 100%;              /* ocupa tota l’alçada del marc */
 
}
/* ===== Miniatures ===== */
.carouselp-thumbs-wrapper {
  margin-top: 1rem;
  overflow: hidden;
}

.carouselp-thumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  cursor: grab;
  padding: 0.5rem 0;
}
.carouselp-thumbs.dragging {
  cursor: grabbing;
}

/* 👇 AQUESTA LÍNIA ÉS CLAU */
.carouselp-thumbs img {
  height: 70px;
  width: auto;
  object-fit: contain;
  user-select: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}
.carouselp-thumbs img.active {
  opacity: 1;
  transform: scale(1.05);
}/* Espai normal a desktop */



/* Evita que el contingut quedi “menjat” */
.carouselp-thumbs::-webkit-scrollbar {
  height: 6px;
}


.carouselp-thumbs::-webkit-scrollbar-thumb {    /*  AFEGIT COM A DALT  */
  background-color: #b08a4f;
  border-radius: 4px;
}


/* Espai més petit a mòbil */
@media (max-width: 600px) {
  
.carouselp-main {
    aspect-ratio: 3 / 2;
    padding: 0.5rem;         /* marge uniforme */
  }

.carouselp-main img {
    padding: 1px;            /* deixa un petit marge per a horitzontals */
  }

  .carouselp-thumbs img {
    height: 50px;        /* miniatures més petites */
  }
}




/* ===== Fletxes ===== */


/* Responsive */
@media (max-width: 768px) {
  .carouselp-main {
    <!--aspect-ratio: 4 / 3;-->
    max-width: 100%;
  }


}


/* Cartells verticals */
.carouselp-main img.poster {
  object-fit: contain;
  background-color: var(--color-fons); /* o blanc */
}


.carouselp-thumbs.dragging {
  cursor: grabbing;
}

.carouselp-thumbs img {
  cursor: grab;
  user-select: none;
}


/* ===== GALERIA CAROUSEL PETITA2===== */
/* CONTENIDOR GENERAL */
.carouselp2 {
  max-width: 450px;
  margin: 2rem auto;
}

/* IMATGE PRINCIPAL */
.carouselp2-main {
  max-width: 450px;
  width: 90%;
  aspect-ratio: 3 / 2;       /* 🔹 proporció horitzontal clàssica de fotografia */
  margin: 2rem auto;
  background: #eae6db;       /* fons visible (marc) */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;             /* marge uniforme a tots els costats */
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}


/* Imatge activa per defecte (horitzontals) */
.carouselp2-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* cobreix tot el marc, retalla si cal */
  display: block;
  background: inherit;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}




/* Posters verticals */
.carouselp2-main img.poster {
  object-fit: contain;       /* es veu sencera dins del marc */
  width: auto;
  height: 100%;              /* ocupa tota l’alçada del marc */
  <!--padding: 0;  -->              /* sense padding extra, ja queda dins */
}
/* ===== Miniatures ===== */
.carouselp2-thumbs-wrapper {
  margin-top: 1rem;
  overflow: hidden;
}

.carouselp2-thumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  cursor: grab;
  padding: 0.5rem 0;
}
.carouselp2-thumbs.dragging {
  cursor: grabbing;
}

/* 👇 AQUESTA LÍNIA ÉS CLAU */
.carouselp2-thumbs img {
  height: 70px;
  width: auto;
  object-fit: contain;
  user-select: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}
.carouselp2-thumbs img.active {
  opacity: 1;
  transform: scale(1.05);
}/* Espai normal a desktop */



/* Evita que el contingut quedi “menjat” */
.carouselp2-thumbs::-webkit-scrollbar {
  height: 6px;
}


/* Espai més petit a mòbil */
@media (max-width: 600px) {
  
.carouselp2-main {
    aspect-ratio: 3 / 2;
    padding: 0.5rem;         /* marge uniforme */
  }

.carouselp2-main img {
    padding: 1px;            /* deixa un petit marge per a horitzontals */
  }

  .carouselp2-thumbs img {
    height: 50px;        /* miniatures més petites */
  }
}




/* ===== Fletxes ===== */


/* Responsive */
@media (max-width: 768px) {
  .carouselp2-main {
    <!--aspect-ratio: 4 / 3;-->
    max-width: 100%;
  }


}


/* Cartells verticals */
.carouselp2-main img.poster {
  object-fit: contain;
  background-color: var(--color-fons); /* o blanc */
}


.carouselp2-thumbs.dragging {
  cursor: grabbing;
}

.carouselp2-thumbs img {
  cursor: grab;
  user-select: none;
}








.contenidorp {
  display: flex; /* Coloca los divs en la misma línea */
  gap: 30px; /* Espacio entre los divs */
  /* O puedes usar margin-left: 15px; en .caja:nth-child(2) */
}

.caja {
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
  /* Para que se separen (apilen) al minimizar */
}

/* Media Query para pantallas pequeñas (ej. móviles) */
@media (max-width: 600px) {
  .contenidorp {
    flex-direction: column; /* Apila los divs verticalmente */
    gap: 5px; /* Ajusta el espacio si es necesario */
  }
  .caja {
    width: 100%; /* Ocupan todo el ancho */
  }
}


/* --- FIX ESPECÍFIC PER A CHROME: mides del carrusel --- */
.carousel-main {
  box-sizing: border-box;
}

.carousel-main > img {
  box-sizing: border-box;
}



