/* =============================================
   E-PAPER PAGE HERO BANNER
   ============================================= */
.epaper-page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #7b0020 100%);
  padding: var(--space-2xl) 0;
  color: white;
}

.epaper-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.epaper-page-hero .eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 5px 14px;
  border-radius: var(--radius-round);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
  backdrop-filter: blur(4px);
}

.epaper-page-hero h1 {
  font-family: var(--font-headline);
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.epaper-page-hero p {
  color: rgba(255,255,255,0.75);
  font-family: var(--font-hindi);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 480px;
}

.epaper-filters-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 240px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.filter-group select,
.filter-group input[type="date"] {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  color: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
  transition: border-color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
}

.filter-group select option {
  background: #1e293b;
  color: white;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.15);
}

.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.epaper-results-bar {
  padding: var(--space-md) 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

/* Responsive hero */
@media (max-width: 767px) {
  .epaper-page-hero h1 { font-size: 1.75rem; }
  .epaper-hero-inner { flex-direction: column; }
  .epaper-filters-hero { width: 100%; }
}

/* =============================================
   E-PAPER SECTION
   ============================================= */

.epaper-section {
  padding: var(--space-2xl) 0;
  background: var(--bg-surface);
  border-top: 3px solid var(--primary);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-title-wrap h2 {
  font-family: var(--font-headline);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title-wrap h2 i {
  color: var(--primary);
}

.epaper-filters {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}

.epaper-filters select,
.epaper-filters input[type="date"] {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.epaper-filters select:focus,
.epaper-filters input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
}

.epaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.epaper-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-normal), transform var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.epaper-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.epaper-thumb {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-elevated);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.epaper-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.epaper-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--tertiary);
  gap: 8px;
  width: 100%;
  height: 100%;
  font-size: 0.85rem;
}

.epaper-thumb-placeholder i {
  font-size: 2.5rem;
  color: var(--primary);
  opacity: 0.7;
}

.epaper-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-round);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.epaper-info {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.epaper-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  font-family: var(--font-hindi);
}

.epaper-edition {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.epaper-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.epaper-actions {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.epaper-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-family: var(--font-body);
}

.epaper-btn-view {
  background: var(--primary);
  color: white;
}

.epaper-btn-view:hover {
  background: var(--primary-dark);
}

.epaper-btn-download {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.epaper-btn-download:hover {
  background: var(--border);
}

/* =============================================
   WEATHER SECTION
   ============================================= */
.weather-section {
  padding: var(--space-xl) 0;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.weather-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  transition: box-shadow var(--transition-normal), transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.weather-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.weather-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.weather-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.weather-city {
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-hindi);
  color: var(--text);
  margin-bottom: 4px;
}

.weather-temp {
  font-size: 1.75rem;
  font-weight: 900;
  font-family: var(--font-headline);
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

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

.weather-loading {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-xl);
  font-size: 0.9rem;
}

/* =============================================
   SIDEBAR WEATHER WIDGET
   ============================================= */
.weather-widget-compact {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: white;
  overflow: hidden;
  position: relative;
}

[data-theme="light"] .weather-widget-compact {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.weather-widget-compact .weather-city {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
}

.weather-widget-compact .weather-temp {
  color: white;
  font-size: 2.5rem;
}

.weather-widget-compact .weather-condition {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* =============================================
   SMOOTH DARK MODE TRANSITION FIX
   ============================================= */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

*, *::before, *::after {
  transition-property: background-color, border-color, color;
  transition-duration: 0.25s;
  transition-timing-function: ease;
}

/* Override transition for elements that should be instant */
.ticker-content,
.skeleton::after,
img,
video {
  transition: none !important;
}

/* =============================================
   RESPONSIVE EPAPER & WEATHER
   ============================================= */
@media (max-width: 479px) {
  .epaper-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  .weather-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .epaper-filters {
    width: 100%;
  }
  .epaper-filters select,
  .epaper-filters input[type="date"] {
    flex: 1;
    min-width: 0;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .epaper-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .weather-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .epaper-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .weather-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .epaper-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .weather-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
