
/**
 * Soltis Landscaping — Featured Projects Hero
 *
 * Full-screen homepage slideshow featuring projects
 * selected through ACF.
 *
 * Includes image transitions, project details,
 * navigation dots, and pause/play controls.
 *
 * Colors are connected to Avada's global palette.
 */


/* ----------------------------------------
   Hero Container
---------------------------------------- */

.soltis-featured-hero {
  /* Soltis brand colors */
  --hero-forest: var(--awb-custom_color_1, #3f541b);
  --hero-ivory: var(--awb-color2, #f8f6f1);

  position: relative;
  isolation: isolate;

  width: 100%;
  height: 100svh;
  min-height: 480px;

  overflow: hidden;

  background: var(--hero-forest);
  color: #fff;
}

/* Keep sizing consistent within the component. */
.soltis-featured-hero *,
.soltis-featured-hero *::before,
.soltis-featured-hero *::after {
  box-sizing: border-box;
}


/* ----------------------------------------
   Slideshow Images & Transitions
---------------------------------------- */

/* Stack all slides on top of one another. */
.soltis-featured-hero__slides,
.soltis-featured-hero__slide {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
}

/* Hide inactive slides until they are selected. */
.soltis-featured-hero__slide {
  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.7s ease,
    visibility 0s linear 0.7s;
}

/* Fade in the currently active slide. */
.soltis-featured-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;

  transition: opacity 0.7s ease;
}

/* Fill the hero without stretching the photograph. */
.soltis-featured-hero__image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

/* Darken the lower portion for readable captions. */
.soltis-featured-hero__shade {
  position: absolute;
  inset: 0;

  pointer-events: none;

  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgb(10 10 10 / 62%) 100%
  );
}


/* ----------------------------------------
   Project Details
---------------------------------------- */

/* Position the project information in the lower-left. */
.soltis-featured-hero__caption {
  position: absolute;
  z-index: 2;

  bottom: clamp(34px, 5vw, 72px);
  left: clamp(28px, 5vw, 40px);

  max-width: min(620px, calc(100% - 190px));
}

/* Small label above the project name. */
.soltis-featured-hero__eyebrow {
  display: block;
  margin-bottom: 8px;

  color: var(--hero-ivory);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Make the project details link to its portfolio page. */
.soltis-featured-hero__link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;

  color: #fff !important;
  text-decoration: none !important;
}

/* Project name. */
.soltis-featured-hero__title {
  color: #fff !important;

  font-family: inherit;
  font-size: clamp(1.125rem, 2vw, 1.75rem) !important;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.025em !important; 
}

/* City and state beneath the project name. */
.soltis-featured-hero__location {
  margin-top: 8px;

  color: var(--hero-ivory);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Show that the project title is clickable. */
.soltis-featured-hero__link:hover
.soltis-featured-hero__title {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Visible keyboard focus for project links. */
.soltis-featured-hero__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
}


/* ----------------------------------------
   Slideshow Navigation
---------------------------------------- */

/* Position navigation in the lower-right. */
.soltis-featured-hero__controls {
  position: absolute;
  z-index: 3;

  bottom: clamp(34px, 5vw, 72px);
  right: clamp(28px, 5vw, 72px);

  display: flex;
  align-items: center;
  gap: 14px;
}

/* Arrange the navigation dots horizontally. */
.soltis-featured-hero__dots {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Give each dot a generous clickable area. */
.soltis-featured-hero__dot {
  appearance: none;

  display: grid;
  place-items: center;

  width: 24px;
  height: 32px;
  padding: 0;

  border: 0;
  background: transparent;

  cursor: pointer;
}

/* The visible circle inside each navigation button. */
.soltis-featured-hero__dot::before {
  content: '';

  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: rgb(255 255 255 / 50%);

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

/* Highlight the currently selected slide. */
.soltis-featured-hero__dot.is-active::before {
  background: #fff;
  transform: scale(1.3);
}

/* Brighten dots on hover. */
.soltis-featured-hero__dot:hover::before {
  background: #fff;
}


/* ----------------------------------------
   Pause / Play Button
---------------------------------------- */

.soltis-featured-hero__pause {
  appearance: none;

  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;
  padding: 0;

  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 50%;

  background: rgb(10 10 10 / 25%);
  color: #fff;

  font-size: 14px;
  cursor: pointer;
}

/* Subtle hover effect. */
.soltis-featured-hero__pause:hover {
  background: rgb(255 255 255 / 20%);
}

/* Accessible focus states for carousel controls. */
.soltis-featured-hero__dot:focus-visible,
.soltis-featured-hero__pause:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}


/* ----------------------------------------
   Responsive Layout
---------------------------------------- */

/* Adjust hero height and controls on mobile. */
@media (max-width: 767px) {
  .soltis-featured-hero {
    /* height: 85svh; */
    height: 90vh;
    min-height: 450px;
  }

  /* Move the caption above the navigation controls. */
  .soltis-featured-hero__caption {
    left: 24px;
    right: 24px;
    bottom: 100px;

    max-width: none;
  }

.soltis-featured-hero__title {
  font-size: clamp(1.65rem, 6.5vw, 2.25rem) !important;
}

  /* Move the controls to the bottom-left on mobile. */
  .soltis-featured-hero__controls {
    left: 16px;
    right: auto;
    bottom: 22px;
    padding-bottom: 30px;
  }
}


/* ----------------------------------------
   Reduced Motion
---------------------------------------- */

/* Avoid animations for visitors who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  .soltis-featured-hero__slide,
  .soltis-featured-hero__slide.is-active {
    transition: none;
  }

  .soltis-featured-hero__dot::before {
    transition: none;
  }
}


/* ----------------------------------------
   Soltis — Accessible Homepage H1
---------------------------------------- */

h1.soltis-homepage-h1 {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  padding: 0 !important;
  margin: -1px !important;

  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;

  white-space: nowrap !important;
  border: 0 !important;
}
