/* ============================================================
   The Public Brief — Global Design System
   Broadsheet editorial aesthetic
   ============================================================ */

/* ---- Ticker animation ---- */
.ticker-wrap { overflow: hidden; white-space: nowrap; box-sizing: border-box; }
.ticker { display: inline-block; padding-left: 100%; animation: ticker 30s linear infinite; }
.ticker:hover { animation-play-state: paused; }
.ticker-item { display: inline-block; padding: 0 2rem; }
@keyframes ticker {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Sports live ticker */
@keyframes marquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.marquee-animate { animation: marquee 25s linear infinite; }

/* ---- Search Overlay ---- */
#search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#search-overlay.open {
  opacity: 1;
  pointer-events: all;
}
#search-overlay .search-box {
  background: #fff;
  width: 100%;
  max-width: 680px;
  padding: 2rem;
  border-radius: 0;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  transform: translateY(-20px);
  transition: transform 0.25s ease;
}
#search-overlay.open .search-box { transform: translateY(0); }
#search-overlay input {
  width: 100%;
  font-size: 1.25rem;
  border: none;
  border-bottom: 2px solid #B00020;
  padding: 0.75rem 0;
  outline: none;
  font-family: 'Inter', sans-serif;
  color: #1a1c1c;
  background: transparent;
}
#search-overlay .search-results {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.search-result-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #E5E7EB;
  cursor: pointer;
}
.search-result-item:hover .result-title { color: #B00020; }
.result-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B00020;
  margin-bottom: 4px;
}
.result-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
  transition: color 0.2s;
}

/* ---- Article Reader Modal ---- */
#article-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}
#article-modal.open {
  opacity: 1;
  pointer-events: all;
}
#article-modal .modal-content {
  background: #fff;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 3rem 2.5rem;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
#article-modal.open .modal-content { transform: scale(1); }
#article-modal .modal-close {
  position: sticky;
  top: 0;
  right: 0;
  float: right;
  background: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #747878;
  transition: color 0.2s;
  z-index: 10;
  margin-top: -2.5rem;
  margin-right: -2rem;
  padding: 0.5rem;
}
#article-modal .modal-close:hover { color: #B00020; }
#article-modal .modal-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B00020;
  margin-bottom: 0.75rem;
  display: block;
}
#article-modal .modal-headline {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
  margin-bottom: 1rem;
}
#article-modal .modal-byline {
  font-size: 0.85rem;
  color: #6B7280;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E5E7EB;
}
#article-modal .modal-body {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  line-height: 1.85;
  color: #1a1c1c;
}
#article-modal .modal-body p { margin-bottom: 1.25rem; }
#article-modal .modal-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

/* ---- Toast Notification ---- */
#pb-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  background: #000;
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
#pb-toast.show {
  transform: translateY(0);
  opacity: 1;
}
#pb-toast .toast-icon { color: #D97706; font-size: 1.2rem; }

/* ---- Active nav highlight ---- */
nav a.nav-active {
  color: #b90c25 !important;
  border-bottom-color: #b90c25 !important;
}

/* ---- Article card hover ---- */
article.clickable-article { cursor: pointer; }
article.clickable-article:hover h2,
article.clickable-article:hover h3 {
  color: #b90c25;
}

/* ---- Smooth scroll ---- */
html { scroll-behavior: smooth; }

/* ---- Responsive image ---- */
img { max-width: 100%; height: auto; }

/* ---- No scrollbar utility ---- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
