/* Panel Section Styles */
.bg-hero-section-opacity {
  background-color: rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 1;
}

.solutions-panels {
  padding: 80px 0;
  overflow: hidden;
}

.panels-container {
  display: flex;
  width: 100%;
  height: 550px;
  margin: 0 auto;
  max-width: 1400px;
  gap: 15px;
}

/* Individual Panel Styling */
.panel {
  position: relative;
  flex: 1;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.43, 0.195, 0.02, 1);
  border-radius: 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

/* Default State - All panels equal width */
.panel {
  flex: 1;
}

/* Active/Expanded State */
.panel.active {
  flex: 2.5;
}

/* Panel Image */
.panel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.43, 0.195, 0.02, 1);
}

/* Panel Overlay Content */
.panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  max-width: 300px;
  padding: 40px 30px;
  background-color: #ffdb3ccc; /* Yellow background with opacity */
  color: #000;
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0; /* Hidden by default */
  transform: translateX(-20px); /* Slight offset when hidden */
  pointer-events: none; /* Prevents interaction with hidden overlay */
  overflow: hidden; /* Ensures content doesn't spill out during animation */
  margin: 10PX;
    border-radius: 5px;
}

.panel-overlay h3 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #0066b2; /* Blue color for heading */
  text-transform: uppercase;
  line-height: 1.1;
  transform: translateY(15px); /* Start slightly down */
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000); /* Improved easing */
  opacity: 0; /* Start fully transparent */
}

.panel-overlay p {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  opacity: 0;
  transform: translateY(20px); /* Start further down */
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000); /* Improved easing */
  max-width: 90%;
  display: none;
}

.panel-btn {
  display: inline-block;
  margin-top: auto; /* Push to bottom */
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  width: fit-content;
  opacity: 0;
  transform: translateY(30px) scale(0.9); /* Start further down and slightly smaller */
  transition: all 0.6s ease; /* No delay initially */
  display: none;
  color: #111111;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.panel-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.panel-btn:after {
  content: "→";
  margin-left: 8px;
  font-size: 18px;
}

/* Active Panel Content Styling */
.panel.active .panel-overlay {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto; /* Re-enables interaction */
}

/* Staggered animation for active panel content */
.panel.active .panel-overlay h3 {
  transform: translateY(0);
  opacity: 1; /* Full opacity when active */
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.2s; /* Delay of 0.2s with improved easing */
}

.panel.active .panel-overlay p {
  opacity: 1;
  transform: translateY(0);
  display: block;
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.4s; /* Delay of 0.4s with improved easing */
}

.panel.active .panel-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
  display: block;
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.6s; /* Delay of 0.6s with improved easing */
}

/* Hover Effects */
.panel:hover:not(.active) {
  flex: 1.5;
}

.panel:hover .panel-overlay {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto; /* Re-enables interaction when hovered */
}

/* Staggered animation for hover state (faster than active) */
.panel:hover:not(.active) .panel-overlay h3 {
  transform: translateY(0);
  opacity: 0.9; /* Almost full opacity on hover */
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.3s; /* Slight delay with improved easing */
}

.panel:hover:not(.active) .panel-overlay p {
  opacity: 0.9;
  transform: translateY(0);
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.3s; /* Slightly longer delay with improved easing */
}

.panel:hover:not(.active) .panel-overlay .panel-btn {
  opacity: 0.9;
  transform: translateY(0) scale(1);
  transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) 0.3s; /* Even longer delay with improved easing */
}

/* Responsive Design */
@media (max-width: 992px) {
  .panel-overlay {
    width: 100%;
    background-color: #ffdb3ccc;
  }
  
  .panel.active .panel-overlay {
    padding-bottom: 80px;
  }
  
  /* Ensure overlay is still visible on mobile even when not active */
  .panel:not(.active) .panel-overlay {
    opacity: 0; /* Keep it hidden until hovered/active */
  }
}

@media (max-width: 768px) {
  .panels-container {
    flex-direction: column;
    height: auto;
    gap: 20px;
  }
  
  .panel {
    height: 200px;
  }
  
  .panel.active {
    height: 450px;
  }
  
  .panel-overlay {
    width: 100%;
    height: 100%;
    transform: translateY(-10px); /* Change direction for mobile */
  }
  
  .panel:hover .panel-overlay,
  .panel.active .panel-overlay {
    transform: translateY(0); /* Reset transform on hover/active */
  }
  
  .panel-overlay h3 {
    font-size: 28px;
  }
  
  .panel-overlay p {
    max-width: 100%;
    font-size: 14px;
  }
  
  /* Make active panel's overlay prominent */
  .panel.active .panel-overlay {
    opacity: 1;
  }
}
