/*
Theme Name: Zusteller-OHZ
Description: Bewerberportal des Osterholzer Zeitungsverlags. Look of zusteller-ohz.de (Materialize metrics) in plain CSS, BFSG/WCAG 2.1 AA.
Version: 1.1.0
Requires PHP: 8.1
Text Domain: zusteller-ohz
*/

/* ---------- Fonts (self-hosted, no Google requests) ---------- */
@font-face { font-family: "Roboto"; font-weight: 300; font-display: swap; src: url(assets/fonts/roboto-300.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url(assets/fonts/roboto-400.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url(assets/fonts/roboto-500.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url(assets/fonts/roboto-700.woff2) format("woff2"); }

/* ---------- Tokens (values from zusteller-ohz.de) ---------- */
:root {
    --blue: #1A5681;
    --blue-dark: #123d5c;
    --black: #131614;
    --text: rgba(0, 0, 0, .87);
    --label: #6e6e6e;          /* original #9e9e9e darkened to 5:1 for AA */
    --error: #c62828;
    --hover: #f1f1f1;
    --focus: #ffbf47;
    --z1: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.12), 0 1px 5px 0 rgba(0,0,0,.2);
    --z3: 0 8px 17px 2px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2);
    --fs: 1;                   /* A-/A+ factor */
    --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    font-size: calc(14px * var(--fs)); line-height: 1.5; color: var(--text);
    font-family: "Roboto", sans-serif; font-weight: 400; -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (min-width: 992px) { html { font-size: calc(14.5px * var(--fs)); } }
@media (min-width: 1200px) { html { font-size: calc(15px * var(--fs)); } }
body { margin: 0; background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { line-height: 2rem; margin: 1rem 0; }
h1, h2, h3 { font-weight: 400; line-height: 110%; }
h1 { font-size: 4.2rem; margin: 2.1rem 0 1.68rem; }
h2, h3 { font-size: 1.64rem; margin: 1.78rem 0 1.424rem; }
@media (max-width: 600px) { h1 { font-size: 3.2rem; } }
strong { font-weight: 500; }
.light { font-weight: 300; }
.center { text-align: center; }
.blue-text { color: var(--blue); }
main { display: block; outline: none; }

/* Keyboard focus only; visible on light and dark backgrounds */
:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; box-shadow: 0 0 0 5px var(--focus); }
.site-footer :focus-visible { outline-color: #fff; }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 1000; padding: .75rem 1rem; background: var(--black); color: #fff; }
.skip-link:focus { top: 1rem; }

.icon { width: 24px; height: 24px; fill: currentColor; flex: none; vertical-align: middle; }

/* ---------- Layout (Materialize container + columns) ---------- */
.container { margin: 0 auto; max-width: 1280px; width: 90%; }
@media (min-width: 601px) { .container { width: 85%; } }
@media (min-width: 993px) { .container { width: 70%; } }
.section { padding: 1rem 0; }
.row-3, .row-2-1 { display: grid; gap: 0 1.5rem; list-style: none; margin: 0 0 20px; padding: 0; }
@media (min-width: 601px) {
    .row-3 { grid-template-columns: repeat(3, 1fr); }
    .row-2-1 { grid-template-columns: 2fr 1fr; }
}
.page-title { text-align: center; color: var(--black); }
.page-subtitle { text-align: center; font-size: 1.64rem; line-height: 110%; margin: 0 0 2rem; }
.section-title { font-size: 2.28rem; margin: 1.14rem 0 .912rem; }
.prose p:first-child { margin-top: 0; }

/* ---------- Buttons (Materialize btn-large + z-depth-3) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    height: 54px; padding: 0 28px; border: 0; border-radius: 2px;
    background: var(--blue); color: #fff; font: inherit; font-size: 1rem; letter-spacing: .5px;
    text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap;
    box-shadow: var(--z3); transition: background-color .2s ease-out;
}
.btn:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }
.btn-large { min-width: 230px; }
.btn-xlarge { height: 100px; padding: 0 2rem; font-size: 2.92rem; }
@media (max-width: 600px) { .btn-xlarge { height: 72px; font-size: 2rem; } }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #f5f5f5; color: var(--blue-dark); }
.btn .icon { width: 1.6rem; height: 1.6rem; }

/* ---------- Header / nav (white navbar, 68px) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: var(--z1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: block; line-height: 0; }
.brand img { height: 60px; width: auto; margin: 4px 0; }
.nav-toggle {
    display: none; background: none; border: 0; padding: 0 .5rem; color: var(--blue); cursor: pointer;
    height: var(--header-h); min-width: 44px;
}
.nav-list { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-list a {
    display: block; padding: 0 15px; line-height: var(--header-h); font-size: 1rem;
    color: var(--black); transition: background-color .3s;
}
.nav-list a:hover { background: rgba(0,0,0,.1); text-decoration: none; }
.nav-list a[aria-current="page"] { background: rgba(0,0,0,.1); }
@media (max-width: 992px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--z1); }
    .site-nav.is-open { display: block; }
    .nav-list { flex-direction: column; }
    .nav-list a { line-height: 48px; padding: 0 5%; }
}
.no-js .site-nav { display: block; position: static; box-shadow: none; }
.no-js .nav-toggle { display: none; }

/* A-/A+ box, bottom right as on the current site */
.font-size-tool {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: flex; gap: 1rem;
    padding: 1rem; background: rgba(255,255,255,.8); border: 1px solid #000; box-shadow: var(--z3);
}
.font-size-tool button {
    width: 2.5rem; height: 2.5rem; border: 0; background: var(--blue); color: #fff;
    font: 400 1rem/1 "Roboto", sans-serif; cursor: pointer;
}

/* ---------- Hero slider ---------- */
.hero { position: relative; overflow: hidden; background: #000; }
.hero-link { display: block; position: relative; width: 100%; height: calc(100vw * .56); max-height: calc(100vh - 78px); color: rgba(255,255,255,.9); }
.hero-link:hover { text-decoration: none; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hero-region {
    position: absolute; top: 0; right: 0; z-index: 2; margin: 0; padding: 2rem;
    background: var(--blue); color: #fff; /* 7.4:1 */
    font-size: 5rem; font-weight: 700; line-height: 1.25em; text-align: right;
}
.hero-region::after {
    content: ""; position: absolute; left: 0; bottom: calc(-2.5rem + 1px);
    border-left: 2.5rem solid transparent; border-right: 2.5rem solid transparent; border-top: 2.5rem solid var(--blue);
}
.hero-claim {
    position: relative; z-index: 2; margin: .5em 0; padding: 0 1em 1vw; color: #fff;
    font-size: 8.5rem; font-style: italic; line-height: 110%; text-shadow: 0 0 8px #000, 0 0 3px #000;
}
@media (max-width: 1600px) { .hero-claim { font-size: 6rem; } .hero-region { padding: 1rem; font-size: 3rem; } }
@media (max-width: 1200px) { .hero-claim { font-size: 4.5rem; } .hero-region { padding: .75rem; font-size: 2.5rem; } }
@media (max-width: 900px)  { .hero-claim { font-size: 2.3rem; } .hero-region { padding: .5rem; font-size: 2rem; } }
@media (max-width: 600px)  { .hero-claim { font-size: 1.4rem; } .hero-region { padding: .25rem .5rem; font-size: 1.5rem; } }
@media (max-width: 400px)  {
    .hero-region { font-size: 1rem; }
    .hero-region::after { bottom: calc(-1rem + 1px); border-width: 1rem 1rem 0; }
}
.hero-pause {
    position: absolute; left: 1rem; bottom: 1rem; z-index: 5; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 2px solid #fff; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
}
.hero-pause .when-paused, .hero-pause[aria-pressed="true"] .when-playing { display: none; }
.hero-pause[aria-pressed="true"] .when-paused { display: inline-flex; }

/* ---------- Intro banner (#index-banner, min-height 480px) ---------- */
.intro { min-height: 480px; display: flex; align-items: center; }
.intro .container { padding: 1rem 0; }
.intro-title { font-size: 1.6rem; font-weight: 700; color: var(--blue); margin: 2.1rem 0 1.68rem; }
.intro-subtitle { font-size: 1.64rem; line-height: 110%; margin: 0 0 2.5rem; }

/* ---------- Icon blocks ---------- */
.icon-block { padding: 0 15px; text-align: center; }
.icon-block-icon { display: block; margin: 1.78rem auto 0; width: 1.64rem; height: 1.64rem; color: var(--blue); }
.icon-block h2, .icon-block h3 { margin: 1.4rem 0 1.424rem; }

/* ---------- Job list ---------- */
.job-group-title { color: var(--blue); margin: 2.5rem 0 1rem; }
@media (min-width: 601px) { .job-group-title { padding-left: 33.33%; } }
.job-items { list-style: none; margin: 0; padding: 0; }
.joboffer { display: grid; align-items: center; gap: .5rem 1.5rem; padding: 10px 0 20px; color: var(--text); }
@media (min-width: 601px) { .joboffer { grid-template-columns: repeat(4, 1fr); } }
.joboffer:hover { background: var(--hover); text-decoration: none; }
.joboffer:hover .joboffer-title { text-decoration: underline; }
.joboffer-title { margin: 0; font-size: 1.25em; color: var(--blue); }
.joboffer-col { display: grid; gap: .5em; }
.iconline { display: flex; gap: .75rem; align-items: center; }
.iconline .icon, .facts .icon, .contact-list .icon { color: var(--blue); }
.joboffer-cta { text-align: center; }
.joboffer-cta .btn { min-width: 0; }

/* ---------- Job detail ---------- */
.facts { align-items: start; }
.facts-col { list-style: none; margin: 0; padding: 0; }
.facts-col li { display: flex; align-items: center; gap: 1rem; min-height: 6em; margin-bottom: 10px; }
.facts-buttons { display: grid; gap: 10px; justify-items: center; }
.facts-buttons .btn { margin: calc((6em - 54px) / 2) 0; }
.only-small { display: none; }
@media (max-width: 600px) {
    .only-small { display: grid; }
    .facts .facts-buttons .btn, .only-small .btn { width: 100%; }
}
.map-open { display: inline-flex; align-items: center; gap: .25rem; }
.map-open .icon { width: 1.2em; height: 1.2em; }
.map-dialog { width: min(95vw, 70rem); max-height: 95vh; padding: 10px; border: 0; border-radius: 2px; box-shadow: var(--z3); }
.map-dialog::backdrop { background: rgba(0,0,0,.5); }
.map-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 5px; }
.map-head h2 { margin: 0; font-size: 1rem; }
.map-close { background: none; border: 0; padding: 0; cursor: pointer; width: 44px; height: 44px; color: var(--black); }
.map-dialog img { display: block; width: 100%; }

/* ---------- Contact list ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 20px; }
.contact-list address { font-style: normal; }
.logo-box { border: 1px solid #f1f1f1; width: 100%; margin-bottom: 1rem; }

/* ---------- FAQ (dl#faq) ---------- */
.faq dt { color: var(--blue); font-size: 1.64rem; line-height: 110%; margin: .82rem 0 .656rem; }
.faq dd { margin: 0; padding: 0 0 10px; }
.faq dd p { margin: 0; line-height: 1.5; }

/* ---------- Form (Materialize inputs) ---------- */
.applying-for { margin-bottom: 1rem; }
.applying-job { font-size: 2rem; line-height: 1.2; color: var(--blue); }
.field { position: relative; margin: 1rem 0 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { display: block; padding: 0; font-size: .8rem; color: var(--label); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"] {
    display: block; width: 100%; height: 3rem; margin: 0 0 20px; padding: 0;
    font: inherit; font-size: 1rem; color: var(--text); background: transparent;
    border: 0; border-bottom: 1px solid #949494; border-radius: 0; box-shadow: none; transition: all .3s;
}
.field input::placeholder { color: #767676; opacity: 1; }
.field input:focus { outline: none; border-bottom-color: var(--blue); box-shadow: 0 1px 0 0 var(--blue); }
.field input:focus-visible { outline: none; }
.field:focus-within > label { color: var(--blue); }
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="tel"] { border-bottom-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.error-msg { color: var(--error); font-size: .9rem; line-height: 1.4; margin: 0 0 .25rem; }
.hint, .hint-inline { color: var(--label); font-size: .8rem; }
.birth-parts { display: flex; gap: 1.5rem; }
.birth-parts label { display: block; font-size: .8rem; color: var(--label); }
.birth-parts input { width: 4rem !important; text-align: left; }
.birth-parts > div:last-child input { width: 5.5rem !important; }
.field legend { margin-bottom: .75rem; font-size: 1rem; }
.checks { display: flex; flex-wrap: wrap; gap: 1rem 20px; margin-bottom: 20px; }
.checks-stacked { flex-direction: column; gap: 20px; }
.check { display: flex; align-items: center; gap: .75rem; cursor: pointer; color: var(--label); font-size: 1rem; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }
.field > label.check { font-size: 1rem; color: var(--label); }
.error-summary { border: 2px solid var(--error); padding: .5rem 1.25rem 1rem; margin-bottom: 1.5rem; }
.error-summary h2 { margin: .75rem 0; font-size: 1.3rem; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 1.25rem; line-height: 1.8; }
.error-summary a { color: var(--error); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.apply-form .btn { margin: 2rem 0 1rem; }
.apply-aside { padding-top: 1rem; }
.apply-aside .btn { margin-top: .5rem; }

/* ---------- Footer (page-footer zst-black) ---------- */
.site-footer { margin-top: 2rem; padding-top: 20px; background: var(--black); color: #fff; }
.site-footer p { color: #f5f5f5; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 0 1.5rem; }
@media (min-width: 993px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-title { font-size: 1rem; font-weight: 700; margin: 1rem 0 .5rem; line-height: 1.5; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin: 0 0 20px; }
.footer-list a { display: inline-flex; align-items: center; gap: 1rem; }
.footer-list .icon { width: 1rem; height: 1rem; }
.footer-contact .icon { color: #fff; width: 1rem; height: 1rem; }
.footer-copyright { margin-top: 1rem; padding: 10px 0; min-height: 50px; display: flex; align-items: center; background: rgba(51,51,51,.08); color: rgba(255,255,255,.8); font-weight: 300; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .font-size-tool, .hero-pause, .site-footer, .facts-buttons { display: none !important; }
}
