/*!
Theme Name: varys-theme
Author: timespin GmbH
Version: 4.0.0
Tested up to: 8.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: coretheme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/* ==========================================================================
   # VARIABLEN & FARBEN
   Harmonisierung von Theme-Farben mit den WordPress Gutenberg Presets
   ========================================================================== */

:root {
  --wp--preset--color--corporate-orange: #EF5214;
  --wp--preset--color--corporate-blue: #002A63;
  --wp--preset--color--black: #000000;
  --wp--preset--color--background: #ffffff;
  --wp--preset--color--surface: #f3f4f6;
  --wp--preset--color--muted: #949494;

  --orange: var(--wp--preset--color--corporate-orange);
  --blue: var(--wp--preset--color--corporate-blue);
  --lightgrey: var(--wp--preset--color--surface);
  --black: var(--wp--preset--color--black);
  --muted: var(--wp--preset--color--muted);
  --textlink: var(--wp--preset--color--corporate-orange);
}

/* ==========================================================================
   # TYPOGRAFIE & BASIS-LAYOUT
   ========================================================================== */

:root {
  --pico-font-size: 100%;
  --pico-line-height: 1.6;
  --pico-font-family: var(--wp--preset--font-family--ibm-plex-sans);
  --pico-color: var(--wp--preset--color--black);
  --pico-background-color: var(--wp--preset--color--background);
  --pico-primary: var(--wp--preset--color--corporate-orange);
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
  font-family: var(--pico-font-family);
  font-size: 100%;
}

@media (min-width: 992px) {
  html {
    font-size: 106.25%;
  }
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/*
 * Globale Link-Formatierung
 * Erzwingt die Textfarbe und die Farbe der Unterstreichung im Corporate Orange über alle Browser hinweg.
 */
a {
  color: var(--wp--preset--color--corporate-orange);
  text-decoration-color: var(--wp--preset--color--corporate-orange);
}

/* --- Typografische Skalierung für Überschriften --- */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.entry-content .wp-block-heading {
  font-family: var(--wp--preset--font-family--zilla-slab);
  color: var(--wp--preset--color--corporate-blue);
}

h1,
h2,
h3,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content .wp-block-heading.has-1-font-size,
.entry-content .wp-block-heading.has-2-font-size,
.entry-content .wp-block-heading.has-3-font-size {
  --pico-font-weight: 400;
  font-weight: 400;
}

h1 strong,
h1 b,
h2 strong,
h2 b,
h3 strong,
h3 b,
.entry-content h1 strong,
.entry-content h1 b,
.entry-content h2 strong,
.entry-content h2 b,
.entry-content h3 strong,
.entry-content h3 b,
.entry-content .wp-block-heading.has-1-font-size strong,
.entry-content .wp-block-heading.has-1-font-size b,
.entry-content .wp-block-heading.has-2-font-size strong,
.entry-content .wp-block-heading.has-2-font-size b,
.entry-content .wp-block-heading.has-3-font-size strong,
.entry-content .wp-block-heading.has-3-font-size b {
  font-weight: 700;
}

h4,
h5,
h6,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  --pico-font-weight: 700;
  font-weight: 700;
}

/* --- WordPress Inhaltsbereich & Fließtext --- */
.entry-content,
.post-content,
.page-content {
  font-family: var(--wp--preset--font-family--ibm-plex-sans);
  font-size: var(--wp--preset--font-size--base, 1rem);
  line-height: var(--pico-line-height, 1.6);
  color: var(--wp--preset--color--black);
}

.entry-content strong,
.entry-content b,
.post-content strong,
.post-content b,
.page-content strong,
.page-content b {
  font-weight: 600;
}

/* --- Typografische Skalierung für Gutenberg-Überschriften --- */
.entry-content h1,
.entry-content .wp-block-heading.has-1-font-size,
h1 {
  font-size: var(--wp--preset--font-size--huge, 2.25rem);
  line-height: 1.25;
  color: var(--wp--preset--color--corporate-blue);
  margin-bottom: 0.75rem;
}

.entry-content h2,
.entry-content .wp-block-heading.has-2-font-size,
h2 {
  font-size: var(--wp--preset--font-size--large, 1.75rem);
  line-height: 1.25;
  color: var(--wp--preset--color--corporate-blue);
  margin-bottom: 0.75rem;
}

.entry-content h3,
.entry-content .wp-block-heading.has-3-font-size,
h3 {
  font-size: var(--wp--preset--font-size--medium, 1.25rem);
  line-height: 1.3;
  color: var(--wp--preset--color--corporate-blue);
  margin-bottom: 0.75rem;
}

