/* ═══════════════════════════════════════════════════════════
   LOKALE WEBFONTS (Task C7 – SEO-Audit 29.07.2026)
   Vorher von fonts.googleapis.com geladen (DSGVO-Grauzone).
   Dateien liegen unter /assets/fonts/ – keine externe Anfrage mehr.
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/josefin-sans-v34-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/josefin-sans-v34-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/josefin-sans-v34-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/josefin-sans-v34-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Josefin Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/josefin-sans-v34-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-200.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
}

/* ═══════════════════════════════════════════════════
   OTTO RÖHRIG – Custom CSS
   Tailwind handles utilities; this file adds:
   - Custom animations (prototype-specific)
   - Non-utility component styles
   ═══════════════════════════════════════════════════ */

/* ── FONTS ──────────────────────────────────────── */
body { font-family: 'Inter', sans-serif; }
h1,h2,h3,h4,h5 { font-family: 'Josefin Sans', sans-serif; }

/* ── HERO ANIMATIONS ────────────────────────────── */
@keyframes reveal-up-anim {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Die Einblendungen laufen nur, wenn JavaScript aktiv ist. Ohne das Praefix
   .js stehen die Abschnitte dauerhaft auf opacity:0, sobald JavaScript fehlt,
   abgeschaltet ist oder zu spaet kommt. Dann sieht ein Besucher - und ein
   KI-Agent, der die Seite als Bild aufnimmt - leere Flaechen. Das Inlineskript
   im <head> setzt die Klasse, bevor die Seite gezeichnet wird. */
.js .reveal-up {
  opacity: 0;
  animation: reveal-up-anim 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
}

/* Hero background subtle zoom */
@keyframes hero-bg-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.hero-bg {
  animation: hero-bg-zoom 12s ease-out forwards;
}

/* Hero CTA button – solid brand blue */
.hero-cta {
  background: #12418D;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.hero-cta:hover {
  background: #0D2F66;
  box-shadow: 0 20px 40px rgba(18,65,141,0.35);
  transform: translateY(-2px);
}

/* Hero pulse glow */
@keyframes hero-pulse-anim {
  0%,100% { opacity: 0; }
  50%      { opacity: 1; }
}
.hero-pulse {
  background: radial-gradient(ellipse at center, rgba(18,65,141,0.15) 0%, transparent 60%);
  animation: hero-pulse-anim 6s ease-in-out infinite;
}

/* Scroll breathe (CTA side bar) */
@keyframes scroll-breathe-anim {
  0%,100% { opacity: 0.4; transform: scaleY(0.8); }
  50%      { opacity: 1;   transform: scaleY(1); }
}
.scroll-breathe { animation: scroll-breathe-anim 3s ease-in-out infinite; }

/* Rotating seal */
@keyframes seal-rotate-anim {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.seal-rotate { animation: seal-rotate-anim 20s linear infinite; }

/* ── SCROLL REVEAL ──────────────────────────────── */
.js .scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── HOVER-UEBERGAENGE ──────────────────────────────
   Einheitlich weiche Kurve fuer alle Uebergaenge und eine spuerbare
   Mindestdauer fuer Farbwechsel. Tailwind setzt 150 ms, das wirkt auf
   grossen Kacheln wie ein Umschalten. Eine ausdrueckliche duration-Klasse
   am Element bleibt unangetastet. */
.transition, .transition-all, .transition-colors, .transition-opacity,
.transition-shadow, .transition-transform {
  transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
}
.transition:not([class*="duration-"]),
.transition-colors:not([class*="duration-"]),
.transition-opacity:not([class*="duration-"]),
.transition-shadow:not([class*="duration-"]) {
  transition-duration: 350ms;
}
.transition-transform:not([class*="duration-"]) {
  transition-duration: 600ms;
}

/* ── NEWSLETTER SHIMMER ─────────────────────────── */
@keyframes shimmer-bar {
  0%   { transform: translateX(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(200%); opacity: 0; }
}
@keyframes shimmer-bar2 {
  0%   { transform: translateX(100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(-200%); opacity: 0; }
}
.animate-shimmer-bar {
  animation: shimmer-bar 6s ease-in-out infinite;
  width: 40%; height: 200%; top: -50%;
}
.animate-shimmer-bar2 {
  animation: shimmer-bar2 8s ease-in-out infinite;
  width: 35%; height: 250%; top: -75%;
}

/* ── STICKY HEADER ──────────────────────────────── */
#global-header {
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
/* Eingeloggt zeigt WordPress oben die Adminleiste (32 px, mobil 46 px) und
   schiebt die Seite um diese Hoehe nach unten. Der fixierte Header blieb bei
   top:0 unter der Leiste haengen, waehrend der Inhalt mit Abstand darunter
   begann: ein weisser Balken zwischen Header und Hero, den nur eingeloggte
   Besucher sehen. Der Header rueckt deshalb unter die Leiste. */
body.admin-bar #global-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar #global-header { top: 46px; }
}
#global-header.scrolled {
  background: rgba(255,255,255,0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 24px rgba(0,0,0,0.08);
}

/* ── TECH-BOX TOGGLE (Fachkompetenz / Specialist section) ──── */
.tech-box .tech-box-content {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease;
  opacity: 0;
}
.tech-box .tech-box-content > * {
  min-height: 0; /* needed for grid-rows 0fr->1fr animation */
}
.tech-box.is-open .tech-box-content {
  grid-template-rows: 1fr;
  opacity: 1;
}
/* Rotate the chevron when open */
.tech-box .tech-toggle-btn svg { transition: transform 0.3s ease; }
.tech-box.is-open .tech-toggle-btn svg { transform: rotate(180deg); }

/* ════════════════════════════════════════════════════════════
   WORDPRESS NAV MENU STYLES (targets WP menu output)
   ════════════════════════════════════════════════════════════ */

/* Desktop nav: WP outputs <ul> inside <nav> */
#global-header nav > ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
#global-header nav > ul > li { position: relative; }
#global-header nav > ul > li > a {
  /* Höhe bewusst auf 40 px: Die Leiste wird auf Tablets mit dem Finger bedient,
     6 px Innenabstand ergaben nur 32 px und damit eine zu kleine Tippfläche. */
  display: flex;
  align-items: center;
  min-height: 40px;
  color: #12418D;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.375rem 0;
  white-space: nowrap;
  transition: color 0.3s;
  font-family: var(--font-family-body);
}
#global-header nav > ul > li > a:hover,
#global-header nav > ul > li.current-menu-item > a,
#global-header nav > ul > li.current_page_item > a { color: #D3111E; }

/* Desktop dropdown */
#global-header nav > ul > li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  min-width: 210px;
  padding: 0.5rem;
  margin: 0;
  list-style: none;
  z-index: 100;
  white-space: nowrap;
}
/* Bridge prevents the dropdown from closing in the gap between trigger and menu */
#global-header nav > ul > li > ul::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
#global-header nav > ul > li:hover > ul,
#global-header nav > ul > li:focus-within > ul { display: block; }
#global-header nav > ul > li > ul > li { list-style: none; margin: 0; }
#global-header nav > ul > li > ul > li > a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: #1A1A1A;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-family-body);
}
#global-header nav > ul > li > ul > li > a:hover { background: #EEF3F9; color: #12418D; }

