:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e5e9f0;
  --surface: #ffffff;
  --primary: #1554d1;
  --teal: #0f766e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.45;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(21, 84, 209, 0.08), transparent 280px),
    #f4f7fb;
}

.hero {
  color: #ffffff;
  text-align: center;
  background: linear-gradient(135deg, #0f3f9e, var(--teal));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 18px;
}

.logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 6px;
  margin-bottom: 10px;
  background: #ffffff;
  border-radius: 8px;
}

.hero h1 {
  margin-bottom: 8px;
  font-size: 1.75rem;
  line-height: 1.25;
}

.hero p {
  font-size: 0.88rem;
  line-height: 1.6;
  opacity: 0.92;
}

#portalContainer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
}

.category-section {
  margin-bottom: 24px;
}

.category-title {
  margin-bottom: 12px;
  color: #263247;
  font-size: 1.05rem;
  font-weight: 800;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.app-card {
  min-height: 124px;
  padding: 15px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(21, 84, 209, 0.28);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.app-card i {
  display: block;
  margin-bottom: 10px;
  font-size: 34px;
}

.app-card h3 {
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.app-card p {
  max-height: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0;
  transition: max-height 0.18s ease, opacity 0.18s ease, margin 0.18s ease;
}

.app-card:hover p,
.app-card:focus p {
  max-height: 64px;
  margin-top: 8px;
  opacity: 1;
}

.footer {
  padding: 15px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.footer p {
  margin-bottom: 4px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .hero-inner {
    padding: 20px 16px;
  }

  .logo {
    width: 56px;
    height: 56px;
  }

  .hero h1 {
    font-size: 1.45rem;
  }

  #portalContainer {
    width: calc(100% - 24px);
    padding-top: 20px;
  }

  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .app-card {
    min-height: 108px;
    padding: 12px;
  }

  .app-card i {
    font-size: 28px;
  }

  .app-card h3 {
    font-size: 0.88rem;
  }
}
