/**
 * ══════════════════════════════════════════════════════════════════════
 * Civic Updates Rail & Hero Composition Styles
 * Nagar Panchayat Shergarh (nagarpanchayatshergarh.in)
 * ══════════════════════════════════════════════════════════════════════
 * Official 3-Color Design System:
 * Primary: Bloodstone (#5D0D1A) | Secondary: Misty Sage (#9FB2AC) | Supportive: Vanilla Custard (#FFF9EB)
 * Desktop 3-column layout: Left Civic Bulletin + Center Large 3D Cylinder + Right Context
 * Smooth vertical auto-cycling, interactive controls, and responsive collapse.
 */
/* ═══ HERO HEADER BADGE - REMOVED PER USER REQUIREMENT ═══ */
.cyl-header-badge,
.cyl-badge-pill {
  display: none !important;
}

/* ═══ HERO COMPOSITION GRID ═══ */
.hero-composition-container {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero-composition-grid {
  display: grid;
  grid-template-columns: 330px 1fr 275px;
  grid-template-rows: auto;
  gap: 20px;
  align-items: center;
  position: relative;
  min-height: 485px;
}

/* ═══ 3D CYLINDER CAROUSEL: SPANS AS 3D BACKDROP BEHIND LEFT & RIGHT PANELS ═══ */
.cyl-hero-container {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.cyl-hero-container .cyl-stage,
.cyl-hero-container .cyl-card,
.cyl-hero-container .cyl-controls-wrap,
.cyl-hero-container .cyl-dock,
.cyl-hero-container .cyl-nav-btn,
.cyl-hero-container .cyl-dot {
  pointer-events: auto;
}

/* ═══ LEFT CIVIC UPDATES RAIL (सूचनाएँ) - Modern Translucent Glass Look ═══ */
.civic-rail-wrapper {
  grid-column: 1;
  grid-row: 1;
  background: rgba(244, 236, 216, 0.55);
  border: 1.5px solid rgba(159, 178, 172, 0.45);
  border-radius: 20px;
  box-shadow: 0 16px 40px -12px rgba(93, 13, 26, 0.08),
              inset 0 1px 2px rgba(255, 255, 255, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 485px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  position: relative;
  z-index: 10;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.civic-rail-wrapper:hover {
  background: rgba(255, 249, 235, 0.65);
  border-color: rgba(93, 13, 26, 0.35);
  box-shadow: 0 20px 45px -10px rgba(93, 13, 26, 0.14),
              0 0 25px rgba(159, 178, 172, 0.18);
}

/* Rail Header - Frosted Translucent Bar */
.civic-rail-header {
  background: rgba(255, 249, 235, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--np-primary, #5D0D1A);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid rgba(159, 178, 172, 0.35);
  flex-shrink: 0;
}

.civic-rail-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.civic-rail-title-group i {
  font-size: 1.15rem;
  color: var(--np-primary, #5D0D1A);
}

.civic-rail-title {
  margin: 0;
  font-family: 'Eczar', serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--np-primary, #5D0D1A);
}

.civic-rail-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(93, 13, 26, 0.08);
  border: 1px solid rgba(93, 13, 26, 0.22);
  border-radius: 999px;
  padding: 2.5px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--np-primary, #5D0D1A);
}

.civic-rail-live-dot {
  width: 6px;
  height: 6px;
  background: var(--np-primary, #5D0D1A);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--np-primary, #5D0D1A);
  animation: liveBlink 1.8s infinite ease-in-out;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Rail Viewport & Track */
.civic-rail-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 12px 14px;
}

.civic-rail-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Individual Civic Item Card - Sleek Translucent Glass Floating Style */
.civic-card {
  background: rgba(255, 249, 235, 0.65);
  border: 1px solid rgba(159, 178, 172, 0.45);
  border-left: 3.5px solid var(--np-secondary, #9FB2AC);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(93, 13, 26, 0.04);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  cursor: pointer;
  outline: none;
  position: relative;
}

.civic-card:hover,
.civic-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(93, 13, 26, 0.35);
  border-left-color: var(--np-primary, #5D0D1A);
  box-shadow: 0 8px 24px -2px rgba(93, 13, 26, 0.14);
  background: rgba(255, 249, 235, 0.95);
}

.civic-card:focus-visible {
  outline: 2px solid var(--np-primary, #5D0D1A);
  outline-offset: 2px;
}

/* Card Category Variants */
.civic-card.cat-tender {
  border-left-color: var(--np-primary, #5D0D1A);
}

.civic-card.cat-announcement {
  border-left-color: var(--np-secondary, #9FB2AC);
}

.civic-card.cat-notice {
  border-left-color: #8C1C2E;
}

/* Meta Bar (Category Badge + Date) */
.civic-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.civic-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.civic-badge.badge-tender {
  background: rgba(93, 13, 26, 0.1);
  color: var(--np-primary, #5D0D1A);
  border: 1px solid rgba(93, 13, 26, 0.25);
}

.civic-badge.badge-announcement {
  background: rgba(159, 178, 172, 0.25);
  color: var(--np-primary, #5D0D1A);
  border: 1px solid rgba(159, 178, 172, 0.5);
}

.civic-badge.badge-notice {
  background: rgba(93, 13, 26, 0.08);
  color: var(--np-primary, #5D0D1A);
  border: 1px solid rgba(93, 13, 26, 0.2);
}

.civic-card-date {
  font-size: 0.72rem;
  color: var(--np-text-muted, #7A6E6A);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Card Title */
.civic-card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1A0A00;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Summary */
.civic-card-summary {
  margin: 0;
  font-size: 0.76rem;
  color: #5D3A1A;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Action Footer */
.civic-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px dashed rgba(159, 178, 172, 0.4);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--np-primary, #5D0D1A);
}

.civic-card-action i {
  transition: transform 0.2s ease;
}

.civic-card:hover .civic-card-action i {
  transform: translateX(3px);
}

/* Rail Controls Footer */
.civic-rail-footer {
  padding: 8px 14px;
  background: rgba(255, 249, 235, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(159, 178, 172, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.civic-rail-counter {
  font-size: 0.75rem;
  color: var(--np-text-muted, #7A6E6A);
  font-weight: 600;
}

.civic-rail-nav-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.civic-rail-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 249, 235, 0.85);
  border: 1px solid rgba(159, 178, 172, 0.45);
  color: var(--np-primary, #5D0D1A);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.civic-rail-btn:hover {
  background: var(--np-gradient-btn, linear-gradient(135deg, #741221 0%, #5D0D1A 45%, #3E060F 100%));
  color: var(--np-supportive, #F4ECD8);
  border-color: #3E060F;
}

.civic-rail-btn:focus-visible {
  outline: 2px solid var(--np-primary, #5D0D1A);
  outline-offset: 1px;
}

/* Pause button strictly hidden per user instruction */
.civic-rail-pause-btn {
  display: none !important;
}

/* ═══ RIGHT CIVIC CONTEXT & SERVICES PANEL - Translucent Glass Look ═══ */
.civic-context-panel {
  grid-column: 3;
  grid-row: 1;
  background: rgba(244, 236, 216, 0.55);
  border: 1.5px solid rgba(159, 178, 172, 0.45);
  border-radius: 20px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 485px;
  overflow: hidden;
  box-shadow: 0 16px 40px -12px rgba(93, 13, 26, 0.08),
              inset 0 1px 2px rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  position: relative;
  z-index: 10;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.civic-context-panel:hover {
  background: rgba(244, 236, 216, 0.75);
  border-color: rgba(93, 13, 26, 0.35);
  box-shadow: 0 20px 45px -10px rgba(93, 13, 26, 0.14),
              0 0 25px rgba(159, 178, 172, 0.18);
}

.civic-context-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(159, 178, 172, 0.4);
}

.civic-context-header i {
  color: var(--np-primary, #5D0D1A);
  font-size: 1.35rem;
}

.civic-context-title {
  margin: 0;
  font-family: 'Noto Sans Devanagari', 'Eczar', serif;
  font-size: 1.32rem;
  font-weight: 800;
  color: #5D0D1A;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 1px rgba(93, 13, 26, 0.12);
}

/* Helpline Banner - Sovereign Bloodstone Card */
.civic-helpline-box {
  background: var(--np-gradient-primary, linear-gradient(135deg, #3A050D 0%, #5D0D1A 40%, #761423 80%, #8C1A2D 100%));
  color: #FFFFFF !important;
  border-radius: 12px;
  border: 1px solid rgba(244, 236, 216, 0.45);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(93, 13, 26, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.civic-helpline-box:hover {
  background: var(--np-gradient-primary-hover, linear-gradient(135deg, #4A0711 0%, #6E101F 45%, #8C1A2D 85%, #9E1F35 100%));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(93, 13, 26, 0.45);
  color: #FFFFFF !important;
}

.civic-helpline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #FFF9EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.civic-helpline-info h6 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  font-family: 'Noto Sans Devanagari', sans-serif;
  opacity: 1;
}

.civic-helpline-number {
  margin: 2px 0 0;
  font-size: 1.45rem;
  font-weight: 800;
  font-family: 'Eczar', serif;
  color: #F8D988 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  letter-spacing: 1.2px;
  line-height: 1.1;
}

/* Service Quick Links - Translucent Glass Pills */
.civic-services-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.civic-service-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 249, 235, 0.65);
  border: 1px solid rgba(159, 178, 172, 0.45);
  border-radius: 11px;
  text-decoration: none;
  color: var(--np-text-primary, #2A1810);
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.22s ease;
}

.civic-service-link:hover {
  background: rgba(255, 249, 235, 0.95);
  border-color: rgba(93, 13, 26, 0.35);
  color: var(--np-primary, #5D0D1A);
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(93, 13, 26, 0.1);
}

.civic-service-link i {
  color: var(--np-primary, #5D0D1A);
  font-size: 0.85rem;
}

/* Non-Notice Updates Group (निविदाएं / विज्ञप्ति) */
.civic-other-feed-group {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-grow: 1;
}

.civic-other-feed-title {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--np-primary, #5D0D1A);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.civic-other-feed-pulse-icon {
  display: inline-flex;
  align-items: center;
  animation: civicMegaphonePulse 1.8s ease-in-out infinite;
}

@keyframes civicMegaphonePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); color: #B31D33; }
}

.civic-feed-ticker-badge {
  font-size: 0.62rem;
  padding: 1.5px 6px;
  background: var(--np-secondary-soft, rgba(159, 178, 172, 0.25));
  border: 1px solid var(--np-secondary-border, rgba(159, 178, 172, 0.5));
  color: var(--np-primary, #5D0D1A);
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.civic-other-feed-viewport {
  position: relative;
  max-height: 110px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 249, 235, 0.45);
  border: 1px solid rgba(159, 178, 172, 0.35);
  padding: 4px;
}

.civic-other-feed-track {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: civicTickerVertical 12s linear infinite;
}

.civic-other-feed-viewport:hover .civic-other-feed-track,
.civic-other-feed-viewport:focus-within .civic-other-feed-track {
  animation-play-state: paused;
}

@keyframes civicTickerVertical {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

.civic-other-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(159, 178, 172, 0.35);
  border-radius: 7px;
  text-decoration: none;
  color: var(--np-text-primary, #2A1810);
  font-size: 0.74rem;
  transition: all 0.2s ease;
}

.civic-other-item:hover {
  background: #ffffff;
  border-color: rgba(93, 13, 26, 0.4);
  color: var(--np-primary, #5D0D1A);
  transform: translateX(2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.civic-other-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(93, 13, 26, 0.1);
  color: var(--np-primary, #5D0D1A);
  flex-shrink: 0;
}

.civic-other-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Office Hours & Location Note */
.civic-hours-note {
  background: rgba(255, 249, 235, 0.5);
  border-top: 1px dashed rgba(159, 178, 172, 0.4);
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: auto;
  font-size: 0.7rem;
  color: var(--np-text-muted, #7A6E6A);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.civic-hours-note span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ═══ RESPONSIVE BEHAVIOR - SEAMLESS FIT ON ALL SCREENS ═══ */

/* Large Tablets & Medium Laptops (992px - 1199px) */
@media (max-width: 1199px) {
  .hero-composition-grid {
    grid-template-columns: 290px 1fr 250px;
    gap: 14px;
    min-height: 500px;
  }
  .civic-rail-wrapper,
  .civic-context-panel {
    height: 480px;
  }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
  .hero-composition-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: auto;
  }
  .cyl-hero-container {
    width: 100%;
    order: 1;
    grid-column: auto;
    grid-row: auto;
    pointer-events: auto;
  }
  .civic-rail-wrapper {
    width: 100%;
    height: auto;
    max-height: 290px;
    order: 2;
    grid-column: auto;
    grid-row: auto;
  }
  .civic-rail-viewport {
    max-height: 210px;
  }
  .civic-context-panel {
    width: 100%;
    height: auto;
    order: 3;
    grid-column: auto;
    grid-row: auto;
    display: flex;
  }
}

/* Mobile Screens (< 768px) */
@media (max-width: 767px) {
  .hero-composition-container {
    padding: 0 10px;
  }
  .hero-composition-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: auto;
  }
  .cyl-hero-container {
    width: 100%;
    order: 1;
    grid-column: auto;
    grid-row: auto;
    pointer-events: auto;
  }
  .civic-rail-wrapper {
    width: 100%;
    height: auto;
    max-height: 240px;
    order: 2;
    border-radius: 14px;
    grid-column: auto;
    grid-row: auto;
  }
  .civic-rail-viewport {
    max-height: 170px;
  }
  .civic-rail-header {
    padding: 10px 14px;
  }
  .civic-rail-title {
    font-size: 1rem;
  }
  .civic-card {
    padding: 10px 12px;
  }
  .civic-card-title {
    font-size: 0.85rem;
  }
  .civic-context-panel {
    width: 100%;
    height: auto;
    order: 3;
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    grid-column: auto;
    grid-row: auto;
  }
}