/* ────────────── LANGUAGE SWITCHER ────────────── */
.lang-switcher { position: relative; }
.lang-switcher__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  min-width: 140px;
  padding: 0.375rem;
  z-index: 110;
}
.lang-switcher.open .lang-switcher__dropdown { display: block; }

/* Mobile nav: inside #mobile-menu */
#mobile-menu nav > ul,
#mobile-menu [data-landingsite-mobile-menu] ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
#mobile-menu ul > li > a {
  display: block;
  padding: 0.75rem 0;
  color: #12418D;
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  font-family: var(--font-family-body);
}
#mobile-menu ul > li > a:hover { color: #D3111E; }
/* Submenu in mobile */
#mobile-menu ul > li > ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0 0 0 1rem;
  margin: 0;
}
#mobile-menu ul > li > ul > li > a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #6B7280;
  border-bottom: 1px solid #f9fafb;
  text-decoration: none;
}

/* ════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE FIXES (precise, non-conflicting)
   ════════════════════════════════════════════════════════════ */

/* Global overflow prevention */
html, body { overflow-x: hidden; }
* { box-sizing: border-box; min-width: 0; }
img, video, iframe { max-width: 100%; height: auto; }

/* ── HERO SECTION (prototype HTML) ──────────────────────────── */

/* Mobile: hero headline font clamp */
@media (max-width: 639px) {
  #hero-section h1 {
    font-size: clamp(1.6rem, 8.5vw, 2.8rem) !important;
    line-height: 1.1 !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  /* Sublines */
  #hero-section p {
    font-size: clamp(0.9rem, 3.5vw, 1.125rem) !important;
  }
  /* Hero content padding */
  #hero-section .max-w-5xl { padding-inline: 1.25rem !important; }
  /* Hero CTA button */
  #hero-section a.hero-cta {
    width: 100%;
    justify-content: center;
    padding-inline: 1.5rem !important;
  }
}

