/* ===================== ESTILS GLOBALS ===================== */
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-style: normal;
  background-color: #e5e3e3;
  color: #1f252c;
  transition: background-color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: underline;
transition: color 0.3s ease;
}

a:hover {
  color: blue;
}
/* ===================== TITOLS I LLISTES ===================== */
h2 {
  font-size: 18px;
  padding: 0;
  border-bottom: 1px solid #222;
  font-weight: 800;
  margin: 0;
}
h3 {
  font-size: 18px;
  padding-top: 40px;
  border-bottom: 0 solid #222;
  font-weight: bolder;
  text-decoration: underline;
}



ul {
  line-height: 1.2;
}

li {
  margin-bottom: 2px;
}


/* ===================== HEADER ===================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 80px 71px 80px;
}

.logo img {
  height: 20px;
}

.nav-right {
  font-size: 16px;
  display: flex;
  gap: 20px;
  align-items: center;
  font-weight: 400;
}

.nav-right a {
  transition: color 0.3s ease;
  text-decoration: none;
}

/* ===================== INTRO ===================== */
.intro {
	padding: 0 80px 80px;
    font-size: 16px;
    line-height: 21px;
    max-width: 600px;
    font-weight: 500;
}


/* ====================FILTERS - botons blaus columnes i text==================== */
.filters {
  position: fixed;
  top: 170px;
  left: 0; /* posició inicial, una mica separada */
  display: flex;
  flex-direction: row; /* a l'inici horitzontal */
  gap: 7px;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.6s ease, flex-direction 0.6s ease, top 0.6s ease, left 0.6s ease;
  padding: 0 0 30px 80px;

}

.filters.scrolled {
  top: 10%;
  left: -65px; /* enganxat completament al marge esquerre */
  flex-direction: column; /* passa a vertical */
  opacity: 0.9; /* pots posar 0.9 si vols un lleu fade */
}
.filter-button {
  background-color: transparent;
  color: #111;
  border: 1px solid #111;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 20px;
  transition: background 0.3s;
}

.filter-button.active,
.filter-button:hover {
  background-color: #111;
  color: #fff;
}


/* BOTONS TOGGLE a dins de filtres btn de color blau -columnes i text ===================== */
.toggle-columns-btn {
  padding: 5px;
  font-size: 16px;
  border-radius: 50%;
  background-color: blue;
  color: #fff;
  border: 1px solid blue;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, color 0.3s;
  width: 50px;
  height: 50px;
}

.toggle-columns-btn:hover,
.toggle-columns-btn.active {
   background-color: #000;
	border: 1px solid #000;
  color: #fff;
  transform: scale(1.1);
}

.toggle-columns-btn.active {
  transform: rotate(90deg);
}

/* ===================== amaga o mostra el text botó filtres + MÉS INFO DESPLEGABLE ===================== */

.toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
}

.hidden-text {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.text-full {
  display: none;
  margin-top: 8px;
}

.slider-text.expanded .text-full {
  display: block;
}
.titol,
.slider-text,
.slider-dots {
  transition: opacity 0.4s ease, transform 0.4s ease;
}
/* ===================== GALERIA ===================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 80px 80px 80px;
}

.gallery div {
  position: relative;
}

.gallery img {
 width: 100%;
  height: auto;
  display: block; 
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.01);
}

/* SLIDER IMATGES===================== */
.slider-container {
  position: relative;
 /* width: 100%;*/
}

.project-slider {
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
}

.slider-wrapper {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.slider-image {
 /* width: 100%;*/
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: contain;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.slider-foto {
  padding-top: 2px;
  color: #f9f8f4;
}

/* SLIDER TEXT===================== */

.premi {
  color: dimgray;
	 text-align: left;
	 font-size: 12px;
	 line-height: 14px;
}

.titol {
  padding: 6px 0 6px 0;
  font-weight: 700;
  font-size: 15px;
  line-height: 18px;
}
.subtitol {
  padding: 0 0 14px 0;
  font-weight: 300;
  font-size: 13px;
  line-height: 18px;
  color: grey;
}

.slider-text {
  text-align: left;
  padding: 0 10px 40px 0;
  font-size: 12px;
  line-height: 18px;
  color: inherit;
  transition: color 0.3s ease;
}
.slider-text span {
  display: block;
}
.client {
  color: black;
	margin: 0 0 2px 0;
}
.credits {
  color: black;
  margin: 0 6px 2px 0;
}

.credits_fotos {
  margin: 0;
  font-size: 12px;
  color: black;
}



/* ===================== NAVEGACIÓ SLIDER ===================== */

.prev-slide {
  cursor: pointer;
}

.next-slide {
   cursor: pointer;
}



.prev-slide,
.next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.0);
	color: #000;
  border: none;
  font-size: 1px;
  width: 50%;
  height: 100%;
  border-radius: 1%;
  display: flex;
  align-items: center;
  /*justify-content: center;*/
  opacity: 0.8;
  z-index: 1;
  transition: opacity 0.3s, transform 0.3s;
}

.prev-slide:hover,
.next-slide:hover {
  opacity: 0.0;
	color: white;
  font-size: 20px;
	/*background: black;
  transform: scale(1.1);*/
}

.prev-slide {
  left: 1px;
	justify-content: left;
}

.next-slide {
  right: 1px;
	justify-content:right;
}


/* /DOTS */

.slider-dots {
  display: flex;
  gap: 6px;
  justify-content: left;
  margin: 16px 0 12px 0;
}

.slider-dot {
  width: 6px;
  height: 6px;
  background-color: #c0c3d2;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.slider-dot.active {
  background-color: #1a1a1a;
  transform: scale(1.2);
}






/* ===================== INTERRUPTOR ===================== */
.interruptor-wrapper {
  display: flex;
  justify-content: flex-start;
  margin: 200px;
  font-size: 12px;
}

.interruptor img {
  width: 140px;
  height: auto;
  cursor: pointer;
}




/* ===================== DUES COLUMNES ===================== */
.dues-columnes {
  display: flex;
  flex-wrap: wrap;
  padding: 30px 80px 60px 80px;
}

.columna {
  flex: 1;
  min-width: 300px;
  line-height: 20px;
  border-left: 1px solid grey;
  padding: 0 20px;
}

/* ===================== MEDIA QUERIES ===================== */
@media (max-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }
  
}

