/* ============================================================
   carousel.css — Horizontal scroll section
   ============================================================ */

.showcase {
  background: var(--off-white);
  padding:    60px 0;
  overflow:   hidden;
  min-height: 100vh;
  display:    flex;
  flex-direction: column;
  justify-content: center;
  /* Start slightly hidden for the scroll-fade effect */
  opacity:    0;
  transition: opacity 0.5s ease-out;
}
.showcase.scrolled-in {
  opacity:    1;
}

/* ── TABS ── */
.showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 30px auto;
  padding: 0;
  width: 100%;
  max-width: var(--container);
}

.showcase-tabs {
  display: flex;
  gap:     8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.showcase-tabs::-webkit-scrollbar { display: none; }

.showcase-tab {
  padding:       8px 16px;
  background:    var(--white);
  color:         var(--gray-1);
  font-size:     13px;
  font-weight:   600;
  border-radius: 4px;
  white-space:   nowrap;
  transition:    color var(--transition);
  position:      relative;
  overflow:      hidden;
  border:        none;
  cursor:        pointer;
}

/* Text must sit above the loading bar */
.showcase-tab span {
  position: relative;
  z-index: 1;
}

/* The loading background bar */
.showcase-tab .tab-bg {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--gray-light);
  z-index: 0;
  pointer-events: none;
}

@keyframes fill-bar {
  0% { width: 0%; }
  100% { width: 100%; }
}

.showcase-tab:hover:not(.active) .tab-bg {
  width: 100%;
  transition: width 0.2s ease;
}
.showcase-tab.active .tab-bg {
  width: 0%;
  animation: fill-bar 5s linear forwards;
}
.showcase-tab:not(.active):not(:hover) .tab-bg {
  width: 0%;
  transition: none;
}

.showcase-tab:hover {
  color: var(--black);
}
.showcase-tab.active {
  color: var(--black);
}

.showcase-all {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  color: var(--black);
  white-space: nowrap;
}
.showcase-all:hover {
  background: var(--black);
  color: var(--white);
}

/* ── TRACK ── */
.showcase-track {
  display: flex;
  gap:     24px;
  /* Use calc(50% - 600px) to align perfectly with the 1200px max-width container */
  padding: 0 max(0px, calc(50% - 600px)) 48px max(0px, calc(50% - 600px));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  position: relative;
}
.showcase-track::-webkit-scrollbar { display: none; }

/* ── CARD ── */
.showcase-card {
  flex: 0 0 var(--container);
  max-width: 100vw;
  height: 640px;
  background: #242424;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  scroll-snap-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--white);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--transition);
}
.showcase-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
  pointer-events: none;
}
.showcase-card:hover {
  transform: translateY(-4px);
}

/* Inner Layout */
.sc-top {
  display: flex;
  flex: 1;
  position: relative;
  z-index: 2;
}

.sc-title-box {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  /* Apple glass effect - compact around text */
  background: rgba(30, 30, 30, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 20px;
  max-width: 480px;
  /* Prevent vertical stretching in flex parent */
  align-self: flex-start;
  height: auto;
}

.sc-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

.sc-headline {
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sc-bottom {
  padding: 40px;
  margin-top: auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.sc-massive {
  font-size: clamp(60px, 11vw, 150px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.8;
  color: var(--white);
  white-space: nowrap;
  margin-bottom: -10px;
  text-align: left;
}

/* ── HOVER ARROWS ── */
.sc-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sc-nav-btn:hover {
  background: var(--off-white);
  transform: translateY(-50%) scale(1.05);
}
.showcase-card:hover .sc-nav-btn {
  opacity: 1;
  pointer-events: auto;
}

.sc-nav-btn.prev {
  left: -24px; /* 10px overlap plus button width mechanics */
}
.showcase-card:hover .sc-nav-btn.prev {
  left: 10px;
}

.sc-nav-btn.next {
  right: -24px;
}
.showcase-card:hover .sc-nav-btn.next {
  right: 10px;
}

/* Hide arrows if there isn't a next/prev element (handled by JS class) */
.sc-nav-btn.hidden {
  display: none !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .sc-title-box { width: 100%; }
}
@media (max-width: 768px) {
  .showcase-header { padding: 0; }
  .showcase-track { padding: 0 0 24px 0; }
  .showcase-card { 
    flex: 0 0 85vw;
    min-width: 0;
    height: 480px; 
  }
  .sc-top { flex-direction: column; }
  .sc-title-box { width: 100%; padding-bottom: 0; }
  .sc-massive { font-size: clamp(40px, 12vw, 80px); }
  .sc-bottom { padding: 24px; }
}