/* Hero stats bar – fix gap overflow */
@media (max-width: 767px) {
  #hero-section .flex.items-center.justify-center.gap-16 {
    gap: 1rem !important;
    margin-top: 2rem !important;
  }
  #hero-section .flex.items-center.justify-center.gap-16 > div.text-center {
    flex: 1;
    min-width: 0;
  }
  #hero-section .flex.items-center.justify-center.gap-16 > div.w-px {
    display: none !important;
  }
  #hero-section .flex.items-center.justify-center.gap-16 .text-2xl {
    font-size: 1.25rem !important;
  }
}

/* Rotating seal – hide on small mobile */
@media (max-width: 639px) {
  #hero-section .absolute.bottom-16.left-12 {
    display: none !important;
  }
  /* Scroll indicator reposition */
  #hero-section .absolute.bottom-10 {
    bottom: 1.5rem !important;
  }
  /* Badge at top */
  #hero-section .mb-8 { margin-bottom: 1.5rem !important; }
  /* mt-24 on stats */
  #hero-section .mt-24 { margin-top: 2rem !important; }
}

/* ── SUBPAGE HEROES ──────────────────────────────────────────── */
@media (max-width: 639px) {
  section.relative.py-28,
  section.relative.py-24,
  section.relative.py-32 {
    padding-top: 4.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  section.relative h1 {
    font-size: clamp(1.5rem, 7.5vw, 2.5rem) !important;
    line-height: 1.15 !important;
  }
  section.relative .max-w-7xl,
  section.relative .max-w-4xl {
    padding-inline: 1.25rem !important;
  }
}

/* ── SECTION SPACING ─────────────────────────────────────────── */
@media (max-width: 639px) {
  .py-20  { padding-block: 2.5rem !important; }
  .py-16  { padding-block: 2rem !important; }
  .py-28  { padding-block: 3rem !important; }
  .py-24  { padding-block: 2.5rem !important; }
  .py-12  { padding-block: 1.75rem !important; }
}

/* ── CONTAINER PADDING ───────────────────────────────────────── */
@media (max-width: 639px) {
  .max-w-7xl  { padding-inline: 1.25rem !important; }
  .max-w-4xl  { padding-inline: 1.25rem !important; }
  .max-w-3xl  { padding-inline: 1.25rem !important; }
  .px-8       { padding-inline: 1.25rem !important; }
  .px-6       { padding-inline: 1.25rem !important; }
  .sm\:px-6   { padding-inline: 1.25rem !important; }
  .lg\:px-8   { padding-inline: 1.25rem !important; }
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
@media (max-width: 639px) {
  h2.text-3xl  { font-size: clamp(1.3rem, 6vw, 1.75rem) !important; }
  h2.text-4xl  { font-size: clamp(1.4rem, 6.5vw, 1.9rem) !important; }
  h3           { font-size: clamp(1rem, 4vw, 1.25rem) !important; }
  /* Very large headings (prototype sections) */
  .text-7xl  { font-size: clamp(2rem, 9vw, 3rem) !important; }
  .text-6xl  { font-size: clamp(1.8rem, 8vw, 2.5rem) !important; }
  .text-5xl  { font-size: clamp(1.6rem, 7.5vw, 2.2rem) !important; }
  .sm\:text-5xl { font-size: clamp(1.6rem, 7.5vw, 2.2rem) !important; }
  .sm\:text-6xl { font-size: clamp(1.8rem, 8vw, 2.5rem) !important; }
  .lg\:text-7xl { font-size: clamp(2rem, 9vw, 3rem) !important; }
}

/* ── GRIDS ───────────────────────────────────────────────────── */
@media (max-width: 639px) {
  .grid.md\:grid-cols-2 { grid-template-columns: 1fr !important; }
  .grid.md\:grid-cols-3 { grid-template-columns: 1fr !important; }
  .grid.lg\:grid-cols-2 { grid-template-columns: 1fr !important; }
  .grid.lg\:grid-cols-3 { grid-template-columns: 1fr !important; }
  .grid.sm\:grid-cols-2 { grid-template-columns: 1fr 1fr !important; }
  .grid.sm\:grid-cols-3 { grid-template-columns: 1fr !important; }
  /* Section grid that needs 2-col */
  .grid.grid-cols-2.gap-4 { grid-template-columns: 1fr 1fr !important; }
  /* Gap reduction */
  .gap-16 { gap: 2rem !important; }
  .gap-12 { gap: 1.75rem !important; }
}

/* ── CARDS & BOXES ───────────────────────────────────────────── */
@media (max-width: 639px) {
  .p-8        { padding: 1.25rem !important; }
  .p-10       { padding: 1.5rem !important; }
  .sm\:p-10   { padding: 1.5rem !important; }
  .lg\:p-10   { padding: 1.25rem !important; }
}

/* ── SLIM CTA BANNER ─────────────────────────────────────────── */
@media (max-width: 639px) {
  section.py-12 .flex.flex-col.sm\:flex-row,
  section.py-12 > div > div.flex {
    flex-direction: column !important;
    gap: 1.25rem !important;
  }
  section.py-12 a.flex-shrink-0 {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ── PROTOTYPE SECTIONS (from front-page.php) ───────────────── */
/* Stats bars in various sections */
@media (max-width: 767px) {
  .flex.items-center.justify-center.gap-16,
  .flex.items-center.gap-16 {
    gap: 1.25rem !important;
  }
  /* Tech-box grid */
  .grid.md\:grid-cols-3.gap-8 { grid-template-columns: 1fr !important; gap: 1rem !important; }
}

/* ── FOOTER ──────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .site-footer__top-inner { grid-template-columns: 1fr 1fr !important; gap: 2rem; }
}
@media (max-width: 639px) {
  .site-footer__top-inner { grid-template-columns: 1fr !important; }
  .site-footer__top { padding-block: 2.5rem !important; }
  .site-footer__bottom-inner { flex-direction: column !important; text-align: center; }
  .site-footer__legal { justify-content: center; }
  /* Prototype footer grids */
  footer .grid.md\:grid-cols-2,
  footer .grid.md\:grid-cols-4,
  footer .grid.lg\:grid-cols-4 { grid-template-columns: 1fr 1fr !important; gap: 1.5rem !important; }
}

/* ── COOKIE BAR: handled by Real Cookie Banner plugin ─────── */

/* ── TABLE ───────────────────────────────────────────────────── */
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { min-width: 480px; }

/* ── PT-16 SM:PT-20 (body offset) ───────────────────────────── */
main.pt-16 { padding-top: 4rem; }
@media (min-width: 640px) {
  main.pt-16.sm\:pt-20 { padding-top: 5rem; }
}


/* Marken-Platzhalter, wenn ein Bild nicht geladen werden konnte */
.or-img-placeholder {
  object-fit: cover;
  background: #0D2F66;
}


/* Startseite: Der Hero beginnt direkt am Seitenanfang und läuft unter den
   fixierten Header. Der Inhalt bekommt den Header-Abstand als Innenabstand,
   damit Badge und Überschrift nicht verdeckt werden. */
body.home #hero-section { margin-top: 0; }
body.home #hero-section > .relative,
body.home #hero-section > div:not(.absolute) { padding-top: 4rem; }
@media (min-width: 640px) {
  body.home #hero-section > .relative,
  body.home #hero-section > div:not(.absolute) { padding-top: 5rem; }
}

/* ── Rückmeldung der Formulare ───────────────────────────────────
   Das Skript setzt .success oder .error auf das Statusfeld. Ohne
   diese Regeln stand die Meldung als schmuckloser Fließtext da und
   war von der Beschriftung darüber kaum zu unterscheiden. */
.or-form__status,
.or-application-status {
  font-size: .9375rem;
  line-height: 1.5;
}
.or-form__status:empty,
.or-application-status:empty { display: none; }

.or-form__status.success,
.or-application-status.success,
.or-form__status.error,
.or-application-status.error {
  display: block;
  margin-top: 1rem;
  padding: .85rem 1.1rem;
  border-radius: .5rem;
  border-left: 4px solid;
}
.or-form__status.success,
.or-application-status.success {
  background: #ECFDF5;
  border-color: #047857;
  color: #065F46;
}
.or-form__status.error,
.or-application-status.error {
  background: #FEF2F2;
  border-color: #D3111E;
  color: #991B1B;
}


/* ── BEWEGUNG AUF WUNSCH ABSCHALTEN ──────────────
   Wer im Betriebssystem „Bewegung reduzieren" eingestellt hat, bekommt den
   Endzustand sofort: nichts blendet ein, nichts zoomt, nichts dreht sich.
   Das hilft Menschen, denen Bewegung Beschwerden macht, und zugleich jedem
   Werkzeug, das ein Bildschirmfoto der Seite aufnimmt. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal-up,
  .js .scroll-reveal,
  .reveal-up,
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .hero-bg,
  .hero-pulse,
  .scroll-breathe,
  .seal-rotate {
    animation: none !important;
  }
  .hero-pulse { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* Fehlermeldung direkt am Eingabefeld (statt nur einer Sammelmeldung unten). */
.or-field-error {
  margin-top: .4rem;
  font-size: .875rem;
  color: #991B1B;
}
[aria-invalid="true"] {
  border-color: #D3111E !important;
}
