/* =========================
   HOME NAVBAR (ONLY HOME)
   ========================= */
body.home .navbar {
  position: absolute;
  top: 0;
  background: transparent;
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* White text on hero */
body.home .navbar button,
body.home .navbar a {
  color: var(--always-white);
}

body.home .navbar .logout {
  color: #ef4444;
  font-weight: 500;
}

/* Solid navbar after scroll */
body.home .navbar.fixed {
  position: fixed;
  background: var(--navbar-bg);
  box-shadow: var(--navbar-shadow);
}

body.home .navbar.fixed .logo,
body.home .navbar.fixed button,
body.home .navbar.fixed a {
  color: var(--navbar-text);
}

body.home .navbar.fixed .logout {
  color: var(--status-open);
  font-weight: 500;
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
  height: 115vh;
  background:
    linear-gradient(to bottom,
      rgba(17, 24, 39, 0.35),
      rgba(17, 24, 39, 0.65)),
    url("/static/images/home_bg.png") center / cover no-repeat;

  display: flex;
  align-items: flex-end;
  padding: 0 64px 180px;

  -webkit-mask-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M0,160L60,176C120,192,240,224,360,234.7C480,245,600,235,720,208C840,181,960,139,1080,149.3C1200,160,1320,224,1380,256L1440,288L1440,0L1380,0C1320,0,1200,0,1080,0C960,0,840,0,720,0C600,0,480,0,360,0C240,0,120,0,60,0L0,0Z'%3E%3C/path%3E%3C/svg%3E"),
    linear-gradient(black, black);

  -webkit-mask-size: 100% 201px, 100% calc(100% - 200px);
  mask-size: 100% 201px, 100% calc(100% - 200px);
  /* 201px adds 1px of overlap */

  -webkit-mask-position: bottom, top;
  mask-position: bottom, top;

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.hero-content {
  max-width: 640px;
  color: var(--text-inverse);
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--always-white);
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 28px;
  color: var(--always-white);
}

/* CTA button */
.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

/* =========================
FEED SECTION
========================= */
body.home .container {
  padding-top: 0;
  background: linear-gradient(180deg,
      var(--bg-body) 0%,
      var(--bg-primary) 100%);
}

.feed-header {
  margin-bottom: 36px;
}

.feed-header h1 {
  font-size: 1.8rem;
}

.guest-hint,
.empty-state {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Grid */
.feed-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* =========================
   PROBLEM CARD
   ========================= */

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

.card-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.status-badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-primary);
  color: var(--accent-secondary);
}

.problem-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-link {
  display: block;
  width: 100%;
  text-decoration: none;
}

/* Hover effect (desktop only) */
@media (hover: hover) {
  .problem-card:hover .problem-img {
    transform: scale(1.04);
  }

  .problem-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .problem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  }
}

.card-body {
  padding: 20px;
}

.description {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--text-secondary);
}

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

.card-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
}

.vote-btn,
.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-secondary);
}

.export-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 1024px) {
  .feed-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    height: 100vh;
    padding: 0 24px 60px;
  }

  .hero-content {
    margin-bottom: 150px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 15px;
  }

  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .feed-container {
    grid-template-columns: 1fr;
  }

  .card-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
  }

  .card-header,
  .card-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
}