@media (max-width: 768px) {
  .dues-columnes {
    flex-direction: column;
    padding: 30px;
  }
    .filters.scrolled {
  left: 0px; /* enganxat completament al marge esquerre */
}
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }

  .intro,
  .filters {
    padding: 10px 30px;
  }

  .filters {	  
    flex-wrap: wrap;
    justify-content: left;
    gap: 3px;
  }

  .gallery {
    grid-template-columns: repeat(1, 1fr);
    padding: 20px;
  }

  .slider-text {
    padding: 3px 0 10px;
  }

  .nav-right {
    margin-top: 20px;
  }
  .filters.scrolled {
  left: 0px; /* enganxat completament al marge esquerre */
}
	.prev-slide,
.next-slide {

  background: rgba(0, 0, 0, 0.1);
	color: #FFF;
  border: none;
  font-size: 20px;
  width: 30px;
  height: 30px;
}
}

/* ===================== LOGO ===================== */

#canviLogo {
 /* transition: opacity 0.5s ease;*/
}
#canviLogo:hover {
 /* opacity: 0.99;*/
}



/* ===================== VISTA 1 COLUMNA — FULLSCREEN PROJECTES ===================== */
/* === VISTA 1 COLUMNA: imatges centrades i 100vh (compatible amb el slider) === */

/* Assegurem que cada "slide" ocupi l'amplada del slider (per a translateX) */
.gallery.one-column .slider-wrapper .slider-image {
  flex: 0 0 10%;    /* cada slide fa 100% width del slider */
  max-width: 100%;
  box-sizing: border-box;
}
/*.gallery.one-column .slider-wrapper {
  padding-left: 200px;
}*/


/* Ajust visual de la imatge: ocupa tota l'alçada de la finestra i es manté la proporció */
.gallery.one-column .slider-image {
  display: block;
  max-height: 80vh;      /* límit d’alçada de pantalla */
  max-width: 100vw;       /* límit d’amplada de pantalla */
  width: auto;           /* que no s’estiri a lo ample */
  height: auto;          /* que decideixi automàticament */
  object-fit: contain;   /* sempre mostra la imatge sencera */
  margin: 0 auto;        /* centrat horitzontal */
  /*background-color: white;*/
}

/* Per si tens elements addicionals dins del slider, centrem-los */
.gallery.one-column .project-slider,
.gallery.one-column .slider-wrapper {
  display: flex;
  align-items: center;
  height: auto !important;
}
/* Opcional: fer que els texts apareguin centrats sota la imatge */
.gallery.one-column .titol,
.gallery.one-column .slider-text,
.gallery.one-column .slider-dots,
.gallery.one-column .premi {
  text-align: left;
}

/* ESPAIS AJUSTATS EN 1 COLUMNA */

.gallery.one-column .slider-container {
  padding: 0 !important;
  margin: 0 !important;
}

.gallery.one-column .project-slider {
  margin: 0 !important;
  padding: 0 !important;
}


.gallery.one-column .slider-wrapper {
  gap: 0 !important;        /* elimina espais interns del flex */
  margin: 0 !important;
}

.gallery.one-column .slider-image {
  margin-bottom: 10px !important;   /* ajusta l’espai sota la foto */
}

/* Textos — elimina separacions extra */
.gallery.one-column .titol,
.gallery.one-column .slider-text,
.gallery.one-column .premi,
.gallery.one-column .slider-dots {
  margin-top: 6px !important;
}


/* INFO -------------------------------- */

.columna img {
    width: 100%;
    height: auto;
    display: block;
}
