/* ===================================================================
   AllUpdate247 — Homepage Styles
   =================================================================== */

/* --- Hero / Featured Section --- */
.hero-section {
  padding: var(--space-8) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.hero-featured {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-small-card {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  align-items: center;
  transition: background var(--transition-fast);
}

.hero-small-card:last-child {
  border-bottom: none;
}

.hero-small-card:hover {
  background: var(--surface-2);
}

.hero-small-card-image {
  width: 80px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--surface-2);
}

.hero-small-card-body {
  flex: 1;
  min-width: 0;
}

.hero-small-card-cat {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
  display: block;
}

.hero-small-card-title {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.hero-small-card:hover .hero-small-card-title {
  color: var(--primary);
}

.hero-small-card-date {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: var(--space-1);
}

/* --- Latest Updates Ticker --- */
.latest-updates-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  overflow: hidden;
}

.latest-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: var(--space-4);
  border-right: 1px solid var(--border);
}

.latest-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse-badge 1.5s ease-in-out infinite;
}

.latest-ticker {
  display: flex;
  gap: var(--space-8);
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
}

.latest-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.latest-ticker-item a {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.latest-ticker-item a:hover {
  color: var(--primary);
}

.latest-updates-bar:hover .latest-ticker {
  animation-play-state: paused;
}

/* --- Category Section Layout --- */
.category-section {
  padding: var(--space-10) 0;
  border-bottom: 1px solid var(--border);
}

.category-section:last-of-type {
  border-bottom: none;
}

/* --- Main + Sidebar Layout --- */
.content-sidebar-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-8);
  align-items: start;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  max-height: calc(100vh - var(--header-height) - var(--space-8));
  overflow-y: auto;
}

/* Hide scrollbar on sticky sidebar but keep functionality */
.content-sidebar::-webkit-scrollbar {
  width: 4px;
}

.content-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.content-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: var(--radius-full);
}

/* --- Newsletter Section --- */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 50%, #1e40af 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: #fff;
  margin: var(--space-12) 0;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.newsletter-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.newsletter-content {
  position: relative;
  z-index: 1;
}

.newsletter-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.newsletter-title {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  color: #fff;
  margin-bottom: var(--space-2);
}

.newsletter-subtitle {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-6);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: var(--space-2);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: #fff;
  outline: none;
  transition: border-color var(--transition-fast);
  backdrop-filter: blur(4px);
}

.newsletter-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.newsletter-input:focus {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.2);
}

.newsletter-submit {
  padding: var(--space-3) var(--space-5);
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.newsletter-submit:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.newsletter-note {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-3);
}

/* --- Category Color Accents --- */
.cat-accent--tech    { border-top: 3px solid var(--cat-tech); }
.cat-accent--govt    { border-top: 3px solid var(--cat-govt); }
.cat-accent--jobs    { border-top: 3px solid var(--cat-jobs); }
.cat-accent--edu     { border-top: 3px solid var(--cat-edu); }
.cat-accent--exam    { border-top: 3px solid var(--cat-exam); }
.cat-accent--service { border-top: 3px solid var(--cat-service); }

.cat-text--tech    { color: var(--cat-tech); }
.cat-text--govt    { color: var(--cat-govt); }
.cat-text--jobs    { color: var(--cat-jobs); }
.cat-text--edu     { color: var(--cat-edu); }
.cat-text--exam    { color: var(--cat-exam); }
.cat-text--service { color: var(--cat-service); }

/* --- Stats Section --- */
.stats-strip {
  background: var(--primary);
  color: #fff;
  padding: var(--space-6) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  text-align: center;
}

.stat-item-value {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-item-label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
  font-weight: var(--fw-medium);
}
