/*
Theme Name: Gains
Theme URI: 
Author: Gains
Author URI: 
Description: A theme for Gains Research
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 5.7
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Gains
Tags:
*/

/* Box sizing rules */

*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  box-sizing: border-box;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

/* Balance text wrapping on headings */
:is(h1, h2, h3, h4, .h1, .h2, .h3, .h4) {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* :is(h1, h2, .h1, .h2, ) {
  max-width: 35ch;
}

:is(h3, h4, h5, h6, .h3, .h4, .h5, .h6):not(.wp-block-accordion-heading) {
  max-width: 40ch;
} */

.p {
  font-size: var(--wp--preset--font-size--300);
  font-family: var(--wp--preset--font-family--primary);
}

.h1 {
  font-size: var(--wp--preset--font-size--600);
  font-family: var(--wp--preset--font-family--secondary);
  line-height: 1.4;
}

.h2 {
  font-size: var(--wp--preset--font-size--500);
  font-family: var(--wp--preset--font-family--secondary);
  line-height: 1.4;
}

/* header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 999;
} */

@media (min-width: 768px) {
  .sticky:not(.is-not-stacked-on-mobile) {
    position: sticky;
    top: 0;
    z-index: 999;
  }
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--wp--preset--spacing--20);
  row-gap: var(--wp--preset--spacing--30);
}

.cluster:is(ul, ol) {
  list-style: none;
  padding-inline-start: 0;
}

.cluster li,
.cluster li p {
  margin: 0;
}

.cluster li a {
  display: block;
  font-size: var(--wp--preset--font-size--300);
  border: 2px solid var(--wp--preset--color--contrast-muted);
  padding-block: var(--wp--preset--spacing--10);
  padding-inline: var(--wp--preset--spacing--50);
  border-radius: 9999px;
  text-decoration: none;
}

.button--separator {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.button--separator::before,
.button--separator::after {
  content: "";
  flex: 1;
  border-top: 2px solid var(--wp--preset--color--contrast-muted);
}

.ratio-5-4 {
  aspect-ratio: 5 / 4 !important;
}

.ratio-1-1 {
  aspect-ratio: 1 / 1 !important;
}

.overflow-hidden {
  overflow: hidden;
}

.ruled-vertical > * + * {
  border-top: 3px solid var(--wp--preset--color--background);
}

.wp-block-post .taxonomy-category {
  display: flex;
  gap: 1.25ch;
  align-items: center;
}

.wp-block-post .taxonomy-field_science a {
  text-decoration: underline;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--wp--preset--color--emerald-500);
}
/* .field_science-laaketiede .taxonomy-field_science a {
  text-decoration-color: #ffc61f;
}

.field_science-sosiologia .taxonomy-field_science a {
  text-decoration-color: #ff7bb0;
}

.field_science-taloustiede .taxonomy-field_science a {
  text-decoration-color: var(--wp--preset--color--emerald-500);
} */

/* .box {
  box-shadow:
    inset 0 1px 0 0 black,
    inset 1px 0 0 black,
    0 1px 0 0 black,
    inset -1px 0 0 black;
} */

.box {
  overflow: hidden;
  border-radius: 8px;
}

/* .member-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--wp--preset--color--surface);
}

.member-avatar__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar__fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: var(--wp--preset--spacing--40);
  color: var(--wp--preset--color--contrast-high);
  background: var(--wp--preset--color--background);
  font-family: var(--wp--preset--font-family--secondary);
  font-size: var(--wp--preset--font-size--600);
  line-height: 1;
} */

/* .wp-block-button.is-style-outline a {
  border-color: var(--wp--preset--color--contrast-medium);
  background-color: transparent;
  color: curre;
}

.wp-block-button a,
.wp-block-button .is-style-fill a {
  background-color: var(--wp--preset--color--contrast-high);
  color: var(--wp--preset--color--background);
} */

.wp-block-polylang-language-switcher {
  list-style: none;
  padding: 0;
  & a {
    text-decoration: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.centered {
  display: grid;
  place-content: center;
}

/* Auto grid utility */

.flex-grid {
  --min: 35ch;
  display: flex;
  flex-wrap: wrap;
}

.flex-grid > * {
  flex: 1 1 var(--min);
}

.numbered-list {
  counter-reset: item;
}

.numbered-list > * {
  counter-increment: item;
}

.numbered-list > * > h3::before {
  content: counter(item) "";
  font-weight: bold;
  display: block;
  font-size: var(--wp--preset--font-size--800);
  /* font-style: italic; */
  font-weight: normal;
  color: var(--wp--preset--color--emerald-500);
}

/* Custom language switcher styles
--------------------------------------------- */

/* .sdl-lang-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 8px;
  overflow: hidden;
}

.sdl-lang-switcher a {
  text-align: center;
  padding-inline: 1.2rem;
  padding-block: 0.4rem;
  text-decoration: none;
  background-color: var(--wp--preset--color--surface);
  transition: background-color var(--wp--custom--transition--duration, 0.2s)
    ease-out;
}

.sdl-lang-switcher a:hover {
  background-color: hsla(0, 0%, 76%, 0.4);
}

.sdl-lang-switcher a.active {
  background-color: var(--wp--preset--color--contrast-high);
  color: white;
} */

.sdl-lang-switcher {
  display: flex;
  gap: 1ch;
}

.sdl-lang-switcher a {
  text-decoration: none;
  font-weight: 500;
}

.sdl-lang-switcher a.active {
  text-decoration: underline;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--wp--preset--color--emerald-500);
}

/* Main menu current page link styles
--------------------------------------------- */

[aria-label="Menu 2"] [aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--wp--preset--color--emerald-500);
}
