/* ===================================================================
   film-cards.css — home page film carousel + flip cards
   Covers: category labels, movie grid, scroll stage/arrows, flip card
   (front/back), back tags, and streaming service logos.
   Includes its own responsive (mobile) rules.
   Shared variables/reset live in global.css
   =================================================================== */

/* ── FILM CATEGORY LABEL ── */
.films-section { padding: 0 48px 80px; }
.category-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  border-left: 3px solid var(--orange);
  padding-left: 12px;
  margin-bottom: 28px;
}
.category-block { margin-bottom: 60px; }

/* ── MOVIE GRID ── */
.movie-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.movie-grid::-webkit-scrollbar { display: none; }
.movie-grid .flip-card {
  flex: 0 0 210px;
}
/* ── SCROLL STAGE ── */
.scroll-stage {
  position: relative;
  display: flex;
  align-items: center;
}
.movie-grid.scroll-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
  padding: 8px 0 16px;
  flex: 1;
}
.movie-grid.scroll-row::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.movie-grid.scroll-row .flip-card {
  flex: 0 0 210px;
}
/* Arrows */
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  width: 80px;
  height: 80px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}
.scroll-arrow::before {
  content: '';
  display: block;
  width: 63px;
  height: 63px;
  border-top: 4px solid #fff;
  border-right: 4px solid #fff;
  border-radius: 5px;
}
.scroll-arrow-left  { left: 8px; }
.scroll-arrow-left::before  { transform: rotate(-135deg); margin-left: 20px; }
.scroll-arrow-right { right: 8px; }
.scroll-arrow-right::before { transform: rotate(45deg); margin-right: 20px; }
.scroll-arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }

/* ── FLIP CARD ── */
.flip-card {
  height: 320px;
  perspective: 1000px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
}
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }

.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
/* Disable pointer events on whichever face is hidden */
.flip-back { pointer-events: none; }
.flip-card:hover .flip-front { pointer-events: none; }
.flip-card:hover .flip-back  { pointer-events: auto; }

/* FRONT */
.flip-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.poster-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s;
}
.flip-card:hover .poster-bg { transform: scale(1.03); }
.poster-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 25%;
  background: linear-gradient(to top, rgba(16,19,62,0.92), transparent);
}
.front-info {
  position: relative;
  z-index: 2;
  padding: 16px;
}

/* Front title: Montserrat SemiBold, ALL CAPS */
.front-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.front-year {
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 600;
  margin-top: 3px;
}

/* Role badge: orange accent */
.front-role-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(245,154,77,0.55);
  color: var(--white);
}

/* BACK */
.flip-back {
  background: var(--navy);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Back title: Montserrat SemiBold, ALL CAPS */
.back-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.back-year-genre {
  font-size: 0.72rem;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.back-divider {
  width: 30px;
  height: 2px;
  background: var(--orange);
  margin-bottom: 10px;
  border-radius: 1px;
}
.back-summary {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.55;
  margin-bottom: 10px;
  flex: 1;
  overflow: hidden;
}
.back-detail {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
  line-height: 1.4;
}
.back-detail strong {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}
/* ── BACK TAGS: Trailer / Service Icons / Coming Soon ── */
.back-tags {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.back-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-block;
}
.back-tag.trailer {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.back-tag.trailer::before {
  content: '▶';
  font-size: 0.5rem;
  color: var(--orange);
}
.back-tag.coming-soon {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: default;
}

/* ── SERVICE LOGO CIRCLES ── */
.service-logos {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}
/* 5 logos → single row, slightly smaller to fit */
.service-logos.logos-five {
  flex-wrap: nowrap;
  gap: 5px;
}
.service-logos.logos-five .service-logo-link,
.service-logos.logos-five .service-logo-link img {
  width: 30px;
  height: 30px;
}
/* 6+ logos → 4-column grid */
.service-logos.logos-grid {
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: repeat(4, 36px);
}
.service-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.15s;
}
.service-logo-link:hover { transform: scale(1.1); opacity: 0.85; }
.service-logo-link img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  display: block;
}
.service-logo-link .svc-initial {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2px;
}
.service-logo-link .svc-initial {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .films-section  { padding: 0 0 60px; }
  .category-label { margin-left: 20px; }
  .scroll-arrow   { display: none; }
  /* Tap-to-flip on touch */
  .flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
}
