/**
 * Mzimba South Luwerezi Constituency — Page-Specific Layouts Stylesheet
 * Layout rules for Home, Projects Register, Details, Oversight, Reporting, Leadership & Dashboard.
 * Refined Public Service Aesthetic.
 */

/* ==========================================================================
   1. HOMEPAGE HERO SECTION
   ========================================================================== */
.hero-section {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--bg-surface) 100%);
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-subtle);
}

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

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.hero-label {
  margin-bottom: var(--space-3);
}

.hero-heading {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--brand-navy-900);
  margin-bottom: var(--space-4);
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .hero-heading {
    font-size: var(--font-size-4xl);
  }
}

.hero-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-6);
  max-width: 44rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-6);
}

.highlight-item {
  display: flex;
  flex-direction: column;
}

.highlight-number {
  font-family: var(--font-mono);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--brand-navy-800);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.highlight-text {
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--font-weight-semibold);
}

/* Hero Crest Column */
.hero-crest-column {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-crest-card {
  text-align: center;
  padding: var(--space-6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
  box-shadow: var(--shadow-modal);
  max-width: 320px;
  position: relative;
}

.hero-crest-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-navy-800), var(--brand-gold-500), var(--brand-green-700));
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.hero-seal-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin: var(--space-2) auto var(--space-4);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.motto-caption {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--brand-navy-900);
  margin-bottom: var(--space-1);
}

.motto-subcaption {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ==========================================================================
   2. FILTER BARS & SEARCH CONTROLS
   ========================================================================== */
.section-controls {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .filter-bar {
    grid-template-columns: 2fr 1.2fr 1fr auto;
    align-items: flex-end;
  }
}

.filter-group-search {
  min-width: 200px;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
}

.results-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.results-count {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
}

/* Empty State Box */
.empty-state-card {
  padding: var(--space-12) var(--space-6);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  text-align: center;
  background-color: var(--bg-surface);
}

.empty-state-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--brand-navy-900);
  margin-bottom: var(--space-2);
}

.empty-state-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ==========================================================================
   3. PROJECTS REGISTER & DETAIL VIEW
   ========================================================================== */
.projects-list-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.project-card-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.project-card-row:hover {
  border-color: var(--brand-navy-700);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .project-card-row {
    grid-template-columns: 2fr 1.2fr auto;
    align-items: center;
  }
}

.project-row-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.project-row-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.project-row-title a {
  color: var(--brand-navy-900);
}

.project-row-title a:hover {
  color: var(--brand-navy-700);
  text-decoration: underline;
}

.project-row-location {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.project-row-finance {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  border-left: 1px solid var(--border-subtle);
  padding-left: var(--space-4);
}

/* Single Project Detail Layout */
.project-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .project-detail-layout {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.project-detail-header {
  border-bottom: 2px solid var(--brand-navy-800);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
}

.project-detail-title {
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-tight);
  color: var(--brand-navy-900);
  margin-bottom: var(--space-2);
}

.project-detail-location {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Verification Callout Box */
.verification-callout-card {
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  margin-bottom: var(--space-6);
  border-left: 4px solid var(--brand-navy-800);
}

.verification-callout-card.border-2 {
  border-left: 4px solid var(--brand-green-700);
  background-color: var(--brand-green-50);
}

.verification-status-heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--brand-navy-900);
}

.verification-indicator-icon {
  font-size: 1rem;
}

.project-section-block {
  margin-bottom: var(--space-8);
}

.section-subheading {
  font-size: var(--font-size-lg);
  color: var(--brand-navy-900);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-4);
}

/* Delay Alert Box */
.delay-alert-box {
  padding: var(--space-4);
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: var(--radius-sm);
  background-color: #fef2f2;
  color: #991b1b;
  margin-bottom: var(--space-6);
}

.delay-heading {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

/* Evidence Gallery Grid */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
}

.evidence-thumb-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  background-color: var(--color-white);
  box-shadow: var(--shadow-xs);
}

.evidence-thumb-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  display: block;
  margin-bottom: var(--space-2);
}

