/* ==========================================================================
   theme.css — Global site styles
   Exact PHP equivalent of the React SPA styled-components and GlobalStyle.ts.

   Breakpoints (from ScreenSize.ts):
     sm  ≤ 1180px
     md  ≤ 1600px
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS variables / resets
   -------------------------------------------------------------------------- */

:root {
	--primary-color: #000;
	--hover-color: #ef4136;
	--active-color: #B03228;
	--bg-color-default: #E5E5E5;
	--bg-color: #E5E5E5;
	--page-primary-color-light: #000;
	--page-primary-color-dark: #fff;
	--page-bg-color-light: #f2f2f2;
	--page-bg-color-dark: #000;
	--page-primary-color: var(--page-primary-color-light);
	--page-bg-color: var(--page-bg-color-light);
	--page-image-filter: none;
	--theme-secondary-color: #ef4136;
	--placeholder-color-light: #ffffff;
	--placeholder-color-dark: #101010;
	--grid-column-width: calc(100% / 6);
	--header-color: #fff;
	--logo-red: #ef4136;
}

@media screen and (max-width: 1180px) {
	:root {
		/* Grid column width collapses to 0 on mobile — matches GlobalStyle.ts */
		--grid-column-width: 0;
	}
}

*:focus {
	outline-color: #ef4136;
}

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

body {
	margin: 0;
	padding: 0;
	font-size: 24px;
	font-family: Lausanne, sans-serif;
	font-weight: 300;
	line-height: 1.4;
	background-color: var(--page-bg-color);
	color: var(--page-primary-color);
	-moz-osx-font-smoothing: grayscale;
}

@media screen and (max-width: 1600px) {
	body {
		font-size: 16px;
	}
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--hover-color);
}

a:active {
	color: var(--hover-color);
}

p {
	margin-top: 0;
}

p:last-child {
	margin-bottom: 0;
}

