/* =========================================================
   POSTER SECTION
========================================================= */

.poster-section {
  position: relative;
  width: 100%;
  padding: 90px 0;
  overflow: hidden;
}

.poster-container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

/* =========================================================
   HEADER
========================================================= */

.poster-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 40px;
}

.poster-heading {
  max-width: 650px;
}

.poster-eyebrow {
  display: inline-block;
  margin-bottom: 10px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.poster-heading h2 {
  margin: 0 0 12px;

  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.poster-heading p {
  margin: 0;

  font-size: 16px;
  line-height: 1.7;
  opacity: 0.7;
}

/* =========================================================
   SEE ALL
========================================================= */

.poster-see-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 12px 18px;

  border: 1px solid currentColor;
  border-radius: 8px;

  color: inherit;
  text-decoration: none;

  font-size: 14px;
  font-weight: 600;

  white-space: nowrap;

  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.poster-see-all span {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.poster-see-all:hover {
  transform: translateY(-2px);
}

.poster-see-all:hover span {
  transform: translateX(4px);
}

/* =========================================================
   GRID
========================================================= */

.poster-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 24px;
}

/* =========================================================
   POSTER ITEM
========================================================= */

.poster-item {
  position: relative;

  aspect-ratio: 1122 / 1402;

  overflow: hidden;

  border-radius: 12px;

  cursor: pointer;

  outline: none;

  background: #eeeeee;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.poster-item:hover,
.poster-item:focus-visible {
  transform: translateY(-6px);

  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

/* =========================================================
   IMAGE
========================================================= */

.poster-image-wrapper {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: hidden;
}

.poster-image-wrapper img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition: transform 0.5s ease;
}

.poster-item:hover .poster-image-wrapper img,
.poster-item:focus-visible .poster-image-wrapper img {
  transform: scale(1.05);
}

/* =========================================================
   HOVER
========================================================= */

.poster-hover {
  position: absolute;

  inset: 0;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 10px;

  background: rgba(0, 0, 0, 0.55);

  color: #ffffff;

  opacity: 0;

  transition: opacity 0.35s ease;
}

.poster-item:hover .poster-hover,
.poster-item:focus-visible .poster-hover {
  opacity: 1;
}

.poster-view-icon {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;

  border: 1px solid rgba(255, 255, 255, 0.8);

  border-radius: 50%;

  font-size: 26px;

  transform: translateY(10px);

  transition: transform 0.35s ease;
}

.poster-view-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;

  transform: translateY(10px);

  transition: transform 0.35s ease 0.03s;
}

.poster-item:hover .poster-view-icon,
.poster-item:hover .poster-view-text,
.poster-item:focus-visible .poster-view-icon,
.poster-item:focus-visible .poster-view-text {
  transform: translateY(0);
}

/* =========================================================
   EMPTY
========================================================= */

.poster-empty {
  grid-column: 1 / -1;

  padding: 60px 20px;

  text-align: center;

  opacity: 0.6;
}

/* =========================================================
   MODAL
========================================================= */

.poster-modal {
  position: fixed;

  inset: 0;

  z-index: 99999;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 30px;

  visibility: hidden;
  opacity: 0;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.poster-modal.is-open {
  visibility: visible;
  opacity: 1;
}

/* =========================================================
   BACKDROP
========================================================= */

.poster-modal-backdrop {
  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.78);

  backdrop-filter: blur(5px);
}

/* =========================================================
   DIALOG
========================================================= */

.poster-modal-dialog {
  position: relative;

  z-index: 1;

  width: min(900px, 100%);

  max-height: calc(100vh - 60px);

  overflow: auto;

  border-radius: 14px;

  background: #ffffff;

  transform: scale(0.96);

  transition: transform 0.3s ease;
}

.poster-modal.is-open .poster-modal-dialog {
  transform: scale(1);
}

/* =========================================================
   CLOSE
========================================================= */

.poster-modal-close {
  position: absolute;

  top: 12px;
  right: 12px;

  z-index: 3;

  display: flex;

  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  border: none;

  border-radius: 50%;

  background: rgba(0, 0, 0, 0.65);

  color: #ffffff;

  font-size: 26px;
  line-height: 1;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.poster-modal-close:hover {
  background: rgba(0, 0, 0, 0.85);

  transform: rotate(90deg);
}

/* =========================================================
   MODAL CONTENT
========================================================= */

.poster-modal-content {
  display: flex;
  flex-direction: column;
}

.poster-modal-image {
  width: 100%;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 25px;

  background: #f5f5f5;
}

.poster-modal-image img {
  display: block;

  width: auto;
  max-width: 100%;

  max-height: 70vh;

  object-fit: contain;
}

/* =========================================================
   MODAL INFO
========================================================= */

.poster-modal-info {
  padding: 20px 25px 25px;
}

.poster-modal-info h3 {
  margin: 0 0 8px;

  font-size: 20px;
  line-height: 1.4;
}

.poster-modal-info time {
  display: block;

  font-size: 13px;

  opacity: 0.6;
}

/* =========================================================
   BODY LOCK
========================================================= */

body.poster-modal-open {
  overflow: hidden;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {
  .poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .poster-section {
    padding: 65px 0;
  }

  .poster-section-header {
    align-items: flex-start;

    flex-direction: column;

    margin-bottom: 30px;
  }

  .poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 16px;
  }

  .poster-modal {
    padding: 15px;
  }

  .poster-modal-dialog {
    max-height: calc(100vh - 30px);
  }

  .poster-modal-image {
    padding: 15px;
  }

  .poster-modal-info {
    padding: 16px 18px 20px;
  }
}

@media (max-width: 430px) {
  .poster-container {
    width: min(100% - 24px, 1200px);
  }

  .poster-grid {
    gap: 12px;
  }

  .poster-item {
    border-radius: 8px;
  }
}
