/*
Theme Name: Ausbildungsjournal
Theme URI: https://www.ausbildungsjournal.de/
Author: Lausitzer Verlagsanstalt
Description: Modernes, mobilorientiertes Magazin- und Ausbildungsportal fuer Ausbildungsjournal.de.
Version: 0.3.0
Requires at least: 7.0
Requires PHP: 8.2
Text Domain: ausbildungsjournal
License: GNU General Public License v2 or later
*/

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  src: url("assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 700 900;
  src: url("assets/fonts/inter-700.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  src: url("assets/fonts/barlow-condensed-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700 900;
  src: url("assets/fonts/barlow-condensed-700.woff2") format("woff2");
}

:root {
  --aj-blue: #4090d4;
  --aj-blue-dark: #1768a9;
  --aj-gray: #818285;
  --aj-orange: #f1461d;
  --aj-green: #75a900;
  --aj-green-bright: #99d420;
  --aj-magenta: #c60076;
  --aj-ink: #231f20;
  --aj-muted: #62666b;
  --aj-surface: #f4f5f6;
  --aj-border: #dfe2e5;
  --aj-white: #fff;
  --aj-radius: 1rem;
  --aj-shadow: 0 1rem 2.5rem rgba(35, 31, 32, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--aj-white);
  color: var(--aj-ink);
  margin: 0;
}

a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--aj-orange);
  outline-offset: 3px;
}

.wp-site-blocks { min-height: 100vh; }

.aj-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--aj-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-bar .aj-header { top: 32px; }

.aj-header__inner { min-height: 5.25rem; }

.aj-header .custom-logo {
  height: auto;
  max-height: 3.2rem;
  width: auto;
}

/* Verhindert den doppelten Seitentitel auch bei einer alten, in der DB
   gespeicherten Header-Vorlage. Das grafische Logo bleibt sichtbar. */
.aj-header .wp-block-site-title { display: none; }

