/* ═══════════════════════════════════════════════════════════════
   WEB APPLICATIONS — CSS
   ═══════════════════════════════════════════════════════════════ */

@keyframes wa-card-in {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes wa-dot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  60%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}
@keyframes wa-hero-bar { from { transform:scaleX(0); } to { transform:scaleX(1); } }

/* ── HERO ── */
.wa-hero {
  background: #fff;
  border-bottom: 1px solid #ebebeb;
  position: relative;
  overflow: hidden;
}
.wa-hero::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #c0392b;
}
.wa-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 36px 40px;
}
.wa-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #c0392b;
  margin-bottom: 12px;
}
.wa-hero-dot {
  width: 7px; height: 7px;
  background: #c0392b;
  border-radius: 50%;
  display: inline-block;
  animation: wa-dot-pulse 1.8s ease-in-out infinite;
}
.wa-hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  color: #0d1117;
  letter-spacing: -2px;
  line-height: 1;
  margin: 0 0 0;
}
.wa-hero-bar {
  display: block;
  height: 4px;
  width: 64px;
  background: #c0392b;
  border-radius: 2px;
  margin: 12px 0 16px;
  transform-origin: left;
  animation: wa-hero-bar .6s cubic-bezier(.4,0,.2,1) .2s both;
}
.wa-hero-desc {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 28px;
}
.wa-hero-stats {
  display: flex;
  gap: 0;
}
.wa-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 24px;
  margin-right: 24px;
  border-right: 1px solid #e5e7eb;
}
.wa-hero-stat:last-child { border-right: none; }
.wa-hero-stat-val {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #c0392b;
  line-height: 1;
  letter-spacing: -.5px;
}
.wa-hero-stat-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9ca3af;
}

/* ── FILTER BAR ── */
.wa-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0 4px;
  margin-bottom: 4px;
}
.wa-filter-btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 6px 16px;
  border-radius: 4px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s ease;
}
.wa-filter-btn:hover { border-color: #c0392b; color: #c0392b; }
.wa-filter-btn.active { background: #c0392b; border-color: #c0392b; color: #fff; }

/* ── APPS GRID ── */
.wa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 24px 0 40px;
}
.wa-list {
  grid-template-columns: 1fr;
}

/* ── APP CARD ── */
.wa-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: wa-card-in .4s ease both;
}
.wa-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  border-color: #c0392b;
}

/* Card Thumbnail */
.wa-card-thumb {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.wa-list .wa-card-thumb { height: 90px; width: 120px; flex-shrink: 0; }
.wa-list .wa-card { flex-direction: row; }
.wa-list .wa-card-body { padding: 16px; }

.wa-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.wa-card-icon {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}

/* Badges */
.wa-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
}
.wa-badge-new    { background: #22c55e; color: #fff; }
.wa-badge-beta   { background: #f59e0b; color: #fff; }
.wa-badge-coming { background: #6b7280; color: #fff; }

/* Card Body */
.wa-card-body {
  padding: 16px 18px 12px;
  flex: 1;
}
.wa-card-cat {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c0392b;
  margin-bottom: 6px;
}
.wa-card-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  color: #0d1117;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.wa-card-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wa-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 3px;
  border: 1px solid #e5e7eb;
}

/* Card Footer */
.wa-card-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wa-btn {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 8px 18px;
  background: #c0392b;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  transition: background .15s ease;
}
.wa-btn:hover { background: #a93226; color: #fff; }
.wa-btn-beta  { background: #f59e0b; }
.wa-btn-beta:hover { background: #d97706; }
.wa-btn-disabled {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  background: #e5e7eb;
  color: #9ca3af;
  border-radius: 5px;
  cursor: not-allowed;
}

/* Status Indicator */
.wa-card-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.wa-card-status.live   { color: #16a34a; }
.wa-card-status.beta   { color: #d97706; }
.wa-card-status.coming { color: #9ca3af; }
.wa-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: wa-dot-pulse 2s ease-in-out infinite;
}

/* Empty State */
.wa-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.wa-empty-icon { font-size: 48px; margin-bottom: 16px; }
.wa-empty h3 { font-size: 18px; color: #374151; margin-bottom: 8px; font-weight: 600; }
.wa-empty p  { font-size: 13px; }

/* ── HOMEPAGE SECTION ── */
.wa-home-section { padding: 0 0 32px; }
.wa-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 0;
}
.wa-home-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.wa-home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  border-color: #c0392b;
}
.wa-home-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.wa-home-info { min-width: 0; }
.wa-home-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 15px;
  color: #0d1117;
  letter-spacing: -.2px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-home-desc {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wa-home-cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c0392b;
}

/* ── RESPONSIVE ── */
/* ======================================================
   RESPONSIVE — TABLET  (≤768px)
   ====================================================== */
@media (max-width: 768px) {
  .wa-hero-inner     { padding: 28px 16px 24px 20px; }
  .wa-hero-title     { font-size: 32px; letter-spacing: -1px; }
  .wa-hero-desc      { font-size: 14px; }
  .wa-hero-stats     { flex-wrap: wrap; gap: 12px 0; }
  .wa-grid           { grid-template-columns: 1fr 1fr; gap: 16px; }
  .wa-home-grid      { grid-template-columns: 1fr 1fr; }
  .wa-filter-bar     { padding: 16px 0 4px; gap: 6px; }
}

@media (max-width: 500px) {
  .wa-hero-inner       { padding: 18px 12px 16px 14px; }
  .wa-hero-title       { font-size: 26px; letter-spacing: -0.5px; }
  .wa-hero-desc        { font-size: 13px; margin-bottom: 18px; }
  .wa-hero-stats       { gap: 10px 0; }
  .wa-hero-stat        { padding-right: 16px; margin-right: 16px; }
  .wa-hero-stat-val    { font-size: 18px; }
  .wa-grid             { grid-template-columns: 1fr; gap: 12px; padding: 16px 0 28px; }
  .wa-list             { grid-template-columns: 1fr; }
  .wa-card-thumb       { height: 160px; }
  .wa-card-name        { font-size: 15px; }
  .wa-card-desc        { font-size: 12.5px; }
  .wa-card-body        { padding: 14px 14px 10px; }
  .wa-card-footer      { padding: 10px 14px 12px; }
  .wa-home-grid        { grid-template-columns: 1fr; gap: 10px; }
  .wa-home-card        { padding: 10px 12px; }
  .wa-home-icon        { width: 40px; height: 40px; font-size: 20px; }
  .wa-home-name        { font-size: 13.5px; }
  .wa-home-desc        { font-size: 11.5px; }
  .wa-filter-btn       { font-size: 11px; padding: 5px 12px; }
  .wa-badge            { font-size: 8px; padding: 2px 6px; }
}
