/* ==========================================================================
   EPIC UTTARAKHAND NEWS - 13 DISTRICTS CATEGORY SYSTEM
   Districts: Almora, Bageshwar, Chamoli, Champawat, Dehradun, Haridwar,
   Nainital, Pauri Garhwal, Pithoragarh, Rudraprayag, Tehri Garhwal,
   Udham Singh Nagar, Uttarkashi
   ========================================================================== */

/* District Category Bar (Horizontal Scroll / Grid) */
.districts-section {
  padding: 1.25rem 0 0.5rem;
  position: relative;
  z-index: 10;
  width: 100%;
}

.districts-ribbon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.districts-scroll-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0.25rem;
  width: 100%;
}
.districts-scroll-nav::-webkit-scrollbar { display: none; }

.district-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-normal);
  flex-shrink: 0;
  scroll-snap-align: start;
}

.district-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.district-chip.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(0, 160, 233, 0.3));
  border-color: var(--accent-cyan);
  color: #ffffff;
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.district-chip .district-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.district-chip .news-count {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  color: var(--accent-gold);
}

/* 13 Districts Visual Explorer & Banner */
.district-banner {
  margin: 1.5rem 0;
  background: linear-gradient(135deg, rgba(15, 22, 37, 0.95), rgba(28, 40, 65, 0.85)), url('../assets/images/hero_news.jpg');
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.district-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 12, 20, 0.95) 0%, rgba(8, 12, 20, 0.75) 60%, rgba(8, 12, 20, 0.4) 100%);
}

.district-banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.district-info-left h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.district-info-left p {
  color: var(--text-secondary);
  max-width: 620px;
  font-size: 1rem;
}

.district-stats-pills {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.district-stat-pill {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.district-stat-pill .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.district-stat-pill .val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* District Grid Cards (Overview Mode) */
/* District Grid Cards (Visual Thumbnail Mode) */
.districts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 3rem;
}

.district-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 0;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.district-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), var(--shadow-glow-cyan);
}

/* Photo Thumbnail Container */
.district-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.district-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.district-card:hover .district-card-media img {
  transform: scale(1.08);
}

.district-media-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
  pointer-events: none;
}

.district-media-badge-left {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 5;
}

.district-media-badge-right {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 5;
}

.district-division-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.district-division-tag.tier-1 {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.district-division-tag.tier-2 {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.district-division-tag.tier-3 {
  border-color: #8338ec;
  color: #d0bfff;
}

.district-weather-tag {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(10, 15, 26, 0.88);
  border: 1px solid var(--accent-gold);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* District Card Body */
.district-card-body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.district-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.district-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.district-card-hindi {
  font-size: 0.92rem;
  color: var(--accent-gold);
  font-weight: 700;
  margin-left: 0.4rem;
}

.district-card-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.district-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  margin-top: auto;
}

.district-card-footer .stat-val {
  color: var(--accent-cyan);
  font-weight: 700;
}

.district-explore-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}

.district-card:hover .district-explore-cta {
  transform: translateX(4px);
  color: #fff;
}

/* Responsive Rules for Districts */
@media (max-width: 768px) {
  .district-banner {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  .district-info-left h2 {
    font-size: 1.6rem;
  }

  .districts-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}
