/* ==========================================================
   EXHIBITIO — HERO SLIDER
   File: inc/blocks/hero-slider/style.css

   Features:
   - Swiper compatible
   - Fantasy author homepage layout
   - Customizer font family integration
   - Customizer font weight integration
   - Responsive design
   - Background positioning
   - Overlay support
========================================================== */

/* ==========================================================
   1. HERO SLIDER ROOT
========================================================== */

.hero-slider {
  --hero-height: 70vh;
  --hero-text: #f8f4ee;
  --hero-teal: #087b8c;

  /* Typography — connected to Exhibitio Customizer */
  --hero-body-family: var(--exhibitio-body-font, inherit);
  --hero-heading-family: var(--exhibitio-heading-font, inherit);

  --hero-body-weight: var(
    --exhibitio-body-font-weight,
    var(--exhibitio-body-weight, 400)
  );

  --hero-h1-weight: var(
    --exhibitio-h1-font-weight,
    var(--exhibitio-h1-weight, 400)
  );

  --hero-h3-weight: var(
    --exhibitio-h3-font-weight,
    var(--exhibitio-h3-weight, 400)
  );

  --hero-h4-weight: var(
    --exhibitio-h4-font-weight,
    var(--exhibitio-h4-weight, 400)
  );

  position: relative;
  width: 100%;
  height: var(--hero-height);
  min-height: 0;
  overflow: hidden;
  isolation: isolate;

  background: #0c2b3d;
  color: var(--hero-text);

  font-family: var(--hero-body-family);
  font-weight: var(--hero-body-weight);
}

.hero-slider,
.hero-slider * {
  box-sizing: border-box;
}

/* ==========================================================
   2. SWIPER STRUCTURE
========================================================== */

.hero-slider .swiper-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: stretch;
}

