/*
Theme Name: Rymy Eetu Theme Enhanced
Version: 2.0
*/
/* ======================
   FONTS1
====================== */
@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&display=swap');

/* ======================
   ROOT & RESET
====================== */
:root {
	--wp--preset--font-size--small: 15px;
	--nav-height: 70px;
}

@media (max-width: 768px) {
	:root {
		--nav-height: 60px;
	}
}

.menu {
    display: none;
}
/* ======================
   BASE
====================== */
body {
	font-family: sans-serif, Arial;
	line-height: 1.6;
	margin: 0;
	padding-bottom: 40px;
	padding-top: var(--nav-height);
}

/** This is set for mobile nav */
body.menu-active .navbar,
body.menu-active .footer-social-mobile {
	background-color: #000;
}

.navbar {
	height: var(--nav-height);
}
.container {
	width: 90%;
	margin: auto;
	max-width: 1080px;
}
h1, h2 ,h3, h4 {
	font-family: "Alfa Slab One", serif;
	color: #F3CF7F;
	letter-spacing: 1px;
	font-weight: 400;
}
a {
	color: #f3cf7f;
	text-decoration: none;
}
p a::after {
	content: " ›";
	margin-left: 3px;
	display: inline-block;
	text-decoration: none;
	font-size: 1.05em;
}
.font-color-white p {
	color: #FFF;
}
.yellow-button {
	border: 0;
	padding: 14px 18px;
	max-width: 200px;
	font-size: 12px;
	font-family: "Alfa Slab One", serif;
	background: #f3cf7f;
	border-radius: 10px;
}
/* ======================
   NAVBAR
====================== */
.navbar {
	background: #0c3b2e;
	color: white;
	padding: 10px 0;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1000;
	transition: all 0.3s ease;
	transform: translateY(-100%);
	animation: slideDown 0.6s ease forwards;
}
/* navbar when scrolling */
.navbar.scrolled {
	padding: 10px 0;
	background: rgba(12, 59, 46, 0.95);
	backdrop-filter: blur(8px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.nav-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.navbar ul {
	display: flex;
	list-style: none;
}

.navbar li {
	margin-left: 18px;
	padding-left: 18px;
	position: relative;
}
.navbar a {
	color: white;
	text-decoration: none;
	transition: 0.3s;
	font-family: "Alfa Slab One", serif;
}
.navbar a:hover {
	color: #f3cf7f;
}
@media screen and (min-width: 782px) {
	.navbar li:not(:first-child)::before {
		content: "";
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		height: 16px;
		width: 2px;
		background: rgba(255, 255, 255, 1);
	}
}

/* slide-down animation */
@keyframes slideDown {
	to {
		transform: translateY(0);
	}
}

/* when user is logged into WordPress */
.admin-bar .navbar {
	top: 32px;
	/* WP admin bar height (desktop) */
}

/* mobile admin bar height */
@media screen and (max-width: 782px) {
	.admin-bar .navbar {
		top: 46px;
	}
}

/* layout left side */
.nav-left {
	display: flex;
	align-items: center;
	gap: 15px;
}

/* hamburger */
.hamburger {
	font-size: 32px;
	cursor: pointer;
	display: none;
}

/** Menu footer **/
#menu-alaosan-valikko-1 {
	margin: 10px 0px;
	padding: 0;
}

#menu-alaosan-valikko-2,
#menu-alaosan-valikko-3 {
	margin: 0;
	padding: 0;
}

[id^="menu-alaosan-valikko-"] li {
	list-style: none;
}

[id^="menu-alaosan-valikko-"] li a {
	color: #FFF;
	font-size: 15px;
	text-decoration: none;
}

@media (min-width: 1138px) {
	.menu-mobiili2-container {
		display: none;
	}
}

