/**
 * Greenbelt Section Styles
 *
 * @package Charleston_TST
 */

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

/* Radial effect behind content */
.greenbelt-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-dark-green) 0%, transparent 70%);
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

/* Layout styling */
.greenbelt-layout {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-bottom: 0; /* No margin to ensure gold line is flush */
}

/* Content section styling (left side) */
.greenbelt-content {
  flex: 0 0 45%; /* Fixed width at 45% */
  padding: 3rem;
  background-color: var(--color-dark-green); /* Dark green background */
  color: #fff; /* White text */
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Image container styling (right side) */
.greenbelt-image-container {
  flex: 0 0 55%; /* Fixed width at 55% */
  display: flex;
  align-items: stretch;
}

.greenbelt-image {
  width: 100%;
  height: 100%;
  min-height: 550px;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
}

/* Content styling */
.greenbelt-title {
  color: #fff;
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-md);
  position: relative;
  z-index: 1;
}

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

.greenbelt-description {
  color: #fff;
  position: relative;
  z-index: 1;
}

.greenbelt-description p {
  color: #fff;
}

/* Content link styling (inline with text) */
.greenbelt-content-link-wrapper {
  margin-top: var(--spacing-sm);
}

.greenbelt-content-link {
  color: var(--color-gold);
  text-decoration: underline;
  font-weight: var(--font-weight-bold);
  transition: color var(--transition-speed) var(--transition-timing);
}

.greenbelt-content-link:hover {
  color: var(--color-sky-blue);
}

.greenbelt-content-link-icon {
  display: inline-flex;
  margin-left: var(--spacing-xs);
  animation: bounce 2s infinite;
  transition: transform var(--transition-speed) var(--transition-timing);
}

.greenbelt-content-link:hover .greenbelt-content-link-icon {
  transform: translateY(3px);
}

/* Facts styling */
.greenbelt-facts {
  display: flex;
  width: 100%;
  margin-top: var(--spacing-lg);
  background-color: var(--color-sky-blue); /* Sky blue background */
  padding: 2rem 1rem;
}

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

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

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

/* Gold line at bottom */
.greenbelt-gold-line {
  height: 15px;
  background-color: var(--color-gold);
  margin-top: 0;
  width: 0; /* Start with 0 width */
  position: relative;
  z-index: 2; /* Higher z-index to ensure it appears above other elements */
  transition: width 1.2s ease-in-out; /* Smooth transition for width change */
  clear: both; /* Ensure it sits below all content */
}

/* Animation triggered when section is in viewport */
.greenbelt-section.in-viewport .greenbelt-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 */
.greenbelt-next-section-link-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 0px;

}

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

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

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

/* Mobile styles */
@media (max-width: 992px) {
  .greenbelt-facts {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .greenbelt-fact {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  .greenbelt-fact:last-child {
    margin-bottom: 0;
  }
  
  .greenbelt-fact-number {
    font-size: var(--font-size-h3);
  }
  
  .greenbelt-layout {
    flex-direction: column;
    margin-bottom: 0; /* Ensure no margin between layout and gold line */
  }
  
  .greenbelt-content,
  .greenbelt-image-container {
    width: 100%;
    flex: 0 0 100%;
  }
  
  .greenbelt-content {
    padding: 2rem;
    order: 1; /* Content appears first on mobile */
  }
  
  .greenbelt-image-container {
    order: 2; /* Image appears second on mobile */
    max-height: 350px; /* Max height for mobile */
    height: auto;
    overflow: hidden; /* Prevent image from spilling out */
  }
  
  .greenbelt-image {
    max-height: 350px; /* Max height for mobile */
    height: auto;
    object-fit: cover; /* Ensure image covers container properly */
    width: 100%;
  }
  
  /* Ensure gold line appears after image content */
  .greenbelt-gold-line {
    position: relative;
    z-index: 3; /* Higher z-index to ensure it appears above image */
    margin-top: 0;
  }
}
