/* ================================================================
   AbdulCineworks Portfolio — Netflix-Style Slider  v2
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500&display=swap');

/* ── RESET ── */
.acw-portfolio-section *,
.acw-portfolio-section *::before,
.acw-portfolio-section *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================================================================
   SECTION
   ================================================================ */
.acw-portfolio-section {
  margin-bottom: 60px;
}

.acw-section-header {
  margin-bottom: 18px;
}

.acw-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(24px, 3.5vw, 42px);
  letter-spacing: 0.06em;
  color: #f0ede6;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 4px;
}

.acw-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0.18), transparent);
}

.acw-section-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(240,237,230,0.38);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ── FILTER BAR ── */
.acw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.acw-filter-btn {
  padding: 5px 16px;
  border-radius: 40px;
  border: 1px solid rgba(255,255,255,0.16);
  background: transparent;
  color: rgba(240,237,230,0.55);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.acw-filter-btn:hover { border-color: rgba(232,201,122,0.5); color: #e8c97a; }

.acw-filter--active {
  background: #e8c97a !important;
  border-color: #e8c97a !important;
  color: #080808 !important;
  font-weight: 500 !important;
}

/* ================================================================
   SLIDER OUTER WRAP
   Holds the overflow-hidden viewport + the arrows positioned on top
   ================================================================ */
.acw-slider-wrap {
  position: relative;
  /* Vertical padding creates breathing room so scaled cards
     are not clipped — arrows are absolutely positioned inside */
  padding-top: 30px;
  padding-bottom: 30px;
  margin-top: -30px;
  margin-bottom: -30px;
}

/* ================================================================
   ARROWS
   ================================================================ */
.acw-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 44px;
  height: 88px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.acw-slider__arrow svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
  flex-shrink: 0;
}

.acw-slider__arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

/* Edge style — Netflix gradient overlay */
.acw-arrow-style--edge .acw-slider__arrow--prev {
  left: 0;
  background: linear-gradient(to right, rgba(8,8,8,0.9) 0%, transparent 100%);
  border-radius: 4px 0 0 4px;
}
.acw-arrow-style--edge .acw-slider__arrow--next {
  right: 0;
  background: linear-gradient(to left, rgba(8,8,8,0.9) 0%, transparent 100%);
  border-radius: 0 4px 4px 0;
}
.acw-arrow-style--edge .acw-slider__arrow svg {
  stroke: #f0ede6;
  fill: none;
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.acw-arrow-style--edge .acw-slider__arrow:not(:disabled):hover {
  background: linear-gradient(to right, rgba(8,8,8,1) 0%, rgba(8,8,8,0.2) 100%);
}
.acw-arrow-style--edge .acw-slider__arrow--next:not(:disabled):hover {
  background: linear-gradient(to left, rgba(8,8,8,1) 0%, rgba(8,8,8,0.2) 100%);
}

/* Outside style — round buttons */
.acw-arrow-style--outside .acw-slider__arrow--prev { left: -52px; }
.acw-arrow-style--outside .acw-slider__arrow--next { right: -52px; }
.acw-arrow-style--outside .acw-slider__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(232,201,122,0.5);
  background: rgba(0,0,0,0.6);
}
.acw-arrow-style--outside .acw-slider__arrow svg {
  stroke: #e8c97a;
  fill: none;
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 18px;
  height: 18px;
}
.acw-arrow-style--outside .acw-slider__arrow:not(:disabled):hover {
  background: rgba(232,201,122,0.15);
}

/* ================================================================
   SLIDER VIEWPORT
   overflow:hidden on x only — but we CANNOT set overflow-y:visible
   when overflow-x is hidden (browser ignores it).
   Solution: use a clip-path trick via a child wrapper.
   ================================================================ */
.acw-slider {
  /* This element clips horizontally */
  overflow: hidden;
  position: relative;
  /* Extra vertical clip padding so scaled cards show above/below */
  margin-top: -30px;
  margin-bottom: -30px;
  padding-top: 30px;
  padding-bottom: 30px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
}

.acw-slider.is-dragging { cursor: grabbing; }

/* ================================================================
   TRACK  — the scrollable row of cards
   ================================================================ */
.acw-track {
  display: flex;              /* horizontal row — THIS is the key fix */
  flex-direction: row;        /* explicit */
  flex-wrap: nowrap;          /* never wrap to next line */
  list-style: none;
  padding: 0;
  margin: 0;
  /* Width will be auto based on flex children */
  transition: transform 0.46s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.acw-track.no-transition {
  transition: none !important;
}

/* ================================================================
   SLIDE  — individual list items (flex children)
   ================================================================ */
.acw-slide {
  /* 
    Width is set by JS as inline style: style="width:Xpx; padding: 0 Ypx"
    The CSS fallback below ensures something shows even before JS runs.
    --acw-cols defaults to 4 visible cards.
  */
  flex: 0 0 auto;             /* do NOT grow or shrink */
  width: calc(100% / var(--acw-cols, 4));
  padding: 0 var(--acw-half-gap, 5px);
  position: relative;
  z-index: 1;
  /* Delay z-index change so card has time to scale before going under */
  transition: z-index 0s 0.2s;
}

.acw-slide:hover,
.acw-slide:focus-within {
  z-index: 20;
  transition: z-index 0s 0s;
}

.acw-slide--hidden {
  opacity: 0.15;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ================================================================
   FILM CARD
   ================================================================ */
.acw-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background: #111;
  cursor: pointer;
  text-decoration: none;
  width: 100%;              /* fill the slide padding-box */

  transform-origin: center center;
  transition:
    transform 0.30s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.30s ease;
  will-change: transform;
}

/* First/last cards scale from their outer edge */
.acw-slide:first-child .acw-card { transform-origin: left center; }
.acw-slide:last-child  .acw-card { transform-origin: right center; }

/* Landscape aspect ratio */
.acw-card--landscape { aspect-ratio: 16 / 10; }

/* Portrait aspect ratio */
.acw-card--portrait  { aspect-ratio: 2 / 3; }

/* ── HOVER SCALE ── */
.acw-card:hover,
.acw-card:focus-visible {
  transform: scale(1.2);
  box-shadow: 0 16px 48px rgba(0,0,0,0.8), 0 4px 14px rgba(0,0,0,0.5);
}

/* ── THUMBNAIL ── */
.acw-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease, transform 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.acw-card__thumb-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1c1c1c 0%, #2a2a2a 50%, #1c1c1c 100%);
  z-index: 1;
}

/* ── BACKGROUND VIDEO ── */
.acw-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 2;
  pointer-events: none;
}