@media (max-width: 1138px) {
	.nav-container {
		flex-direction: row;
		justify-content: space-between;
	}

	.hamburger {
		display: block;
		color: white;
	}

	#nav-menu {
		position: absolute;
		top: 70px;
		left: 0;
		width: 100%;
		height: calc(100dvh - var(--nav-height));
		background: #0c3b2e;
		display: none;
		flex-direction: column;
	}

	#nav-menu ul {
		flex-direction: column;
		padding: 10px 0px 0px 20px;
	}

	#nav-menu .menu-valikko-1-container li {
		margin: 5px 0;
	}

	#nav-menu.active {
		display: flex;
	}

	.menu-mobiili2-container li {
		margin: 0px;
	}

	.menu-mobiili2-container li a {
		letter-spacing: 1px;
		font-size: 0.85em;
		font-weight: 400;
		font-family: sans-serif, Arial;
	}
}

/* ======================
   LOGO
====================== */
.header-logo img {
	max-width: 110px;
	height: auto;
	display: block;
}

.footer-logo img {
	max-width: 100px;
	height: auto;
	display: block;
}

/* ======================
   HERO
====================== */
.hero {
	height: 550px;
	position: relative;
	overflow: visible;
}

.hero-overlay {
	height: 100%;
	padding: 60px 0px;
	color: white;
	position: relative;
	bottom: -180px;
	height: 100%;
	box-sizing: border-box;
	z-index: 100;
}

.hero-overlay .custom-logo {
	max-width: 300px;
	height: auto;
}

.hero-overlay-color {
	background: rgba(0, 0, 0, 0.5);
}

.hero-content {
	max-width: 1080px;
	margin: auto;
	height: 100%;
}

.hero h1 {
	font-size: 64px;
}

.hero-slides {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
}

.slide {
	position: absolute;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	opacity: 0;
	animation: fadeSlide 28s infinite;
}

/* 7 slides → 28s total (7 × 4s) */
.slide:nth-child(1) {
	animation-delay: 0s;
}

.slide:nth-child(2) {
	animation-delay: 4s;
}

.slide:nth-child(3) {
	animation-delay: 8s;
}

.slide:nth-child(4) {
	animation-delay: 12s;
}

.slide:nth-child(5) {
	animation-delay: 16s;
}

.slide:nth-child(6) {
	animation-delay: 20s;
}

.slide:nth-child(7) {
	animation-delay: 24s;
}

@keyframes fadeSlide {
	0% {
		opacity: 0;
	}

	5% {
		opacity: 1;
	}

	20% {
		opacity: 1;
	}

	25% {
		opacity: 0;
	}

	100% {
		opacity: 0;
	}
}

/* BUTTONS HERO */
.hero-buttons {
	display: flex;
	gap: 20px;
	margin-top: 110px;
}

.hero-buttons a {
	text-decoration: none;
}

.btn-card {
	background: rgb(32, 29, 29);
	padding: 10px;
	cursor: pointer;
	transition: 0.3s;
	width: 400px;
}

.btn-card h4 {
	color: #FFF;
	margin: 0px 0px 5px 0px;
	font-size: 15px;
}

.btn-card:hover {
	background: rgba(243, 207, 127, 0.9);
	color: black;
}

/** VIDEO THUMBNAILS HERO **/
.video-thumb {
	position: relative;
	max-height: 200px;
}

.video-thumb img:not(.play-btn) {
	width: 100%;
	display: block;
	height: 200px;
	object-fit: cover;
}

.play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100px;
	opacity: 0.9;
	filter: brightness(1.2) contrast(1.1);
}

/* ======================
   VIDEO MODAL WINDOW
====================== */
.video-modal {
	display: none;
	position: fixed;
	z-index: 999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
}

.video-content {
	position: relative;
	width: 80%;
	max-width: 700px;
	margin: 170px auto;
	z-index: 3000;
}

.video-content iframe {
	width: 100%;
	height: 450px;
}

.close {
	position: absolute;
	top: -30px;
	right: 0;
	font-size: 30px;
	color: white;
	cursor: pointer;
}

/* ======================
   CONTENT
====================== */
.main {
	margin-bottom: 100px;
}

.post {
	margin-bottom: 20px;
}

.content-green {
	background: #0c3b2e;
	color: #FFF;
}

.content {
	max-width: 940px;
}

.content p,
.content li {
	font-size: 1.2em;
}

.content-black-background .wp-block-column {
	border: none;
}

/** MARGIN & PADDING RULES **/
.main.mt40 {
	margin-top: 40px;
}

