:root {
  --bg: #ecf2f2;
  --ink: #031a47;
  --line: #031a47;

  --shell-width: 1000px;
  --article-width: 1000px;
  --topbar-width: 1000px;

  --logo-width: 96px;
  --line-thickness: 4px;
  --row-height: 50px;

  --font-main: Arial, Helvetica, sans-serif;

  --topbar-size: 1rem;
  --section-size: 1.15rem;
  --title-size: 1rem;
  --meta-size: 1rem;
  --body-size: 1rem;
  --site-size: 1rem;

  --top-space: 85px;
  --bottom-space: 100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.project-page {
  width: 100%;
  min-height: 100vh;
}

.project-shell {
  width: min(100%, var(--shell-width));
  margin: 0 auto;
  padding: var(--top-space) 0 var(--bottom-space);
}

/* capçalera superior */
.topbar {
  width: var(--topbar-width);
  margin: 0 auto 50px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.topbar-logo-link {
  flex: 0 0 auto;
  text-decoration: none;
}

.topbar-logo {
  width: var(--logo-width);
}

.topbar-text {
  margin-left: 25px;
  flex: 1;
  font-size: var(--topbar-size);
  line-height: 1.2;
  letter-spacing: 0;
  /* text-transform: uppercase; */
  transform: translateY(-20px);
  white-space: pre-line;  
}

/* columna central */
.project-article {
  width: var(--article-width);
  margin: 0 auto;
}

/* per poder fer el text més estret al mòbil */
  .project-article p,
  .project-article h1 {
	width: 100%;
	margin-left: 0%;
	margin-right: 0%;
  } 

.project-heading {
  margin: 0 0 28px;
}

.project-heading > * {
  margin: 0;
}

.project-section-title,
.project-title {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--row-height);
  padding: 0;
}

.project-section-title {
  font-size: var(--section-size);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.project-title {
  font-size: var(--title-size);
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.project-section-title::after,
.project-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--line-thickness);
  background: var(--line);
  pointer-events: none;
}

/* les línies del bloc de títol no han d’ocupar espai */
.project-heading > .rule {
  display: none;
}

.rule {
  width: 100%;
  height: var(--line-thickness);
  background: var(--line);
  margin: 0;
}

.project-meta {
  margin-top: 25px;
}

.project-meta p {
  margin: 0;
  font-size: var(--meta-size);
  font-weight: 700;
  line-height: 1.5;
}

.project-text {
  margin: 0 0 30px;
}

.project-text p,
.gallery-item p {
  margin: 0 0 18px;
  font-size: var(--body-size);
  font-weight: 700;
  line-height: 1.5;
}

.project-text p:last-child {
  margin-bottom: 0;
}

.project-site {
  margin-top: 14px;
}

.project-site-link {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--site-size);
  font-weight: 700;
  line-height: 1;
  text-decoration: underline;
}

.project-site-link:hover,
.project-site-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* galeria */
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 70px 0 50px;
}

.gallery-item {
  margin: 5px 0 5px 0;
  width: 100%;
}

.gallery-item--logo {
  margin-bottom: 8px;
}

.gallery-image {
  width: 100%;
  height: auto;
}

.gallery-image--logo {
  width: 72%;
  max-width: 230px;
}

.rule--bottom {
  margin: 0;
}

.gallery-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border: 0;
  margin: 0;
  /* margin-bottom: 3px;   */
}

.gallery-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* transform: translateX(-1%); */
  border: 0;
  margin: 0;
  display: block;
}

.gallery-pdf-wrapper {
  width: 100%;
  height: 720px; /* pots ajustar segons el disseny */
  position: relative;
}

.gallery-pdf {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.pc {
  display: block;
}

.mobile {
  display: none;
}


@media (max-width: 1920px) {
:root {
  --top-space: 70px;
  --bottom-space: 90px;
}

/* capçalera superior */
.topbar {
  margin: 0 auto 25px;
}

}


/* mòbil */
@media (max-width: 768px) {
  :root {
    --shell-width: 100%;
    --article-width: 100%;
    --topbar-width: 100%;

    --logo-width: 76px;
    --line-thickness: 4px;
    --row-height: 40px;

    --topbar-size: 0.75rem;
    --section-size: 1rem;
    --title-size: 0.9rem;
    --meta-size: 0.9rem;
    --body-size: 0.9rem;
    --site-size: 0.9rem;

    --top-space: 50px;
    --bottom-space: 50px;
  }

  .project-shell {
    padding: var(--top-space) 0 var(--bottom-space);
  }

  .topbar {
    margin-bottom: 28px;
    gap: 14px;
	width: 90%;
	margin-left: 5%;
	margin-right: 5%;	
  }

  .topbar-text {
    line-height: 1.2;
    margin-left: 9px;
    transform: translateY(-14px);
  }

  .project-article {
    width: 100%;
  }

  .project-text p,
  .gallery-item p  {
    line-height: 1.22;
  }
  
  .project-article p,
  .project-article h1,
  .rule--bottom   {
	width: 90%;
	margin-left: 5%;
	margin-right: 5%;	
  }    

.gallery-item {
  margin: 1px 0 1px 0;
  width: 100%;
}  

  .project-gallery {
    gap: 6px;
    margin: 50px 0 30px;
  }

  .gallery-image--logo {
    width: 78%;
    max-width: 240px;
  }

  .project-meta p {
    line-height: 1.2;
  }
  
.gallery-pdf-wrapper {
  height: 640px;
}

  .pc {
    display: none;
  }

  .mobile {
    display: block;
  }  
}