/* 
 *
 * CUSTOM
 * Extra CSS that can't be conveniently/nicely added through WordPress itself
 *
 */

:root {
	--gradient-rotation: 135deg;
}
@property --gradient-rotation {
  syntax: '<angle>';
  inherits: false;
  initial-value: 135deg;
}

/* Smooth scrolling (mainly for anchor links) */
html { scroll-behavior: smooth; }

/* Check if user prefers reduced motion, if so, disable smooth scrolling */
@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Header */
.wp-site-blocks > header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
}
.wp-site-blocks > header::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
	z-index: -1;
}
.wp-site-blocks > header.scrolled::before {
    -webkit-backdrop-filter: saturate(180%) blur(6px);
    backdrop-filter: saturate(180%) blur(6px);
}
.wp-site-blocks > header > div.wp-block-group {
	transition: background-color .3s, padding-top .3s, padding-bottom .3s;
}
.wp-site-blocks > header:not(.scrolled) > div.wp-block-group {
    border-bottom-color: transparent !important;
}
.wp-site-blocks > header.scrolled:not(:hover) > div.wp-block-group  {
 	padding-top: clamp(0.5rem, 5vw, 1rem) !important;
    padding-bottom: clamp(0.5rem, 5vw, 1rem) !important;
}
.wp-site-blocks > header.scrolled > div.wp-block-group {
	background-color: rgb(250 250 250 / 75%) !important;
    color: var(--wp--preset--color--contrast) !important;
}
.wp-site-blocks > header.scrolled > div.wp-block-group #logo-svg path:not(.logo-curly-bracket) {
    transition: fill .3s;
    fill: var(--wp--preset--color--contrast) !important;
}

.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
    padding-top: 3em;
}

.wp-site-blocks > header #logo-svg {
    max-width: 200px;
}

.wp-site-blocks > header .wp-block-polylang-language-switcher {
    list-style: none;
}
.wp-site-blocks > header .wp-block-polylang-language-switcher img {
    width: 15px;
    border-radius: 3px;
}
.wp-site-blocks > header .wp-block-polylang-language-switcher a {
    text-decoration: none;
    color: var(--wp--preset--color--base);
}
.wp-site-blocks > header.scrolled .wp-block-polylang-language-switcher a {
    color: var(--wp--preset--color--contrast);
}
.wp-site-blocks > header .menu-language-separator,
.wp-site-blocks > header .wp-block-polylang-language-switcher {
  	display: none;
  	padding-left: 0;
}
.wp-site-blocks > header .wp-block-polylang-language-switcher li {
	font-size: var(--wp--preset--font-size--small);
  	line-height: 26px;
}
@media (min-width: 601px) {
    body.admin-bar .wp-site-blocks > header {
        margin-top: var(--wp-admin--admin-bar--height);
    }
	.wp-site-blocks > header .menu-language-separator,
    .wp-site-blocks > header .wp-block-polylang-language-switcher {
        display: block;
    }
}

/* Footer */
body > .wp-site-blocks {
  min-height: 90vh; 
  margin:0;
  display:flex; 
  flex-direction:column;
}
body > .wp-site-blocks > main {
  flex:1;
}
body > .wp-site-blocks > footer {
  margin-block-start: 0;
}

/* Block spacing */
.wp-site-blocks {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
.wp-site-blocks .wp-block-group {
	margin-top: 0;
}


/* Buttons */
.wp-element-button,
.wp-block-button .wp-block-button__link {
  	--gradient-rotation: 135deg;
  	background: linear-gradient(var(--gradient-rotation), mediumseagreen 0%, lightseagreen 100%) !important;
	transition: --gradient-rotation 1s, box-shadow .3s !important;
}
.wp-element-button:hover,
.wp-block-button .wp-block-button__link:hover,
.wp-element-button:active,
.wp-block-button .wp-block-button__link:active {
  	--gradient-rotation: 260deg;
}
div.wpforms-container-full input[type=submit]:focus:after, 
div.wpforms-container-full button[type=submit]:focus:after, 
div.wpforms-container-full .wpforms-page-button:focus:after {
 	content: none !important;
}
.wpforms-submit.wp-block-button__link::before {
	content: '\f1d8';
  	font: var(--fa-font-solid);
}

/* Break links to prevent page overflow */
.wp-block-post-content a:where(:not(.wp-element-button)) {
	word-break: break-all;
}


/* Comment fields */
.wp-block-post-comments-form p.comment-form-author,
.wp-block-post-comments-form p.comment-form-email,
.wp-block-post-comments-form p.comment-form-url,
.wp-block-post-comments-form p.comment-form-comment,
.wp-block-post-comments-form p.comment-form-cookies-consent,
.wp-block-post-comments-form p.form-submit {
	margin-top: 1em;
	font-weight: bold;
}
.wp-block-post-comments-form p.comment-form-cookies-consent,
.wp-block-post-comments-form p.form-submit {
	font-weight: normal;
}

/* Images */
.mobile-small-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    width: calc(25% - var(--wp--style--unstable-gallery-gap, 16px)/2);
}
@media (min-width: 601px) {
    .mobile-small-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
        width: calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2);
    }
}

/* Other */
/* .grecaptcha-badge { 
    visibility: hidden;
} */