.main.mt70 {
	margin-top: 70px;
}

.footer-bottom-divider {
	height: 100px;
}

/* ======================
   WP BLOCK COLUMNS
====================== */

.wp-block-column {
	border: 1px solid #F3CF7F;
}

.wp-block-column :is(h1, h2, h3) {
	font-size: 20px;
	font-weight: 200;
	margin: 0;
}

.wp-block-column p {
	font-size: 12px;
}

.wp-block-image img {
	width: 100%;
}

.yellow-box h2 {
	color: #111;
}

.wp-container-core-columns-is-layout-9d6595d7 .size-large {
	margin: 0;
}

.wp-container-core-columns-is-layout-9d6595d7 .wp-block-column {
	height: 100%;
}

.wp-block-column:empty {
	border: none;
	padding: 0 !important;
}

.wp-block-column br {
	line-height: 0;
}

.padding10-14 .wp-block-column :is(h1, h2, h3, p),
.padding10-14 :is(h1, h2, h3, p) {
	padding: 0px 14px;
}

.wp-block-column p {
	font-size: 1em;
	line-height: 1.4;
}

.content-black-background .wp-block-column p {
	font-size: inherit;
	padding: 0;
	margin: 0;
}

/* ======================
   FOOTER
====================== */
.footer {
	background: #111;
	color: white;
	padding: 30px 0px 14px 0px;
	margin-top: 50px;
	position: fixed;
	bottom: 0;
	width: 100%;
	z-index: 100;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

.footer-social img {
	max-width: 45px;
	height: auto;
	margin-right: 10px;
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 768px) {
	.nav-container {
		flex-direction: inherit;
	}

	.hero {
		height: auto;
	}

	.hero h1 {
		font-size: 40px;
	}

	.hero-buttons {
		flex-direction: column;
	}

	.hero-character {
		display: none;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* ======================
   HERO SIMPLE IMAGE
====================== */
.hero-simple-bg {
	background-size: cover;
	background-position: center;
	width: 100%;
	height: 40vh;
}

/* ======================
   HERO BADGE IMAGES
====================== */
.hero-badge {
	position: absolute;
	top: 50%;
	left: 20px;
	transform: translateY(-50%);
	z-index: 2;
}

.hero-badge img {
	max-width: 320px;
	height: auto;
}

/* ======================
   OTHER
====================== */
.current_page_item a {
	color: #f3cf7f;
}

.map-container {
	width: 100%;
	height: 100%;
	min-height: 245px;
	line-height: 0;
}

.map-container iframe {
	width: 100%;
	height: 100%;
	min-height: 250px;
	border: 0;
}

.rymy-eetu-story {
	padding: 20px;
	color: #fff;
	display: flex;
	gap: 20px;
}

.yellow-background-container {
	background: #f3cf7f;
}

.yellow-background-content {
	color: #000;
	max-width: 1080px;
	margin: 0 auto;
	padding: 40px 0px;
}

.no-border {
	border: 0px;
}

.no-padding {
	padding: 0px !important;
}

@media (max-width: 1138px) {
	.rymy-eetu-story {
		flex-direction: column;
	}

	.hero-buttons {
		margin-top: 208px;
	}

	.btn-card {
		margin: 0 auto;
	}

	.header-logo img {
		max-width: 140px;
		padding-top: 8px;
	}
}

/* ======================
   SECOND FOOTER 
====================== */
.site-footer {
	background: #111;
	color: #fff;
	width: 100%;
	padding-top: 10px;
	padding-bottom: 10px;
	display: none;
	/* hidden by default, controlled by WP checkbox */
	margin-bottom: 146px;
	font-size: 0.85em;
}

.site-footer.is-visible {
	display: block;
}

.footer-inner {
	max-width: 1080px;
	margin: 0 auto;
	display: flex;
	gap: 40px;
	justify-content: space-between;
}

.footer-col {
	flex: 1;
	min-width: 200px;
}

.footer-col h4 {
	margin-bottom: 15px;
	font-size: 1.1em;
}

.footer-col a {
	color: #fff;
	text-decoration: none;
	display: block;
	margin-bottom: 8px;
	line-height: 1em;
}

.footer-col ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-col ul li {
	margin-bottom: 8px;
}

.footer-col input[type="email"],
.footer-col input[type="text"] {
	width: 100%;
	padding: 10px;
	margin-bottom: 10px;
}

.footer-col input[type="submit"] {
	padding: 10px 15px;
	cursor: pointer;
}

.mobile-footer-bar {
	display: none;
}

@media (max-width: 1138px) {
	.mobile-footer-bar {
		display: flex;
		position: fixed;
		flex-wrap: wrap;
		bottom: 0;
		left: 0;
		width: 100%;
		z-index: 9999;
		align-items: center;
		justify-content: center;
	}

	.mobile-footer-bar div {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.mobile-footer-bar .footer-social-mobile {
		background: #0c3b2e;
	}

	.mobile-footer-bar .mobile-footer-links {
		background: #000;
	}

	.footer-social-mobile-content,
	.mobile-footer-links-content {
		width: 90%;
		margin: 0 auto;
	}

	.footer-social-mobile-content {
		padding: 18px 0px 5px 0px;
	}

	.mobile-footer-links-content {
		padding: 10px;
	}

	.mobile-footer-bar .footer-social-mobile img {
		width: 40px;
		height: auto;
		margin-right: 8px;
	}

	.mobile-footer-bar a {
		color: #fff;
		font-family: "Alfa Slab One", serif;
		text-decoration: none;
		font-size: 1em;
		text-align: left;
	}

	.desktop-footer {
		display: none;
	}

	#nav-menu ul {
		max-width: 50%;
	}

	.navbar a {
		font-size: 1.2em;
		letter-spacing: 1px;
	}
}

:where(.wp-block-columns.is-layout-flex) {
	gap: 1.4em;
}

@media (max-width: 768px) {
	.footer-inner {
		flex-direction: column;
		max-width: 90%;
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.footer-col input[type="email"],
	.footer-col input[type="text"] {
		max-width: 300px;
		width: 90%;
	}

	.content p,
	.content li {
		font-size: 1em;
	}

	.main.mt70 {
		margin-top: 140px;
	}
}

@media (min-width: 1153px) and (max-width: 1220px) {
	.nav-container {
		gap: 0;
	}

	.navbar ul {
		list-style: none;
		justify-content: flex-start;
		padding: 0;
	}

	.navbar ul li a {
		font-size: 0.95em;
	}
}

@media (min-width: 1138px) and (max-width: 1152px) {
	.nav-container {
		gap: 0;
	}

	.navbar ul {
		list-style: none;
		justify-content: flex-start;
		padding: 0;
	}

	.navbar ul li {
		padding-left: 15px;
	}

	.navbar ul li a {
		font-size: 0.90em;
	}
}

/* ======================
    NEWSLETTER, NEWSLETTER POPUP
====================== */
.popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 99999;
}

.popup-box {
	width: 500px;
	height: auto;
	background: transparent;
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: fadeIn 0.3s ease-in-out;
}

.popup-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

img.popup-close {
	position: absolute;
	top: 2px;
	right: 5px;
	width: 50px;
	height: 50px;
	border: 0px;
	cursor: pointer;
}

/* Mobile scaling */
@media (max-width: 768px) {
	.popup-box {
		width: 90vw;
		height: auto;
	}

	.popup-box img {
		height: auto;
	}

	.yellow-background-content {
		width: 90%;
	}
}

@keyframes fadeIn {
	from {
		transform: scale(0.9);
		opacity: 0;
	}

	to {
		transform: scale(1);
		opacity: 1;
	}
}

.navbar,
.footer-social-mobile {
	transition: background-color 0.3s ease;
}

/* ======================
   HEIDI
====================== */
.heidi img {
	position: absolute;
	right: 20px;
	bottom: 0px;
	width: 250px;
}

@media (max-width: 1138px) {
	.heidi img {
		position: absolute;
		right: -72px;
		width: 217px;
	}
}

.ohjelma-sivu-video {
	width: 90%;
	margin: 0 auto;
	max-width: 1080px;
	position: relative;
}

.ohjelma-sivu-video .ohjelma-video {
	position: absolute;
	left: 0px;
	top: 100px;
}