/* Shared portal styles for hub and article pages */
.portal-page {
  background:
    radial-gradient(circle at 16% 14%, rgba(0, 229, 255, 0.1), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(26, 10, 58, 0.72), transparent 28%),
    linear-gradient(180deg, #020d1a 0%, #041427 42%, #020d1a 100%);
}

.portal-page .page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-page main {
  flex: 1 0 auto;
  padding: 54px 0 32px;
}

.portal-page--article main {
  padding-top: 24px;
}

.portal-page--article header {
  position: relative;
  top: auto;
}

.portal-page--article .page-shell,
.portal-page--article .container,
.portal-page--article .news-article,
.portal-page--article .guide-article,
.portal-page--article .article-header {
  transform: none !important;
}

.portal-page--article .news-article.reveal,
.portal-page--article .guide-article.reveal,
.portal-page--article .breadcrumb {
  opacity: 1;
  transform: none;
  transition: none;
}

.portal-page .section-header {
  position: relative;
  margin-bottom: 26px;
  padding: 34px 36px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(0, 229, 255, 0.06), rgba(26, 10, 58, 0.2)),
    rgba(4, 16, 28, 0.7);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.02), 0 12px 40px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.portal-page .section-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.03) 48%, transparent 66%);
  pointer-events: none;
}

.portal-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.portal-header-copy {
  position: relative;
  z-index: 1;
}

.portal-header-copy h1,
.portal-header-copy .section-title,
.portal-header-copy p {
  position: relative;
  z-index: 1;
}

.portal-header-stats {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.portal-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.portal-chip,
.guide-tag,
.category-link,
.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.06);
  color: rgba(232, 244, 248, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.portal-section-stack {
  display: grid;
  gap: 24px;
}

.guides-grid,
.tools-grid,
.wiki-categories,
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.news-feed {
  display: grid;
  gap: 20px;
}

.news-feed--text .news-item,
.news-feed--text .news-item.featured {
  display: block;
}

.news-feed--text .news-content {
  display: block;
}

.guide-card,
.tool-card,
.wiki-category,
.featured-item,
.news-item,
.related-content,
.tool-spotlight,
.guide-article,
.news-article {
  position: relative;
  padding: 24px 26px 26px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(0, 229, 255, 0.045), rgba(26, 10, 58, 0.24)),
    rgba(3, 14, 26, 0.8);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.08);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.guide-card:hover,
.tool-card:hover,
.wiki-category:hover,
.featured-item:hover,
.news-item:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.48);
  box-shadow: 0 0 34px rgba(0, 229, 255, 0.14);
}

.guide-card h2,
.guide-card h3,
.tool-card h3,
.wiki-category h2,
.featured-item h3,
.news-item h2,
.news-item h3 {
  margin: 0 0 12px;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.guide-card p,
.tool-card p,
.wiki-category p,
.featured-item p,
.news-item p,
.related-content p,
.tool-spotlight p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.72;
}

.guide-card a,
.tool-card a,
.wiki-category a,
.featured-item a,
.news-item a,
.related-content a,
.guide-article a,
.news-article a {
  color: #dffcff;
  text-decoration-color: rgba(0, 229, 255, 0.5);
  text-underline-offset: 3px;
}

.guide-image,
.tool-icon,
.news-image,
.wiki-visual,
.featured-visual,
.image-placeholder,
.article-visual {
  display: flex;
  align-items: flex-end;
  min-height: 180px;
  margin: -4px -6px 22px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(2, 13, 26, 0.06), rgba(2, 13, 26, 0.72)),
    linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(26, 10, 58, 0.42));
  box-shadow: inset 0 -60px 80px rgba(2, 13, 26, 0.52);
  overflow: hidden;
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-image,
.news-image,
.wiki-visual {
  border: 0;
}

.guide-image--starter,
.news-image--update,
.wiki-visual--biomes,
.article-visual--lifepod {
  background-image:
    linear-gradient(180deg, rgba(2, 13, 26, 0.05), rgba(2, 13, 26, 0.76)),
    url('../../assets/images/screenshot-1.jpg');
  background-size: cover;
  background-position: center;
}

.guide-image--crafting,
.tool-icon--calculator,
.wiki-visual--items,
.article-visual--biomes {
  background-image:
    linear-gradient(180deg, rgba(2, 13, 26, 0.05), rgba(2, 13, 26, 0.76)),
    url('../../assets/images/screenshot-3.jpg');
  background-size: cover;
  background-position: center;
}

