* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  font-family: "Inter", Helvetica, Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-content {
  flex: 1 0 auto;
  background-color: black;
}
.footer {
  flex-shrink: 0;
}

h2 {
  font-size: 2.5rem;
  line-height: 2.5rem;
}

h1,
h2,
h3 {
  font-weight: lighter;
  line-height: 100%;
}
h1 b {
  font-weight: bold;
}

h1 {
  font-size: 4rem;
}
h3 {
  font-size: 1.7rem;
}
a {
  text-decoration: none;
  color: inherit;
  align-items: inherit;
  gap: inherit;
}

.header-bar {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 10), rgba(0, 0, 0, 0));
  position: fixed;
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100px;
  z-index: 15;
  gap: auto;
  justify-content: space-between;
}

.header-bar .logo {
  height: 60px;
  margin: 20px;
  position: absolute;
}

.header-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  background-color: #111;
  color: white;
  padding: 40px;
  position: fixed;
  z-index: 20;
  right: -100%;
  top: 0;
  height: 100%;
  width: 50vw;
  transition: right 0.5s ease-in-out;
}

.header-display.visible {
  right: 0;
  transition: right 0.5s ease-in-out;
}

.header-display .navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: start;
}

.header-display a:hover {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.navigation {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 20px;
  margin-top: 60px;
  left: 0;
}

#toggle-button {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

#close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-outline {
  width: fit-content;
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  border-radius: 10rem;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: white;
  color: black;
}

.btn-solid {
  width: fit-content;
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  color: white;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}
.btn-solid a {
  display: inline-flex;
}

.icon-arrow {
  stroke: white;
  fill: none;
  stroke-width: 2;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide img,
.slide-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease-in-out;
  object-position: center center;
}

.slide img {
  opacity: 1;
  z-index: -2;
}

.slide img.left {
  object-position: left center;
}

.slide img.right {
  object-position: right center;
}
.slide img.vint {
  object-position: 20% center;
}
.slide img.trenta {
  object-position: 30% center;
}
.slide img.quaranta {
  object-position: 40% center;
}

.slide img.setanta {
  object-position: 70% center;
}

.slide-video {
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

.gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 50%;
  width: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85));
  pointer-events: none; /* para que no interfiera con clicks */
  z-index: 1;
}

.slide-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  bottom: 50px;
  left: 0px;
  margin: 2rem;
  color: white;
  font-size: 5rem;
  z-index: 10; /* debe ser más alto que video e imagen */
}

.nav-dots {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: opacity 0.3s;
}

.dot.active {
  background-color: white;
  opacity: 1;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  user-select: none;
}

.arrow.left {
  left: 0;
}

.arrow.right {
  right: 0;
}

.content-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3rem;
}

.project-gallery {
  background-color: black;
  color: white;
  display: flex;
  justify-content: center;
}

.project-gallery h2 {
  margin-bottom: 40px;
}

.gallery-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: start;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  aspect-ratio: 2/3;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.1);
}
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: start;
  padding: 20px;
  text-align: start;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay h3 {
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  transition-delay: 0.1s;
}

.project-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.project-card:hover .project-overlay h3,
.project-card:hover .project-overlay .project-meta {
  opacity: 1;
  transform: translateY(0);
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.meta-label {
  font-size: 0.75rem;
  color: #ccc;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 1.1rem;
  font-weight: light;
}

/* Extensión para el drawer lateral */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  background-color: #111;
  color: white;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

/* Activo (visible) */
.drawer.active {
  transform: translateX(0);
}

/* Contenido dentro del drawer */
.drawer-content {
  height: 100%;
  position: relative;
  overflow-y: scroll;
}
.drawer-header {
  width: 100%;
  min-height: 300px;
  position: relative;
  padding: 2rem;
  padding-top: 8rem;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  justify-content: end;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.8)
  );
}

.drawer-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.drawer-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.drawer-fotogrames img:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.fotogrames-carousel {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 100%;
  overflow: hidden;
}
.thumb-window {
  overflow: hidden;
  width: 920px;
}
.thumb-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.3s ease;
}
.thumb-track img {
  width: 300px; /* Ajusta el tamaño de las imágenes */
  display: flex;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0; /* Evita que las imágenes se reduzcan */

  transition: transform 0.3s ease;
}

.thumb-track img:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
  cursor: pointer;
}
.arrow {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 1rem;
  user-select: none;
}

/* Botón para cerrar */
.close-btn {
  position: fixed;
  padding: 2rem;
  top: 0;
  right: 0;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
  z-index: 19; /* Below the drawer but above other content */
  display: none; /* Hidden by default */
}

.backdrop.active {
  display: block; /* Visible when active */
}

/*serveis*/
.services {
  background-color: black;
  color: white;
}
.services .content-container {
  align-items: flex-start;
}

.title-description-side {
  display: flex;
  gap: 2rem;
  flex-direction: row;
  justify-content: space-between;
}
.title-description-side p,
.title-description-side h3 {
  width: 50%;
}

/* agenda*/

.agenda-gallery {
  padding-top: 4rem;
  background-color: black;
  color: white;
}
.agenda-gallery .content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 30px;
}

.agenda-gallery h3 {
  font-size: 24px;
}
.agenda-item {
  display: flex;
  flex-direction: column;
}
.agenda-item a {
  opacity: 100%;
  color: white;
  display: block;
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.agenda-item a:hover {
  opacity: 80%;
  transition: opacity 0.3s ease;
}

.agenda-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.agenda-item a:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.agenda-info-box {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  padding: 20px 0;
  gap: 20px;
}

.agenda-info {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 5px;
}

.agenda-tags {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding-top: 5px;
}

.agenda-tag {
  border: solid 1px white;
  border-radius: 100px;
  padding: 5px 10px;
  width: fit-content;
}

/*contacte*/
.contacte {
  background-color: black;
  color: white;
}

.contact-info {
  margin-top: 4rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.contact-info h3 {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.icon-xarxes {
  font-size: 2rem;
  margin: 0.2rem;
}

.footer {
  background-color: black;
  color: white;
  padding: 20px;
  text-align: center;
}
.footer .content-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: start;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
}
.footer .logo {
  height: 60px;
  margin: 20px;
}

#fullscreenViewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

#fullscreenViewer.active {
  display: flex !important;
  opacity: 1;
}

#fullscreenViewer img {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 0 40px #000;
  border-radius: 10px;
  object-fit: contain;
}
.fullscreen-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  padding: 2rem;
  cursor: pointer;
  z-index: 10000;
  transition: opacity 0.2s;
}
.fullscreen-close:hover {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.fullscreen-arrow {
  background: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  z-index: 10000;
  border-radius: 50%;
  transition: opacity 0.2s;
}
.fullscreen-arrow.left {
  left: 0;
}
.fullscreen-arrow.right {
  right: 0;
}
.fullscreen-arrow:hover {
  opacity: 0.5;

  transition: opacity 0.2s;
}

/* Para ocultar el visor con clase */
.fullscreen-hidden {
  display: none !important;
}

#trailerEmbed iframe {
  max-width: 100%;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  .header-display {
    width: 100vw;
    height: 100%;
  }

  .drawer {
    width: 100vw;
  }

  .footer .content-container {
    flex-direction: column;
  }
  .title-description-side {
    flex-direction: column;
  }
  .title-description-side p,
  .title-description-side h3 {
    width: 100%;
  }
}
