/*
Theme Name: Café Obstkörbchen 2026
Theme URI: https://cafe-obstkoerbchen.de/
Author: ITSW
Description: Schlichtes, responsives WordPress-Theme für das Café Obstkörbchen in Freckenhorst. Fokus auf klare Typografie, viel Weißraum, Kardinalrot und Mausgrau.
Version: 1.2.7
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: obstkoerbchen
*/

:root {
  --ok-red: #B81400;
  --ok-red-dark: #8e1003;
  --ok-grey: #AEB2AE;
  --ok-ink: #2c2b29;
  --ok-muted: #6f716e;
  --ok-cream: #faf8f4;
  --ok-paper: #ffffff;
  --ok-line: #e7e4df;
  --ok-shadow: 0 18px 50px rgba(46, 34, 25, .08);
  --ok-radius: 18px;
  --ok-image-radius: 20px;
  --ok-max: 1180px;
  --ok-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ok-serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ok-ink);
  background: var(--ok-paper);
  font-family: var(--ok-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ok-red); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--ok-red-dark); }
button, input, textarea, select { font: inherit; }

.container { width: min(calc(100% - 40px), var(--ok-max)); margin-inline: auto; }
.section { padding: clamp(64px, 7vw, 104px) 0; }
.section--soft { background: var(--ok-cream); }
.eyebrow {
  margin: 0 0 10px;
  color: var(--ok-red);
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: .78rem;
}
.section-title,
.entry-title {
  margin: 0 0 18px;
  font-family: var(--ok-serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
}
.section-title { font-size: clamp(2rem, 4vw, 3.4rem); }
.entry-title { font-size: clamp(2.2rem, 5vw, 4rem); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #4b4a47; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(231,228,223,.9);
}
.admin-bar .site-header { top: 32px; }
.header-inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand-mark { width: 98px; height: 58px; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-title { color: var(--ok-red); font-family: var(--ok-serif); font-size: 1.45rem; font-weight: 700; }
.brand-subtitle { color: var(--ok-muted); text-transform: uppercase; font-size: .66rem; letter-spacing: .22em; margin-top: 5px; }
.custom-logo { max-height: 64px; width: auto; }

.primary-nav > ul { list-style: none; display: flex; gap: clamp(16px, 1.7vw, 26px); padding: 0; margin: 0; align-items: center; flex-wrap: nowrap; }
.primary-nav li { position: relative; white-space: nowrap; }
.primary-nav a { color: var(--ok-ink); text-decoration: none; font-size: .95rem; }
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a { color: var(--ok-red); }
.primary-nav .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: .42em;
  height: .42em;
  margin-left: .48em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-.16em) rotate(45deg);
}
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 120;
  min-width: 210px;
  display: block;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--ok-line);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(46,34,25,.12);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.primary-nav .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -13px;
  height: 13px;
}
.primary-nav .sub-menu li { width: 100%; }
.primary-nav .sub-menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: .92rem;
}
.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu .current-menu-item > a {
  background: var(--ok-cream);
  color: var(--ok-red);
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--ok-red);
  color: white;
  border: 1px solid var(--ok-red);
  text-decoration: none;
  font-weight: 700;
  transition: .2s ease;
}
.button:hover, .header-cta:hover { background: var(--ok-red-dark); color: white; border-color: var(--ok-red-dark); transform: translateY(-1px); }
.button--ghost { background: transparent; color: var(--ok-red); }
.button--ghost:hover { color: white; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--ok-ink); margin: 5px 0; }