.guide-image--base,
.tool-icon--planner,
.wiki-visual--resources,
.news-image--patch {
  background-image:
    linear-gradient(180deg, rgba(2, 13, 26, 0.05), rgba(2, 13, 26, 0.76)),
    url('../../assets/images/screenshot-4.jpg');
  background-size: cover;
  background-position: center;
}

.guide-image--vehicles,
.guide-image--coop,
.tool-icon--map,
.wiki-visual--creatures,
.news-image--trailer,
.news-image--interview {
  background-image:
    linear-gradient(180deg, rgba(2, 13, 26, 0.05), rgba(2, 13, 26, 0.76)),
    url('../../assets/images/screenshot-5.jpg');
  background-size: cover;
  background-position: center;
}

.guide-image--survival,
.tool-icon--tracker,
.tool-icon--comparison,
.tool-icon--challenge,
.wiki-visual--lore,
.featured-visual,
.article-visual--update {
  background-image:
    linear-gradient(180deg, rgba(2, 13, 26, 0.05), rgba(2, 13, 26, 0.76)),
    url('../../assets/images/screenshot-2.jpg');
  background-size: cover;
  background-position: center;
}

.news-item {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.news-item.featured {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.news-item .news-image {
  min-height: 100%;
  margin: 0;
}

.news-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-meta {
  margin-bottom: 12px;
  color: rgba(172, 240, 255, 0.74);
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.read-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.article-source {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 229, 255, 0.12);
  color: rgba(205, 241, 248, 0.82);
}

.wiki-category ul,
.related-content ul,
.calculator-preview ul,
.guide-article ul,
.guide-article ol,
.news-article ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0 0 22px;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(233, 246, 255, 0.72);
  font-size: 0.88rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: rgba(0, 229, 255, 0.5);
}

.article-header {
  margin-bottom: 24px;
}

.article-header .section-label {
  margin-bottom: 12px;
}

.article-header h1 {
  margin: 0 0 16px;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  max-width: 18ch;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.article-intro {
  margin: 0;
  max-width: 68ch;
  color: rgba(233, 246, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.76;
}

.guide-article section,
.news-article section,
.related-content,
.tool-spotlight {
  margin-top: 20px;
}

.guide-article section,
.news-article section {
  position: static;
  padding: 0;
  margin-top: 24px;
}

.guide-article section:first-of-type,
.news-article section:first-of-type {
  margin-top: 0;
}

.guide-article section + section,
.news-article section + section {
  padding-top: 24px;
  border-top: 1px solid rgba(0, 229, 255, 0.1);
}

.guide-article section p,
.news-article section p {
  margin: 0;
  color: rgba(233, 246, 255, 0.86);
  line-height: 1.72;
}

.guide-article section h2,
.news-article section h2,
.related-content h2,
.tool-spotlight h2,
.featured-articles h2 {
  margin: 0 0 14px;
  font-family: "Orbitron", sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-article table,
.news-article table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  margin-top: 16px;
}

.guide-article th,
.guide-article td,
.news-article th,
.news-article td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
  text-align: left;
}

.guide-article th,
.news-article th {
  color: var(--accent);
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 229, 255, 0.06);
}

.news-article blockquote {
  margin: 20px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
  background: rgba(0, 229, 255, 0.05);
  color: rgba(240, 251, 255, 0.9);
}

.portal-page .footer .container > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

@media (max-width: 980px) {
  .portal-header-grid,
  .guides-grid,
  .tools-grid,
  .wiki-categories,
  .featured-grid,
  .news-item,
  .news-item.featured {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .portal-page main {
    padding-top: 34px;
  }

  .portal-page--article main {
    padding-top: 18px;
  }

  .portal-page .section-header,
  .guide-card,
  .tool-card,
  .wiki-category,
  .featured-item,
  .news-item,
  .related-content,
  .tool-spotlight,
  .guide-article,
  .news-article {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .guide-image,
  .tool-icon,
  .news-image,
  .wiki-visual,
  .featured-visual,
  .image-placeholder,
  .article-visual {
    min-height: 150px;
    margin-bottom: 18px;
  }

  .article-header h1 {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
    max-width: none;
  }

}
