/* ==========================================================================
   GIULIO CUSCITO'S TIMED CARDS OPENING - HERO SHOWCASE CSS
   Reference: https://pin.it/2u4kndvRI (Timed Cards Opening on Dribbble/Pinterest)
   ========================================================================== */

.timed-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-dark);
  display: flex;
  align-items: center;
  z-index: 5;
}

/* Background layers */
.hero-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* HIGHLIGHTED & VIVID: Crisp, bright, naturally lit photography with no murky shades */
  filter: brightness(0.92) contrast(1.06) saturate(1.05);
  transform: scale(1.04);
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-bg-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Subtle Contrast Overlay: Darkens ONLY the left side underneath the typography
   so text is 100% sharp and readable, while the rest of the image (center, right, landscape)
   remains bright, highlighted, and breathtaking! */
.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(
      90deg, 
      rgba(4, 5, 9, 0.88) 0%, 
      rgba(4, 5, 9, 0.72) 30%, 
      rgba(4, 5, 9, 0.18) 56%, 
      transparent 75%
    ),
    linear-gradient(
      0deg,
      rgba(4, 5, 9, 0.72) 0%,
      transparent 25%
    );
  z-index: 2;
  pointer-events: none;
}

/* Main Hero Wrapper: Strict Two-Column Architecture */
.hero-inner {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1850px;
  margin: 0 auto;
  padding: 0 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 10;
}

/* ==========================================================================
   LEFT SIDE: CONTENT & CLEAN TYPOGRAPHY (Details Layer)
   Firmly clamped to the left ~42% width so preview cards NEVER overlap
   ========================================================================== */
.hero-details {
  width: 46%;
  min-width: 320px;
  max-width: 600px;
  position: relative;
  z-index: 15;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Category & Location Dash Tag (like the reference: - Switzerland Alps) */
.hero-place-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  opacity: 0;
}

.hero-place-box .place-dash {
  color: var(--gold-primary);
  font-size: 1rem;
  font-weight: 700;
  margin-right: 0.1rem;
}

/* Giant Bold Condensed Stacked Title — Perfectly sized to never clip words */
.hero-title-box {
  overflow: visible;
  margin-bottom: 0.15rem;
  line-height: 0.95;
}

.hero-title-1,
.hero-title-2 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.1vw, 3.8rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  display: block;
  color: #ffffff;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.85);
  transform: translateY(110%);
  opacity: 0;
  line-height: 0.95;
}

.hero-title-2 {
  color: #ffffff;
}

/* Narrative Description */
.hero-desc {
  font-size: 1rem;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.85);
  margin: 1.15rem 0 1.35rem;
  max-width: 500px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  transform: translateY(30px);
  opacity: 0;
}

/* Telemetry Badge (EXIF Info) */
.hero-exif-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0.9rem;
  background: rgba(14, 18, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 1.4rem;
  backdrop-filter: blur(12px);
  width: fit-content;
  transform: translateY(30px);
  opacity: 0;
}

.hero-exif-badge .exif-sep {
  opacity: 0.4;
}

.hero-exif-badge strong {
  color: var(--cyan-accent);
  font-weight: 600;
}

/* Action Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateY(30px);
  opacity: 0;
}

/* Circular Amber Bookmark / Favorite button (matching Dribbble reference) */
.btn-bookmark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6b76c 0%, #c4913c 100%);
  color: #0b0d13;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(230, 183, 108, 0.35);
  flex-shrink: 0;
}

.btn-bookmark:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 25px rgba(230, 183, 108, 0.55);
}

.btn-bookmark.active {
  background: #ffffff;
  color: #e6b76c;
}

