/*
Theme Name: EverQuest Chronicles
Author: Codex
Description: Ein Retro-MMORPG-Guide-Theme im Stil frueher 2000er Jahre fuer EverQuest 1, EverQuest 2, TLPs und Legenden.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: everquest-chronicles
Tags: blog, two-columns, custom-menu, featured-images, threaded-comments
*/

:root {
  --page-bg: #14120d;
  --panel: #2b2116;
  --panel-dark: #18110b;
  --parchment: #c7b17b;
  --parchment-light: #ead59b;
  --ink: #f4e5b2;
  --muted: #b8a16b;
  --blue: #69a7ba;
  --green: #80a95e;
  --red: #a14e3d;
  --border: #5a3d22;
  --shadow: #070503;
  --outer-border: #7d5b31;
  --outer-shadow: #25180d;
  --shell-bg: #0f0b07;
  --content-bg: #17100a;
  --title-shadow: #120b05;
  --tagline: #dfc887;
  --nav-top: #3b2715;
  --nav-bottom: #1e130a;
  --nav-text: #eed895;
  --nav-hover-bg: #244f5a;
  --nav-hover-text: #ffffff;
  --meta-border: #4c311b;
  --meta-bg: #160f09;
  --content-text: #ead9a6;
  --content-heading: #dcbf73;
  --table-bg: #1a120b;
  --table-head-bg: #3b2715;
  --table-head-text: #fff2c3;
  --quote-bg: #18110b;
  --quote-text: #d7c58f;
  --quick-border: #74532e;
  --quick-bg: #21160d;
  --quick-title: #fff0bd;
  --guide-border: #4f351d;
  --guide-bg: #160f09;
  --button-border: #9a743d;
  --button-top: #6e4a25;
  --button-bottom: #2b1a0c;
  --button-text: #fff4c8;
  --button-hover-top: #3e7d8e;
  --button-hover-bottom: #19323a;
  --button-hover-text: #ffffff;
  --widget-title-border: #674720;
  --widget-title-top: #4b3219;
  --widget-title-bottom: #201309;
  --form-border: #6d4b28;
  --form-bg: #100b07;
  --form-text: #f2e2ae;
  --footer-bg: #100b07;
  --header-widget-bg: #100b07;
  --max-width: 1180px;
  --sidebar-width: 292px;
  --header-height: 238px;
  --masthead-height: 190px;
  --body-bg-image: none;
  --body-bg-repeat: repeat;
  --body-bg-size: auto;
  --body-bg-attachment: scroll;
  --header-image: url("assets/images/header-banner.png");
  --header-position: center center;
  --font-ui: Verdana, Geneva, Tahoma, sans-serif;
  --font-title: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--page-bg);
  background-image:
    radial-gradient(circle at top left, rgba(95, 72, 39, 0.35), transparent 360px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    var(--body-bg-image);
  background-repeat: no-repeat, repeat, repeat, var(--body-bg-repeat);
  background-size: auto, 16px 16px, 16px 16px, var(--body-bg-size);
  background-attachment: scroll, scroll, scroll, var(--body-bg-attachment);
  background-position: top left, top left, top left, center top;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
}

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

a:hover,
a:focus {
  color: var(--parchment-light);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.site-shell {
  width: min(var(--max-width), calc(100% - 24px));
  margin: 12px auto 28px;
  border: 2px solid var(--outer-border);
  background: var(--shell-bg);
  box-shadow: 0 0 0 4px var(--outer-shadow), 0 18px 45px rgba(0, 0, 0, 0.7);
}

.site-header {
  min-height: var(--header-height);
  position: relative;
  border-bottom: 2px solid var(--outer-border);
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.76)),
    var(--header-image);
  background-position: center center, var(--header-position);
  background-size: auto, cover;
  background-repeat: no-repeat, no-repeat;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.52), transparent 24%, transparent 76%, rgba(0,0,0,0.5)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 1px, transparent 1px, transparent 4px);
}

.masthead {
  position: relative;
  z-index: 1;
  min-height: var(--masthead-height);
  padding: 30px 28px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.site-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.92;
  color: var(--parchment-light);
  text-shadow: 2px 2px 0 var(--title-shadow), 0 0 16px rgba(92, 165, 186, 0.7);
  letter-spacing: 0;
}

