/**
 * @file
 * Styles for the Latest News Flyout component.
 */

/* The Vertical Trigger Tab */
.latest-news-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040; /* Just below the offcanvas backdrop */
  background-color: #4b286d; /* NSSC Purple */
  width: 45px;
  height: 160px;
  border-radius: 8px 0 0 8px;
  transition: all 0.3s ease-in-out;
  padding: 0;
}

.latest-news-tab:hover,
.latest-news-tab:focus {
  background-color: #3a1f56;
  width: 55px; /* Slight expansion on hover */
}

.latest-news-tab__text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Offcanvas Customization */
.latest-news-flyout {
  width: 400px !important; /* Fixed width for the news drawer */
  border-left: 5px solid #4b286d;
}

@media (max-width: 576px) {
  .latest-news-flyout {
    width: 100% !important; /* Full width on mobile */
  }
}

.latest-news-flyout .offcanvas-header {
  background-color: #4b286d !important;
  padding: 1.5rem;
}

.latest-news-flyout .offcanvas-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Block Headers (Section Titles) */
.latest-news-flyout .view-header {
  padding: 1rem 1.5rem 0;
}

.latest-news-flyout .view-header h6 {
  font-family: 'Inter', sans-serif;
  color: #042969;
  font-size: 22px;
  line-height: 1.1; /* 110% */
  letter-spacing: 0.05em; /* 5% */
  font-weight: 700;
  text-transform: none; 
}

/* Block Footers */
.latest-news-flyout .view-footer {
  padding: 0 1.5rem;
}

/* "See More" Link Formatting & Animations */
.flyout-see-more {
  font-family: 'Inter', sans-serif;
  color: #006BB6 !important;
  font-weight: 600; /* Semi-bold */
  font-size: 18px;
  transition: color 0.2s ease;
}

.flyout-see-more:hover {
  color: #042969 !important; /* Slightly darker blue on hover */
}

.flyout-see-more i {
  transition: transform 0.2s ease;
}

.flyout-see-more:hover i {
  transform: translateX(5px); /* Arrow slides right on hover */
}

/* News Item Styling within the Flyout */
.latest-news-flyout .views-row {
  padding: 1rem 1.5rem;
  transition: background-color 0.2s ease;
}

.latest-news-flyout .views-row:hover {
  background-color: #f8f9fa;
}

/* Dates */
.latest-news-flyout .news-date {
  font-family: 'Inter', sans-serif;
  color: #42B1FF;
  font-weight: 700; /* Bold */
  font-size: 18px;
  line-height: 1.2; /* 120% */
  letter-spacing: -0.02em; /* -2% */
  display: block;
}

/* Item Titles */
.latest-news-flyout .news-title a {
  font-family: 'Inter', sans-serif;
  color: #494959;
  font-weight: 500; /* Medium */
  font-size: 16px;
  text-decoration: none;
  display: block;
}

.latest-news-flyout .news-title a:hover {
  color: #006BB6;
  text-decoration: underline;
}

/* Flyout Body Social Icons */
.flyout-social-link {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.flyout-social-link:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

/* Official Brand Colors */
.flyout-social-link.x-twitter { color: #000000; }
.flyout-social-link.bluesky   { color: #0285FF; }
.flyout-social-link.facebook  { color: #1877F2; }
.flyout-social-link.linkedin  { color: #0A66C2; }
.flyout-social-link.instagram { color: #E1306C; }
.flyout-social-link.youtube   { color: #FF0000; }



/* ==========================================================
   LATEST NEWS FLYOUT TAB ANIMATION
   ========================================================== */

/* 1. Define the bounce keyframes */
@keyframes attentionNudge {
  0%   { transform: translateY(-50%) translateX(0); }
  15%  { transform: translateY(-50%) translateX(-20px); } /* Big bounce left */
  30%  { transform: translateY(-50%) translateX(0); }
  45%  { transform: translateY(-50%) translateX(-10px); } /* Smaller bounce left */
  60%  { transform: translateY(-50%) translateX(0); }
  100% { transform: translateY(-50%) translateX(0); }
}

/* 2. Apply the animation to the tab on load */
.latest-news-tab {
  /* Existing styles for the tab remain untouched */
  
  /* name | duration | easing | delay | iterations */
  animation: attentionNudge 2s ease-in-out 1.5s 1; 
}