/**
 * DaysAndDates.com - Editorial Hero Story Slider Styles
 * High-Performance, Luxury Magazine Slider for the Hero Visual Column
 * Inspired by Apple Newsroom, Linear, and The New York Times Magazine
 */

/* ==========================================================================
   1. Slider Shell & Frame
   ========================================================================== */
.hero-story-slider {
  position: relative;
  width: 100%;
  margin-left: auto;
  height: 530px;
  min-height: 520px;
  max-height: 545px;
  border-radius: var(--radius-xl, 28px);
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
  transform: none !important;
}

.hero-story-slider:hover {
  box-shadow: 0 28px 65px -10px rgba(0, 0, 0, 0.55),
              0 0 28px rgba(245, 158, 11, 0.2),
              0 0 0 1px rgba(245, 158, 11, 0.35);
}

/* Ensure Swiper wrappers and slides match height */
.hero-story-slider .swiper-wrapper {
  height: 100%;
  align-items: stretch;
}

.hero-story-slider .swiper-slide {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Base Spotlight Card within the Slider - Flat Luxury, Always Fills 100% of Slider Shell */
.hero-story-slider .hero-spotlight-card {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: clamp(1.25rem, 1.5vw, 1.85rem) clamp(1.25rem, 1.5vw, 1.85rem) 1.25rem clamp(1.25rem, 1.5vw, 1.85rem);
  background: linear-gradient(145deg, rgba(11, 18, 34, 0.97) 0%, rgba(18, 28, 50, 0.95) 100%);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl, 28px);
  transform: none !important;
  box-sizing: border-box !important;
}

/* Multi-layer Cinematic Scrim for High-Contrast Editorial Legibility */
.hero-story-slider .hero-spotlight-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(7, 10, 20, 0.65) 0%,
      rgba(7, 10, 20, 0.22) 22%,
      rgba(7, 10, 20, 0.65) 55%,
      rgba(4, 7, 14, 0.98) 100%
    ),
    radial-gradient(
      circle at 85% 15%,
      rgba(245, 158, 11, 0.16) 0%,
      transparent 55%
    );
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hero-story-slider:hover .hero-spotlight-shade {
  background:
    linear-gradient(
      180deg,
      rgba(7, 10, 20, 0.58) 0%,
      rgba(7, 10, 20, 0.18) 22%,
      rgba(7, 10, 20, 0.60) 55%,
      rgba(4, 7, 14, 0.98) 100%
    ),
    radial-gradient(
      circle at 85% 15%,
      rgba(245, 158, 11, 0.20) 0%,
      transparent 55%
    );
}

/* ==========================================================================
   3. Modern Image Handling & Ken Burns Cinematic Zoom
   ========================================================================== */
.hero-story-slider .hero-spotlight-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-story-slider .hero-spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1);
  will-change: transform;
  transform-origin: center center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-story-slider .swiper-slide-active .hero-spotlight-media img,
.hero-story-slider .hero-spotlight-media img.is-active-ken-burns {
  animation: heroKenBurnsZoom 6.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.hero-story-slider .swiper-slide:not(.swiper-slide-active) .hero-spotlight-media img {
  animation: none;
  transform: scale(1);
}

@keyframes heroKenBurnsZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.06);
  }
}

/* ==========================================================================
   4. Editorial Typography & Content Hierarchy
   ========================================================================== */
.hero-story-slider .spotlight-header {
  position: relative;
  z-index: 10;
}

.hero-story-slider .hero-spotlight-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 9.4rem;
}

.hero-story-slider .spotlight-title {
  color: #ffffff;
  font-size: clamp(1.4rem, 1.6vw, 1.95rem);
  line-height: 1.18;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-story-slider .spotlight-desc {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  font-size: 0.925rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-story-slider .spotlight-impact-callout {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-md, 12px) var(--radius-md, 12px) 0;
  color: rgba(255, 255, 255, 0.95);
  padding: 0.55rem 0.9rem;
  font-size: 0.825rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Staggered Editorial Reveal for Active Slide Content */
.hero-story-slider .swiper-slide-active .hero-spotlight-kicker {
  animation: editorialSlideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-story-slider .swiper-slide-active .spotlight-title {
  animation: editorialSlideUp 0.65s 0.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-story-slider .swiper-slide-active .spotlight-desc {
  animation: editorialSlideUp 0.75s 0.10s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-story-slider .swiper-slide-active .spotlight-impact-callout {
  animation: editorialSlideUp 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes editorialSlideUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   5. Spotlight Footer & Control Clearance
   ========================================================================== */
.hero-story-slider .spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-right: 255px;
  position: relative;
  z-index: 10;
  margin-top: auto;
  padding-top: 0.75rem;
}

.hero-story-slider .spotlight-footer-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.hero-story-slider .spotlight-cta-btn {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-pill, 9999px);
  background: var(--gradient-logo-primary, linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%));
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.hero-story-slider .spotlight-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6), 0 0 16px rgba(79, 70, 229, 0.35);
  color: #ffffff;
}

.hero-story-slider .spotlight-cta-btn:active {
  transform: translateY(0);
}

.hero-story-slider .celebrated-in-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hero-story-slider .country-pill-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill, 9999px);
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

/* ==========================================================================
   6. Graceful Fallback if JavaScript is Disabled
   ========================================================================== */
.hero-story-slider:not(.swiper-initialized) .swiper-wrapper {
  display: block !important;
}

.hero-story-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) {
  display: none !important;
}

