/* Mobile-First CSS - Singularity.Kiwi */
/* Works on mobile AND desktop with responsive design */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
  background-attachment: fixed;
  color: #fff;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  width: 100%;
}

a {
  color: #00d4ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container - Mobile: Edge to Edge, Desktop: Centered */
.container {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  width: 100%;
  padding: 12px;
  position: relative;
}

.site-branding {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  margin: 0;
}

.site-title a {
  color: #fff;
}

.site-title span {
  color: #00d4ff;
}

.site-description {
  display: none;
}

/* Hamburger Menu Button - Mobile Only */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Navigation - Hidden on Mobile, Shown on Desktop */
.main-navigation {
  display: none;
  flex-direction: column;
  width: 100%;
  padding: 0;
  margin-top: 12px;
}

.main-navigation.active {
  display: flex;
}

.main-navigation a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 12px 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  width: 100%;
}

.main-navigation a:hover {
  color: #00d4ff;
  background: none;
}

/* Breaking News Ticker - Label left, text scrolls to the right */
.breaking-news-ticker {
  background: #1a1a3a;
  width: 100%;
  padding: 10px 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.ticker-label {
  background: #00d4ff;
  color: #000;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 12px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticker-wrapper {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.ticker-content {
  display: inline-flex;
  animation: ticker 35s linear infinite;
  -webkit-animation: ticker 35s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  white-space: nowrap;
}

.ticker-item:hover {
  color: #00d4ff;
}

.ticker-separator {
  margin: 0 12px;
  color: rgba(255,255,255,0.4);
}

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

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

/* Countdown */
.countdown-section {
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.1) 0%, rgba(120, 0, 255, 0.1) 100%);
  width: 100%;
  padding: 20px 0;
}

.countdown-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.countdown-item {
  text-align: center;
}

.countdown-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
}

.countdown-number.accelerating {
  color: #00e676;
}

.countdown-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

/* News Section */
.news-section {
  width: 100%;
  padding: 0;
}

.news-section h2 {
  padding: 12px;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* News Item - Mobile: Full width */
.news-item {
  width: 100%;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.news-item a {
  color: #fff;
  text-decoration: none;
  display: block;
}

.news-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-bottom: 8px;
}

.news-item h3 {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0;
}

.news-item h3:hover {
  color: #00d4ff;
}

.news-item .article-date-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  padding: 4px 8px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.9);
  border-radius: 4px;
}

.news-item .article-card-image {
  position: relative;
  overflow: hidden;
}

/* Badge inside image - positioned top-right */
.news-item .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #00d4ff, #00e676);
  color: #0a0a1a;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 2;
}

/* Article Page */
.article-hero {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* Complex hero format: background image in child div */
.article-hero-image {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
}

.article-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.65) 100%);
}

.article-hero-content {
  position: relative;
  z-index: 2;
  padding: 24px 16px 20px;
}

.article-content {
  width: 100%;
  padding: 16px 12px;
}

.article-category {
  color: #00d4ff;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.article-content h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.article-meta {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.article-content h2 {
  font-size: 1.4rem;
  margin: 28px 0 12px;
  color: #fff;
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.article-content blockquote {
  border-left: 3px solid #00d4ff;
  padding-left: 16px;
  margin: 20px 0;
  font-style: italic;
  color: rgba(255,255,255,0.8);
}

.article-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 12px;
  margin-top: 32px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.article-nav a {
  color: #00d4ff;
  text-decoration: none;
  font-size: 0.875rem;
}

/* Footer */
.site-footer {
  background: #0a0a1a;
  width: 100%;
  padding: 16px 12px;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

.site-footer a {
  color: #00d4ff;
}

/* ============================================
   DESKTOP STYLES (screens 768px and wider)
   ============================================ */
@media (min-width: 768px) {
  /* Container: Center with max-width */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* ============================================
     STICKY NAV BAR - Logo scrolls off, menu stays
     ============================================ */
  .site-header {
    position: relative;
    background: transparent;
    padding: 0;
  }
  
  /* Branding section scrolls away */
  .site-branding {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to right, #302b63 0%, #0a0a1a 100%);
  }
  
  /* Logo area */
  .site-branding > div:first-child {
    display: flex;
    flex-direction: column;
  }
  
  /* THE STICKY NAV - stays at top when scrolling */
  .main-navigation {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    background: rgba(15, 12, 41, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    padding: 0 20px !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  /* Hide hamburger on desktop */
  .menu-toggle {
    display: none !important;
  }
  
  .site-description {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    margin-top: 4px;
  }
  
  /* ============================================
     NAV LINKS - Red hover effect (old site style)
     ============================================ */
  .main-navigation a {
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    height: 50px;
    border-bottom: none;
    width: auto;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.9) !important;
    position: relative;
    transition: color 0.2s ease;
    text-decoration: none;
    margin: 0;
  }
  
  /* Blue hover background - fills from bottom */
  .main-navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #00d4ff;
    transition: height 0.2s ease;
    z-index: -1;
  }
  
  .main-navigation a:hover::before {
    height: 100%;
  }
  
  .main-navigation a:hover {
    color: #fff !important;
    text-decoration: none;
  }
  
  /* Current page - blue background filled (set via JS) */
  .main-navigation a.active::before {
    height: 100%;
  }
  
  .main-navigation a.active {
    color: #fff !important;
  }
  
  .site-title {
    font-size: 1.75rem;
  }
  
  /* Ticker: Scroll speed on desktop */
  .ticker-content {
    animation-duration: 30s;
  }
  
  /* Countdown: Larger numbers */
  .countdown-section {
    padding: 40px 0;
  }
  
  .countdown-number {
    font-size: 3.5rem;
  }
  
  .countdown-label {
    font-size: 0.875rem;
  }
  
  /* News: Grid layout on desktop */
  .news-section {
    padding: 20px;
  }
  
  .news-section h2 {
    padding: 0 0 16px;
    font-size: 1.5rem;
  }
  
  /* News grid: 2 columns on tablet, 3 on desktop */
  .news-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .news-section h2 {
    grid-column: 1 / -1;
  }
  
  .news-item {
    padding: 0;
    border-bottom: none;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, background 0.2s;
  }
  
  .news-item:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.05);
  }
  
  .news-item img {
    height: 200px;
  }
  
  .news-item h3 {
    padding: 16px;
    font-size: 1.1rem;
  }
  
  /* Article: Centered with max-width */
  .article-hero {
    height: 400px;
  }
  
  .article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
  }
  
  .article-content h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
  }
  
  .article-content h2 {
    font-size: 1.75rem;
  }
  
  /* Footer: More padding */
  .site-footer {
    padding: 24px;
  }
}

/* Large Desktop (1200px+) - 3 column news grid */
@media (min-width: 1200px) {
  .news-section {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .site-header {
    padding: 20px 40px;
  }
  
  .main-navigation a {
    padding: 10px 20px;
    font-size: 1rem;
  }
  
  .container {
    padding: 0 40px;
  }
}

/* Today's Featured Article - highlighted but in grid */
.featured-today {
  background: linear-gradient(135deg, rgba(0,212,255,0.08) 0%, rgba(15,15,35,0.8) 100%);
  border: 1px solid rgba(0,212,255,0.2);
}

.featured-today .article-card-image {
  height: 200px;
}

.featured-today h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* Badge for featured articles - positioned inside image */
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #00d4ff, #00e676);
  color: #0a0a1a;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}

.article-excerpt {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  padding: 0 16px 16px;
  margin: 0;
}

.article-date-overlay.today {
  background: linear-gradient(135deg, #00d4ff, #00e676);
  color: #0a0a1a;
}