.hero-slider .swiper-slide {
  position: relative;
  display: flex;
  flex: 0 0 100%;

  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
  min-width: 0;

  overflow: hidden;

  background-color: #0c2b3d;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ==========================================================
   3. BACKGROUND POSITIONING
========================================================== */

.hero-slider .swiper-slide.position-left {
  background-position: left center;
}

.hero-slider .swiper-slide.position-right {
  background-position: right center;
}

.hero-slider .swiper-slide.position-top {
  background-position: center top;
}

.hero-slider .swiper-slide.position-bottom {
  background-position: center bottom;
}

.hero-slider .swiper-slide.position-center {
  background-position: center center;
}

/* ==========================================================
   4. BACKGROUND OVERLAY
========================================================== */

.hero-slider .swiper-slide > .overlay,
.hero-slider .swiper-slide > .exhibitio-author-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================
   5. HERO CONTENT
========================================================== */

.hero-slider .hero-content,
.hero-slider .exhibitio-author-hero__content {
  position: relative;
  z-index: 2;

  width: min(90%, 780px);
  max-width: 780px;

  margin: 0 auto;
  padding: 16px 0 24px;

  text-align: center;
  color: var(--hero-text);

  font-family: var(--hero-body-family);
  font-weight: var(--hero-body-weight);
}

/* Content alignment */

.hero-slider .swiper-slide.align-left .hero-content {
  margin-left: max(5%, calc((100vw - 1200px) / 2));
  margin-right: auto;
  text-align: left;
}

.hero-slider .swiper-slide.align-right .hero-content {
  margin-left: auto;
  margin-right: max(5%, calc((100vw - 1200px) / 2));
  text-align: right;
}

/* ==========================================================
   6. INTRODUCTORY TEXT
   Uses Body Typography
========================================================== */

.hero-slider .exhibitio-author-hero__eyebrow {
  margin: 0 0 7px;

  color: var(--hero-text);

  font-family: var(--hero-body-family);
  font-size: clamp(10px, 1.12vw, 14px);
  font-weight: var(--hero-body-weight);

  line-height: 1.35;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* ==========================================================
   7. AUTHOR NAME
   Uses Heading Typography + H3 Weight
========================================================== */

.hero-slider .exhibitio-author-hero__author {
    margin: 0;
    color: var(--hero-text);

    font-family: var(--hero-heading-family);
    font-size: clamp(24px, 3.1vw, 43px);

    /* H3 weight from Customizer */
    font-weight: var(
        --exhibitio-h3-font-weight,
        var(--exhibitio-h3-weight, 400)
    );

    line-height: 1.12;
    letter-spacing: 0.115em;
    text-transform: uppercase;
}

/* ==========================================================
   8. DECORATIVE DIVIDER
========================================================== */

.hero-slider .exhibitio-author-hero__divider {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;
  width: min(420px, 76%);

  margin: 11px auto 10px;

  color: var(--hero-text);

  font-family: var(--hero-heading-family);
  font-weight: var(--hero-h3-weight);

  line-height: 1;
}

.hero-slider .exhibitio-author-hero__divider::before,
.hero-slider .exhibitio-author-hero__divider::after {
  content: '';
  display: block;

  flex: 1;
  height: 1px;

  background: currentColor;
  opacity: 0.85;
}

.hero-slider .exhibitio-author-hero__divider span {
  font-size: 22px;
  font-weight: inherit;
  line-height: 1;
}

/* ==========================================================
   9. MAIN HERO TITLE
   Uses Heading Typography + H1 Weight
========================================================== */

.hero-slider .hero-content h2.exhibitio-author-hero__title {
  max-width: 700px;
  margin: 0 auto 12px;

  color: var(--hero-text);

  font-family: var(--hero-heading-family);
  font-size: clamp(38px, 4.8vw, 72px);
  font-weight: var(--hero-h1-weight);

  font-style: italic;

  line-height: 1.06;
  letter-spacing: .035em;

  text-transform: none;
  text-wrap: balance;
}

/* H1 support if used in future */

.hero-slider .hero-content h1.exhibitio-author-hero__title {
  max-width: 700px;
  margin: 0 auto 12px;

  color: var(--hero-text);

  font-family: var(--hero-heading-family);
  font-size: clamp(38px, 4.8vw, 72px);
  font-weight: var(--hero-h1-weight);


  line-height: 1.06;
  letter-spacing: -0.025em;

  text-transform: none;
  text-wrap: balance;
}

/* ==========================================================
   10. OPTIONAL SUBTITLE — H4 TYPOGRAPHY
========================================================== */

.hero-slider .exhibitio-author-hero__subtitle {
  max-width: 540px;
  margin: 0 auto;
  color: var(--hero-text);
  font-family: var(--hero-heading-family);
  font-size: 17px;
  font-weight: var(--hero-h4-weight);
  line-height: 1.38;
  text-wrap: balance;
}

/* ==========================================================
   10B. EXCERPT / DESCRIPTION — BODY TYPOGRAPHY
========================================================== */

.hero-slider .exhibitio-author-hero__description {
  max-width: 540px;
  margin: 0 auto;
  color: var(--hero-text);
  font-family: var(--hero-body-family);
  font-size: 17px;
  font-weight: var(--hero-body-weight);
  line-height: 1.38;
  text-wrap: balance;
}

.hero-slider .exhibitio-author-hero__description p {
  margin: 0;
  font-family: inherit;
  font-weight: inherit;
}

/* ==========================================================
   11. BUTTON CONTAINER
========================================================== */

.hero-slider .exhibitio-author-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 23px;
  margin-top: 24px;
}

/* ==========================================================
   12. HERO BUTTONS
   Uses Body Typography + Body Weight
========================================================== */

.hero-slider .hero-content a.exhibitio-author-hero__button {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  min-width: 190px;
  min-height: 42px;

  padding: 10px 22px;

  border: 1px solid #7bcbd2;
  border-radius: 3px;

  background: rgba(0, 105, 118, 0.75);
  color: #fff;

  font-family: var(--hero-body-family);
  font-size: 12px;
  font-weight: var(--hero-body-weight);

  line-height: 1.35;
  letter-spacing: 0.045em;

  text-decoration: none;
  text-transform: uppercase;

  box-shadow: 0 0 16px rgba(46, 189, 205, 0.15);

  transition:
    background 0.25s,
    border-color 0.25s,
    transform 0.25s;
}

/* Secondary button */

.hero-slider .hero-content a.exhibitio-author-hero__button--secondary {
  background: rgba(4, 24, 39, 0.24);
}

/* Button hover */

.hero-slider .hero-content a.exhibitio-author-hero__button:hover {
  background: rgba(0, 125, 143, 0.95);
  border-color: #d6f6f7;
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================
   13. CONTENT ALIGNMENT
========================================================== */

.hero-slider .swiper-slide.align-left .exhibitio-author-hero__actions {
  justify-content: flex-start;
}

.hero-slider .swiper-slide.align-right .exhibitio-author-hero__actions {
  justify-content: flex-end;
}

.hero-slider .swiper-slide.align-left .exhibitio-author-hero__divider,
.hero-slider .swiper-slide.align-left .exhibitio-author-hero__title,
.hero-slider .swiper-slide.align-left .exhibitio-author-hero__description,
.hero-slider .swiper-slide.align-left .exhibitio-author-hero__subtitle {
  margin-left: 0;
}

.hero-slider .swiper-slide.align-right .exhibitio-author-hero__divider,
.hero-slider .swiper-slide.align-right .exhibitio-author-hero__title,
.hero-slider .swiper-slide.align-right .exhibitio-author-hero__description,
.hero-slider .swiper-slide.align-right .exhibitio-author-hero__subtitle {
  margin-right: 0;
}

/* ==========================================================
   14. SWIPER NAVIGATION
========================================================== */

.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
  z-index: 5;

  width: 38px;
  height: 38px;

  color: #fff;
  opacity: 0.8;
}

.hero-slider .swiper-button-prev:hover,
.hero-slider .swiper-button-next:hover {
  opacity: 1;
}

.hero-slider .swiper-button-prev::after,
.hero-slider .swiper-button-next::after {
  font-size: 21px;
}

/* ==========================================================
   15. SWIPER PAGINATION
========================================================== */

.hero-slider .swiper-pagination {
  position: absolute;
  z-index: 5;

  bottom: 10px;
  left: 0;

  width: 100%;
}

.hero-slider .swiper-pagination-bullet {
  width: 7px;
  height: 7px;

  margin: 0 5px !important;

  background: #fff;
  opacity: 0.5;
}

.hero-slider .swiper-pagination-bullet-active {
  background: #a6dce0;
  opacity: 1;
}

/* ==========================================================
   16. ACCESSIBILITY
========================================================== */

.hero-slider a:focus-visible,
.hero-slider .swiper-button-prev:focus-visible,
.hero-slider .swiper-button-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ==========================================================
   17. TABLET RESPONSIVE
========================================================== */

@media (max-width: 900px) {

  .hero-slider .hero-content {
    width: min(88%, 650px);
  }

  .hero-slider .exhibitio-author-hero__actions {
    gap: 12px;
    margin-top: 16px;
  }

  .hero-slider .exhibitio-author-hero__divider {
    margin: 8px auto;
  }

}

/* ==========================================================
   18. MOBILE RESPONSIVE
========================================================== */

@media (max-width: 600px) {

  .hero-slider {
    --hero-height: 50vh;
  }

  .hero-slider .hero-content {
    width: calc(100% - 42px);
    padding: 8px 0 16px;
  }

  .hero-slider .exhibitio-author-hero__eyebrow {
    font-size: 9px;
    letter-spacing: 0.16em;
    margin-bottom: 4px;
  }

  .hero-slider .exhibitio-author-hero__author {
    font-size: clamp(19px, 5.5vw, 29px);
    letter-spacing: 0.06em;
  }

  .hero-slider .exhibitio-author-hero__divider {
    width: 76%;
    margin: 7px auto;
  }

  .hero-slider .exhibitio-author-hero__divider span {
    font-size: 16px;
  }

  .hero-slider .hero-content h2.exhibitio-author-hero__title,
  .hero-slider .hero-content h1.exhibitio-author-hero__title {
    font-size: clamp(25px, 7.3vw, 40px);
    margin-bottom: 18px;
  }

  .hero-slider .exhibitio-author-hero__subtitle,
  .hero-slider .exhibitio-author-hero__description {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 30px;
  }

  .hero-slider .exhibitio-author-hero__actions {
    gap: 8px;
    margin-top: 12px;
  }

  .hero-slider .hero-content a.exhibitio-author-hero__button {
    min-width: 0;
    min-height: 34px;

    padding: 8px 12px;
    font-size: 10px;
  }

  .hero-slider .swiper-button-prev,
  .hero-slider .swiper-button-next {
    width: 22px;
    height: 30px;
  }

  .hero-slider .swiper-button-prev::after,
  .hero-slider .swiper-button-next::after {
    font-size: 15px;
  }

  .hero-slider .swiper-button-prev {
    left: 3px;
  }

  .hero-slider .swiper-button-next {
    right: 3px;
  }

}

/* ==========================================================
   19. SHORT SCREENS
========================================================== */

@media (max-height: 650px) and (min-width: 601px) {

  .hero-slider .exhibitio-author-hero__eyebrow {
    font-size: 10px;
  }

  .hero-slider .exhibitio-author-hero__author {
    font-size: 27px;
  }

  .hero-slider .hero-content h2.exhibitio-author-hero__title,
  .hero-slider .hero-content h1.exhibitio-author-hero__title {
    font-size: 36px;
  }

  .hero-slider .exhibitio-author-hero__divider {
    margin: 6px auto;
  }

  .hero-slider .exhibitio-author-hero__actions {
    margin-top: 12px;
  }

}

/* ==========================================================
   20. REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

  .hero-slider .hero-content a.exhibitio-author-hero__button {
    transition: none;
  }

}

/* ==========================================================
   21. SWIPER FADE — ACTIVE SLIDE INTERACTION
========================================================== */

.hero-slider.swiper-initialized .swiper-slide,
.hero-slider.swiper-initialized .swiper-slide * {
  pointer-events: none;
}

.hero-slider.swiper-initialized .swiper-slide-active,
.hero-slider.swiper-initialized .swiper-slide-active * {
  pointer-events: auto;
}

.hero-slider.swiper-initialized .swiper-slide-active > .overlay,
.hero-slider.swiper-initialized .swiper-slide-active > .exhibitio-author-hero__overlay {
  pointer-events: none;
}

.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next,
.hero-slider .swiper-pagination-bullet {
  pointer-events: auto;
}