/* Discover Location Pill Button */
.btn-hero-explore {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-hero-explore:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  transform: translateY(-3px);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-hero-story {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1rem;
  color: rgba(244, 246, 252, 0.75);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.btn-hero-story:hover {
  color: var(--gold-light);
}

/* ==========================================================================
   RIGHT SIDE: TIMED CARDS OPENING DECK
   Anchored to the right side with strict bounds so it NEVER encroaches on left text
   ========================================================================== */
.hero-cards-wrapper {
  position: relative;
  width: 54%;
  flex: 1;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden; /* Strictly prevent any card from showing outside on the left */
  z-index: 15;
  padding: 1.5rem 0 1.5rem 0.5rem;
  margin-left: 2rem;
  mask-image: linear-gradient(to right, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 82%, transparent 100%);
}

.cards-deck {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  position: relative;
  will-change: transform;
}

/* Individual Preview Card — Portrait oriented like the reference */
.preview-card {
  position: relative;
  width: 195px;
  height: 300px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background-color: #0d1018;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.preview-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(230, 183, 108, 0.85);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(230, 183, 108, 0.35);
}

.preview-card.card-active {
  border: 2px solid var(--gold-primary);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 35px var(--gold-glow);
  transform: translateY(-4px) scale(1.02);
}

/* Fixed Image Framing: Center & proper crop so subjects are never cut off */
.preview-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-card:hover .preview-card-img {
  transform: scale(1.08);
}

.preview-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 8, 12, 0.92) 90%);
  z-index: 2;
  transition: opacity 0.3s ease;
}

.preview-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.15rem 1rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-sizing: border-box;
  overflow: hidden;
}

.preview-card-region {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.preview-card-region::before {
  content: "—";
  opacity: 0.7;
}

.preview-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  hyphens: none;
}

/* ==========================================================================
   BOTTOM CONTROLS & TIMED PROGRESS INDICATOR
   Left side: Circular prev/next buttons
   Right side: Progress line + Slide Counter
   ========================================================================== */
.hero-bottom-bar {
  position: absolute;
  bottom: 2rem;
  left: 0;
  width: 100%;
  padding: 0 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  pointer-events: auto;
}

.hero-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Circular Translucent Arrow Buttons matching reference */
.hero-ctrl-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(14, 18, 28, 0.45);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-ctrl-circle:hover {
  background: rgba(230, 183, 108, 0.25);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 0 18px var(--gold-glow);
}

.hero-ctrl-circle:active {
  transform: scale(0.95);
}

/* Right Section of Bottom Bar */
.hero-bottom-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-indicator-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.indicator-track {
  width: 220px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.indicator-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  transition: width 0.1s linear;
}

.indicator-label {
  display: flex;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.indicator-status {
  color: var(--cyan-accent);
}

.hero-slider-counter {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.counter-current {
  color: #ffffff;
  font-size: 1.6rem;
}

.counter-divider,
.counter-total {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN FOR TIMED CARDS OPENING
   ========================================================================== */
@media (max-width: 1400px) {
  .hero-inner {
    padding: 0 3rem;
    gap: 2rem;
  }
  .hero-bottom-bar {
    padding: 0 3rem;
  }
  .preview-card {
    width: 178px;
    height: 268px;
  }
  .hero-details {
    width: 42%;
  }
  .hero-cards-wrapper {
    width: 55%;
  }
}

@media (max-width: 1024px) {
  .hero-inner {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5rem;
    gap: 1.5rem;
  }
  .hero-details {
    width: 100%;
    max-width: 100%;
    padding-top: 0;
  }
  .hero-cards-wrapper {
    width: 100%;
    height: auto;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .hero-cards-wrapper::-webkit-scrollbar {
    display: none;
  }
  .preview-card {
    width: 150px;
    height: 220px;
  }
  .hero-bottom-bar {
    bottom: 1rem;
    padding: 0 2rem;
  }
  .indicator-track {
    width: 140px;
  }
}

@media (max-width: 768px) {
  .hero-title-1,
  .hero-title-2 {
    font-size: 2.8rem;
  }
  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 1rem 0;
  }
  .hero-exif-badge {
    display: none;
  }
  .hero-bottom-bar {
    padding: 0 1.5rem;
    bottom: 0.75rem;
  }
  .hero-bottom-right {
    gap: 1rem;
  }
  .indicator-track {
    width: 90px;
  }
  .hero-ctrl-circle {
    width: 38px;
    height: 38px;
  }
}