.hero-story-slider:not(.swiper-initialized) .hero-slider-controls {
  display: none !important;
}

/* ==========================================================================
   7. Responsive Adaptations (Tablet 768px & Mobile 390x844)
   ========================================================================== */
@media (max-width: 991.98px) {
  .hero-story-slider {
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    height: 490px;
    min-height: 490px;
    max-height: 490px;
    padding: 0 !important;
  }

  .hero-story-slider .hero-spotlight-card {
    width: 100% !important;
    height: 100% !important;
    padding: 1.35rem 1.25rem 1.15rem 1.25rem;
  }

  .hero-story-slider .spotlight-footer {
    padding-right: 235px;
  }
}

@media (max-width: 575.98px) {
  .hero-story-slider {
    max-width: 100%;
    height: 470px;
    min-height: 450px;
    max-height: 495px;
    padding: 0 !important;
  }

  .hero-story-slider .hero-spotlight-card {
    width: 100% !important;
    height: 100% !important;
    padding: 1.15rem 1rem 1.15rem 1rem;
  }

  .hero-story-slider .spotlight-title {
    font-size: 1.22rem;
    line-height: 1.22;
    margin-bottom: 0.4rem;
  }

  .hero-story-slider .spotlight-desc {
    font-size: 0.835rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    margin-bottom: 0.55rem;
  }

  .hero-story-slider .spotlight-impact-callout {
    font-size: 0.74rem;
    padding: 0.4rem 0.65rem;
    margin-bottom: 0.5rem;
  }

  .hero-story-slider .spotlight-footer {
    padding-top: 0.5rem;
    margin-top: auto;
    padding-right: 140px;
    justify-content: flex-start;
  }

  .hero-story-slider .spotlight-footer-left {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-story-slider .spotlight-cta-btn {
    padding: 0.36rem 0.85rem;
    font-size: 0.78rem;
  }

  .hero-story-slider .celebrated-in-tags {
    display: none !important;
  }
}

@media (max-width: 375px) {
  .hero-story-slider {
    height: 460px;
    min-height: 440px;
  }

  .hero-story-slider .hero-spotlight-card {
    padding: 1rem 0.85rem 0.95rem 0.85rem;
  }

  .hero-story-slider .spotlight-title {
    font-size: 1.15rem;
  }

  .hero-story-slider .spotlight-footer {
    padding-right: 120px;
  }

  .hero-story-slider .spotlight-cta-btn {
    padding: 0.32rem 0.72rem;
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   8. Accessibility: Prefers Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-story-slider .swiper-slide-active .hero-spotlight-media img,
  .hero-story-slider .hero-spotlight-media img.is-active-ken-burns {
    animation: none !important;
    transform: scale(1) !important;
  }

  .hero-story-slider .swiper-slide-active .hero-spotlight-kicker,
  .hero-story-slider .swiper-slide-active .spotlight-title,
  .hero-story-slider .swiper-slide-active .spotlight-desc,
  .hero-story-slider .swiper-slide-active .spotlight-impact-callout {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

#heroStorySlider .hero-spotlight-media {
    background: #ff00ff !important;
}

#heroStorySlider .hero-spotlight-media img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    animation: none !important;
}

#heroStorySlider .hero-spotlight-shade {
    opacity: 0.25 !important;
}



/* ==========================================================================
   Hero Slider Navigation Controls
   ========================================================================== */

#heroStorySlider .hero-slider-controls {
    position: absolute;
    left: auto;
    right: 18px;
    bottom: 18px;
    z-index: 30;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;

    width: auto;
    max-width: calc(100% - 36px);
    min-height: 42px;

    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 30px;

    background: rgba(8, 13, 26, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    visibility: visible;
    opacity: 1;
}

#heroStorySlider .hero-slider-prev,
#heroStorySlider .hero-slider-next,
#heroStorySlider #heroSliderToggleBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;

    width: 30px;
    height: 30px;
    padding: 0;

    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;

    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#heroStorySlider .hero-slider-prev:hover,
#heroStorySlider .hero-slider-next:hover,
#heroStorySlider #heroSliderToggleBtn:hover {
    background: #d99b32;
    color: #111827;
    transform: scale(1.06);
}

#heroStorySlider .hero-slider-prev i,
#heroStorySlider .hero-slider-next i,
#heroStorySlider #heroSliderToggleBtn i {
    font-size: 13px;
    line-height: 1;
}

#heroStorySlider .hero-slider-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
}

#heroStorySlider .hero-slider-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    margin: 0;
    background: rgba(255, 255, 255, 0.55);
    opacity: 1;
}

#heroStorySlider .hero-slider-pagination .swiper-pagination-bullet-active {
    width: 17px;
    border-radius: 10px;
    background: #fbbf24;
}

#heroStorySlider .hero-slider-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    color: #fff;
    font-size: 11px;
    font-family: monospace;
}

#heroStorySlider .hero-slider-counter .counter-separator {
    color: rgba(255, 255, 255, 0.45);
}

#heroStorySlider .hero-slider-progress {
    width: 35px;
    height: 3px;
    overflow: hidden;
    flex: 0 0 35px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.25);
}

#heroStorySlider #heroSliderProgressBar {
    width: 0%;
    height: 100%;
    background: #fbbf24;
    border-radius: inherit;
    transition: width 0.1s linear;
}

#heroStorySlider .hero-slider-controls button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    #heroStorySlider .hero-slider-controls {
        right: 10px;
        bottom: 12px;
        gap: 6px;
        padding: 6px 8px;
        max-width: calc(100% - 20px);
    }
}
