/* ================================================
   Hero Section - Carousel
=================================================== */
.carousel-container {
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.carousel-inner img,
.carousel-inner video {
  height: 100vh;
  object-fit: cover;
  filter: brightness(0.5);
  transition: filter 2s ease;
  z-index: 0;
}

/* Highlight current slide with full brightness */
.carousel-inner img.colored,
.carousel-inner video.colored {
  filter: brightness(0.8);
}

.carousel-indicators button {
  height: 2px !important;
}

.carousel-caption {
  position: absolute;
  top: 47.5%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 50%;
  color: white;
  text-align: center;
  z-index: 4;
  transition: opacity 1s ease;
  padding-top: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  bottom: 0px;
  padding-bottom: 0px;
}

.carousel-title {
  font-weight: bold;
  margin-top: 0;
  padding-top: 0 !important;
  line-height: 1;
  position: relative;
  margin-block-end: 0rem !important;
}

.carousel-subtitle {
  font-family: "Helvetica", Helvetica, Arial, sans-serif !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: clamp(1.25rem, 2vw, 1.8rem);
  height: clamp(1.25rem, 2vw, 1.8rem);
}

.carousel-item:first-child .carousel-caption {
  opacity: 0;
}

.carousel-caption.first-slide {
  opacity: 0;
}

.carousel-item:first-child .carousel-caption-extra {
  opacity: 0;
}

.homepage-carousel-btn {
  position: relative;
  z-index: 1;
  color: white;
  border: none;
  border-radius: 0 !important;
  font-size: var(--font-sm);
  overflow: hidden;
  background: rgba(36, 82, 53, 0.3);
  backdrop-filter: blur(2px);
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(31, 80, 19, 0.2);
  color: #000;
  backdrop-filter: blur(15px);
}

/* ================================================
   Splash Screen
=================================================== */
@keyframes fadeOutLogo {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fadeOutSplash {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    visibility: hidden;
  }
}

.splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOutSplash 4s ease forwards cubic-bezier(0.075, 0.82, 0.165, 1);
  pointer-events: none;
}

.splash img {
  width: 40vh;
  max-width: 40vh;
  height: auto;
  animation: fadeOutLogo 2s ease forwards 4s;
}

/* ================================================
   Featured Container */

.featured-container {
  margin-top: 8vh;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 8vh;
  width: 90%;
}

.featured-title {
  margin-bottom: 3%;
  color: var(--crisal-green-light);
  text-align: center;
  font-weight: bold;
}

.featured-subtitle {
  font-size: var(--font-2xl);
  color: var(--grey-dark);
}

.featured-text-wrapper {
  width: 60%;
  margin: 0 auto;
  text-align: center;
}

.cards-wrapper {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 0 auto;
  box-sizing: border-box;
  align-items: stretch;
}

.card {
  flex: 1 1 0;
  border: none;
  border-radius: 0;
}

.image-wrapper {
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.image-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--crisal-green-light);
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: multiply;
  z-index: 2;
  pointer-events: none;
}

.image-wrapper:hover::after {
  opacity: 1;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.image-wrapper:hover img {
  transform: scale(1.1);
}

#carouselFeatured {
  position: relative;
}

.custom-prev,
.custom-next {
  position: absolute;
  top: calc(8vw + 5%);
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  z-index: 10;
}

.custom-prev {
  left: -3rem;
}

.custom-next {
  right: -3rem;
}

.featured-container .card-title {
  color: var(--grey-mid);
}

.featured-container .card-subtitle {
  color: var(--grey-light);
  min-height: 2.5rem;
}

