/* Global CSS reset to eliminate default margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: hidden;
  position: relative;
}

/* Glide basic styles */
.glide {
  position: relative;
}

.glide__track {
  overflow: visible;
  /* padding: 0 100px; */
  margin-top: -40px;
  padding-top: 0px;
}

.glide__slides {
  position: relative;
  width: 100%;
  list-style: none;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  touch-action: pan-Y;
  overflow: visible;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  margin-top: 0px;
  padding-top: 0px;
}

.glide__slide {
  position: relative;
  display: inline-block;
  vertical-align: top;
  white-space: normal;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease;
}

/* Inactive slide styles */
.glide__slide:not(.glide__slide--active) {
  opacity: 0.6;
  transform: scale(0.7);
}

.glide__slide--active {
  opacity: 1;
  transform: scale(0.8);
}

/* Navigation arrows */
.glide__arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  pointer-events: none;
  z-index: 10;
}

.glide__arrow {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  z-index: 2;
  padding: 15px 20px;
  background-color: #858585;
  border: none;
  border-radius: 50px;
  box-shadow: 0 0.25em 0.5em 0 rgba(0, 0, 0, 0.1);
  opacity: 0.9;
  cursor: pointer;
  transition: opacity 150ms ease, border 300ms ease-in-out;
  pointer-events: auto;
  width: 50px;
  height: 50px;
}

.glide__arrow img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.glide__arrow:hover {
  opacity: 1;
  background-color: #666666;
}

.glide__arrow--left {
  left: 2em;
}

.glide__arrow--right {
  right: 2em;
}

.glide__arrow--right img {
  transform: rotate(180deg);
}

/* Indicators */
.glide__bullets {
  position: absolute;
  z-index: 2;
  bottom: 15px;
  left: 50%;
  display: flex;
  list-style: none;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  gap: 10px;
}

.glide__bullet {
  background-color: #666666;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 300ms ease-in-out;
}

.glide__bullet--active {
  background-color: #000000;
  transform: scale(1.2);
}

.glide__bullet:hover {
  background-color: #999999;
}

/* Touch feedback */
.glide.touching .glide__slide {
  transition: none;
}

/* Responsive design */
@media (max-width: 768px) {
  .carousel-container {
    padding: 0 0px;
    overflow: hidden;
    margin-top: 0px;
  }
  
  .glide__track {
    /* padding: 0 10px; */
    overflow: hidden;
    margin-top: -65px;
    padding-top: 0px;
  }
  
  /* Ensure slides stretch to same height on mobile */
  .glide__slide {
    display: flex;
    align-items: flex-start;
  }
  
  .glide_card {
      flex-direction: column;
      /* padding: 15px 15px; */
      padding: 20px 25px;
      gap: 15px;
      margin: 0px 0px;
      /* Mobile height consistency using flexbox */
      min-height: 180px;
      flex: 1;
      align-self: stretch;
  }

  .glide_card .content {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      /* Ensure content items don't stretch */
      align-items: flex-start;
  }

  .glide_card .left_img {
      width: 100%;
      height: auto;
      max-height: 150px;
      object-fit: contain;
  }

  .glide_card .title {
      font-size: 24px;
      margin-bottom: 15px;
  }

  .glide_card .tag {
      font-size: 16px;
      /* Prevent tag from being stretched on mobile */
      width: fit-content;
      flex-shrink: 0;
      align-self: flex-start;
      /* Allow tags to wrap on mobile */
      white-space: normal; /* Allow text wrapping */
      margin-right: 6px;
  }
  
  /* Tag container to keep them inline on mobile */
  .glide_card .content > .tag {
      display: inline-block;
      margin-right: 6px;
      margin-bottom: 8px;
  }
  
  /* Tag container for multiple tags on mobile */
  .glide_card .tag-container {
      display: flex;
      flex-wrap: wrap; /* Allow wrapping on mobile */
      gap: 6px;
      margin-bottom: 8px;
      align-items: flex-start; /* Align to top when wrapping */
  }
  
  .glide_card .tag-container .tag {
      margin: 0;
      flex-shrink: 0;
      /* Allow tags to wrap on mobile */
      white-space: normal; /* Allow text wrapping */
  }

  .glide_card .time {
      font-size: 18px;
      margin-top: 0px;
      margin-bottom: 15px;
  }

  .glide__arrow {
      padding: 10px 15px;
      font-size: 14px;
      width: 40px;
      height: 40px;
  }

  .glide__arrow--left {
      left: 0em;
  }

  .glide__arrow--right {
      right: 0em;
  }
  
  /* Mobile indicator position adjustment */
  .glide__bullets {
    bottom: 20px;
  }
}

/* Placeholder image styles */
.placeholder-img {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: bold;
}

/* Icon placeholder */
.icon-placeholder {
  width: 32px;
  height: 32px;
  background: #F39800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}