button,
input[type="submit"],
input[type="reset"] {
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

ul {
	list-style: none;
	margin: 0;
	padding-left: 2em;
	text-indent: -2em;
}

b,
strong {
	font-weight: 800;
}

blockquote {
	margin-left: 5em;
}

@keyframes fadein {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Global typography — matches GlobalStyle.ts h1/h2 exactly
   -------------------------------------------------------------------------- */

h1 {
	font-family: anisette-std, sans-serif;
	font-style: normal;
	font-weight: 600;
	font-size: 96px;
	line-height: 1em;
	padding: 16px 0 8px;
	border-bottom: 6px solid var(--page-primary-color);
	margin: 0 0 48px 0;
}

@media screen and (max-width: 1600px) {
	h1 {
		font-size: 72px;
		padding: 16px 0;
	}
}

@media screen and (max-width: 1180px) {
	h1 {
		font-size: 42px;
		padding: 4px 0;
		margin: 24px 0;
	}
}

/* h2 — global; individual components override below */
h2 {
	font-size: inherit;
	font-weight: 800;
	border-bottom: 2px solid var(--page-primary-color);
	margin-top: 56px;
	margin-bottom: 32px;
	margin-left: 0;
}

@media screen and (max-width: 1180px) {
	h2 {
		margin: 32px 0 16px 0;
		font-size: 1rem;
	}
}

/* --------------------------------------------------------------------------
   Post heading (PostHeading styled.h1 in Post.tsx)
   Used on single.php — Lausanne, no border, 3rem/800
   -------------------------------------------------------------------------- */

.post-heading {
	font-family: Lausanne, sans-serif;
	font-style: normal;
	font-weight: 800;
	font-size: 3rem;
	line-height: 1.3em;
	border-bottom: none;
	padding: 0;
	margin-bottom: 32px;
}

@media screen and (max-width: 1180px) {
	.post-heading {
		font-size: 24px;
		margin-bottom: 16px;
	}
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */

.topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: 24px 5vw 16px;
	background: #fff;
	color: #000;
	z-index: 100;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	overflow-y: auto;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.topbar::-webkit-scrollbar {
	display: none;
}

@media screen and (max-width: 1600px) {
	.topbar {
		padding: 24px 3vw 16px;
	}
}

@media screen and (max-width: 1180px) {
	.topbar {
		padding: 16px 0;
		align-items: center;
	}

	.topbar--open {
		bottom: 0;
		overflow-y: auto;
		align-items: flex-start;
	}
}

/* --------------------------------------------------------------------------
   Topbar nav
   -------------------------------------------------------------------------- */

.topbar__nav {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	width: 100%;
	min-width: max-content;
	color: #000;
	position: relative;
}

@media screen and (max-width: 1180px) {
	.topbar__nav {
		min-width: 100%;
		align-items: center;
	}

	.topbar--open .topbar__nav {
		align-items: flex-start;
	}
}

.topbar__menu-shell {
	display: flex;
	color: inherit;
	position: relative;
	flex-direction: row;
	flex: 1 1 auto;
	align-items: flex-start;
	width: 100%;
}

@media screen and (max-width: 1180px) {
	.topbar__menu-shell {
		display: none;
		box-sizing: border-box;
		position: relative;
		width: 100%;
		flex-direction: column;
		padding: 160px 0 16px calc(100% / 6);
	}

	.topbar--open .topbar__menu-shell {
		display: flex;
	}
}

.topbar__menu {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	text-indent: 0;
}

.topbar__menu li {
	position: relative;
	margin-right: 64px;
	cursor: pointer;
	white-space: nowrap;
}

.topbar__menu li a {
	color: #000;
	text-decoration: none;
}

.topbar__menu li a:hover {
	color: inherit;
}

@media screen and (max-width: 1600px) {
	.topbar__menu li {
		margin-right: 44px;
	}
}

@media screen and (max-width: 1180px) {
	.topbar__menu {
		flex-direction: column;
	}

	.topbar__menu li {
		margin-right: 0;
		margin-bottom: 24px;
	}
}


.topbar__right-side {
	display: flex;
	margin-left: auto;
	align-items: flex-start;
	flex-shrink: 0;
	white-space: nowrap;
}

@media screen and (max-width: 1180px) {
	.topbar__right-side {
		display: flex;
		margin-left: 0;
	}
}

/* Logo */

.topbar__logo {
	font-family: Lausanne, sans-serif;
	font-size: inherit;
	font-weight: normal;
	color: #000;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	margin-left: 0;
	line-height: inherit;
	position: relative;
	display: flex;
	align-items: flex-start;
}

.topbar__logo::before {
	content: none;
}

.topbar__logo-icon {
	display: none;
	width: 130px;
}

.topbar__logo-icon img {
	display: block;
	width: 100%;
	max-width: 136px;
}

.topbar__logo:hover {
	color: #000;
}

.topbar__logo-text {
	display: block;
}

.topbar__mobile-logo {
	display: none;
	font-family: Lausanne, sans-serif;
	font-size: inherit;
	font-weight: normal;
	color: #000;
	text-decoration: none;
	white-space: nowrap;
	line-height: inherit;
	align-items: center;
}

.topbar__mobile-logo:hover {
	color: #000;
}

.topbar__mobile-logo-text {
	display: block;
}

@media screen and (max-width: 1180px) {
	.topbar__logo {
		display: none;
		position: absolute;
		top: 0;
		left: 24px;
		right: 70%;
		margin-top: 0;
	}

	.topbar--open .topbar__logo {
		display: block;
	}

	.topbar--open .topbar__logo-icon {
		display: block;
		width: 100px;
	}

	.topbar--open .topbar__logo-text {
		display: none;
	}

	.topbar__mobile-logo {
		display: flex;
		padding-left: 16px;
	}

	.topbar--open .topbar__mobile-logo {
		display: none;
	}
}

/* Language switcher */

.topbar__locale {
	color: #000;
	text-transform: uppercase;
	position: relative;
	display: flex;
	align-items: flex-start;
	flex-shrink: 0;
	white-space: nowrap;
}

.topbar__locale::after {
	content: '|';
	display: block;
	flex: 0 0 auto;
	margin-left: 44px;
	margin-right: 44px;
}

.topbar__locale::before {
	content: none;
}

.topbar__locale a {
	color: #000;
}

.topbar__locale a:hover {
	color: var(--hover-color);
}

@media screen and (max-width: 1180px) {
	.topbar__locale {
		margin: 16px 0 0;
	}

	.topbar__locale::after {
		content: '';
		margin: 0;
	}

	.topbar__logo::before {
		display: none;
	}
}

/* Burger — mobile only */

.topbar__burger {
	display: none;
	width: 40px;
	color: #000;
	margin-left: 16px;
	padding: 0;
	line-height: 0;
	flex-shrink: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.topbar__burger-icon {
	display: block;
	width: 100%;
}

.topbar__burger-icon svg {
	display: block;
	width: 100%;
	height: auto;
}

.topbar__burger-icon--close {
	display: none;
}

.topbar--open .topbar__burger-icon--burger {
	display: none;
}

.topbar--open .topbar__burger-icon--close {
	display: block;
}

@media screen and (max-width: 1180px) {
	.topbar__burger {
		display: flex;
		align-items: center;
		justify-content: center;
		margin-left: 0;
		margin-right: 16px;
		position: relative;
		z-index: 1;
	}
}

/* --------------------------------------------------------------------------
   Dropdown submenus
   -------------------------------------------------------------------------- */

.topbar__menu li.menu-item-has-children {
	margin-left: 1em;
}

.topbar__menu > li::before {
	position: absolute;
	left: -1em;
	padding-right: 1em;
	content: '';
}

.topbar__menu > li.menu-item-has-children::before {
	content: '↓';
}

.topbar__menu > li.menu-item-has-children.is-open::before {
	content: '↑';
}

.topbar__menu > li:hover::before,
.topbar__menu > li:focus-within::before {
	content: '→';
}

.topbar__menu li.current-menu-item::before,
.topbar__menu li.current-menu-parent::before,
.topbar__menu li.current-menu-ancestor::before,
.topbar__menu li.current_page_item::before,
.topbar__menu li.current_page_parent::before,
.topbar__menu li.current_page_ancestor::before {
	content: '→';
}

.topbar__menu .sub-menu li::before {
	position: absolute;
	left: -1em;
	padding-right: 1em;
	content: '';
}

.topbar__menu .sub-menu li:hover::before,
.topbar__menu .sub-menu li:focus-within::before {
	content: '→';
}

.topbar__menu .sub-menu li.current-menu-item::before,
.topbar__menu .sub-menu li.current-menu-parent::before,
.topbar__menu .sub-menu li.current-menu-ancestor::before,
.topbar__menu .sub-menu li.current_page_item::before,
.topbar__menu .sub-menu li.current_page_parent::before,
.topbar__menu .sub-menu li.current_page_ancestor::before {
	content: '→';
}

.topbar__menu .sub-menu {
	display: none;
	list-style: none;
	margin: 16px 0 0 0;
	padding: 0;
	min-height: 130px;
	margin-right: -10vw;
	text-indent: 0;
}

.topbar__menu li.is-open > .sub-menu {
	display: block;
}

.topbar__menu .sub-menu li {
	position: relative;
	margin-right: 0;
	margin-bottom: 8px;
	white-space: nowrap;
}

@media screen and (max-width: 1180px) {
	.topbar--open {
		overflow-y: auto;
	}

	.topbar__menu li.menu-item-has-children {
		margin-left: 1em;
	}

	.topbar__menu .sub-menu {
		margin-top: 0;
		margin-right: 0;
		margin-bottom: 24px;
		min-height: auto;
	}
}

/* --------------------------------------------------------------------------
   Hero section (front page)
   -------------------------------------------------------------------------- */

.hero {
	min-height: 100vh;
}

.hero__swiper,
.hero__swiper .swiper-wrapper,
.hero__swiper .swiper-slide {
	height: 100vh;
}

.slide-container {
	display: block;
	height: 100vh;
	overflow: hidden;
	position: relative;
	text-decoration: none;
	user-select: none;
	-webkit-user-drag: none;
}

.slide-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-color: black;
	display: block;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

.slide-title {
	position: absolute;
	top: 10vh;
	left: 5vw;
	display: inline-block;
	margin: 0;
	width: min-content;
	max-width: 90vw;
	padding-bottom: 0.3em;
	font-family: anisette-std, sans-serif;
	font-style: normal;
	font-weight: 600;
	font-size: 10vw;
	text-align: left;
	line-height: 1.1;
	pointer-events: none;
	user-select: none;
}

@media screen and (max-width: 1180px) {
	.slide-title {
		font-size: 15.5vw;
		top: unset;
		bottom: 128px;
		padding-bottom: 0.1em;
		line-height: 1.1em;
	}
}

.hero__swiper .swiper-pagination {
	bottom: 24px;
}

.hero__swiper .swiper-pagination-bullet {
	background: #fff;
	opacity: 0.6;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.hero__swiper .swiper-pagination-bullet-active {
	opacity: 1;
}

/* --------------------------------------------------------------------------
   Content wrapper — ContentWrapper in ContentGroup.tsx
   -------------------------------------------------------------------------- */

.content-wrapper {
	box-sizing: content-box;
	padding: 0 5vw;
	max-width: 1256px;
	margin-top: 136px;
	min-height: 256px;
}

@media screen and (max-width: 1600px) {
	.content-wrapper {
		padding: 0 3vw;
	}
}

@media screen and (max-width: 1180px) {
	.content-wrapper {
		padding: 0 16px;
		margin-top: 72px;
	}
}

/* --------------------------------------------------------------------------
   Entry content — Content in Post.tsx
   Mirrors: > *:not(h2) { margin-left }  /  > *:not(figure):not(h2) { margin-right }
   -------------------------------------------------------------------------- */

.entry-content > *:not(h2) {
	margin-left: var(--grid-column-width);
}

.entry-content > *:not(figure):not(h2) {
	margin-right: var(--grid-column-width);
}

/* --------------------------------------------------------------------------
	WordPress block overrides — ported from WordpressOverride.ts
	-------------------------------------------------------------------------- */

.wp-block-image figcaption,
.wp-block-video figcaption {
	margin-bottom: inherit;
	text-align: inherit;
}

.wp-block-media-text img,
.wp-block-image img {
	width: 100%;
	height: auto;
}

.wp-block-gallery .blocks-gallery-item figure {
	flex-direction: column;
}

.wp-block-gallery .blocks-gallery-item figcaption {
	position: static;
	background: none;
	text-align: left;
	padding: 8px 0 0;
	color: #333;
	text-indent: 0;
}

.wp-block-embed {
	margin-bottom: 24px;
}

.wp-block-button {
	color: var(--page-primary-color);
}

.wp-block-button__link {
	position: relative;
	border-radius: 0;
	display: inline-block;
	padding: 0;
	text-decoration: none;
	font-size: inherit;
	font-weight: 300;
	white-space: nowrap;
	background-color: transparent;
	color: inherit;
	cursor: pointer;
}

.wp-block-button__link:hover {
	color: var(--hover-color);
}

.wp-block-button__link::after {
	content: '→';
	width: 100%;
	padding-left: 3px;
	transition: padding-left 0.2s;
}

.wp-block-button__link:active {
	color: var(--active-color);
}

figure {
	margin: 0 0 24px 0;
}

figure figcaption {
	margin: 0;
	font-size: 0.9rem;
	color: #333;
}

.wp-block-latest-posts__list li {
	margin-bottom: 8px;
}

.wp-block-latest-posts__list li a {
	text-decoration: none;
}

.wp-block-latest-posts__list li a::after {
	content: '→';
	width: 100%;
	padding-left: 3px;
	transition: padding-left 0.2s;
}

.wp-block-embed__wrapper {
	overflow: hidden;
	padding-bottom: 56.25%;
	position: relative;
	height: 0;
}

.wp-block-embed-youtube iframe {
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	position: absolute;
}

.ek-linked-block {
	position: relative;
}

.ek-linked-block .editorskit-block-link {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

@media screen and (max-width: 600px) {
	.sponsor img {
		max-width: 200px;
	}
}

@media screen and (max-width: 1180px) {
	.wp-block-embed {
		margin-right: 0;
	}

	.wp-block-embed__wrapper {
		width: 100%;
		padding-top: 56.25%;
		position: relative;
	}

	.wp-block-embed__wrapper iframe {
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
	}
}

@media only screen and (min-width: 1600px) {
	.has-2-columns .wp-block-column,
	.has-3-columns .wp-block-column,
	.has-4-columns .wp-block-column,
	.has-5-columns .wp-block-column,
	.has-6-columns .wp-block-column {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   Page subpage tabs — matches Page.tsx tab layout/active arrow treatment
   -------------------------------------------------------------------------- */

.page-tabs {
	display: flex;
	flex-flow: row wrap;
	margin-bottom: 56px;
}

.page-tabs__tab {
	position: relative;
	text-decoration: none;
}

.page-tabs__tab:not(:last-child) {
	margin-right: 50px;
}

.page-tabs__tab--active::before {
	position: absolute;
	content: '→';
	left: -1em;
}

.page-tabs__content {
	margin-top: 0;
}

@media screen and (max-width: 1180px) {
	.page-tabs {
		flex-flow: column;
		align-items: flex-start;
		margin-bottom: 32px;
	}

	.page-tabs__tab:not(:last-child) {
		margin-right: 0;
		margin-bottom: 8px;
	}

	.page-tabs__content {
		margin-top: 0;
	}
}
.lavastus-title-area {
	display: flex;
	position: relative;
	align-items: flex-end;
}

.lavastus-title {
	margin-right: var(--grid-column-width);
	margin-bottom: 8px;
	flex: 1 auto;
}

.lavastus-buy-ticket {
	position: absolute;
	right: 0;
}

.lavastus-buy-ticket a {
	text-decoration: none;
}

.lavastus-buy-ticket a::after {
	content: ' →';
}

.lavastus-gallery,
.lavastus-hero {
	position: relative;
	margin: 48px 0;
	overflow: hidden;
}

.swiper-gallery__swiper {
	width: 100%;
}

.swiper-gallery__slide {
	display: flex;
	justify-content: center;
}

.swiper-gallery__media {
	display: flex;
	justify-content: center;
	width: 100%;
}

.swiper-gallery__media img,
.swiper-gallery__media video {
	display: block;
	max-width: 100%;
	max-height: 640px;
	height: auto;
}

.lavastus-hero img {
	display: block;
	width: 100%;
	height: auto;
}

.swiper-gallery__navigation {
	display: grid;
	grid-template-columns: 1em auto 1em;
	align-items: center;
	justify-content: center;
	column-gap: 28px;
	font-size: 16px;
	padding-top: 12px;
}

.swiper-gallery__nav-button {
	z-index: 1;
	display: inline-flex;
	flex: 0 0 1em;
	width: 1em;
	align-items: flex-end;
	justify-content: center;
	align-self: flex-end;
	cursor: pointer;
	user-select: none;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	line-height: 1;
	appearance: none;
	-webkit-appearance: none;
	color: inherit;
	text-align: center;
}

.swiper-gallery__nav-button:hover {
	color: var(--hover-color);
}

.swiper-gallery__nav-button:active {
	color: var(--active-color);
}

.swiper-gallery__nav-button:focus {
	outline: none;
}

.swiper-gallery__fraction {
	display: block;
	min-width: 36px;
	text-align: center;
	user-select: none;
	line-height: 1;
	white-space: nowrap;
}

.lavastus-content-block {
	margin-left: var(--grid-column-width);
	margin-right: var(--grid-column-width);
}

.lavastus-content-block li {
	margin-bottom: 8px;
}

.lavastus-extra-text > *:not(h2) {
	margin-left: var(--grid-column-width);
	margin-right: var(--grid-column-width);
}

@media screen and (max-width: 1180px) {
	.lavastus-title-area {
		display: inline-block;
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   News section (front page) — matches hardcoded .news h2 in React
   -------------------------------------------------------------------------- */

.news h2 {
	font-family: anisette-std, sans-serif;
	font-style: normal;
	font-weight: 600;
	font-size: 96px;
	line-height: 1em;
	padding-bottom: 8px;
	border-bottom: 6px solid #000;
	margin: 16px 0 48px 0;
}

@media screen and (max-width: 1600px) {
	.news h2 {
		font-size: 72px;
	}
}

@media screen and (max-width: 1180px) {
	.news h2 {
		font-size: 40px;
	}
}

/* --------------------------------------------------------------------------
   Post items — PostWrapper / PostTitle / Content / ReadMore in PostList.tsx
   -------------------------------------------------------------------------- */

.post-item {
	min-height: 200px;
}

.post-item:not(:last-child) {
	border-bottom: 2px solid black;
	padding-bottom: 48px;
	margin-bottom: 48px;
}

@media screen and (max-width: 1180px) {
	.post-item:not(:last-child) {
		padding-bottom: 24px;
		margin-bottom: 24px;
	}
}

.post-date {
	margin: 0 0 4px;
}

@media screen and (max-width: 1180px) {
	.post-date {
		margin-bottom: 4px;
	}
}

.post-title {
	display: block;
	margin-bottom: 34px;
	font-size: 40px;
	font-weight: 800;
	line-height: 1.3em;
	text-decoration: none;
	color: inherit;
}

.post-title:hover {
	color: var(--hover-color);
}

@media screen and (max-width: 1600px) {
	.post-title {
		font-size: 1.5rem;
	}
}

@media screen and (max-width: 1180px) {
	.post-title {
		font-size: 1.5rem;
		margin-bottom: 16px;
	}
}

/* Content row (ReadMore + excerpt) — matches Content styled.div in PostList.tsx */
.post-content-row {
	display: flex;
	align-items: flex-end;
	margin-right: var(--grid-column-width);
}

@media screen and (max-width: 1180px) {
	.post-content-row {
		flex-direction: column-reverse;
		align-items: flex-start;
		margin: 0;
	}
}

/* ReadMore — arrow via CSS ::after, text content only "Loe edasi" */
.post-read-more {
	text-decoration: none;
	min-width: calc(100% / 5);
	color: inherit;
	flex-shrink: 0;
}

.post-read-more::after {
	content: ' →';
}

.post-read-more:hover {
	color: var(--hover-color);
}

@media screen and (max-width: 1180px) {
	.post-read-more {
		margin-top: 16px;
	}
}

.post-excerpt {
	flex: 1;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
	display: flex;
	justify-content: center;
	margin-right: var(--grid-column-width);
	margin-top: 48px;
}

.pagination__list {
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	list-style: none;
	text-indent: 0;
}

.pagination__item {
	display: inline-flex;
	padding: 4px;
}

.pagination__item a,
.pagination__item span {
	color: inherit;
	text-decoration: none;
}

.pagination__item .current {
	font-weight: 800;
}

.pagination__control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	padding: 16px;
}

.pagination__control--prev::before {
	content: '←';
}

.pagination__control--next::after {
	content: '→';
}

.pagination__control.is-disabled {
	opacity: 0.5;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Footer — SubTitle (divider) + site-footer
   SubTitle in ContentGroup.tsx: border-bottom 6px, padding 16px 0, margin 32px 0
   -------------------------------------------------------------------------- */

.footer-divider {
	display: block;
	font-size: 24px;
	font-weight: 300;
	line-height: 1.25em;
	padding: 16px 0;
	margin: 32px 0;
	border-bottom: 6px solid #000;
}

.site-footer {
	margin-bottom: 64px;
}

.site-footer a {
	text-decoration: underline;
}

.site-footer__wrapper {
	box-sizing: content-box;
	padding: 0 5vw;
	max-width: 1256px;
	margin-top: 0;
	min-height: 0;
}

.site-footer__content {
	padding: 0;
	margin: 0;
}

.site-footer__content > *:not(h2) {
	margin-left: var(--grid-column-width);
	margin-right: var(--grid-column-width);
}

@media screen and (max-width: 1600px) {
	.site-footer__wrapper {
		padding: 0 3vw;
	}
}

@media screen and (max-width: 1180px) {
	.site-footer__wrapper {
		padding: 0 16px;
	}
}

.site-footer .wp-block-columns {
	gap: 40px;
	margin-left: var(--grid-column-width);
	margin-right: 0;
}

.site-footer .wp-block-column {
	display: flex;
	justify-content: space-between;
	flex-direction: column;
}

.footer-logos {
	display: flex;
}

.footer-logo {
	flex-basis: auto;
	filter: var(--page-image-filter);
}

.footer-logo img {
	width: 100%;
	height: 100%;
}

.footer-logo img:hover {
	filter: brightness(2);
}

.site-footer figure {
	margin-bottom: 0;
}

@media screen and (max-width: 1180px) {
	.footer-logos {
		flex-direction: column;
		justify-content: center;
		width: 100%;
	}

	.footer-logo img {
		width: 200px;
	}

	.footer-logo:nth-child(2n) {
		margin-left: 0;
	}
}

/* --------------------------------------------------------------------------
   Dark page (Repertoire) — fgTheme: themes.dark
   -------------------------------------------------------------------------- */

.dark-page {
	--page-primary-color: var(--page-primary-color-dark);
	--page-bg-color: var(--page-bg-color-dark);
	--page-image-filter: invert();
	background: var(--page-bg-color);
	color: var(--page-primary-color);
}

/* Global background image (repertoire hover effect) */
.global-background {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	object-fit: cover;
	z-index: 0;
	pointer-events: none;
	animation: fadein 500ms ease-in-out;
}

/* Content layers sit above the background image */
.dark-page main,
.dark-page .site-footer {
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------------------------
   Repertoire filter panel — FilterPanel.tsx + StagingFilterPanel styles
   -------------------------------------------------------------------------- */

.staging-filter-panel {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-start;
	/* StagingFilterPanel: width 5 grid columns, sits just below h1 */
	width: calc(5 * var(--grid-column-width));
	margin-top: -32px;
	margin-bottom: 32px;
}

@media screen and (max-width: 1180px) {
	.staging-filter-panel {
		width: 100%;
		flex-flow: column;
		margin-top: -8px;
	}
}

/* FilterElement — each clickable tag item */
.filter-element {
	box-sizing: border-box;
	cursor: pointer;
	user-select: none;
	position: relative;
	color: inherit;
}

.filter-element:not(:last-child) {
	margin-right: 40px;
}

/* Arrow appears on hover or when selected */
.filter-element:hover::before,
.filter-element.is-selected::before {
	position: absolute;
	content: '→';
	left: -1em;
}

/* --------------------------------------------------------------------------
   Repertoire staging list — StyledLink + VenueTitle in RepertoireContent.tsx
   -------------------------------------------------------------------------- */

/* VenueTitle = styled.h2`` — uses global h2 styles, no override needed */

/* Staging link — StyledLink in RepertoireContent.tsx */
.staging-link {
	display: table;
	font-size: 48px;
	font-weight: 800;
	line-height: 1.33;
	text-decoration: none;
	margin-left: var(--grid-column-width);
	color: inherit;
}

.staging-link:hover {
	text-decoration: underline;
	color: inherit;
}

@media screen and (max-width: 1180px) {
	.staging-link {
		font-size: 32px;
		line-height: 1.5;
	}
}

/* --------------------------------------------------------------------------
   People (Inimesed) accordion — Accordion.tsx + InimesedContent.tsx
   -------------------------------------------------------------------------- */

/* AccordionSection */
.accordion-section {
	/* no extra styles on the wrapper */
}

/* AccordionButton */
.accordion-button {
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
	width: 100%;
	text-align: left;
}

/* AccordionTitle = styled.h2 with margin-top: 24px */
.accordion-title {
	margin-top: 24px;
	/* h2 global styles apply (font-weight 800, border-bottom) */
}

/* AccordionArrow — span showing ↑ or ↓ */
.accordion-arrow {
	font-weight: normal;
	padding-left: 8px;
}

/* AccordionContent — hidden when collapsed */
.accordion-content {
	display: none;
	margin-bottom: 16px;
}

.accordion-content.is-open {
	display: block;
}

/* GroupContent — margin-left: var(--grid-column-width) */
.group-content {
	margin-left: var(--grid-column-width);
}

/* Person — each person block */
.person-item {
	/* no extra wrapper styles */
}

/* StyledLink in InimesedContent.tsx — 56px/800, display: table */
.person-link {
	display: table;
	font-size: 56px;
	font-weight: 800;
	line-height: 1em;
	text-decoration: none;
	margin-top: 0.5em;
	color: inherit;
}

.person-link:hover {
	color: var(--hover-color);
}

@media screen and (max-width: 1180px) {
	.person-link {
		font-size: 24px;
		margin: 0;
		margin-top: 0.5em;
	}
}

/* Profession — below the name */
.person-profession {
	line-height: 1em;
}

@media screen and (max-width: 1180px) {
	.person-profession {
		margin-top: 4px;
	}
}

/* --------------------------------------------------------------------------
   Timetable (mangukava)
   -------------------------------------------------------------------------- */

.performances-table {
	border-collapse: collapse;
	box-sizing: border-box;
	width: 100%;
}

.performances-table__cell {
	box-sizing: border-box;
	border-bottom: 2px solid #000;
	padding: 12px 16px 8px 0;
}

.performances-table tbody tr:last-child .performances-table__cell,
.performances-table__cell--last-day-date {
	border-bottom: none;
}

.performances-table__cell--title {
	line-height: 1.2;
	max-width: 400px;
}

.performances-table__cell--title a {
	font-weight: 800;
}

.performances-table__cell--location {
	white-space: nowrap;
}

.performances-table__cell--actions {
	padding-right: 0;
	text-align: right;
}

.performances-table__date--short {
	display: none;
	white-space: nowrap;
}

.performances-table__date--long {
	white-space: nowrap;
}

.performances-table__date--long span {
	display: inline-block;
	vertical-align: inherit;
}

.performances-table__date--long span:first-child {
	text-align: left;
}

.performances-table__day-number {
	font-size: 56px;
	font-weight: 800;
	text-align: center;
	margin: 0 16px;
	width: 72px;
}

.performances-table__description,
.performances-table__meta,
.performances-table__venue-mobile {
	margin-bottom: 0;
}

.performances-table__description {
	color: var(--theme-secondary-color);
}

.performances-table__meta,
.performances-table__venue-mobile {
	display: none;
	margin-top: 0;
}

.performances-table__meta {
	margin-top: 8px;
}

.timetable-button {
	position: relative;
	display: inline-block;
	font-weight: 300;
	white-space: nowrap;
}

.timetable-button::after {
	content: '→';
	padding-left: 3px;
}

.timetable-ticket-marker {
	background-color: var(--theme-secondary-color);
	width: 32px;
	height: 32px;
	border-radius: 50%;
	margin-left: auto;
	margin-top: -4px;
	display: block;
}

@media screen and (max-width: 1600px) and (max-resolution: 4dppx), screen and (max-width: 1600px) and (-webkit-max-device-pixel-ratio: 4) {
	.performances-table__cell--title {
		max-width: 250px;
	}

	.performances-table__day-number {
		margin: 0 8px;
	}

	.performances-table__cell--location {
		max-width: 100px;
	}

	.timetable-ticket-marker {
		width: 24px;
		height: 24px;
	}
}

@media screen and (max-width: 1180px) and (max-resolution: 4dppx), screen and (max-width: 1180px) and (-webkit-max-device-pixel-ratio: 4) {
	.performances-table {
		font-size: 14px;
	}

	.performances-table__date--short {
		display: table-cell;
	}

	.performances-table__date--long,
	.performances-table__cell--time,
	.performances-table__cell--location {
		display: none;
	}

	.performances-table__meta,
	.performances-table__venue-mobile {
		display: block;
	}
}

.timetable-month-heading {
	font-family: anisette-std, sans-serif;
	font-size: 48px;
	font-weight: 600;
	border-bottom: 2px solid #000;
	margin: 48px 0 16px;
}

.lavastus-sessions__table {
	margin-left: var(--grid-column-width);
}

@media screen and (max-width: 1180px) {
	.lavastus-sessions__table {
		margin-left: 0;
	}
}

.timetable-row {
	display: flex;
	gap: 32px;
	padding: 16px 0;
	border-bottom: 1px solid #ccc;
	align-items: baseline;
	flex-wrap: wrap;
}

.timetable-row__date {
	min-width: 140px;
}

.timetable-row__title {
	flex: 1;
}

.timetable-row__location {
	color: #555;
}

.timetable-row__actions {
	margin-left: auto;
}

.timetable-row__actions a::after {
	content: ' →';
}

.timetable-row__sold-out {
	opacity: 0.5;
	font-size: 0.85em;
}

/* --------------------------------------------------------------------------
   Publications (valjaanded)
   -------------------------------------------------------------------------- */

.publications-group-heading {
	font-weight: 800;
	border-bottom: 2px solid #000;
	margin: 48px 0 16px;
}

.publications-group-content {
	margin-left: var(--grid-column-width);
	display: flex;
	flex-direction: column;
}


.publications-thumbnail-group {
	display: flex;
	flex-flow: row wrap;
	gap: 24px;
	margin-bottom: 64px;
}

.publications-thumbnail-link {
	display: inline-block;
	text-decoration: none;
}

.publications-thumbnail-link:hover {
	filter: brightness(1.1);
}

.publications-thumbnail-image {
	display: block;
	height: 256px;
	width: auto;
	max-width: 100%;
}

.publications-item-with-info {
	display: flex;
	align-items: flex-start;
	margin-bottom: 32px;
}

.publications-item-with-info:last-child {
	margin-bottom: 0;
}

.publications-item-info {
	margin-left: 32px;
}

.publications-item-title,
.publications-item-meta {
	margin-bottom: 4px;
}

.publications-item-excerpt {
	margin-top: 24px;
}

.publications-item-button {
	margin-top: 24px;
}

.publications-text-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.publications-text-link {
	position: relative;
	display: inline-block;
	text-decoration: none;
	font-size: inherit;
	font-weight: 300;
	white-space: normal;
	color: inherit;
	background-color: transparent;
}

.publications-text-link:hover {
	color: var(--hover-color);
}

.publications-text-link:active {
	color: var(--active-color);
}

.publications-text-link::after {
	content: '→';
	padding-left: 3px;
	transition: padding-left 0.2s;
}

.publications-text-link:hover::after {
	padding-left: 6px;
}

@media screen and (max-width: 1180px) {
	.publications-group-content {
		margin-left: 0;
	}

	.publications-thumbnail-group {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		margin-bottom: 40px;
	}

	.publications-item-with-info {
		flex-direction: column;
	}

	.publications-item-info {
		margin: 16px 0 40px;
	}
}

/* --------------------------------------------------------------------------
   Archive (arhiiv)
   -------------------------------------------------------------------------- */

.archive-year-filter {
	padding-bottom: 64px;
}

.archive-year-filter__label {
	display: inline-flex;
	align-items: center;
}

.archive-year-filter__label::after {
	content: '↓';
	display: inline-block;
	color: #000;
	margin-left: -1em;
	line-height: 1;
	pointer-events: none;
}

.archive-year-filter__select {
	line-height: 1;
	padding: 0.4em 3em 0.4em 0;
	margin: 0;
	border: none;
	border-radius: 0;
	border-bottom: 1px solid #000;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: transparent;
	font: inherit;
	color: inherit;
}

.archive-year-filter__select:focus {
	outline: none;
	box-shadow: none;
}

.archive-year-group {
	margin-bottom: 40px;
}

.archive-year-group:last-child {
	margin-bottom: 0;
}

.archive-year-group__items > .archive-staging-link:not(:last-child) {
	margin-bottom: 8px;
}

@media screen and (max-width: 1180px) {
	.archive-year-filter {
		padding-bottom: 40px;
	}
}
