/* Rolling News Header Styles - Attached to mobile header */
.rolling-news-header {
  position: relative;
  width: 100%;
  background: linear-gradient(90deg, #253b70 0%, #1a2b5c 50%, #253b70 100%);
  color: white !important;
  overflow: hidden;
  z-index: 150;
  font-family: 'Nunito', sans-serif;
  border-bottom: 2px solid #ff7162;
  border-top: 1px solid rgba(255, 113, 98, 0.3);
  display: block !important;
  visibility: visible !important;
}

.rolling-news-container {
  position: relative;
  width: 100%;
  height: 45px;
  display: flex !important;
  align-items: center;
  overflow: hidden;
  background: transparent;
}

.rolling-news-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: scroll-left 52.5s linear infinite;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  width: fit-content;
  min-width: 100%;
}

.news-text {
  display: inline-block;
  color: white !important;
  padding-right: 3rem;
  font-size: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

/* Rolling animation - complete text scroll */
@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Improved mobile scroll animation with 5x speed */
@keyframes mobile-scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-500%);
  }
}

/* Ensure animation is applied */
.rolling-news-content {
  animation-play-state: running !important;
}



/* Pause animation on hover */
.rolling-news-header:hover .rolling-news-content {
  animation-play-state: paused;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
  .rolling-news-header {
    height: 40px !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  .rolling-news-container {
    height: 40px !important;
    width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .rolling-news-content {
    display: inline-block !important;
    padding-left: 100% !important;
    animation: mobile-scroll 50s linear infinite !important;
    animation-play-state: running !important;
    white-space: nowrap !important;
    line-height: 40px !important;
    font-size: 13px !important;
  }
  
  .rolling-news-content .news-text {
    display: inline-block !important;
    white-space: nowrap !important;
  }
}

/* Very small mobile devices */
@media screen and (max-width: 480px) {
  .rolling-news-header {
    height: 35px;
  }
  
  .rolling-news-container {
    height: 35px;
  }
  
  .rolling-news-content {
    display: inline-block !important;
    padding-left: 100% !important;
    animation: mobile-scroll 50s linear infinite !important;
    animation-play-state: running !important;
    white-space: nowrap !important;
    line-height: 35px !important;
    font-size: 12px !important;
  }
  
  .rolling-news-content .news-text {
    display: inline-block !important;
    white-space: nowrap !important;
  }
}

/* Ensure news header is part of both mobile and desktop header structures */
.rolling-news-header {
  position: relative; /* Part of the header structure */
  z-index: 150;
}

/* Make the desktop header sticky to include the news ticker */
@media screen and (min-width: 769px) {
  .desktop-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 150 !important;
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  }
}

/* Ensure news header shows on all devices */
.rolling-news-header {
  display: block !important;
}

/* Mobile-specific news header */
@media screen and (max-width: 768px) {
  /* Hide desktop news header on mobile */
  .desktop-header .rolling-news-header {
    display: none !important;
  }
  
  /* Mobile news header - enhanced version with proper scrolling */
  .mobile-news {
    display: block !important;
    width: 100% !important;
    height: 40px !important;
    background: linear-gradient(90deg, #253b70 0%, #1a2b5c 50%, #253b70 100%) !important;
    color: white !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  .mobile-news .rolling-news-container {
    width: 100% !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
  }
  
  .mobile-news .rolling-news-content {
    display: inline-block !important;
    padding-left: 100% !important;
    animation: mobile-scroll 50s linear infinite !important;
    white-space: nowrap !important;
    line-height: 40px !important;
    font-size: 13px !important;
  }
  
  .mobile-news .news-text {
    color: white !important;
    white-space: nowrap !important;
    display: inline-block !important;
  }
}

/* Hide mobile news on desktop */
@media screen and (min-width: 769px) {
  .mobile-news {
    display: none !important;
  }
}