/**
 * Infrastructure Section Styles
 *
 * @package Charleston_TST
 */

/* Basic section styling */
.infrastructure-section {
  position: relative;
  padding: var(--spacing-xxl) 0 var(--spacing-xl) 0;
  min-height: 600px; /* Ensure minimum height */
  background-color:var(--color-light-blue);
  overflow: hidden; /* Ensure radial effect stays within bounds */
}

/* Radial effect behind content */
.infrastructure-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--color-blue) 0%, transparent 70%);
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}


/* Title box styling */
.infrastructure-title-box {
  background-color: var(--color-blue);
  padding: 3rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: center;
}

/* No animation container needed */

/* Images container */
.infrastructure-images {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 0; /* Remove gap */
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
}

/* No additional animation needed */

.infrastructure-image {
  flex: 1;
  width: 33.333%; /* Each image takes up exactly 1/3 of the width */
  height: auto;
  overflow: hidden;
  font-size: 0; /* Remove any potential whitespace */
  line-height: 0;
}

.infrastructure-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Remove any potential whitespace */
  margin: 0;
  padding: 0;
}

/* Content styling */
.infrastructure-title {
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

/* Styling for spans within title */
.infrastructure-title span {
  color: var(--color-gold);
  font-weight: var(--font-weight-bold);
}

.infrastructure-description {
  color: var(--color-sky-blue);
}

.infrastructure-description p {
  margin-bottom: var(--spacing-sm);
}

/* Blue box styling for facts */
.infrastructure-blue-box {
  background-color: var(--color-sky-blue);
  padding: 3rem 0;
  width: 100%;
  position:relative;
  z-index:1;
}

/* Facts styling */
.infrastructure-facts {
  display: flex;
  width: 100%;
}

.infrastructure-fact {
  flex: 1;
  padding: 0 var(--spacing-sm);
  text-align: center;
}

.infrastructure-fact-number {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-xs);
  line-height: 1;
  color: var(--color-dark-blue);
}

.infrastructure-fact-text {
  color: var(--color-dark-blue);
}

.infrastructure-fact-text p {
  margin-bottom: var(--spacing-xs);
}

.infrastructure-fact-text p:last-child {
  margin-bottom: 0;
}

/* Gold line at bottom */
.infrastructure-gold-line {
  height: 15px;
  background-color: var(--color-gold);
  margin-top: 0;
  width: 0; /* Start with 0 width */
  position: relative;
  z-index: 1;
  transition: width 1.2s ease-in-out; /* Smooth transition for width change */
}

/* Animation triggered when section is in viewport */
.infrastructure-section.in-viewport .infrastructure-gold-line {
  width: 100%; /* Expand to full width when in viewport */
  transition-delay: 0.5s; /* Add a slight delay before starting animation */
}

/* Jump link styling */
.infrastructure-next-section-link-wrapper {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-xl);
}

.infrastructure-next-section-link {
  display: inline-flex;
  align-items: center;
  flex-direction: column; /* Stack elements vertically */
  color: #fff;
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transition: color var(--transition-speed) var(--transition-timing);
}

.infrastructure-next-section-link:hover {
  color: var(--color-gold);
}

.infrastructure-next-section-icon {
  display: inline-flex;
  margin-top: 0.5rem; /* Space between text and icon */
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Mobile styles */
@media (max-width: 992px) {
  .infrastructure-blue-box {
    padding: 2rem;
  }
  
  .infrastructure-facts {
    flex-direction: column;
  }
  
  .infrastructure-fact {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  .infrastructure-fact:last-child {
    margin-bottom: 0;
  }
  

  .infrastructure-images {
    flex-direction: column;
  }
  
  .infrastructure-image {
    width: 100%;
    max-height: 350px; /* Max height for mobile */
    height: auto;
  }
  
  /* Hide the second and third images on mobile */
  .infrastructure-image:nth-child(2),
  .infrastructure-image:nth-child(3) {
    display: none;
  }
}
