/* Strategy Section Module - Using Global Variables */

/* Main Container */
.strategy-section {
  padding: var(--spacing-2xl) 0;
  background: var(--color-bg-dark);
}

.strategy-container {
  max-width: 75rem; /* 1200px */
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: var(--spacing-2xl);

}

/* Strategy Title */
.strategy-title {
  font-size: var(--h3-size) !important;
  font-weight: 600; /* semi-bold per design */
  text-transform: uppercase;
  color: var(--h2-color);
  margin-bottom: var(--spacing-lg);
  position: relative;
}

/* Strategy Content */
.strategy-content {
  position: relative;
  width: 70%;
  display: flex;
  flex-direction: column;
}

/* Text Wrapper with Collapsible Functionality */
.strategy-text-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --collapsed-height: 4.5rem; /* Default ~3 lines at 1.5 line-height */
  --full-height: auto; /* Will be set by JavaScript */
  will-change: max-height;
}

.strategy-text-wrapper.is-collapsible:not(.is-expanded) {
  max-height: var(--collapsed-height);
}

.strategy-text-wrapper.is-expanded {
  max-height: var(--full-height);
  transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Strategy Text */
.strategy-text {
  font-size: var(--body-size);
  color: var(--color-body-muted);
  word-wrap: break-word;
}

.strategy-text p {
  margin-bottom: var(--spacing-sm);
  font-size: inherit;
  line-height: 1.6;
}

/* Gradient Overlay for Collapsed State */
.text-gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.75rem; /* 60px */
  background: linear-gradient(to bottom, 
    #1c1c1c2d 0%, 
    #1c1c1cb8 50%,
    var(--color-bg-dark) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.strategy-text-wrapper.is-collapsible:not(.is-expanded) .text-gradient-overlay {
  opacity: 1;
}

.strategy-text-wrapper.is-expanded .text-gradient-overlay {
  opacity: 0;
}

/* Read More Button */
 .read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: transparent;
  color: var(--color-secondary);
  border: none;
  font-size: var(--body-size);
  font-weight: 400;
  text-transform: none;
  cursor: pointer;
  position: relative;
  align-self: flex-end;
  overflow: hidden;
}

.read-more-btn:hover {
  border: none;
  background: transparent;
}

.read-more-btn:focus {
  border: none;
  background: transparent;
}

.read-more-btn:focus:hover {
  border: none;
  background: transparent;
}

.read-more-btn:active:hover {
  border: none;
  background: transparent;
}

.read-more-btn .btn-text,
.read-more-btn .btn-text-alt {
  position: relative;
  z-index: 1;
}

.read-more-btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}*/

/* Mobile Styles */
@media (max-width: 768px) {
  .strategy-section {
    padding: var(--spacing-xl) 0;
  }
  
  .strategy-container {
    padding: 0 var(--spacing-lg);
    flex-direction: column;
  }
  
  .strategy-title {
    margin-bottom: var(--spacing-md);
  }

  .read-more-btn {
    align-self: center;
  }

  .strategy-content {
    width: 100%;
  }
  
  
  
  /* Adjust collapsed height for mobile - 4 lines default */
  .strategy-text-wrapper {
    --collapsed-height: 6rem; /* ~4 lines at 1.5 line-height */
  }
}

@media (max-width: 480px) {
  .strategy-section {
    padding: var(--spacing-lg) 0;
  }
  
  .strategy-container {
    padding: 0 var(--spacing-md);
    flex-direction: column;
  }
  
  .read-more-btn {
    padding: var(--spacing-lg) var(--spacing-2xl);
  }

  .read-more-btn:active:hover{
    font-size: var(--body-size);
    padding: var(--spacing-lg) var(--spacing-2xl);
  }

  .read-more-btn:hover{
    padding: var(--spacing-lg) var(--spacing-2xl);
  }

  .strategy-text p {
    line-height: 1.5;
  }
}

/* Animation for expanding/collapsing */
@keyframes expandIn {
  from {
    opacity: 0.8;
    transform: translateY(-0.625rem); /* -10px */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.strategy-text-wrapper.is-expanded .strategy-text {
  animation: expandIn var(--transition-normal) ease-out;
}