/* Mission Section Animation Styles */
.mission-section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem 6rem;
  position: relative;
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(11,15,28,0.95) 100%);
  overflow: hidden;
}

.mission-animation-wrapper {
  max-width: 1200px;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Changed from center to flex-start for left alignment */
  margin-left: auto;
  margin-right: auto;
  text-align: left; /* Changed from center to left */
}

.mission-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Changed from center to flex-start */
  text-align: left; /* Changed from center to left */
  z-index: 10;
  position: relative;
}

.mission-line {
  margin-bottom: 0.3rem; /* Reduced vertical space between lines */
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* Changed from center to flex-start */
  min-height: 1.2em; /* Ensure consistent line height */
}

/* Make sure IN COLLEGIATE AND stay together */
.mission-line:nth-child(7) {
  white-space: nowrap;
}

.mission-word {
  opacity: 0;
  transform: translateY(100%);
  display: inline-block;
  font-family: 'IDLEWILD', 'Arial', sans-serif;
  font-weight: bold;
  font-size: 3.2rem;
  margin: 0 0.6rem 0.2rem 0; /* Changed margins to add right margin only */
  transition: opacity 0.6s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  white-space: nowrap;
  color: rgba(240, 240, 245, 0.95); /* Brighter white with 95% opacity */
  line-height: 1.2; /* Improved line height for better readability */
  letter-spacing: 0.01em; /* Slight letter spacing for better legibility */
}

.mission-word.visible {
  opacity: 1;
  transform: translateY(0);
}

.accent-word {
  position: relative;
  color: rgb(255, 123, 0); /* Exact brand orange color */
  -webkit-text-fill-color: rgb(255, 123, 0); /* Override for webkit browsers */
  text-fill-color: rgb(255, 123, 0);
}

.accent-word::before {
  content: '';
  position: absolute;
  bottom: -0.15em;
  left: 0;
  width: 100%;
  height: 0; /* Set height to 0 to remove the underline */
  background: rgb(255, 123, 0);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
  border-radius: 1px;
}

.accent-word.highlight::before {
  animation: highlightExpand 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.mission-graphic {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wave-pattern-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards 0.5s;
  z-index: 0;
}

.wave-pattern-container {
  position: absolute;
  width: 140%; /* Extend well beyond container edges */
  height: 140%; /* Extend well beyond container edges */
  top: -20%;
  left: -20%;
  opacity: 1;
  z-index: 0;
  overflow: visible;
}

/* Make the section itself position relative to contain the absolute positioned waves */
.mission-section {
  position: relative;
  overflow: hidden; /* Prevent scrollbars from oversized SVG */
}

/* Animation Keyframes */
@keyframes highlightExpand {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes floatAnimation {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, 10px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Responsive media queries */
/* Landscape/Desktop Orientation (width > height) */
@media (orientation: landscape) {
  .mission-section {
    min-height: 90vh; /* Reduced from 100vh */
    padding: 4rem 2rem 4rem; /* Adjusted vertical padding */
  }
  
  .mission-word {
    font-size: 2.8rem; /* Adjusted font size */
    margin: 0 0.5rem 0.3rem 0; /* Adjusted margins */
  }
  
  .mission-line {
    margin-bottom: 0.4rem; /* Adjusted space between lines */
  }
  
  .circle-outline {
    width: 650px;
    height: 650px;
  }
  
  .circle-pulse {
    width: 350px;
    height: 350px;
  }
  
  /* Adjust background elements for better fit */
  .circle-small-1, .circle-small-2, .circle-small-3 {
    transform: scale(0.85);
  }
}

/* Media query for tablets */
@media (max-width: 992px) {
  .mission-word {
    font-size: 2.5rem;
    margin: 0 0.4rem 0.3rem 0;
  }
  
  .mission-line {
    margin-bottom: 0.5rem;
  }
  
  .mission-section {
    padding: 4rem 1rem 6rem;
  }
}

/* Media query for smaller tablets and large phones */
@media (max-width: 768px) {
  .mission-animation-wrapper {
    align-items: flex-start; /* Left align for mobile */
    text-align: left; /* Left text for mobile */
  }

  .mission-lines {
    align-items: flex-start; /* Left align for mobile */
    text-align: left; /* Left text for mobile */
  }

  .mission-line {
    justify-content: flex-start; /* Left alignment for mobile */
    margin-bottom: 0.3rem;
  }

  /* Allow line breaks on mobile for the IN COLLEGIATE AND line */
  .mission-line:nth-child(7) {
    white-space: normal;
  }

  .mission-word {
    font-size: 2.2rem;
    margin: 0 0.3rem 0.3rem 0; /* Right margin only for left-aligned text */
    line-height: 1.25; /* Improved line height */
  }
  
  .mission-section {
    padding: 3rem 1rem 5rem;
  }
}

/* Media query for phones */
@media (max-width: 576px) {
  .mission-word {
    font-size: 1.5rem;
    margin: 0 0.25rem 0.2rem 0; /* Right margin only for left-aligned text */
    line-height: 1.3;
  }
  
  .mission-line {
    margin-bottom: 0.2rem;
    line-height: 1.4; /* Improved line height for mobile */
  }
  
  /* Remove underline adjustments since we're not using underlines anymore */
  .accent-word::before {
    height: 0;
  }
  
  .mission-section {
    padding: 3rem 0.5rem 5rem;
  }
}

/* Media query for small phones */
@media (max-width: 480px) {
  .mission-word {
    font-size: 1.3rem;
    margin: 0 0.2rem 0.15rem 0; /* Right margin only for left-aligned text */
    line-height: 1.4;
  }
  
  .mission-line {
    margin-bottom: 0.2rem;
  }
  
  .mission-section {
    padding: 2.5rem 0.5rem 4rem;
  }
}

/* Extra small screens */
@media (max-width: 375px) {
  .mission-word {
    font-size: 1.2rem;
    margin: 0 0.15rem 0.15rem 0; /* Right margin only for left-aligned text */
  }
  
  .mission-line {
    margin-bottom: 0.2rem;
  }
}

/* High-resolution devices with small viewports */
@media (min-width: 390px) and (max-width: 767px) and (min-resolution: 2dppx) {
  .mission-word {
    font-size: 1.4rem;
    margin: 0 0.18rem 0.2rem 0; /* Right margin only for left-aligned text */
  }
  
  .mission-line {
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
  }
  
  .mission-section {
    padding: 3rem 0.5rem 5rem;
  }
  
  .mission-animation-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
  }
}
