/* index.css */

/* ---- section alternating backgrounds ---- */
.bg-alt  { background: var(--BgAlt); }
.bg-white { background: var(--BgPage); }
.index-section { padding: 64px 0; }
.index-ad-wrap { padding-top: 16px; padding-bottom: 16px; }

/* ---- hero ---- */
.hero-section {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 50%, #FED7AA 100%);
  padding: 72px 0 64px;
  overflow: hidden;
  position: relative;
}
.hero-section::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255,107,53,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-section__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-section__content { flex: 1; max-width: 560px; }
.hero-section__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,107,53,0.12);
  color: var(--Theme);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero-section__title {
  font-family: var(--FontTitle);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--TextPrimary);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-section__desc {
  font-size: 17px;
  color: var(--TextSecondary);
  line-height: 1.6;
  margin-bottom: 32px;
}
.hero-section__btn { font-size: 16px; padding: 14px 32px; }
.hero-section__apps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.hero-app-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,107,53,0.15);
  border-radius: 12px;
  padding: 10px 16px;
  text-decoration: none;
  width: 220px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(4px);
}
.hero-app-pill:hover {
  box-shadow: 0 4px 16px rgba(255,107,53,0.15);
  transform: translateX(4px);
}
.hero-app-pill__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}
.hero-app-pill__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--TextPrimary);
  max-width: 140px;
}

/* ---- app grids ---- */
.app-grid {
  display: grid;
  gap: 16px;
}
.app-grid > * { min-width: 0; }
.app-grid--3 { grid-template-columns: repeat(3, 1fr); }
.app-grid--4 { grid-template-columns: repeat(4, 1fr); }
.app-grid--5 { grid-template-columns: repeat(5, 1fr); }

/* compact card — tighter padding */
.app-card--compact { padding: 14px; overflow: hidden; }
.app-card--compact .app-card__top { margin-bottom: 0; min-width: 0; }
.app-card--compact .app-card__icon { width: 44px; height: 44px; border-radius: 10px; }
.app-card--compact .app-card__name { font-size: 13px; }

/* ---- article grid ---- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ---- category grid ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.cat-card {
  padding: 20px 12px;
  gap: 10px;
}
.cat-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--TextPrimary);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

/* ---- responsive ---- */
@media (max-width: 1199px) {
  .app-grid--5 { grid-template-columns: repeat(4, 1fr); }
  .article-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-section__title { font-size: 36px; }
}
@media (max-width: 1023px) {
  .app-grid--4 { grid-template-columns: repeat(3, 1fr); }
  .hero-section__apps { display: none; }
}
@media (max-width: 767px) {
  .index-section { padding: 40px 0; }
  .hero-section { padding: 48px 0 40px; }
  .hero-section__inner { flex-direction: column; gap: 32px; }
  .hero-section__title { font-size: 28px; }
  .hero-section__desc { font-size: 15px; }
  .app-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .app-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .app-grid--5 { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(1, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-section__apps { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; width: 100%; }
  .hero-app-pill { width: calc(50% - 6px); }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
}
