/* ============================================
   HERO SECTION - Main container and layout
   ============================================ */



h5 {
  font-family: 'Merriweather', serif!important;
}

.hero-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-container .d-flex {
  flex: 1;
  user-select: none;
  touch-action: pan-x;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  -webkit-user-select: none;
  overflow-x: auto;
}

.hero-container .d-flex::-webkit-scrollbar {
  display: none;
}

.hero-section {
  background-image: url("/img/clouds.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 5px 0 5px 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1700px;
  width: 100%;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

header.hero-section,
header.hero-section .hero-container {
  overflow: visible;
}

.hero-cards-wrapper.cards-main-wrapper {
  overflow: visible;
}

/* ============================================
   HERO BACKGROUND - Text and image overlays
   ============================================ */

.hero-background-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 0;
  color: rgba(255, 255, 255, 0.1);
  font-size: 5rem;
  font-weight: bold;
  text-align: center;
  pointer-events: none;
  padding: 20px;
}

.hero-background-image {
  inset: 0;
  max-width: 100%;
  max-height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  display: none;
}

/* ============================================
   HERO CARDS - Card styling and layout
   ============================================ */

.hero-card {
  width: 600px !important;
  height: 350px;
  background-color: #ecf0f2;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 15px;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  text-decoration: none;
  position: relative;
  z-index: 0;
  padding: 10px;
  transition: transform 300ms ease, box-shadow 300ms ease, z-index 0s;
  will-change: transform;
}

.hero-card:first-child {
  margin-left: 0;
}

.hero-card h2,
.hero-card h3,
.hero-card h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.hero-card h5 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 5px;
}

.hero-card p {
  font-size: 0.8rem;
}

/* Card icon and image elements */
.hero-card-left-icon {
  width: 100px;
  height: 100px !important;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  float: left;
  margin-right: 10px;
}

.hero-card-right-image {
  max-width: 200px;
  max-height: 300px !important;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  float: right;
}

/* Card content layout */
.hero-card-center {
  margin: 10px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.hero-card-main-content {
  overflow: hidden;
  height: 100%;
  width: 100%;
  margin-bottom: 10px;
  margin-top: 10px;
}

.hero-card-main-content p {
  height: 100%;
}

.hero-card-main-content img {
  height: 100%;
}

.hero-card-main-content-picture {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  height: 100%;
}

.hero-card-desc {
  text-overflow: ellipsis;
  margin-bottom: 0;
  height: auto !important;
}

/* ============================================
   HERO CARDS WRAPPER - Container for cards
   ============================================ */

.hero-cards-wrapper {
  margin-right: 60px;
  overflow: visible;
}

.hero-cards-wrapper.cards-main-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
}

.hero-cards-wrapper.cards-main-wrapper > .hero-card:first-child {
  margin-left: 0;
}

/* Enhanced styling for cards within wrapper */
.hero-cards-wrapper .hero-card {
  transition: transform 350ms ease, box-shadow 300ms ease;
  position: relative;
}

.hero-cards-wrapper .hero-card:hover {
  z-index: 1000 !important;
}

/* ============================================
   DESKTOP STYLES (min-width: 769px)
   ============================================ */

@media (min-width: 769px) {
  .hero-section {
    overflow: auto !important;
    max-width: none !important;
    width: 100vw !important;
  }
}

/* ============================================
   MOBILE STYLES (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
  :root {
    --hero-gutter: clamp(16px, 6vw, 48px);
  }

  /* Background text sizing */
  .hero-background-text {
    font-size: 3rem;
  }

  /* Hero section adjustments */
  .hero-section {
    padding: 5px 0 5px !important;
  }

  .hero-container {
    width: 100% !important;
    justify-content: center !important;
  }

  header.hero-section,
  header.hero-section .hero-container {
    overflow: visible !important;
  }

  header.hero-section .container-fluid {
    padding: 0 !important;
  }

  /* Cards wrapper - scrolling behavior */
  .hero-cards-wrapper {
    margin-right: 0 !important;
  }

  .hero-cards-wrapper.cards-main-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 0 6vw !important;
    padding-inline: var(--hero-gutter) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: 6vw !important;
    scroll-padding-inline: var(--hero-gutter) !important;
    overscroll-behavior-x: contain !important;
    scrollbar-gutter: stable both-edges !important;
    scrollbar-width: none !important;
    position: relative !important;
  }

  .hero-cards-wrapper.cards-main-wrapper::-webkit-scrollbar {
    display: none !important;
  }

  /* Card sizing and behavior */
  .hero-card {
    width: 90% !important;
    min-height: 320px !important;
    height: 300px;
    padding: 14px !important;
    flex: 0 0 auto !important;
    align-items: flex-start;
    border-radius: 16px !important;
    scroll-snap-align: center !important;
    scroll-snap-stop: always !important;
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
    transform: none !important;
    will-change: auto !important;
    width: min(88vw, 680px) !important;
    max-width: calc(100vw - (2 * var(--hero-gutter))) !important;
    min-width: calc(100vw - (2 * var(--hero-gutter))) !important;
    box-shadow: none;
  }

  /* Remove desktop margin overlap on mobile */
  .hero-cards-wrapper.cards-main-wrapper > .hero-card {
    margin-left: 0 !important;
  }

  /* Disable hover effects on mobile */
  .hero-cards-wrapper .hero-card:hover {
    transform: none !important;
  }

  /* Icon and image sizing for mobile */
  .hero-card-right-image {
    width: 128px !important;
    height: auto;
    margin-bottom: 8px !important;
  }

  .hero-card-left-icon {
    width: 64px !important;
    height: 64px !important;
    margin-bottom: 8px !important;
  }

  /* Scroll gradient indicators */
  .hero-cards-wrapper.cards-main-wrapper::before,
  .hero-cards-wrapper.cards-main-wrapper::after {
    content: "";
    position: sticky;
    top: 0;
    width: 9vw;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.2s ease;
  }

  .hero-cards-wrapper.cards-main-wrapper::before {
    left: 0;
    margin-left: -6vw;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
  }

  .hero-cards-wrapper.cards-main-wrapper::after {
    left: calc(100% - 9vw);
    margin-right: -6vw;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
  }

  /* Hide gradients at scroll boundaries */
  .hero-cards-wrapper[data-at-start="1"]::before {
    opacity: 0;
  }

  .hero-cards-wrapper[data-at-end="1"]::after {
    opacity: 0;
  }

  /* Scroll microhint */
  .hero-cards-wrapper.cards-main-wrapper .scroll-microhint {
    position: absolute;
    bottom: 10px;
    right: 10vw;
    font-size: 12px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 6px 8px;
    border-radius: 999px;
    z-index: 6;
    user-select: none;
    pointer-events: none;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .hero-cards-wrapper.cards-main-wrapper.has-scrolled .scroll-microhint,
  .hero-cards-wrapper.cards-main-wrapper.hide-microhint .scroll-microhint {
    opacity: 0;
    transform: translateY(6px);
  }
}
