/* Portal hubs + home sections (Games, Tools, Learn) */
.portal-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 28px;
}

.portal-nav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #5f6368;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #dfe1e5;
  background: #fff;
  font-family: "Noto Sans Bengali", arial, sans-serif;
}

.portal-nav a:hover,
.portal-nav a.active {
  color: #006a4e;
  border-color: #006a4e;
  background: #f0faf5;
}

.portal-menu {
  width: 100%;
  max-width: 720px;
  margin: 8px auto 0;
  padding: 0 16px 8px;
}

.portal-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .portal-cards { grid-template-columns: 1fr; }
}

.portal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  border-radius: 14px;
  border: 1px solid #e8eaed;
  background: #fff;
  text-decoration: none;
  color: inherit;
  overflow: visible;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.portal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: #c8e6d0;
}

.portal-card .ico {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}

.portal-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  font-family: "Noto Sans Bengali", arial, sans-serif;
}

.portal-card p {
  margin: 0;
  font-size: 12px;
  color: #70757a;
}

.portal-card .count {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #006a4e;
}

.portal-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.portal-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.portal-tile:hover {
  border-color: #006a4e;
  box-shadow: 0 2px 8px rgba(0, 106, 78, 0.1);
}

.portal-tile .t-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--c1, #006a4e), var(--c2, #f42a41));
}

.portal-tile .t-body {
  min-width: 0;
  flex: 1;
}

.portal-tile .t-body strong {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-tile .t-body span {
  display: block;
  font-size: 11px;
  color: #70757a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page:not(.has-results) .portal-menu {
  display: block;
}

.page.has-results .portal-menu {
  display: none;
}

.portal-card-3d {
  overflow: visible;
}

.portal-card-3d .portal-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 148px;
  margin: 0 auto 10px;
  padding: 8px 4px;
  overflow: visible;
  background: linear-gradient(180deg, #f8faf9 0%, #fff 100%);
  border-radius: 12px;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.portal-card-3d .portal-card-visual img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 132px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  transform: scale(1);
  transition: transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.35s ease;
  will-change: transform;
}

.portal-card-3d:hover .portal-card-visual,
.portal-card-3d:focus-visible .portal-card-visual {
  background: linear-gradient(180deg, #eef8f3 0%, #fff 100%);
  box-shadow: 0 8px 24px rgba(0, 106, 78, 0.12);
}

.portal-card-3d:hover .portal-card-visual img,
.portal-card-3d:focus-visible .portal-card-visual img {
  animation: portal-icon-pop 0.55s cubic-bezier(0.34, 1.55, 0.64, 1) forwards;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.14));
}

@keyframes portal-icon-pop {
  0% {
    transform: scale(1) translateY(0);
  }
  45% {
    transform: scale(1.12) translateY(-10px);
  }
  100% {
    transform: scale(1.08) translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-card-3d .portal-card-visual img {
    transition: none;
  }
  .portal-card-3d:hover .portal-card-visual img,
  .portal-card-3d:focus-visible .portal-card-visual img {
    animation: none;
    transform: scale(1.03);
  }
}

.portal-card-3d h3 {
  font-size: 18px;
}

.hub-card-3d {
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-card-3d:hover {
  transform: translateY(-4px) rotateX(2deg);
}

.hub-card-3d .strip-3d {
  padding: 0;
  background: #e8eaed;
  overflow: hidden;
  aspect-ratio: 5 / 3;
  display: flex;
  align-items: stretch;
}

.hub-card-3d .cover-3d {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #0f172a;
}

.hub-loading,
.hub-empty {
  grid-column: 1 / -1;
  color: #5f6368;
  font-size: 14px;
  padding: 24px 8px;
  text-align: center;
}

.hub-empty-err {
  color: #c5221f;
}

.page .home-actions {
  display: none !important;
}

/* Hub pages */
.hub-page {
  min-height: 100vh;
  background: #f8f9fa;
  color: #202124;
  font-family: arial, sans-serif, "Noto Sans Bengali", system-ui;
}

.hub-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.hub-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hub-top h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  font-family: "Noto Sans Bengali", arial, sans-serif;
}

.hub-top .lead {
  margin: 4px 0 0;
  color: #5f6368;
  font-size: 14px;
}

.hub-search {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 0 14px;
}

.hub-search input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 10px 0;
  font-size: 14px;
}

.hub-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.hub-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.hub-card .strip {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--c1, #006a4e), var(--c2, #f42a41));
}

.hub-card .body {
  padding: 12px 14px;
}

.hub-card .body h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.hub-card .body p {
  margin: 0;
  font-size: 12px;
  color: #5f6368;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hub-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dfe1e5;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #5f6368;
}

.hub-chip.on {
  background: #006a4e;
  border-color: #006a4e;
  color: #fff;
}

.hub-logo img,
.hub-logo svg {
  height: 36px;
  width: auto;
}

.hub-back {
  color: #1a0dab;
  text-decoration: none;
  font-size: 14px;
}

.hub-back:hover { text-decoration: underline; }