.evidence-caption {
  font-size: var(--font-size-2xs);
  color: var(--text-muted);
}

/* Timeline Stack */
.timeline-stack {
  list-style: none;
  border-left: 2px solid var(--brand-navy-800);
  padding-left: var(--space-4);
  margin-left: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-4) - 5px);
  top: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--brand-gold-500);
  border: 2px solid var(--brand-navy-800);
  border-radius: var(--radius-full);
}

.timeline-date {
  font-size: var(--font-size-2xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: block;
}

.timeline-text {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

/* Financial Meta Description List */
.meta-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
}

.meta-dl dt {
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: var(--font-size-2xs);
  letter-spacing: 0.04em;
}

.meta-dl dd {
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--brand-navy-900);
}

/* ==========================================================================
   4. COMMUNITY REPORTING & TRACKING
   ========================================================================== */
.safeguarding-callout-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid #fed7aa;
  border-left: 4px solid #ea580c;
  border-radius: var(--radius-sm);
  background-color: #fff7ed;
  box-shadow: var(--shadow-xs);
}

.safeguarding-banner-icon {
  font-size: 1.5rem;
  color: #c2410c;
  line-height: 1;
}

.reference-code-display {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  background-color: var(--brand-navy-900);
  color: var(--brand-gold-400);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* Stepper progress for Tracking */
.status-stepper {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
  position: relative;
}

.status-stepper::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-medium);
  z-index: 1;
}

.stepper-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-bubble {
  width: 30px;
  height: 30px;
  margin: 0 auto var(--space-1);
  background-color: var(--color-white);
  border: 2px solid var(--color-gray-400);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}

.stepper-step.completed .step-bubble {
  background-color: var(--brand-green-700);
  color: var(--color-white);
  border-color: var(--brand-green-700);
}

.stepper-step.active .step-bubble {
  background-color: var(--brand-navy-800);
  color: var(--color-white);
  border-color: var(--brand-navy-800);
  box-shadow: 0 0 0 4px var(--brand-navy-100);
}

.step-label {
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
}

.stepper-step.active .step-label {
  color: var(--brand-navy-900);
  font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   5. LEADERSHIP PROFILE & DIRECTORY
   ========================================================================== */
.leadership-grid {
  align-items: stretch;
}

.leadership-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.leadership-card:hover {
  border-color: var(--brand-navy-700);
  box-shadow: var(--shadow-card-hover);
}

.leadership-card.featured-leadership-card {
  border: 2px solid var(--brand-navy-800);
  position: relative;
}

.leadership-card.featured-leadership-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--brand-gold-500);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.leadership-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-4);
}

.leadership-avatar {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 3px solid var(--brand-navy-800);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-2);
}

.leadership-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-medium);
  background-color: var(--brand-navy-50);
  color: var(--brand-navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-mono);
  margin-bottom: var(--space-2);
}

.leadership-badge,
.leadership-badge-sub {
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background-color: var(--brand-navy-800);
  color: var(--color-white);
}

.leadership-badge-sub {
  background-color: var(--color-gray-200);
  color: var(--text-secondary);
}

.leadership-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.leadership-name {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brand-navy-900);
  margin-bottom: 2px;
}

.leadership-role {
  font-size: var(--font-size-xs);
  color: var(--brand-gold-700);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-3);
}

.leadership-bio {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-5);
  flex: 1;
}

.contact-actions-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* MP Biography Extended Card (About Page) */
.mp-biography-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding: var(--space-6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .mp-biography-card {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }
}

.mp-biography-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 2px solid var(--brand-navy-800);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.mp-biography-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--brand-navy-900);
  margin-top: var(--space-2);
  margin-bottom: 2px;
}

.mp-biography-title {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.mp-biography-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ==========================================================================
   6. NEWS & OFFICIAL BULLETINS
   ========================================================================== */
.news-articles-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.news-card-item {
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.news-card-item:hover {
  border-color: var(--brand-navy-700);
  box-shadow: var(--shadow-card-hover);
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.news-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brand-navy-900);
  margin-bottom: var(--space-3);
}

.news-summary {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}