.entry-content h4,
h4 {
  font-size: var(--wp--preset--font-size--base, 1rem);
  line-height: 1.35;
  color: var(--wp--preset--color--corporate-blue);
  margin-bottom: 0.5rem;
}

.entry-content h5,
h5 {
  font-size: var(--wp--preset--font-size--small, 0.875rem);
  line-height: 1.4;
  color: var(--wp--preset--color--corporate-blue);
  margin-bottom: 0.5rem;
}

.entry-content h6,
h6 {
  font-size: var(--wp--preset--font-size--small, 0.875rem);
  line-height: 1.4;
  color: var(--wp--preset--color--corporate-blue);
  margin-bottom: 0.5rem;
}


/* --- Globaler Reset für das article-Element --- */
article {
    margin-bottom: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* --- Reset für den article > header (Pico Card-Header-Styling entfernen) --- */
article > header {
    margin: 0;
    padding: 0;
    background-color: var(--wp--preset--color--background);
    border-radius: 0;
    border: none;
}

/* ==========================================================================
   # WORDPRESS CORE BLOCKS
   ========================================================================== */

details.wp-block-details {
  display: block;
  margin-bottom: var(--pico-spacing);
  padding-bottom: var(--pico-spacing);
  border-bottom: var(--pico-border-width) solid var(--pico-muted-border-color);
}

details.wp-block-details summary {
  line-height: var(--pico-line-height);
  color: var(--pico-color);
  cursor: pointer;
  transition: color var(--pico-transition);
}

details.wp-block-details summary:focus-visible {
  outline: none;
  color: var(--pico-primary);
}

details.wp-block-details[open] > summary {
  margin-bottom: calc(var(--pico-spacing) * 0.5);
}

details.wp-block-details > *:not(summary) {
  margin-top: 0;
  margin-bottom: calc(var(--pico-spacing) * 0.5);
}

details.wp-block-details > *:last-child {
  margin-bottom: 0;
}

figure.wp-block-gallery {
  margin-top: var(--pico-spacing);
  margin-bottom: var(--pico-spacing);
}

figure.wp-block-gallery.has-nested-images {
  --gallery-columns: 3;
  display: flex;
  flex-wrap: wrap;
  gap: var(--pico-spacing) !important;
  margin-right: 0;
  margin-left: 0;
  padding: 0;
}

figure.wp-block-gallery.has-nested-images.columns-1 {
  --gallery-columns: 1;
}

figure.wp-block-gallery.has-nested-images.columns-2 {
  --gallery-columns: 2;
}

figure.wp-block-gallery.has-nested-images.columns-default,
figure.wp-block-gallery.has-nested-images.columns-3 {
  --gallery-columns: 3;
}

figure.wp-block-gallery.has-nested-images.columns-4 {
  --gallery-columns: 4;
}

figure.wp-block-gallery.has-nested-images.columns-5 {
  --gallery-columns: 5;
}

figure.wp-block-gallery.has-nested-images.columns-6 {
  --gallery-columns: 6;
}

figure.wp-block-gallery.has-nested-images.columns-7 {
  --gallery-columns: 7;
}

figure.wp-block-gallery.has-nested-images.columns-8 {
  --gallery-columns: 8;
}

figure.wp-block-gallery.has-nested-images figure.wp-block-image {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0;
  flex-basis: calc((100% - (var(--pico-spacing) * (var(--gallery-columns) - 1))) / var(--gallery-columns) - 1px) !important;
  width: calc((100% - (var(--pico-spacing) * (var(--gallery-columns) - 1))) / var(--gallery-columns) - 1px) !important;
  max-width: calc((100% - (var(--pico-spacing) * (var(--gallery-columns) - 1))) / var(--gallery-columns) - 1px) !important;
}

figure.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image a,
figure.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 1 0 auto;
}

@media (max-width: 768px) {
  figure.wp-block-gallery.has-nested-images:not(.columns-1) {
    --gallery-columns: 2;
  }
}

@media (max-width: 480px) {
  figure.wp-block-gallery.has-nested-images {
    --gallery-columns: 1;
  }
}

/* ==========================================================================
   # SWIPER RESET
   ========================================================================== */
.my-swiper .swiper-button-next,
.my-swiper .swiper-button-prev {
  background-color: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  min-width: auto;
}

.my-swiper .swiper-button-next:hover,
.my-swiper .swiper-button-prev:hover,
.my-swiper .swiper-button-next:focus,
.my-swiper .swiper-button-prev:focus {
  background-color: transparent;
  border: none;
  box-shadow: none;
  color: var(--swiper-navigation-color, var(--swiper-theme-color));
}

.my-swiper .swiper-wrapper {
  height: max-content;
  align-items: stretch;
}

.my-swiper .swiper-slide {
  height: auto;
  padding: 0 60px;
}