/*
Theme Name: SleepWell
Description: A deep indigo and soft moon-tone theme for sleep and rest wellness content.
Version: 1.0.0
Author: AdWell
Text Domain: adwell
*/

:root {
	--bg: #13182b;
	--surface: #1e2540;
	--text: #e6e8f0;
	--muted: #9aa3c0;
	--link: #a5b4fc;
	--link-hover: #c7d2fe;
	--accent: #f3e9c8;
	--accent-text: #13182b;
	--border: #313a5c;
	--shadow: rgba(0, 0, 0, 0.25);
	--max-width: 75rem;
	--gutter: 1.25rem;
	--radius: 0.5rem;
}

* {
	box-sizing: border-box;
}

html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	font-size: 1rem;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
}

a {
	color: var(--link);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--link-hover);
	text-decoration: underline;
}

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

.container {
	width: min(100% - var(--gutter) * 2, var(--max-width));
	margin-inline: auto;
}

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	padding-block: 1rem;
	box-shadow: 0 1px 3px var(--shadow);
}

.site-header .container {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.site-branding {
	flex: 1 1 auto;
}

.site-title {
	margin: 0;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
}

.site-title a {
	color: var(--text);
}

.site-description {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: var(--muted);
}

.primary-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.primary-menu li a {
	font-weight: 500;
	font-size: 0.9375rem;
}

.header-ad {
	width: 100%;
	margin-top: 1rem;
}

.lang-switcher ul {
	display: flex;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}

.lang-switcher li::marker {
	content: none;
}

.lang-switcher a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	font-size: 0.85rem;
	text-decoration: none;
	color: var(--text-main);
	padding: 0.25rem 0.5rem;
	min-width: 6.5rem;
	border: 1px solid var(--border);
	border-radius: 0.25rem;
}

.lang-switcher a:hover,
.lang-switcher .current-lang a {
	background: var(--accent);
	color: var(--accent-text);
	border-color: var(--accent);
	font-weight: 600;
}

.lang-switcher a::before {
	content: "";
	display: inline-block;
	width: 1.2em;
	height: 0.85em;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin-right: 0.3em;
	flex-shrink: 0;
}

.lang-item-en a::before {
	background-image: url('flags/us.svg');
}

.lang-item-de a::before {
	background-image: url('flags/de.svg');
}

.lang-item-fr a::before {
	background-image: url('flags/fr.svg');
}

.lang-item-ja a::before {
	background-image: url('flags/jp.svg');
}

.hero-section {
	position: relative;
	padding-block: 5rem 4rem;
	overflow: hidden;
	text-align: center;
}

.hero-bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(19, 24, 43, 0.65) 0%, rgba(19, 24, 43, 0.55) 50%, rgba(19, 24, 43, 0.75) 100%), url('images/hero-bg.jpg') center / cover no-repeat;
	z-index: 0;
}

.hero-bg::before,
.hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.hero-bg::before {
	background: radial-gradient(circle at 20% 20%, rgba(165, 180, 252, 0.12), transparent 40%), radial-gradient(circle at 80% 80%, rgba(243, 233, 200, 0.06), transparent 45%);
}

.hero-bg::after {
	background: radial-gradient(circle at 70% 30%, rgba(165, 180, 252, 0.10), transparent 45%);
}

.hero-content {
	position: relative;
	z-index: 2;
	max-width: 48rem;
	margin-inline: auto;
}

.hero-title {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	color: #ffffff;
	text-wrap: balance;
}

.hero-subtitle {
	margin: 0 0 1.75rem;
	font-size: clamp(1rem, 2vw, 1.25rem);
	color: rgba(230, 232, 240, 0.9);
	line-height: 1.6;
	text-wrap: balance;
}

.hero-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.75rem;
	background: var(--accent);
	color: var(--accent-text);
	font-weight: 700;
	font-size: 1rem;
	border-radius: 9999px;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-cta:hover,
.hero-cta:focus {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(243, 233, 200, 0.25);
	color: var(--accent-text);
}

.page-hero-image {
	margin-bottom: 1.5rem;
	border-radius: var(--radius);
	overflow: hidden;
}

.page-hero-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.site-main {
	padding-block: 2rem;
}

.content-area {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}

@media (min-width: 64rem) {
	.content-area {
		grid-template-columns: 1fr 18rem;
	}
}

.entry-title {
	margin: 0 0 0.5rem;
	font-size: 1.875rem;
	line-height: 1.25;
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--muted);
	margin-bottom: 1rem;
}

.entry-content>* {
	margin-block: 0 1.25rem;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 2rem;
	line-height: 1.3;
}

.page-title {
	margin: 0 0 1.5rem;
	font-size: 2rem;
}

.posts-list .blog-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 2px var(--shadow);
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.entry-thumbnail {
	flex-shrink: 0;
	overflow: hidden;
	border-radius: var(--radius);
	background: #13182b;
}

.entry-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

@media (min-width: 640px) {
	.posts-list .blog-card {
		flex-direction: row;
		align-items: flex-start;
	}

	.entry-thumbnail {
		width: 220px;
	}

	.entry-thumbnail img {
		height: 100%;
	}
}

.posts-list .entry-title {
	font-size: 1.5rem;
}

.posts-list .entry-excerpt {
	color: var(--muted);
}

.read-more {
	display: inline-block;
	margin-top: 0.75rem;
	font-weight: 500;
}

.pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 2rem;
}

.pagination a,
.pagination span {
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.pagination .current {
	background: var(--accent);
	color: var(--accent-text);
	border-color: var(--accent);
}

.widget-area {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.widget {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem;
}

.widget-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}

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

.widget ul li+li {
	margin-top: 0.5rem;
}

.adwell-ad {
	position: relative;
	min-height: 90px;
	background: var(--surface);
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
	margin-block: 1.5rem;
	overflow: hidden;
}

.adwell-ad .ad-label {
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
	margin-bottom: 0.35rem;
}

.adwell-ad .ad-slot {
	display: block;
	width: 100%;
	max-width: 728px;
	height: 90px;
	background: repeating-linear-gradient(45deg, transparent, transparent 12px, var(--border) 12px, var(--border) 13px);
	border-radius: 0.25rem;
}

.widget .adwell-ad {
	min-height: 250px;
}

.widget .adwell-ad .ad-slot {
	max-width: 300px;
	height: 250px;
}

.footer-ad .adwell-ad {
	margin-bottom: 0;
}

.site-footer {
	background: var(--surface);
	border-top: 1px solid var(--border);
	padding-block: 1.5rem;
	text-align: center;
	font-size: 0.875rem;
	color: var(--muted);
}

.footer-ad {
	margin-bottom: 1.25rem;
}

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