/*
 * Hero Carousel Block
 *
 * Sections:
 *   1. Glide.js core CSS  — bundled from @glidejs/glide@3.6.0
 *                           (replaces the CDN glide.core.min.css import)
 *   2. Hero Carousel layout & images
 *   3. Navigation arrows  — pure-CSS chevrons, no Font Awesome dependency
 *   4. Single-slide (no-carousel) mode
 *   5. Block editor notices
 *   6. Responsive tweaks
 */

/* ============================================================
   1. Glide.js Core
   ============================================================ */

.glide {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.glide * {
  box-sizing: inherit;
}

.glide__track {
  overflow: hidden;
}

.glide__slides {
  position: relative;
  width: 100%;
  list-style: none;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  touch-action: pan-Y;
  overflow: hidden;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  display: flex;
  flex-wrap: nowrap;
  will-change: transform;
}

.glide__slides--dragging {
  user-select: none;
}

.glide__slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  white-space: normal;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.glide__slide a {
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
  -ms-user-select: none;
  border-bottom: none;
}

.glide__arrows {
  -webkit-touch-callout: none;
  user-select: none;
}

.glide__bullets {
  -webkit-touch-callout: none;
  user-select: none;
}

.glide--rtl {
  direction: rtl;
}

/* ============================================================
   2. Hero Carousel – layout & images
   ============================================================ */

.hero-carousel {
  position: relative;
  /* anchors the absolutely-positioned arrows */
  width: 100%;
  overflow: hidden;
  /* belt + braces */
}

/* Images are displayed at their natural size (never stretched beyond it)
   and centred horizontally within the slide. */
.hero-carousel .glide__slide {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.hero-carousel .glide__slide img,
.hero-carousel .glide__slide a img {
  display: block;
  max-width: 100%;
  /* never wider than the slide */
  width: auto;
  height: auto;
}

/* Remove default <a> spacing around images */
.hero-carousel .glide__slide a {
  display: flex;
  justify-content: center;
  line-height: 0;
}

/* ============================================================
   3. Navigation arrows
   ============================================================

   Positioned absolutely over the carousel.
   The chevrons are drawn with CSS borders – no icon font needed.
   If you prefer Font Awesome, replace the ::before rules with an
   <i class="fa-light fa-chevron-left"> inside each <button>.
   ============================================================ */

/* Arrow container – stretched full width at vertical centre */
.hero-carousel .glide__arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem;
  z-index: 10;
  pointer-events: none;
  /* pass clicks through to slides */
}

/* Individual arrow buttons */
.hero-carousel .glide__arrow {
  position: static;
  top: auto;
  transform: none;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  line-height: 1;
  font-size: 4rem;
  line-height: 1;
  background: transparent;
  color: #ce461c;


}

.hero-carousel .glide__arrow:hover,
.hero-carousel .glide__arrow:focus-visible {
  background: transparent;
  outline: none;
}

.hero-carousel .glide__arrow--disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ============================================================
   4. Single-slide mode  (.single-banner)

   When there is only one visible slide the .glide class is not
   applied, so Glide.js never initialises.
   ============================================================ */

.hero-carousel.single-banner {
  display: flex;
  justify-content: center;
}

.hero-carousel.single-banner img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
}

.hero-carousel.single-banner a {
  display: flex;
  justify-content: center;
  line-height: 0;
}

/* ============================================================
   5. Block editor notice
   ============================================================ */

.hcb-editor-notice {
  background: #f0f0f0;
  border: 2px dashed #bbb;
  padding: 1.5em 2em;
  text-align: center;
  color: #555;
  font-style: italic;
}

/* ============================================================
   6. Responsive tweaks
   ============================================================ */

@media (max-width: 600px) {
  .hero-carousel .glide__arrows {
    padding: 0 0.5rem;
  }

  .hero-carousel .glide__arrow {
    width: 2.25rem;
    height: 2.25rem;
  }
}