.featured-container .card-text {
  color: var(--grey-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.featured-btn {
  background-color: var(--crisal-green-light);
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-size: var(--font-sm);
  border: 2px solid transparent !important;
}

.featured-btn:hover {
  background-color: #ffffff;
  color: var(--crisal-green-light) !important;
  border-color: var(--crisal-green-light) !important;
}

/* ================================================
   Banner Counter */
.counter-banner {
  position: relative;
  width: 100%;
  padding: 2rem 1rem;
  background-color: var(--crisal-green-light);
  overflow: hidden;
  z-index: 2;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.counter-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--banner-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 0;
}

.counter-wrapper {
  width: 95%;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  z-index: 2;
  position: relative;
  color: white;
}

.counter-item {
  flex: 1 1 calc(25% - 1.5rem);
  min-width: 220px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  height: auto;
  justify-content: space-between;
}

.counter-icon {
  --icon-size: clamp(45px, 6vw, 60px);
  width: var(--icon-size);
  height: var(--icon-size);
  min-width: var(--icon-size);
  min-height: var(--icon-size);
  margin: 0 auto 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.counter-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

[data-countup] {
  font-size: clamp(1.8rem, 3.5vw, 3.5rem);
  font-family: "Brandon", sans-serif;
  font-weight: bold;
  margin: 0;
  flex-shrink: 0;
  line-height: 1.1;
  flex-grow: 1;
  align-items: center;
  height: auto;
  margin-bottom: 5%;
}

.custom-counter-titles {
  font-family: "HelveticaNeueLT", Helvetica, Arial, sans-serif !important;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  line-height: 1.3;
  margin: 0 0 0 0;
  padding: 0 0.25rem;
  min-height: 3.2em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

.counter-item h6 {
  font-weight: bold;
}

/* ================================================
   Markets Section 
=================================================== */

.markets-container {
  margin-top: 8vh;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 8vh;
  width: 100%;
}

.markets-container h2 {
  text-align: center;
  margin-bottom: 3%;
  color: var(--grey-light);
  font-weight: bold;
}

.markets-wrapper {
  width: 90%;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  box-sizing: border-box;
  align-items: stretch;
}

.market-card {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.carousel-inner-markets {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.carousel-inner-markets .carousel-item {
  transition: transform 0.6s ease-in-out;
  height: 100%;
}

.carousel-inner-markets::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--crisal-green-light);
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: multiply;
  z-index: 2;
  pointer-events: none;
}

.carousel-inner-markets:hover::after {
  opacity: 1;
}

.carousel-inner-markets img,
.carousel-inner-markets video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  z-index: 1;
}

.carousel-inner-markets img {
  transition: transform 0.6s ease, filter 0.3s ease;
}

.carousel-inner-markets:hover img {
  transform: scale(1.1);
}

.market-icon-container {
  display: flex;
  gap: 1rem;
}

.markets-container .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.markets-container .card-subtitle {
  min-height: 3.5rem;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markets-container .card-text {
  flex-grow: 1;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--grey-dark);
}


.markets-container .card-title {
  color: var(--grey-mid);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markets-container .card-subtitle {
  color: var(--grey-light);
}

/* ================================================
   Promotional Banner */

.promo-banner {
  position: relative;
  width: 100%;
  background-color: var(--crisal-green-light);
  overflow: hidden;
  padding: 4rem 2rem;
  z-index: 1;
}

.promo-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--banner-url);
  background-color: var(--crisal-green-light);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 0;
}

.promo-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
}

.promo-title {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: white;
}

.promo-subtitle {
  font-weight: 400;
  margin-bottom: 2rem;
  color: white;
}

.btn-promo {
  background-color: #ffffff;
  color: var(--crisal-green-light);
  padding: 0.6rem 1.5rem;
  font-size: var(--font-sm);
  text-decoration: none;
  border: none;
  border-radius: 0;
  transition: color 0.3s ease;
}

.btn-promo:hover {
  background-color: #ffffff;
  color: var(--crisal-green-light);
}

/* ================================================
   Mobile Styles
=================================================== */
@media (max-width: 576px) {
  .carousel-container {
    object-fit: contain;
  }

  .featured-text-wrapper {
    width: 90%;
    margin: 0 auto;
    text-align: center;
  }

  .featured-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3%;
    color: var(--crisal-green-light);
  }

  .cards-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .cards-wrapper {
    display: block !important;
  }
  .cards-wrapper .card {
    flex: none !important;
    width: 100% !important;
    margin-bottom: 1rem;
  }

  .card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    width: 100%;
    margin: 0;
  }

 .cards-wrapper .card:not(:first-child) {
  display: none !important;
}

  .image-wrapper {
    aspect-ratio: 3 / 2;
    margin: 0 auto 0 auto !important;
    padding: 0 !important;
  }

  .image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
  }

    .custom-prev,
  .custom-next {
    position: absolute;
    top: 27.5%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    z-index: 10;
  }

  .custom-prev {
    left: -2.2rem;
  }

  .custom-next {
    right: -2.2rem;
  }

  .carousel-inner-markets {
    aspect-ratio: 3 / 2;
    margin: 0 auto 0 auto !important;
    padding: 0 !important;
  }


  .markets-wrapper {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .market-card {
    width: 100%;
    margin-bottom: 2rem;
    flex: 0 0 auto !important;
    height: auto !important;
  }

  .promo-banner {
    height: auto;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
  }


  .btn-promo {
    padding: 0.4rem 0.8rem;
  }

  .counter-banner {
    padding: 2rem 1rem;
  }

  .counter-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .counter-item {
    flex: none;
    width: 280px;
    max-width: 90vw;
    min-width: auto;
  }
}

/* ================================================
   Mobile Landcape Styles and Tablets
=================================================== */

@media (min-width: 576px) and (max-width: 768px) {
  .featured-text-wrapper {
    width: 90%;
    margin: 0 auto;
    text-align: center;
  }

  .featured-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3%;
    color: var(--crisal-green-light);
  }

  .custom-prev,
  .custom-next {
    position: absolute;
    top: 30%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    z-index: 10;
  }

  .counter-banner {
    padding: 2rem 0.5rem;
  }

  .counter-wrapper {
    width: 90%;
    gap: 0.5rem;
  }

  .counter-item {
    flex: 1 1 calc(25% - 0.375rem);
    min-width: 150px;
    max-width: 200px;
  }

  .counter-icon {
    --icon-size: clamp(35px, 4vw, 50px);
  }

  [data-countup] {
    font-size: clamp(1.4rem, 2.8vw, 2.5rem);
  }

  .custom-counter-titles {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    min-height: 2.8em;
    padding: 0 0.1rem;
  }
  .promo-banner {
    height: auto;
    padding: 2rem 1rem;
    margin-bottom: 5rem;
  }

  .banner-pocket-3 {
    padding-left: 0% !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {

  .featured-text-wrapper {
  width: 90%;
  margin: 0 auto;
  text-align: center;
}


  .custom-prev,
  .custom-next {
    position: absolute;
    top: 25%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    z-index: 10;
  }

  .counter-banner {
    padding: 2rem 0.5rem;
  }

  .counter-wrapper {
    width: 90%;
    gap: 0.5rem;
  }

  .counter-item {
    flex: 1 1 calc(25% - 0.375rem);
    min-width: 150px;
    max-width: 200px;
  }

  .counter-icon {
    --icon-size: clamp(35px, 4vw, 50px);
  }

  [data-countup] {
    font-size: clamp(1.4rem, 2.8vw, 2.5rem);
  }

  .custom-counter-titles {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    min-height: 2.8em;
    padding: 0 0.1rem;
  }
}
