
/* CASA BAJIOU — VIDEO SHOWCASE */

.casa-videos {
  padding: 100px 0;
  background: #f7f6f3;
}

.casa-videos__heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 55px;
}

.casa-videos__eyebrow {
  display: block;
  margin-bottom: 15px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  color: #99866c;
}

.casa-videos__heading h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  color: #242424;
  margin-bottom: 18px;
}

.casa-videos__heading p {
  font-size: 16px;
  line-height: 1.8;
  color: #777;
}

.casa-videos__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
  max-width: 1080px;
  margin: auto;
}

.casa-videos__card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.casa-videos__visual {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: #262521;
  box-shadow: 0 12px 35px rgba(0,0,0,.10);
  transition: transform .35s ease,
              box-shadow .35s ease;
}

.casa-videos__visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .6s ease;
}

.casa-videos__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  color: #bba98f;
  letter-spacing: 3px;
  text-align: center;
}

.casa-videos__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(0,0,0,.55) 100%
  );
}

.casa-videos__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  transition: background .3s ease,
              transform .3s ease;
}

.casa-videos__number {
  position: absolute;
  bottom: 22px;
  left: 24px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 2px;
}

.casa-videos__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 3px;
  font-size: 15px;
  font-weight: 500;
}

.casa-videos__card:hover .casa-videos__visual {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(0,0,0,.18);
}

.casa-videos__card:hover img {
  transform: scale(1.045);
}

.casa-videos__card:hover .casa-videos__play {
  background: rgba(255,255,255,.30);
  transform: translate(-50%, -50%) scale(1.1);
}

.casa-videos__card:focus-visible,
.casa-modal button:focus-visible {
  outline: 3px solid #b89a6a;
  outline-offset: 4px;
}

/* MODAL */

.casa-modal[hidden] {
  display: none !important;
}

.casa-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.casa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.93);
}

.casa-modal__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 500px);
  max-height: calc(100dvh - 48px);
}

.casa-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,.7);
  font-size: 30px;
  cursor: pointer;
}

.casa-modal__player {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
}

.casa-modal__player video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 140px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
}

.casa-modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 5px 0;
  color: #fff;
}

.casa-modal__footer button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid #777;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.casa-modal__info {
  min-width: 0;
  text-align: center;
}

.casa-modal__info span {
  display: block;
  overflow-wrap: anywhere;
}

.casa-modal__info small {
  display: block;
  margin-top: 5px;
  color: #aaa;
}

html.casa-modal-open {
  overflow: hidden;
}

/* TABLET */

@media (max-width: 991px) {
  .casa-videos {
    padding: 70px 0;
  }

  .casa-videos__grid {
    gap: 16px;
  }
}

/* MOBILE */

@media (max-width: 767px) {
  .casa-videos {
    padding: 55px 0;
  }

  .casa-videos__heading {
    padding: 0 15px;
    margin-bottom: 30px;
  }

  .casa-videos__grid {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 15px;
    padding: 8px 15px 25px;
    scrollbar-width: none;
  }

  .casa-videos__grid::-webkit-scrollbar {
    display: none;
  }

  .casa-videos__card {
    flex: 0 0 78%;
    scroll-snap-align: center;
  }

  .casa-videos__play {
    width: 62px;
    height: 62px;
  }

  .casa-modal {
    padding: 12px;
  }

  .casa-modal__content {
    max-height: calc(100dvh - 24px);
  }

  .casa-modal__player video {
    max-height: calc(100dvh - 120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .casa-videos__visual,
  .casa-videos__visual img,
  .casa-videos__play {
    transition: none;
  }

  .casa-videos__card:hover .casa-videos__visual,
  .casa-videos__card:hover img {
    transform: none;
  }
}

.casa-videos__thumbnail {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.casa-videos__thumbnail[hidden],
.casa-videos__placeholder[hidden] {
  display: none !important;
}

.casa-videos__duration {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  padding: 6px 11px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.casa-videos__duration:empty {
  display: none;
}