.hero {
  overflow: hidden;
  background: var(--ok-cream);
  padding: clamp(26px, 4vw, 52px) 0;
}
.hero-grid {
  width: min(calc(100% - 40px), var(--ok-max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 560px;
  background: var(--ok-paper);
  border: 1px solid var(--ok-line);
  border-radius: 26px;
  box-shadow: 0 18px 55px rgba(55, 42, 33, .07);
  overflow: hidden;
}
.hero-copy {
  min-width: 0;
  padding: clamp(42px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy-inner {
  width: 100%;
  max-width: 540px;
}
.hero h1 {
  margin: 0;
  max-width: 100%;
  color: var(--ok-red);
  font-family: var(--ok-serif);
  font-size: clamp(3rem, 4.35vw, 4.75rem);
  line-height: .96;
  letter-spacing: -.04em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.hero-tagline {
  margin: 22px 0 18px;
  color: #5f605d;
  font-family: var(--ok-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2vw, 1.85rem);
}
.hero-text {
  max-width: 520px;
  font-size: 1.04rem;
  color: #42413e;
}
.hero-text p { margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-media {
  position: relative;
  margin-block: 0;
  min-width: 0;
  min-height: 500px;
  margin: 18px 18px 18px 0;
  border-radius: var(--ok-image-radius);
  overflow: hidden;
  background: #efece6;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.hero-media--fallback { display: grid; place-items: center; padding: 56px; }

.image-credit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  margin: 0;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(255,255,255,.9);
  color: #666865;
  font-size: .72rem;
  line-height: 1.35;
  box-shadow: 0 2px 10px rgba(40,32,26,.08);
}
.image-credit a { color: inherit; text-decoration: underline; text-underline-offset: .12em; }
.image-credit__label { font-weight: 600; }
.hero-media--fallback img { object-fit: contain; max-width: 760px; }
.hours-strip { border-top: 1px solid var(--ok-line); border-bottom: 1px solid var(--ok-line); background: white; }
.hours-inner { display: grid; grid-template-columns: .9fr 2.1fr; gap: 32px; align-items: center; padding: 28px 0; }
.hours-label { font-family: var(--ok-serif); font-size: 1.45rem; letter-spacing: .04em; }
.hours-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.hours-list p { margin: 0; padding: 8px 24px; border-left: 1px solid var(--ok-line); }
.hours-list strong, .hours-list span { display: block; }
.hours-list strong { font-weight: 600; }
.hours-list span { color: var(--ok-muted); margin-top: 2px; }

.split {
  width: min(calc(100% - 40px), var(--ok-max));
  margin: clamp(64px, 7vw, 104px) auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 4vw, 54px);
  align-items: center;
}
.split-media {
  position: relative;
  margin: 0;
  min-height: 460px;
  background: var(--ok-cream);
  border-radius: var(--ok-image-radius);
  overflow: hidden;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.split-copy { padding: clamp(24px, 3vw, 46px) 0; align-self: center; }
.split-copy p:last-of-type { margin-bottom: 28px; }
.fallback-panel { display: grid; place-items: center; height: 100%; padding: 64px; background: var(--ok-cream); }
.fallback-panel img { max-width: 520px; }

.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.offer-card { border: 1px solid var(--ok-line); border-radius: var(--ok-radius); padding: 28px; background: white; text-decoration: none; color: inherit; transition: .2s ease; min-height: 210px; display: flex; flex-direction: column; }
.offer-card:hover { transform: translateY(-4px); box-shadow: var(--ok-shadow); border-color: rgba(184,20,0,.25); }
.offer-icon { width: 42px; height: 42px; color: var(--ok-red); margin-bottom: 28px; }
.offer-card h3 { margin: 0 0 8px; font-family: var(--ok-serif); font-size: 1.6rem; }
.offer-card p { margin: 0 0 24px; color: var(--ok-muted); }
.offer-card span { margin-top: auto; color: var(--ok-red); font-weight: 700; }

.pilgrim { border-top: 1px solid var(--ok-line); border-bottom: 1px solid var(--ok-line); }
.pilgrim-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 56px; }
.pilgrim-media { position: relative; margin: 0; border-radius: var(--ok-image-radius); overflow: hidden; min-height: 360px; background: var(--ok-cream); }
.pilgrim-media img { width: 100%; height: 100%; object-fit: cover; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
.news-card { border: 1px solid var(--ok-line); border-radius: var(--ok-image-radius); overflow: hidden; background: white; }
.news-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.news-card-body { padding: 24px; }
.news-card h3 { margin: 0 0 8px; font-family: var(--ok-serif); font-size: 1.45rem; }
.news-card time { color: var(--ok-muted); font-size: .86rem; }
.news-card p { color: #555; }

.site-main { min-height: 50vh; }
.content-wrap { width: min(calc(100% - 40px), 860px); margin-inline: auto; padding: 72px 0 96px; }
.entry-content > * { max-width: 100%; }
.entry-featured { margin: 0 0 34px; border-radius: var(--ok-image-radius); overflow: hidden; }
.entry-featured img { width: 100%; border-radius: inherit; }
.entry-content img { border-radius: var(--ok-image-radius); }
.entry-content .wp-block-image { overflow: hidden; border-radius: var(--ok-image-radius); }
.entry-content .wp-block-image img { border-radius: inherit; }
.entry-content .wp-block-media-text__media { border-radius: var(--ok-image-radius); overflow: hidden; }
.entry-content .wp-block-media-text__media img { border-radius: inherit; }
.entry-content .wp-block-cover { border-radius: var(--ok-image-radius); overflow: hidden; }
.entry-content h2, .entry-content h3 { font-family: var(--ok-serif); }
.post-list { display: grid; gap: 28px; }
.post-list article { padding-bottom: 28px; border-bottom: 1px solid var(--ok-line); }

.site-footer { background: var(--ok-cream); border-top: 1px solid var(--ok-line); }
.footer-grid { padding: 52px 0 36px; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
.footer-title { font-weight: 700; margin: 0 0 10px; }
.footer-grid p { margin: 0 0 6px; color: #555; }
.footer-hours p:not(.footer-title) { margin-bottom: 12px; }
.footer-hours strong { color: var(--ok-ink); font-weight: 600; }
.footer-brand .brand-mark { width: 120px; }
.footer-bottom { border-top: 1px solid var(--ok-line); padding: 16px 0 26px; display: flex; justify-content: space-between; gap: 20px; color: var(--ok-muted); font-size: .88rem; }
.footer-menu { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; }
.footer-menu a { color: var(--ok-muted); text-decoration: none; }

.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; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; grid-column: 1 / -1; padding-bottom: 22px; }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .primary-nav > ul > li > a { display: block; padding: 8px 0; }
  .primary-nav .menu-item-has-children > a::after { transform: translateY(-.05em) rotate(45deg); }
  .primary-nav .sub-menu {
    position: static;
    min-width: 0;
    margin: 0 0 4px 14px;
    padding: 0 0 0 14px;
    border: 0;
    border-left: 1px solid var(--ok-line);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
  }
  .primary-nav .sub-menu::before { display: none; }
  .primary-nav .sub-menu a { padding: 7px 0; }
  .primary-nav .sub-menu a:hover,
  .primary-nav .sub-menu .current-menu-item > a { background: transparent; }
  .hero-grid, .split, .pilgrim-grid { grid-template-columns: 1fr; }
  .split { width: min(calc(100% - 32px), var(--ok-max)); gap: 28px; }
  .split-media { min-height: 380px; }
  .split-copy { padding: 0 8px; }
  .hero-grid { width: min(calc(100% - 32px), var(--ok-max)); min-height: auto; }
  .hero-copy { padding: 48px 44px 36px; }
  .hero-copy-inner { max-width: 680px; }
  .hero h1 { font-size: clamp(3rem, 9vw, 5rem); overflow-wrap: normal; }
  .hero-media { min-height: 420px; margin: 0 18px 18px; }
  .hours-inner { grid-template-columns: 1fr; }
  .offer-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 28px), var(--ok-max)); }
  .header-inner { min-height: 76px; gap: 12px; }
  .brand-mark { width: 76px; height: 46px; }
  .brand-title { font-size: 1.15rem; }
  .hero { padding: 14px 0 28px; }
  .split { width: min(calc(100% - 20px), var(--ok-max)); margin: 48px auto; gap: 22px; }
  .split-media { min-height: 300px; border-radius: 15px; }
  .split-copy { padding: 0 8px; }
  .hero-grid { width: min(calc(100% - 20px), var(--ok-max)); min-height: auto; border-radius: 20px; }
  .hero-copy { padding: 40px 24px 30px; }
  .hero-copy-inner { width: 100%; }
  .hero h1 { font-size: clamp(2.75rem, 13vw, 4.15rem); line-height: .98; overflow-wrap: anywhere; }
  .hero-tagline { font-size: 1.35rem; }
  .hero-media { min-height: 300px; margin: 0 10px 10px; border-radius: 15px; }
  .hours-list { grid-template-columns: 1fr; }
  .hours-list p { border-left: 0; border-top: 1px solid var(--ok-line); padding: 14px 0; }
  .split-copy { padding: 44px 22px; }
  .split-media { min-height: 320px; }
  .offer-grid, .news-grid, .footer-grid { grid-template-columns: 1fr; }
  .pilgrim-grid { gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .admin-bar .site-header { top: 46px; }
}
