/*
Theme Name: Terra Nova
Theme URI: https://example.com/terra-nova
Author: Gery
Author URI: https://geha-projects.at
Description: Dark Fantasy Theme für den Ultima-Online-Shard Terra Nova.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: terra-nova
*/

:root {
  --bg: #05060a;
  --bg-alt: #0c1018;
  --card-bg: #151b26;
  --accent: #e8a84b;
  --accent-soft: rgba(232, 168, 75, 0.15);
  --text: #f5f5f7;
  --muted: #9ba2b1;
  --danger: #e45858;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Cinzel", "Georgia", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000000 100%);
  color: var(--text);
  font-family: var(--font-sans);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(3,4,7,0.95), rgba(3,4,7,0.9));
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(12px);
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #facc6b, #b45309);
  box-shadow: 0 0 25px rgba(248, 250, 252, 0.4);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 35%;
  border-radius: 999px;
  border: 2px solid rgba(15,23,42,0.6);
}

.brand-text-main {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-text-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Content */

.site-main {
  flex: 1;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Hero (Startseite) */

.hero {
  padding: 3.5rem 0 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr);
  gap: 3rem;
  align-items: center;
}

.hero-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3vw, 3rem);
  line-height: 1.1;
  margin: 0.4rem 0 0.8rem;
}

.hero-subtitle {
  margin: 0 0 1.1rem;
  color: var(--muted);
  max-width: 30rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #facc6b, #b45309);
  color: #111827;
  box-shadow: 0 10px 25px rgba(180, 83, 9, 0.55);
}

.btn-outline {
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--muted);
  background: rgba(15,23,42,0.7);
}

.badge-soft {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(248, 250, 252, 0.08);
}

/* Hero: Visual */

.hero-visual {
  position: relative;
  min-height: 260px;
  border-radius: 1.5rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0, rgba(248, 250, 252, 0.2), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(56,189,248,0.3), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(248,250,252,0.08), transparent 50%),
    linear-gradient(135deg, #020617, #020617 40%, #020617);
  border: 1px solid rgba(148,163,184,0.4);
  box-shadow:
    0 30px 80px rgba(15,23,42,0.95),
    0 0 60px rgba(8,47,73,0.7);
}

.hero-orbit {
  position: absolute;
  inset: 12%;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-top-color: rgba(248, 250, 252, 0.85);
  transform: rotate(-12deg);
}

.hero-orbit-inner {
  position: absolute;
  inset: 28%;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-bottom-color: rgba(248, 250, 252, 0.8);
  transform: rotate(18deg);
}

.hero-world {
  position: absolute;
  top: 48%;
  left: 20%;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, #fef9c3, #fde68a),
    radial-gradient(circle at 60% 80%, #0f172a, #0b1120);
  box-shadow:
    0 0 60px rgba(248,250,252,0.6),
    0 0 120px rgba(250,204,21,0.7);
  transform: translateY(-50%);
  border: 3px solid rgba(15, 23, 42, 0.85);
}

.hero-stats {
  position: absolute;
  right: 1.3rem;
  bottom: 1.3rem;
  padding: 0.7rem 0.9rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148,163,184,0.4);
  font-size: 0.75rem;
  color: var(--muted);
  display: grid;
  gap: 0.2rem;
}

.hero-stats span {
  color: var(--text);
  font-weight: 500;
}

/* Card-Grid für Blog/News */

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title-row h2 {
  margin: 0;
  font-size: 1.4rem;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title-row p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: radial-gradient(circle at top, rgba(248,250,252,0.04), transparent 55%);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 40px rgba(15,23,42,0.8);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 250, 252, 0.6);
  box-shadow:
    0 24px 60px rgba(15,23,42,0.95),
    0 0 40px rgba(56,189,248,0.4);
}

.card-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Single/Page */

.content-area {
  max-width: 1200px;
}

/* Inhalt + Sidebar-Layout */