.site-title a {
  color: inherit;
}

.site-tagline {
  max-width: 690px;
  margin: 9px 0 0;
  color: var(--tagline);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 1px 1px 0 var(--title-shadow);
}

.top-nav {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(239, 204, 119, 0.25);
  background: linear-gradient(var(--nav-top), var(--nav-bottom));
}

.top-nav > ul,
.top-nav > div > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0 12px;
  list-style: none;
}

.top-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-nav li {
  position: relative;
}

.top-nav a {
  display: block;
  padding: 10px 14px;
  border-left: 1px solid rgba(255, 226, 148, 0.18);
  border-right: 1px solid rgba(0, 0, 0, 0.55);
  color: var(--nav-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.top-nav a:hover,
.top-nav a:focus,
.top-nav .current-menu-item > a,
.top-nav .current-menu-ancestor > a {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-text);
  text-decoration: none;
}

.top-nav li > ul,
.top-nav .sub-menu,
.top-nav .children {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: none;
  width: 220px;
  padding: 0;
  border: 1px solid var(--outer-border);
  background: linear-gradient(var(--nav-top), var(--nav-bottom));
  box-shadow: 3px 3px 0 var(--shadow);
}

.top-nav li > ul li,
.top-nav .sub-menu li,
.top-nav .children li {
  width: 100%;
}

.top-nav li > ul a,
.top-nav .sub-menu a,
.top-nav .children a {
  min-height: 34px;
  padding: 9px 11px;
  border-left: 0;
  border-right: 0;
  border-bottom: 1px solid var(--border);
  white-space: normal;
}

.top-nav li:hover > ul,
.top-nav li:focus-within > ul {
  display: block;
}

.top-nav li > ul ul,
.top-nav .sub-menu .sub-menu,
.top-nav .children .children {
  top: -1px;
  left: 100%;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(rgba(255,255,255,0.025), transparent 240px),
    var(--content-bg);
}

.content-grid.no-sidebar {
  grid-template-columns: 1fr;
}

.content-grid.no-sidebar .sidebar {
  display: none;
}

.content-grid.sidebar-left {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.content-grid.sidebar-left .main-content {
  order: 2;
}

.content-grid.sidebar-left .sidebar {
  order: 1;
}

.main-content,
.sidebar .widget,
.front-box,
.front-widget-area .widget,
.header-widget-band .widget,
.footer-widget-grid .widget,
.post-card,
.comments-area,
.post-navigation {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 242, 184, 0.08), transparent 95px),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 150, 0.08), 3px 3px 0 var(--shadow);
}

.header-widget-band {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(239, 204, 119, 0.2);
  background: var(--header-widget-bg);
}

.header-widget-band .widget,
.front-widget-area .widget,
.footer-widget-grid .widget {
  margin: 0;
  padding: 10px;
}

.main-content {
  min-width: 0;
  padding: 12px;
}

.page-title,
.archive-title,
.entry-title,
.front-box h2,
.widget-title,
.comments-title {
  margin: 0 0 10px;
  font-family: var(--font-title);
  color: var(--parchment-light);
  letter-spacing: 0;
  text-shadow: 1px 1px 0 var(--title-shadow);
}

.entry-title {
  font-size: 28px;
}

.entry-title a {
  color: var(--parchment-light);
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 8px;
  border: 1px solid var(--meta-border);
  background: var(--meta-bg);
  color: var(--muted);
  font-size: 11px;
}

.post-card {
  margin: 0 0 14px;
  padding: 12px;
}

.entry-content {
  color: var(--content-text);
}

.entry-content h2,
.entry-content h3 {
  color: var(--content-heading);
  font-family: var(--font-title);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--table-bg);
}

.entry-content th,
.entry-content td {
  padding: 8px;
  border: 1px solid var(--border);
}

.entry-content th {
  color: var(--table-head-text);
  background: var(--table-head-bg);
}

.entry-content blockquote {
  margin: 16px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--green);
  background: var(--quote-bg);
  color: var(--quote-text);
}

