/* =============================================================
   PakSpeaks — components.css
   All UI components: ticker, navbar, hero, cards, widgets, footer
   ============================================================= */

/* -------------------------------------------------------------
   TICKER BAR
   ------------------------------------------------------------- */
.ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--ticker-height);
  background: var(--green-primary);
  z-index: 1001;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.25);
  height: 100%;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  white-space: nowrap;
}

.ticker-dot {
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.ticker-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: inline-flex;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
}

.ticker-item {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  font-weight: 500;
  margin-right: 40px;
  cursor: pointer;
  transition: color 0.15s;
}

.ticker-item:hover {
  color: #ffffff;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* -------------------------------------------------------------
   NAVBAR
   ------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: var(--ticker-height);
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(8, 14, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(8, 14, 26, 0.98);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
  padding: 0 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-badge {
  background: var(--green-primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 4px 9px;
  border-radius: 6px;
  font-family: var(--font-body);
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-heading);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
}

.nav-link {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.breaking {
  color: #EF4444;
}

.nav-link.breaking:hover {
  color: #ff6b6b;
  background: rgba(239, 68, 68, 0.08);
}

/* Actions area */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Icon buttons */
.nav-icon-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color);
  color: #ffffff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s;
}

.hamburger:hover {
  border-color: var(--green-primary);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* -------------------------------------------------------------
   USER MENU DROPDOWN
   ------------------------------------------------------------- */
.user-menu {
  position: relative;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.user-avatar-btn:hover {
  border-color: var(--green-primary);
}

.user-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name-nav {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Dropdown panel */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
  display: none;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.dropdown-item.danger {
  color: #EF4444;
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* -------------------------------------------------------------
   MOBILE MENU OVERLAY + PANEL
   ------------------------------------------------------------- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(300px, 85vw);
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  z-index: 999;
  padding: 20px 0;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 20px 16px;
  align-self: flex-end;
  line-height: 1;
  transition: color 0.15s;
}

.mobile-menu-close:hover {
  color: #ffffff;
}

.mobile-menu .nav-link {
  display: flex;
  align-items: center;
  padding: 13px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0;
  transition: color 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active {
  color: var(--green-primary);
  background: rgba(0, 168, 107, 0.06);
}

/* -------------------------------------------------------------
   SEARCH OVERLAY
   ------------------------------------------------------------- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.97);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 24px 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.search-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.search-overlay-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 1;
}

.search-overlay-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.search-overlay-input-wrap {
  position: relative;
  width: 100%;
  max-width: 680px;
}

.search-overlay-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: var(--bg-elevated);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s ease;
  appearance: none;
}

.search-overlay-input:focus {
  border-color: var(--green-primary);
}

.search-overlay-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
}

.search-results-overlay {
  width: 100%;
  max-width: 680px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

/* -------------------------------------------------------------
   HERO SECTION
   ------------------------------------------------------------- */
.hero-section {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

#hero-container {
  min-height: 560px;
}

.hero-card {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 0;
  cursor: pointer;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 5s ease;
  will-change: transform;
}

.hero-card:hover .hero-image {
  transform: scale(1.03);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 14, 26, 0.98) 0%,
    rgba(8, 14, 26, 0.50) 50%,
    rgba(8, 14, 26, 0.10) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-meta-item {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* -------------------------------------------------------------
   ARTICLE CARDS
   ------------------------------------------------------------- */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 168, 107, 0.2);
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  height: 200px;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.article-card:hover .card-image-wrap img {
  transform: scale(1.06);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.card-views {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Large card variant */
.article-card.card-lg .card-image-wrap {
  height: 280px;
}

.article-card.card-lg .card-title {
  font-size: 1.2rem;
  -webkit-line-clamp: 4;
}

/* -------------------------------------------------------------
   TRENDING WIDGET
   ------------------------------------------------------------- */
.trending-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
}

.trending-list {
  display: flex;
  flex-direction: column;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-item:hover {
  opacity: 0.8;
}

.trending-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  font-family: var(--font-heading);
  min-width: 32px;
}

.trending-info {
  flex: 1;
  min-width: 0;
}

.trending-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.trending-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   NEWSLETTER
   ------------------------------------------------------------- */
.newsletter-section {
  background: linear-gradient(
    135deg,
    rgba(0, 168, 107, 0.12) 0%,
    rgba(0, 168, 107, 0.05) 100%
  );
  border: 1px solid rgba(0, 168, 107, 0.2);
  border-radius: 20px;
  padding: 48px;
  text-align: center;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.newsletter-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.newsletter-input:focus {
  border-color: var(--green-primary);
}

/* -------------------------------------------------------------
   SPORTS + TRENDING SPLIT LAYOUT
   ------------------------------------------------------------- */
.sports-trending-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* -------------------------------------------------------------
   STARTUPS TWO-COLUMN GRID
   ------------------------------------------------------------- */
.startups-layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

/* -------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 32px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-top: 12px;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.footer-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 5px 0;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--green-primary);
}

/* Social links */
.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-link {
  width: 38px;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.social-link:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
}

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s ease;
}

.footer-bottom-link:hover {
  color: #ffffff;
}

/* -------------------------------------------------------------
   BOTTOM NAV (Mobile)
   ------------------------------------------------------------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(9, 17, 30, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  z-index: 900;
  align-items: stretch;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s ease;
  padding: 6px 4px;
}

.bottom-nav-item.active {
  color: var(--green-primary);
}

.bottom-nav-item:hover {
  color: var(--green-primary);
}

.bottom-nav-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: block;
}
