/* IMPACT PAGE WRAPPER */
.impact-wrapper {
    padding: 20px;
}

.impact-head {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 30px;
}

h1 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1rem;
}

.impact-head a {
    text-decoration: none;
    font-size: 1.25rem;
    color: palevioletred;
}

.impact-head a:hover {
    color: rgb(255, 99, 151);
}

/* STATS GRID */
.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 4fr));
    gap: 30px;
}

.stat-card {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary)
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* Stat Variants */
.stat-card.yellow {
    border-bottom: 4px solid #f59e0b;
}

.stat-card.green {
    border-bottom: 4px solid #10b981;
}

/* TABS NAVIGATION */
.impact-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 2px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-secondary);
}

.tab-divider {
    border: 0;
    border-top: 1px solid var(--text-muted);
    margin: 0 0 30px 0;
}

/* TAB CONTENT LOGIC */
.tab-content {
    display: none;
    animation: fadeIn 5s ease;
}

.tab-content.active {
    display: block;
}

/* FEED GRID & CARDS */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.problem-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.problem-card a{
    text-decoration: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-tag {
    color: var(--accent-primary);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-badge.progress {
    background: var(--bg-body);
    color: #92400e;
}

.status-badge.resolved {
    background: var(--bg-body);
    color: #04a35f;
}

.card-body p {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.location-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer small {
    color: var(--text-muted);
    font-style: italic;
}

/* LIKE BUTTON */
.like-btn {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.like-btn:hover {
    background: #ffe4e6;
    transform: scale(1.05);
}

.like-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 50px;
    color: #9ca3af;
    font-style: italic;
}
/* =========================
   IMPACT PAGE RESPONSIVE
   ========================= */

@media (max-width: 640px) {
  /* 1. Reset Wrapper & Grid */
  .impact-wrapper {
    padding: 15px 12px;
  }

  .impact-head {
    display: flex;         /* Switch from Grid to Flex */
    flex-direction: column; 
    text-align: center;
    margin-bottom: 20px;
  }

  .subtitle {
    margin-bottom: 15px;
    font-size: 0.9rem;
  }

  /* 2. Compact Stats (2x2 Grid) */
  .impact-stats {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns is better than 1 long list */
    gap: 12px;
    margin-top: 20px;
  }

  .stat-card {
    padding: 15px 10px;
    border-radius: 12px;
  }

  .stat-num {
    font-size: 1.4rem; /* Scale down numbers */
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* 3. Tabs (Full width buttons) */
  .impact-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .tab-btn {
    padding: 10px 5px;
    font-size: 0.85rem;
    text-align: center;
    border-bottom-width: 2px;
  }

  /* 4. Problem Cards (Full Screen Scale) */
  .feed-grid {
    grid-template-columns: 1fr; /* Single column */
    gap: 16px;
  }

  .problem-card {
    padding: 16px;
    box-shadow: none;       /* Flatter look */
    border: 1px solid var(--border-light);
  }

  .card-body p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  /* 5. Footer Adjustments */
  .card-footer {
    flex-direction: column; /* Stack share/like and the small text */
    gap: 10px;
    align-items: flex-start;
  }

  .card-footer small {
    font-size: 0.75rem;
    order: -1; /* Put the text above the buttons */
  }

  .share-btn, .like-btn {
    width: 100%; /* Make action buttons easy to tap */
    text-align: center;
  }
}