/* ── OVERLAY ── */
.acw-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.12) 45%,
    transparent 70%
  );
  transition: background 0.35s ease;
}

/* ── YEAR PILL ── */
.acw-card__year {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: rgba(240,237,230,0.75);
  background: rgba(0,0,0,0.55);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  text-transform: uppercase;
  transition: opacity 0.25s ease;
}

/* ── AWARD BADGE ── */
.acw-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

.acw-badge-icon {
  width: 28px;
  height: 28px;
  fill: #e8c97a;
  opacity: 0.9;
  display: block;
}

/* ── PLAY BUTTON ── */
.acw-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 5;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}

.acw-card__play svg {
  width: 17px;
  height: 17px;
  fill: #fff;
  margin-left: 3px;
}

/* ── CARD BODY ── */
.acw-card__body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.acw-card__genre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e8c97a;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease 0.04s, transform 0.22s ease 0.04s;
}

.acw-card__genre::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1.5px;
  background: #e8c97a;
  flex-shrink: 0;
}

.acw-card__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(13px, 1.6vw, 22px);
  letter-spacing: 0.04em;
  color: #f0ede6;
  line-height: 1;
  text-transform: uppercase;
}

.acw-card__meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 300;
  color: rgba(240,237,230,0.45);
  letter-spacing: 0.04em;
}

/* ================================================================
   HOVER STATE
   ================================================================ */
.acw-card:hover .acw-card__video,
.acw-card:focus-visible .acw-card__video     { opacity: 1; }

.acw-card:hover .acw-card__thumb,
.acw-card:focus-visible .acw-card__thumb     { opacity: 0.1; transform: scale(1.05); }

.acw-card:hover .acw-card__overlay,
.acw-card:focus-visible .acw-card__overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.55) 50%,
    rgba(0,0,0,0.2) 100%
  );
}

.acw-card:hover .acw-card__play,
.acw-card:focus-visible .acw-card__play   { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.acw-card:hover .acw-card__genre,
.acw-card:focus-visible .acw-card__genre  { opacity: 1; transform: translateY(0); }

.acw-card:hover .acw-card__year,
.acw-card:focus-visible .acw-card__year   { opacity: 0; }

/* ================================================================
   DOT INDICATORS
   ================================================================ */
.acw-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 18px;
}

.acw-dot {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.18);
  transition: background 0.3s ease, width 0.3s ease;
}

.acw-dot--active {
  background: #e8c97a;
  width: 36px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .acw-arrow-style--outside .acw-slider__arrow--prev { left: -6px; }
  .acw-arrow-style--outside .acw-slider__arrow--next { right: -6px; }
}

@media (max-width: 768px) {
  .acw-slider__arrow { width: 34px; height: 64px; }
  .acw-card:hover,
  .acw-card:focus-visible { transform: scale(1.1); }
}

@media (max-width: 480px) {
  .acw-slider__arrow { display: none; }
  .acw-card:hover,
  .acw-card:focus-visible { transform: scale(1.04); }
}
