/*
Theme Name: wp-rat-theme
Theme URI: wp-rat-theme
Author: Ratschlag 2024
Tested up to: 6.6
Requires PHP: 7.3
Version: 1.3.1.2
Text Domain: wp-rat-theme

wp-rat-theme WordPress Theme
*/

/* CSS Reset
---------------------------------------------------------------------------- */

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

html {
	box-sizing: border-box;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	scroll-behavior: smooth;
}

b,
strong {
	font-weight: var(--wp--custom--font-weight--semi-bold);
}

ol,
ul {
	padding: 0;
}

ol:where(:not([class*="wp-block"])),
ol:where(.wp-block-list),
ul:where(:not([class*="wp-block"])),
ul:where(.wp-block-list) {
	padding-inline-start: var(--wp--preset--spacing--medium);
}

div[class*="wp-block-"] figcaption {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--x-small);
	margin-bottom: 0;
	margin-top: 20px;
	text-align: center;
}

img,
figure {
	max-width: 100%;
	height: auto;
}

/* Standardize form styling
--------------------------------------------- */

input,
button,
textarea,
select {
	font: inherit;
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
	-webkit-appearance: none;
}

input:not([type="submit"]),
select,
textarea,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
	color: var(--wp--preset--color--main);
	border-radius: 5px;
	border: solid 1px var(--wp--preset--color--main-accent);
	padding: 0.5em 1em;
	font-size: var(--wp--preset--font-size--small);
	width: 100%;
}

input:focus-visible,
textarea:focus-visible {
	outline-color: var(--wp--preset--color--primary);
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
	width: auto;
}

label {
	width: 100%;
	display: block;
}

::placeholder {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.75;
}

/* Helper styles that can't be done via theme.json
---------------------------------------------------------------------------- */

a.more-link {
	display: block;
}

/* Inline code */
*:not(.wp-block-code) > code {
	background-color: var(--wp--preset--color--tertiary);
	font-weight: var(--wp--custom--font-weight--medium);
	padding: 3px 5px;
	position: relative;
	border-radius: 3px;
}

/* Adjust terms at bottom of posts */
.single .wp-block-group .wp-block-post-terms,
.blog .wp-block-group .wp-block-post-terms {
	margin-bottom: -8px !important;
}

/* Remove margin on term description on archive pages */
.wp-block-term-description p:last-child {
	margin-bottom: 0;
}

/* Remove last separator on post list */
.remove-border-and-padding .wp-block-post-template li:last-child .wp-block-separator {
	display: none;
}

/* Hide post meta div if no tags assigned */
.single .wp-block-group:has(> .post-meta:empty) {
	display: none;
}

.wp-block-group:empty:has(+ .comment-respond) {
	display: none;
}

.row-logos > figure {
	flex-shrink: 1 !important;
}

@media (max-width: 781px) {
	.wp-rat-theme-hide-on-mobile {
		display: none;
	}
}

/* -------------------------------------------------------------------------- */
/*                                 HERO HEADER                                */
/* -------------------------------------------------------------------------- */
.hero {
	& .hero__hand img {
		transform: translateX(-3rem) scale(1.15);
		position: relative;
		z-index: 5;
	}
	& .hero__title img {
		transform: translateX(-12%) translateY(-0.5rem);
		background: var(--wp--preset--color--beige);
		outline: 1rem solid var(--wp--preset--color--beige);
	}

	& .hero__date,
	& .hero__location {
		margin: 0;
		line-height: 1.1;
	}
}

@media only screen and (max-width: 782px) {
	.hero {
		.wp-block-columns.is-layout-flex {
			/* flex-direction: row !important; */
		}
		& .hero__hand img {
			transform: translateX(-1rem) scale(1.15);
		}
		& .hero__title img {
			transform: translateX(-12%) translateY(-0.5rem);
			background: transparent;
			outline: none;
		}

		.hero__right-column {
			padding: 0rem 0 2rem 12vw;
		}
	}

	nav.main-nav {
		li:nth-child(2) {
			content: "";
		}
	}
}

nav.main-nav {
	ul {
		gap: 0;
	}
	li:not(:last-of-type):after {
		content: "•";
		margin-inline: 1.5rem;
	}

	.current-menu-item a {
		text-decoration: none;
	}

	a:hover {
		text-decoration: underline;
		text-decoration-thickness: 3px;
		text-underline-offset: 0.2rem;
	}
}

@media only screen and (max-width: 782px) {
	nav.main-nav {
		li:not(:last-of-type):after {
			content: "";
			margin-inline: 2vw;
		}
	}
}

nav.lang-nav {
	margin-top: 1.5rem;
	line-height: 0;
	.current-menu-item a:not(:hover) {
		text-decoration: none;
	}
}

/* -------------------------------------------------------------------------- */
/*                                    MAIN                                    */
/* -------------------------------------------------------------------------- */

.has-tanker-font-family,
.has-secondary-font-family {
	font-weight: normal !important;
}

/* -------------------------------------------------------------------------- */
/*                                  DATE LIST                                 */
/* -------------------------------------------------------------------------- */
@media only screen and (max-width: 782px) {
	.schedule-entry {
		display: block !important;
		border-top: 3px solid var(--wp--preset--color--primary);
		padding: 1rem 0;
	}
	.schedule-entry .has-text-align-right {
		text-align: left;
	}
	.schedule-entry .wp-block-column:first-child p {
		display: flex;
		gap: 1rem;
		margin-bottom: 5px;
	}
}

/* -------------------------------------------------------------------------- */
/*                                   BLOG                                     */
/* -------------------------------------------------------------------------- */
.listed-post {
	h2.wp-block-post-title,
	a {
		text-align: left;
	}
}

/* -------------------------------------------------------------------------- */
/*                                   FOOTER                                   */
/* -------------------------------------------------------------------------- */

footer {
	.footer-logo img {
		transform: translateX(-12%);
	}

	.wp-block-navigation__container .current-menu-item a:not(:hover) {
		text-decoration: none;
	}
}