.front-quicklinks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.front-widget-area {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.front-box {
  padding: 12px;
}

.front-box h2 {
  font-size: 19px;
}

.quicklink {
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--quick-border);
  background:
    linear-gradient(135deg, rgba(105, 167, 186, 0.16), transparent 58%),
    var(--quick-bg);
}

.quicklink-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  min-height: 76px;
}

.quicklink-main:hover,
.quicklink-main:focus {
  text-decoration: none;
}

.quicklink strong {
  color: var(--quick-title);
  font-family: var(--font-title);
  font-size: 18px;
}

.quicklink span {
  color: var(--muted);
  font-size: 12px;
}

.quicklink-submenu {
  display: grid;
  gap: 4px;
  margin: 9px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--quick-border);
  list-style: none;
}

.quicklink-submenu a {
  display: block;
  color: var(--blue);
  font-size: 12px;
}

.guide-list {
  display: grid;
  gap: 10px;
}

.guide-list article {
  padding: 10px;
  border: 1px solid var(--guide-border);
  background: var(--guide-bg);
}

.guide-list h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.read-more,
.button,
button,
input[type="submit"] {
  display: inline-block;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--button-border);
  color: var(--button-text);
  background: linear-gradient(var(--button-top), var(--button-bottom));
  font: 700 12px var(--font-ui);
  text-transform: uppercase;
  cursor: pointer;
}

.read-more:hover,
.button:hover,
button:hover,
input[type="submit"]:hover {
  color: var(--button-hover-text);
  background: linear-gradient(var(--button-hover-top), var(--button-hover-bottom));
  text-decoration: none;
}

.sidebar {
  min-width: 0;
}

.sidebar .widget {
  margin-bottom: 14px;
  padding: 10px;
}

.widget-title,
.widget .wp-block-heading,
.widget > h1,
.widget > h2,
.widget > h3 {
  margin: 0 0 10px;
  padding: 7px 8px;
  border: 1px solid var(--widget-title-border);
  color: var(--parchment-light);
  background: linear-gradient(var(--widget-title-top), var(--widget-title-bottom));
  font-family: var(--font-title);
  font-size: 17px;
  line-height: 1.25;
  text-shadow: 1px 1px 0 var(--title-shadow);
}

.widget ul {
  margin: 0;
  padding-left: 18px;
}

.widget li {
  margin: 5px 0;
}

.search-form {
  display: flex;
  gap: 6px;
}

.search-field,
.comment-form input,
.comment-form textarea,
select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--form-border);
  color: var(--form-text);
  background: var(--form-bg);
  font: 13px var(--font-ui);
}

.search-submit {
  width: auto;
  flex: 0 0 auto;
}

.site-footer {
  padding: 12px 16px;
  border-top: 2px solid var(--outer-border);
  color: var(--muted);
  background: var(--footer-bg);
  font-size: 12px;
  text-align: center;
}

.footer-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pagination,
.post-navigation {
  margin-top: 14px;
  padding: 10px;
}

.pagination .nav-links,
.post-navigation .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.comments-area {
  margin-top: 14px;
  padding: 12px;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .front-quicklinks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-widget-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: calc(100% - 12px);
    margin-top: 6px;
  }

  .masthead {
    min-height: 174px;
    padding: 20px 14px 14px;
  }

  .site-header {
    min-height: 222px;
  }

  .top-nav > ul,
  .top-nav > div > ul {
    padding: 0;
  }

  .top-nav li {
    width: 50%;
  }

  .top-nav li > ul,
  .top-nav .sub-menu,
  .top-nav .children {
    position: static;
    width: 100%;
    box-shadow: none;
  }

  .top-nav li > ul ul,
  .top-nav .sub-menu .sub-menu,
  .top-nav .children .children {
    position: static;
  }

  .top-nav li > ul a,
  .top-nav .sub-menu a,
  .top-nav .children a {
    padding-left: 18px;
    font-size: 11px;
  }

  .top-nav li > ul ul a,
  .top-nav .sub-menu .sub-menu a,
  .top-nav .children .children a {
    padding-left: 28px;
  }

  .top-nav a {
    min-height: 42px;
    padding: 10px;
  }

  .content-grid {
    padding: 8px;
  }

  .main-content {
    padding: 8px;
  }

  .front-quicklinks {
    grid-template-columns: 1fr;
  }
}
