/* Horizontal Scroll Section */

.horizontal-section {
  position: relative;
  /* Gradient background for glass effect enhancement */
  background: linear-gradient(
    135deg,
    rgba(237, 242, 254, 1) 0%,
    rgba(247, 250, 252, 1) 50%,
    rgba(230, 240, 255, 1) 100%
  );
  overflow: hidden;
  margin-left: calc(-1 * var(--content-padding));
  margin-right: calc(-1 * var(--content-padding));
  width: calc(100% + (2 * var(--content-padding)));
}

.horizontal-container {
  height: 100vh;
  width: 100%;
  position: relative;
}

.horizontal-wrapper {
  height: 100%;
  width: 100%;
  position: relative;
}

.horizontal-scroller {
  display: flex;
  height: 100%;
  width: max-content;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  min-width: 3000px; /* Ensure enough width for horizontal scroll */
}

.horizontal-item {
  flex-shrink: 0;
  width: 400px;
  height: 80vh;
  /* Enhanced Liquid Glass Effect with Edge Lighting */
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  /* Multi-layer glass shadow with inner glow */
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 16px 8px rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Top edge highlight */
.horizontal-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  z-index: 3;
}

/* Left edge highlight */
.horizontal-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8),
    transparent,
    rgba(255, 255, 255, 0.3)
  );
  z-index: 3;
}

/* Ensure content is above edge highlights */
.horizontal-item h3,
.horizontal-item p {
  position: relative;
  z-index: 2;
}

.horizontal-item:hover {
  transform: translateY(-12px) scale(1.02);
  /* Enhanced hover glass effect */
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 20px 10px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(65, 105, 225, 0.2);
}

.horizontal-item h3 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.horizontal-item:first-child h3 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  font-weight: 900;
}

/* All other cards - uniform size */
.horizontal-item:nth-child(2) h3,
.horizontal-item:nth-child(3) h3,
.horizontal-item:nth-child(4) h3,
.horizontal-item:nth-child(5) h3,
.horizontal-item:nth-child(6) h3,
.horizontal-item:nth-child(7) h3 {
  font-size: clamp(1.8rem, 5.5vw, 3.5rem);
  line-height: 1.2;
  font-weight: 900;
}

.horizontal-item p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.horizontal-image {
  width: 100%;
  height: 60%;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.horizontal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.horizontal-item:hover .horizontal-image img {
  transform: scale(1.05);
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
  .horizontal-scroller {
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .horizontal-item {
    width: 400px; /* Much wider cards on mobile for better proportions */
    height: 50vh; /* Reduced height to make cards less tall */
    padding: 2rem;
  }
  
  .horizontal-item h3 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }
  
  .horizontal-item:first-child h3 {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    line-height: 1.1;
  }
  
  /* All cards except first - uniform size on tablet */
  .horizontal-item:nth-child(2) h3,
  .horizontal-item:nth-child(3) h3,
  .horizontal-item:nth-child(4) h3,
  .horizontal-item:nth-child(5) h3,
  .horizontal-item:nth-child(6) h3,
  .horizontal-item:nth-child(7) h3 {
    font-size: clamp(1.5rem, 7vw, 2.8rem);
    line-height: 1.2;
  }
  
  .horizontal-item p {
    font-size: clamp(0.9rem, 3vw, 1rem);
  }
}

@media screen and (max-width: 480px) {
  .horizontal-scroller {
    gap: 0.5rem;
    padding: 0 0.5rem;
  }
  
  .horizontal-item {
    width: 250px;
    height: 45vh; /* Reduced height for small mobile screens too */
    padding: 1.5rem;
  }
  
  .horizontal-item h3 {
    font-size: clamp(1rem, 6vw, 1.5rem);
  }
  
  .horizontal-item:first-child h3 {
    font-size: clamp(1.2rem, 8vw, 2rem);
    line-height: 1.1;
  }
  
  /* All cards except first - uniform size on mobile */
  .horizontal-item:nth-child(2) h3,
  .horizontal-item:nth-child(3) h3,
  .horizontal-item:nth-child(4) h3,
  .horizontal-item:nth-child(5) h3,
  .horizontal-item:nth-child(6) h3,
  .horizontal-item:nth-child(7) h3 {
    font-size: clamp(1.2rem, 8vw, 2.2rem);
    line-height: 1.2;
  }
  
  .horizontal-item p {
    font-size: clamp(0.8rem, 4vw, 0.9rem);
    margin-bottom: 1.5rem;
  }
}
