/* ============================================================
   index.css — Home Page Styles
   AppVault Play Store
   ============================================================ */

/* ── Hero Section ── */
.hero {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,15,44,0.85) 0%,
    rgba(10,15,44,0.4) 50%,
    rgba(10,15,44,0.1) 100%
  );
}

.hero-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--navy) 0%, transparent 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 3rem;
  animation: fadeUp 0.7s ease both;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  max-width: 520px;
  margin-bottom: 0.75rem;
}

.hero-content h1 span {
  color: var(--green-light);
}

.hero-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  max-width: 400px;
  line-height: 1.6;
  font-weight: 300;
}

/* ── Filter Bar ── */
.filter-bar {
  padding: 0 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 0.5rem;
}

.filter-label img {
  width: 14px;
  height: 14px;
  filter: invert(1) opacity(0.4);
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  transition: var(--transition);
  font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(26,138,90,0.15);
  border-color: var(--green-primary);
  color: var(--green-light);
}

/* ── App Grid ── */
.apps-section {
  padding: 0 2rem;
  margin-bottom: 4rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ── App Card ── */
.app-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  animation: fadeUp 0.5s ease both;
  position: relative;
  display: flex;
  flex-direction: column;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(26,138,90,0.4);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.app-card:hover .card-image-wrap img {
  transform: scale(1.04);
}

/* Card image */
.card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-light);
  position: relative;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Card body */
.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--card-border);
  background: var(--navy-light);
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.card-developer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.card-download-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(26,138,90,0.15);
  border: 1px solid rgba(26,138,90,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.card-download-btn:hover {
  background: var(--green-primary);
  border-color: var(--green-primary);
}

.card-download-btn img {
  width: 14px;
  height: 14px;
  filter: invert(1) brightness(1.5);
}

/* Card short description */
.card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured badge on card */
.card-featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--green-primary);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
}

/* ── Stats Bar ── */
.stats-bar {
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  background: rgba(255,255,255,0.02);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-light);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--card-border);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    height: 260px;
  }
  .hero-content {
    padding: 0 1.5rem;
  }
  .apps-section,
  .filter-bar {
    padding: 0 1rem;
  }
  .apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.875rem;
  }
  .stats-bar {
    padding: 1rem;
    gap: 1rem;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .apps-grid {
    grid-template-columns: 1fr 1fr;
  }
}