/* Header styles */
.main-header {
  background: linear-gradient(135deg, #1c1e53 0%, #2d3192 100%);
  padding: 120px 0 60px;
  color: #ffffff;
  margin-top: 45px; /* Account for fixed navbar */
  display: flex;
  align-items: center;
  overflow: hidden; /* Prevent any content from overflowing */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 40px;
  width: 100%; /* Ensure full width */
  box-sizing: border-box;
}

.header-content {
  flex: 1;
  min-width: 300px;
  animation: fadeInUp 1s ease-out;
  text-align: left; /* Ensure text starts from left */
  word-wrap: break-word; /* Ensure long words break properly */
  overflow-wrap: break-word; /* Modern alternative to word-wrap */
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-heading {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
  margin-top: 0;
  text-align: left;
  word-break: break-word; /* Break long words if needed */
}

/* Gradient text for modern browsers */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .main-heading {
    background: linear-gradient(45deg, #ffffff, #fcd980);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.subheadline {
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0.9;
  line-height: 1.4;
  color: #fcd980;
  text-align: left;
  word-break: break-word; /* Break long words if needed */
}

.join-interactive {
  font-size: 1.1rem;
  margin-bottom: 25px;
  opacity: 0.9;
  line-height: 1.6; /* Slightly reduced line height */
  text-align: justify;
  hyphens: auto; /* Enable hyphenation for better text flow */
  word-break: break-word; /* Break long words if needed */
}

.join-interactive strong {
  color: #fcd980;
  font-weight: 600;
}

/* News ticker styles */
.news-ticker-container {
  background-color: #ff5100;
  color: white;
  padding: 10px 0;
  margin: 20px 0;
  overflow: hidden;
  position: relative;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.news-ticker {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-scroll 15s linear infinite;
}

.ticker-content:hover {
  animation-play-state: paused;
}

.breaking-news {
  font-weight: bold;
  margin-right: 20px;
  text-transform: uppercase;
  font-size: 1rem;
}

.ticker-text {
  font-weight: bold;
  margin-right: 30px;
  color: #ffff00;
  font-size: 1rem;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 10px;
}

.cta-button {
  display: inline-block;
  padding: 14px 30px;
  background-color: #fcd980;
  border-radius: 8px;
  color: #282938;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

.cta-button:hover {
  background-color: #ffcb45;
  transform: translateY(-3px);
}

.consultation-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.consultation-link {
  color: #ffffff;
  text-decoration: none;
  margin-right: 10px;
  white-space: nowrap;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.consultation-link:hover {
  color: #fcd980;
}

.arrow-icon {
  width: 20px;
  height: auto;
  transition: transform 0.3s ease;
}

.consultation-cta:hover .arrow-icon {
  transform: translateX(5px);
}

.icon-wrapper {
  display: flex;
  align-items: center;
}

.header-image-container {
  flex: 1;
  min-width: 300px;
  text-align: center;
  animation: fadeInRight 1s ease-out;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.header-image {
  max-width: 100%;
  height: auto;
  max-height: 450px;
}

/* Responsive styles */
@media (max-width: 1200px) {
  .main-heading {
    font-size: 2.5rem;
  }
  
  .subheadline {
    font-size: 1.4rem;
  }
  
  .header-container {
    gap: 30px;
  }
}

@media (max-width: 992px) {
  .header-container {
    flex-direction: column;
    gap: 40px;
    text-align: left;
  }
  
  .main-heading {
    font-size: 2.2rem;
  }
  
  .subheadline {
    font-size: 1.3rem;
  }
  
  .header-content, .main-heading, .subheadline, .join-interactive {
    text-align: justify;
    width: 100%;
  }
  
  .header-actions {
    justify-content: flex-start;
  }
  
  .header-image {
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  .main-header {
    padding: 100px 0 50px;
  }
  
  .header-container {
    padding: 0 15px;
    gap: 30px;
  }
  
  .main-heading {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .subheadline {
    font-size: 1.2rem;
  }
  
  .join-interactive {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .header-actions {
    flex-direction: row;
    gap: 15px;
    justify-content: flex-start;
  }
  
  .cta-button {
    padding: 12px 25px;
    font-size: 0.95rem;
  }
  
  .consultation-link {
    font-size: 0.95rem;
  }
  
  .breaking-news, .ticker-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .main-heading {
    font-size: 1.8rem;
  }
  
  .subheadline {
    font-size: 1.1rem;
  }
  
  .header-container {
    padding: 0 15px;
  }
  
  .cta-button {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  
  .consultation-link {
    font-size: 0.9rem;
  }
  
  .header-image {
    max-width: 100%;
  }
  
  .news-ticker-container {
    margin: 15px 0;
  }
  
  /* Stack buttons vertically on very small screens */
  .header-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .cta-button {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
  
  .consultation-cta {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Fix for very small screens */
@media (max-width: 400px) {
  .main-heading {
    font-size: 1.6rem;
  }
  
  .subheadline {
    font-size: 1rem;
  }
  
  .join-interactive {
    font-size: 0.9rem;
  }
  
  .cta-button {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
  
  .consultation-link {
    font-size: 0.9rem;
  }
  
  .header-container {
    padding: 0 10px;
  }
}

/* Ensure text doesn't overflow on any screen */
.main-heading, .subheadline, .join-interactive, .consultation-link {
  max-width: 100%;
  overflow: visible;
}