.aj-header .wp-block-navigation-item__content {
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.aj-header .wp-block-navigation-item__content:hover { color: var(--aj-blue-dark); }

.aj-kicker {
  color: var(--aj-blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aj-hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(153, 212, 32, 0.22), transparent 28rem),
    linear-gradient(135deg, #eff7fd 0%, #fff 60%);
  overflow: hidden;
  position: relative;
}

.aj-hero::before {
  background: var(--aj-orange);
  border-radius: 999px;
  content: "";
  height: 0.5rem;
  left: max(1.25rem, calc((100% - 1200px) / 2));
  position: absolute;
  top: 0;
  width: 7rem;
}

.aj-hero h1,
.aj-section-title,
.aj-card h2,
.aj-card h3,
.wp-block-post-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  letter-spacing: -0.025em;
}

.aj-hero h1 { font-size: clamp(2.65rem, 7vw, 5.75rem); line-height: 0.94; }

.aj-hero__lead { color: var(--aj-muted); font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 42rem; }

.aj-section { padding-block: clamp(3rem, 7vw, 6.5rem); }

.aj-section--surface { background: var(--aj-surface); }

.aj-section--dark {
  background: var(--aj-ink);
  color: var(--aj-white);
}

.aj-section--dark .aj-kicker { color: var(--aj-green-bright); }
.aj-section--dark p { color: #e9eaeb; }

.aj-section-title { font-size: clamp(2.1rem, 4vw, 3.4rem); margin-bottom: 0.35rem; }

.aj-section-intro { color: var(--aj-muted); margin-top: 0; max-width: 48rem; }

.aj-card,
.wp-block-query .wp-block-post-template > li {
  background: var(--aj-white);
  border: 1px solid var(--aj-border);
  border-radius: var(--aj-radius);
  box-shadow: 0 0.3rem 1.4rem rgba(35, 31, 32, 0.04);
  height: 100%;
  overflow: hidden;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.aj-card:hover,
.wp-block-query .wp-block-post-template > li:hover {
  box-shadow: var(--aj-shadow);
  transform: translateY(-3px);
}

.wp-block-query .wp-block-post-template > li .wp-block-post-featured-image {
  margin: calc(clamp(1.1rem, 2.5vw, 1.6rem) * -1);
  margin-bottom: 1.25rem;
}

.wp-block-query .wp-block-post-template > li .wp-block-post-featured-image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.aj-card__meta,
.aj-entry-meta {
  color: var(--aj-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  gap: 0.45rem 1rem;
  margin: 0.6rem 0 1rem;
}

.aj-card__meta span,
.aj-entry-meta span { align-items: center; display: inline-flex; gap: 0.35rem; }

.aj-card__eyebrow {
  color: var(--aj-blue-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.aj-card__title { font-size: 1.55rem; line-height: 1.05; margin: 0.45rem 0; }

.aj-card__title a { color: inherit; text-decoration: none; }

.aj-card__title a:hover { color: var(--aj-blue-dark); }

.aj-card__image {
  display: block;
  margin: calc(clamp(1.1rem, 2.5vw, 1.6rem) * -1);
  margin-bottom: 1.25rem;
}

.aj-card__image img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.aj-badge {
  background: #eaf4fc;
  border-radius: 999px;
  color: var(--aj-blue-dark);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
}

.aj-badge--featured { background: #fff0eb; color: #bd2e0d; }

.aj-search {
  background: var(--aj-white);
  border-radius: 1.25rem;
  box-shadow: var(--aj-shadow);
  padding: clamp(1.1rem, 3vw, 2rem);
}

.aj-search__form {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(10rem, 1fr)) auto;
}

.aj-field { display: flex; flex-direction: column; gap: 0.35rem; }

.aj-field label { font-size: 0.82rem; font-weight: 800; }

.aj-field input,
.aj-field select {
  background: var(--aj-white);
  border: 1px solid #b9bec3;
  border-radius: 0.65rem;
  color: var(--aj-ink);
  font: inherit;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  width: 100%;
}

.aj-button,
.wp-block-button__link {
  align-items: center;
  background: var(--aj-blue-dark);
  border: 0;
  border-radius: 999px;
  color: var(--aj-white);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
}

.aj-button:hover,
.wp-block-button__link:hover { background: #0d507f; color: var(--aj-white); }

.aj-button--secondary { background: var(--aj-orange); }

.aj-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.aj-results-count { color: var(--aj-muted); font-size: 0.92rem; margin: 1.25rem 0; }

.aj-empty {
  background: var(--aj-surface);
  border-left: 0.35rem solid var(--aj-orange);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
}

.aj-entry-facts {
  background: var(--aj-surface);
  border-radius: var(--aj-radius);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2rem 0;
  overflow: hidden;
}

.aj-entry-fact { border-bottom: 1px solid var(--aj-border); padding: 1rem 1.2rem; }

.aj-entry-fact:nth-child(odd) { border-right: 1px solid var(--aj-border); }

.aj-entry-fact dt { color: var(--aj-muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }

.aj-entry-fact dd { margin: 0.25rem 0 0; }

.aj-ad-slot {
  align-items: center;
  background: #f1f2f3;
  border: 1px dashed #aeb3b8;
  border-radius: var(--aj-radius);
  color: var(--aj-muted);
  display: flex;
  justify-content: center;
  min-height: 10rem;
  padding: 1rem;
  position: relative;
  text-align: center;
}

.aj-ad-slot::before {
  content: "Anzeige";
  font-size: 0.66rem;
  font-weight: 800;
  left: 0.75rem;
  letter-spacing: 0.08em;
  position: absolute;
  text-transform: uppercase;
  top: 0.6rem;
}

.aj-ad-slot > a,
.aj-ad-slot > a img {
  display: block;
  max-width: 100%;
}

.aj-footer { background: var(--aj-ink); color: #e9eaeb; margin-top: auto; }

.aj-footer a { color: var(--aj-white); }

.aj-footer__mark { border-top: 0.45rem solid var(--aj-green-bright); }

.aj-footer .wp-block-site-title { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 2rem; }

.aj-pagination { margin-top: 2rem; }

@media (max-width: 960px) {
  .aj-search__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aj-search__form .aj-button { width: 100%; }
  .aj-grid,
  .aj-grid--4,
  .aj-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
  .admin-bar .aj-header { top: 46px; }
}

@media (max-width: 640px) {
  .aj-header__inner { min-height: 4.5rem; }
  .aj-search__form,
  .aj-grid,
  .aj-grid--4,
  .aj-grid--2,
  .aj-entry-facts { grid-template-columns: 1fr; }
  .aj-entry-fact:nth-child(odd) { border-right: 0; }
  .aj-section { padding-block: 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