.layout-sidebar {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.layout-sidebar .content-area {
  flex: 1 1 auto;
}

.sidebar {
  flex: 0 0 280px;
  max-width: 320px;
  background: radial-gradient(circle at top left, #020617 0, #020617 35%, #020617 100%);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
}

.widget + .widget {
  margin-top: 1.25rem;
}

.widget-title {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.sidebar a {
  color: var(--muted);
}

.sidebar a:hover {
  color: var(--text);
}

.article-header {
  margin-bottom: 1.25rem;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.article-body {
  line-height: 1.7;
  font-size: 0.95rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body h2,
.article-body h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: #020617;
  padding: 1.2rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 404 */

.not-found {
  text-align: center;
  padding: 4rem 0;
}

/* ============================
   Navigation Hauptmenü (Top-Level)
   ============================ */

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav > ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav li {
  position: relative;
}

/* Hover-Safe-Zone NUR für Top-Level-Items,
   damit der Abstand zum Dropdown überbrückt wird */
.main-nav > ul > li:hover::after,
.main-nav > ul > li:focus-within::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 14px;               /* überbrückt den vertikalen Gap */
  background: transparent;
}

.main-nav > ul > li > a {
  font-size: 1.2rem;
  color: var(--muted);
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

/* Dropdown-Menüs – 1. Ebene */

.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);      /* Abstand unter dem Hauptpunkt */
  left: 0;
  min-width: 180px;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: #020617;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
  display: none;
  flex-direction: column;
  gap: 0;
  z-index: 999;
}

/* Jedes Item im Dropdown bekommt eigene Position,
   damit Flyouts sauber positioniert werden können */
.main-nav .sub-menu li {
  position: relative;
}

/* Dropdown – 2. Ebene (Flyout nach rechts) */

.main-nav .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin-left: 0;
  border-radius: 0.75rem;
}

.main-nav .sub-menu li a {
  display: block;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: none;
  white-space: nowrap;
}

/* Anzeigen bei Hover oder Tastatur-Fokus */

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
  display: flex;
}

/* Aktiver/hovernder Link */

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--text);
  border-color: var(--accent);
}

/* Status-Pill */

.header-cta {
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  background: radial-gradient(circle at top, rgba(248, 250, 252, 0.12), transparent 60%);
}

/* Frontpage Content-Abstand */

.frontpage-content {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Navbar unter dem Header */

.header-nav {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0.5rem;
}

.header-nav ul {
  display: flex;
  gap: 1rem;
}

/* Responsive */

@media (max-width: 960px) {
  .layout-sidebar {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0,1fr);
  }

  .hero-visual {
    order: -1;
  }
}

@media (max-width: 700px) {
  .site-header-inner {
    flex-wrap: wrap;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* ================================
   TERRA NOVA – HOVER SIDEBAR (fix)
   ================================ */

.side-dock {
  position: fixed;
  top: 200px;                          /* an Bannerhöhe angepasst */
  left: 0;
  height: calc(100vh - 200px);
  width: 260px;                        /* volle Breite der Sidebar */
  background: #020617;
  border-right: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.9);
  z-index: 30;
  overflow: hidden;

  /* 👉 nur ein Teil sichtbar (ca. 52px) */
  transform: translateX(-208px);       /* 260 - 52 = 208 */
  transition: transform 0.25s ease-in-out;
}

/* Beim Hover: komplett reinsliden */
.side-dock:hover {
  transform: translateX(0);
}

/* Inhalt behält immer volle Breite → kein Gequetsche */
.side-dock-inner {
  width: 260px;
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.side-dock .widget + .widget {
  margin-top: 1rem;
}

.side-dock .widget-title {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.3rem;
}

.side-dock a {
  color: var(--muted);
  text-decoration: none;
}

.side-dock a:hover {
  color: var(--text);
}

.side-dock-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Content ein bisschen nach rechts schieben,
   damit der sichtbare "Dock-Streifen" nichts verdeckt */
.site-main {
  margin-left: 52px;
  transition: margin-left 0.25s ease-in-out;
}

/* Optional: wenn Sidebar offen ist, Content weiter nach rechts –
   kannst du rausnehmen, wenn du kein "Mitwandern" willst */
.side-dock:hover ~ .site-main {
  margin-left: 260px;
}

/* Mobile: Sidebar ausblenden */
@media (max-width: 900px) {
  .side-dock {
    display: none;
  }
  .site-main {
    margin-left: 0;
  }
}

/* ========================
   Mobile Navigation Toggle
   ======================== */

/* Burger-Button – Desktop ausblenden */
.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  padding: 0.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
}

.nav-toggle span + span {
  margin-top: 4px;
}

/* Mobile-Styles: Menü einklappen */
@media (max-width: 900px) {
  /* Burger sichtbar */
  .nav-toggle {
    display: inline-flex;
  }

  /* Hauptmenü standardmäßig verstecken und unter den Header legen */
  .main-nav.header-nav {
    display: none;
    position: fixed;
    left: 0;
    top: 56px; /* ungefähr Header-Höhe */
    width: 100%;
    background: #020617;
    border-bottom: 1px solid rgba(148,163,184,0.35);
    box-shadow: 0 18px 40px rgba(15,23,42,0.9);
    padding: 0.75rem 1rem 1.25rem;
    justify-content: flex-start;
  }

  .main-nav.header-nav.is-open {
    display: flex;
  }

  .main-nav.header-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .main-nav.header-nav > ul > li > a {
    font-size: 0.95rem;
    border-bottom: none;
    padding: 0.25rem 0;
  }

  /* Dropdowns auf Mobile als einfache Liste */
  .main-nav.header-nav .sub-menu {
    position: static;
    display: block;
    margin: 0.25rem 0 0.5rem 0.75rem;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .main-nav.header-nav .sub-menu li a {
    padding: 0.15rem 0;
    font-size: 0.85rem;
  }
}
.editor-styles-wrapper * {
    color: #000 !important;
}