/*
Theme Name: SILBERWEISS 2026
Theme URI: 
Author: SILBERWEISS
Author URI: 
Description: SILBERWEISS Block Theme 2026
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: silberweiss-2026
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news


/* basic stylings */
:root {
  interpolate-size: allow-keywords;
}

  /* 3. animations */
  @media (prefers-reduced-motion: no-preference) {
    html {
      interpolate-size: allow-keywords;
    }
    @view-transition {
      navigation: auto;
    }
  }

  @media (prefers-reduced-motion: reduce) {   
    * {
      animation: none !important;
      transition: none !important;
    }
  }

/* Styles intended only for the frontend.*/
html {
  scroll-behavior: smooth;
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  overflow-x: clip;

  scrollbar-gutter: stable;
  scrollbar-color: var(--wp--preset--color--contrast) var(--wp--preset--color--base);
  scrollbar-width: .5rem;
}

/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
  }
  
  /* 3. Enable keyword animations */
  @media (prefers-reduced-motion: no-preference) {
    html {
      interpolate-size: allow-keywords;
    }
  }
  body {
    /* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
  }
  /* 6. Improve media defaults */
  img, picture, video, canvas, svg {
    max-width: 100%;
  }
  /* 7. Inherit fonts for form controls */
  input, button, textarea, select {
    font: inherit;
  }
  /* 8. Avoid text overflows */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  /* 9. Improve line wrapping */
  p {
    text-wrap: pretty;
  }
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
  }
  /*
    10. Create a root stacking context
  */
  #root, #__next {
    isolation: isolate;
  }

@media screen and (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: clip;
    max-width: 100%;
}


* {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

a {
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}


/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}


/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/* Navigation: Unterstreichung beim Hover/Fokus (Bewegung, nicht über theme.json abbildbar) */
header nav a,
footer nav a {
	position: relative;
}

/* Menüpunkte nicht innerhalb eines Begriffs umbrechen */
header .wp-block-navigation-item__content {
	white-space: nowrap;
}

header nav a::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: currentColor;
	transition: width 0.3s ease;
}

header nav a:hover::after,
header nav a:focus-visible::after {
	width: 100%;
}

.ff_btn_style:hover,
.ff_btn_style:focus{
    background-color: var(--wp--preset--color--accent-2) !important;
    opacity: 1 !important;
    border-color: var(--wp--preset--color--accent-2) !important;
    color: var(--wp--preset--color--base) !important;
}


/* Barrierefreiheit: gut sichtbarer Fokusrahmen auf hellen und dunklen Flächen
   (dunkler Rahmen + heller Innenring, Kontrast auf Weiß und Grün ≥ 3:1) */
a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

/* Sprungziele: etwas Luft über Abschnitten mit Anker */
[id] {
	scroll-margin-top: 1rem;
}

/* Nur für Screenreader sichtbar (z. B. Statusmeldung „IBAN kopiert“) */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Mobiles Menü (Overlay): linksbündig, größere Einträge – Core bietet dafür keine Einstellung */
.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	align-items: flex-start;
}

.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	gap: 1.25rem;
}

.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--large);
}

/* Menü öffnen/schließen: Klickfläche 44 × 44 px, Symbol bleibt optisch an seinem Platz */
/* Menü-Button mobil: grüner Button mit drei Streifen und sichtbarer Beschriftung.
   Der zugängliche Name („Menü öffnen“ / „Menü schließen“) kommt von WordPress,
   die sichtbare Beschriftung ist darin enthalten (WCAG 2.5.3). */
.wp-block-navigation .wp-block-navigation__responsive-container-open,
.wp-block-navigation .wp-block-navigation__responsive-container-close {
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	min-width: 44px;
	padding: 0.5rem 0.9rem 0.5rem 0.7rem;
	border-radius: 2px;
	background-color: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--lato);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
}

.wp-block-navigation .wp-block-navigation__responsive-container-close {
	display: flex;
}

.wp-block-navigation .wp-block-navigation__responsive-container-open:hover,
.wp-block-navigation .wp-block-navigation__responsive-container-close:hover {
	background-color: var(--wp--preset--color--accent-1);
}

.wp-block-navigation .wp-block-navigation__responsive-container-open svg,
.wp-block-navigation .wp-block-navigation__responsive-container-close svg {
	fill: currentColor;
	width: 24px;
	height: 24px;
}

.wp-block-navigation .wp-block-navigation__responsive-container-open::after {
	content: "Menü";
}

.wp-block-navigation .wp-block-navigation__responsive-container-close::after {
	content: "Schließen";
}

.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: calc(44px + 2rem);
}
