/* News ticker, flash banner, notices board */

.news-ticker {
  display: flex;
  align-items: stretch;
  background: linear-gradient(90deg, var(--md-secondary, #1b4965), #0d2137);
  color: #fff;
  font-size: 0.9rem;
  border-bottom: 3px solid var(--md-primary, #e85d04);
  overflow: hidden;
}

.news-ticker__label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  background: var(--md-primary, #e85d04);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  white-space: nowrap;
  animation: ticker-label-pulse 2s ease-in-out infinite;
}

@keyframes ticker-label-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

.news-ticker__viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.news-ticker__track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  padding: 0.7rem 1.5rem;
  animation: news-ticker-scroll 45s linear infinite;
}

.news-ticker:hover .news-ticker__track {
  animation-play-state: paused;
}

@keyframes news-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.news-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.news-ticker__link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-ticker__sep { opacity: 0.6; }
.news-ticker__msg { opacity: 0.92; font-weight: 400; }

/* Flash / pinned banner */
.flash-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(232, 93, 4, 0.12), rgba(46, 196, 182, 0.15));
  border-bottom: 1px solid rgba(27, 73, 101, 0.12);
  min-height: 3.25rem;
}

.flash-banner__slides {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  min-height: 3.25rem;
}

.flash-banner__slide {
  display: none;
  align-items: center;
  gap: 0.75rem;
  animation: flash-fade-in 0.5s ease;
}

.flash-banner__slide.is-active {
  display: flex;
}

@keyframes flash-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-banner__icon {
  color: var(--md-primary, #e85d04);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.flash-banner__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  font-size: 0.92rem;
  color: var(--md-secondary, #1b4965);
}

.flash-banner__body strong { font-weight: 700; }

.flash-banner__more {
  font-weight: 600;
  color: var(--md-primary, #e85d04);
  text-decoration: none;
  font-size: 0.85rem;
}

.flash-banner__dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding-bottom: 0.4rem;
}

.flash-banner__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(27, 73, 101, 0.25);
  cursor: pointer;
  padding: 0;
}

.flash-banner__dot.is-active {
  background: var(--md-primary, #e85d04);
  transform: scale(1.2);
}

/* Notices board */
.notices-board__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.notice-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(27, 73, 101, 0.1);
  box-shadow: 0 4px 16px rgba(27, 73, 101, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.notice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27, 73, 101, 0.1);
}

.notice-card--pinned {
  border-color: var(--md-primary, #e85d04);
  box-shadow: 0 0 0 1px rgba(232, 93, 4, 0.25), 0 6px 20px rgba(232, 93, 4, 0.12);
  animation: notice-pulse 3s ease-in-out infinite;
}

@keyframes notice-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(232, 93, 4, 0.25), 0 6px 20px rgba(232, 93, 4, 0.12); }
  50% { box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.4), 0 8px 28px rgba(232, 93, 4, 0.18); }
}

.notice-card__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--md-primary, #e85d04);
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.notice-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--md-secondary, #1b4965);
  padding-right: 4rem;
}

.notice-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
}

.notice-card__meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.notice-card__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--md-primary, #e85d04);
}

@media (max-width: 640px) {
  .news-ticker { flex-direction: column; }
  .news-ticker__label { justify-content: center; }
  .news-ticker__track { animation-duration: 60s; }
}
