/*
Theme Name: ALTHOSAN
Theme URI: https://althosan.de
Author: Alexander Thomas Sang
Description: Block-Theme für das Indie-Game-Studio ALTHOSAN. Dunkles, modernes Blau-Design mit eigenem Beitragstyp „Spiele“, Genres und Akzentfarbe pro Spiel.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: althosan
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(a) { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--wp--preset--color--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.ath-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.ath-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wp--preset--color--text); }
.ath-brand svg { width: 44px; height: 44px; flex: none; }
.ath-brand span { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 24px; letter-spacing: .04em; }
.ath-header .wp-block-navigation a { padding: 10px 12px; }

/* ---------- Pillen / Badges ---------- */
.ath-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; line-height: 1.4; }
.ath-pill--blue { background: var(--wp--preset--color--blue); color: #fff; }
.ath-pill--cyan { background: var(--wp--preset--color--cyan); color: var(--wp--preset--color--ink); }
.ath-pill--mint { background: var(--wp--preset--color--mint); color: var(--wp--preset--color--ink); }
.ath-pill--sun  { background: var(--wp--preset--color--sun);  color: var(--wp--preset--color--ink); }

/* Genre-Liste (Tag-Cloud) als Filter-Pillen */
.ath-filter.wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.ath-filter.wp-block-tag-cloud a {
  font-size: 15px !important; font-weight: 500; text-decoration: none; margin: 0;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--wp--preset--color--line-strong);
  color: var(--wp--preset--color--text);
}
.ath-filter.wp-block-tag-cloud a:hover { background: var(--wp--preset--color--text); color: var(--wp--preset--color--ink); }

/* ---------- Akzentfarbe pro Spiel ----------
   Jede Spielkarte bekommt die Klasse genre-<slug>. Genres steuern die Farbe,
   das Feld „Akzentfarbe“ im Spiel überschreibt sie (siehe functions.php). */
.type-spiel { --game-accent: var(--wp--preset--color--blue); }
.genre-puzzle     { --game-accent: var(--wp--preset--color--sun); }
.genre-casual     { --game-accent: var(--wp--preset--color--blue); }
.genre-simulation { --game-accent: var(--wp--preset--color--mint); }
.genre-adventure  { --game-accent: var(--wp--preset--color--cyan); }
.genre-action     { --game-accent: var(--wp--preset--color--cyan); }

.ath-card { background: var(--wp--preset--color--panel); border-radius: 22px; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.ath-card .wp-block-post-featured-image { margin: 0; background: var(--game-accent); aspect-ratio: 4 / 3; }
.ath-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.ath-card__body { padding: 20px; }
.ath-card .wp-block-post-terms a { color: var(--game-accent); text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.ath-card .wp-block-post-title a { text-decoration: none; }
.ath-card:hover { outline: 2px solid var(--game-accent); }

/* Vorgestelltes Spiel */
.ath-feature { background: var(--wp--preset--color--panel); border-radius: 28px; overflow: hidden; }
.ath-feature .wp-block-post-featured-image { margin: 0; height: 100%; min-height: 360px; background: var(--game-accent); }
.ath-feature .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.ath-feature .wp-block-post-terms a { background: var(--game-accent); color: var(--wp--preset--color--ink); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; text-transform: uppercase; }

/* Status-Zeile */
.ath-status { color: var(--wp--preset--color--mint); font-weight: 700; font-size: 14px; }
.ath-status::before { content: "● "; }

/* Einzelseite Spiel */
.ath-game-hero { border-bottom: 4px solid var(--game-accent); }
.ath-facts { background: var(--wp--preset--color--panel); border-radius: 20px; }
.ath-facts p { margin: 0; }
.ath-facts .ath-label { color: var(--wp--preset--color--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.wp-block-gallery img { border-radius: 16px; }

/* Kennzahlen */
.ath-stat { background: var(--wp--preset--color--ink); border-radius: 20px; }
.ath-stat .ath-stat__num { font-family: var(--wp--preset--font-family--display); font-size: 40px; font-weight: 800; line-height: 1.1; margin: 0; }

/* CTA-Box */
.ath-cta { border-radius: 28px; }

/* Leere Bild-Platzhalter, solange kein Beitragsbild gesetzt ist */
.ath-card .wp-block-post-featured-image:empty,
.ath-feature .wp-block-post-featured-image:empty { display: block; }
