/*
Theme Name: tm3-01 Responsive
Description: Responsive version of tm3-01 — three-column layout on desktop, single column on mobile.
Version: 1.9
*/

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

* {
	margin: 0;
	padding: 0;
	list-style: inside;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	font-family: Arial, Helvetica, sans-serif;
}

body {
	background-color: #F5F7F1;
	background-image: url(/images/fancy1_smaller.png);
	background-position: top left;
	background-repeat: repeat-y;
}

/* ── Hamburger: hidden on desktop ── */

.menu-toggle {
	display: none;
}

.hamburger {
	display: none;
}

/* ── Layout ── */

#wrap {
	max-width: 770px;
	width: 100%;
	margin-right: auto;
	margin-left: auto;
	margin-top: 20px;
	background-color: #F5F7F1;
	display: flex;
	flex-wrap: wrap;
}

#header {
	display: none;
}

/* ── Content column ── */

#content {
	float: left;
	width: 408px;
	background: #FFFFAF;
	padding: 20px;
	border: 1px solid #666;
	order: 2;
}

#content .entry {
	clear: both;
}

#content .entrybody a {
	color: #0066CC;
}

#content .entrytitle a {
	font-size: x-large;
	text-decoration: none;
	color: #c60;
}

#content .entrydate {
	font-size: x-small;
	color: #666666;
}

#content .entrybody {
	font-size: small;
	line-height: 150%;
	color: #333333;
}

#content .entrybody p {
	padding-top: 7px;
	padding-bottom: 7px;
}

#content .entrybody p img {
	float: left;
	padding-right: 15px;
	padding-bottom: 15px;
	border-width: 0px;
}

#content .entrybody blockquote {
	padding: 15px;
	background-color: #F5F7F1;
	margin: 5px;
}

#content .entrybody blockquote blockquote {
	background: #D9E0C9;
	margin: 5px;
	padding: 5px;
}

#content .entrybody .wp-smiley {
	float: none;
	border-width: 0px;
	margin: 0px;
	padding: 0px;
}

#content .entrybody ol li {
	list-style: decimal inside;
}

#content .entrybody ul li {
	list-style: circle inside;
}

#content .entrymeta {
	text-align: right;
	padding-bottom: 35px;
	font-size: small;
	clear: both;
}

#content .entrymeta a {
	color: #990000;
	text-decoration: none;
}

#content .navigation a {
	color: #0066CC;
}

#content .navigation .nextposts {
	float: left;
}

#content .navigation .previousposts {
	float: right;
}

/* ── Post navigation (single posts) ── */

#content .post-navigation {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	padding: 20px 0 10px;
	border-top: 1px solid #ddd;
	margin-top: 20px;
	font-size: small;
	clear: both;
}

#content .post-navigation .nav-prev {
	text-align: left;
	max-width: 48%;
}

#content .post-navigation .nav-next {
	text-align: right;
	max-width: 48%;
	margin-left: auto;
}

#content .post-navigation a {
	color: #c60;
	text-decoration: none;
}

#content .post-navigation a:hover {
	text-decoration: underline;
}

#content .commentsblock #comments {
	font-size: large;
}

#content .commentsblock .commentlist .commentmetadata {
	font-size: x-small;
	display: none;
}

#content .commentsblock .commentlist li {
	background-color: #F5F7F1;
	font-size: small;
	margin-top: 10px;
	margin-bottom: 10px;
	padding: 5px;
	list-style: decimal inside;
}

#content .commentsblock .commentlist p {
	padding-top: 5px;
	padding-bottom: 5px;
}

#content .commentsblock .commentlist a {
	color: #0066CC;
}

#content .commentsblock #respond {
	font-size: large;
}

#content .commentsblock #commentform input, textarea {
	padding: 2px;
	border: 1px solid #999999;
	margin-top: 5px;
	margin-bottom: 5px;
}

#content .commentsblock #commentform #submit {
	background: #990000;
	color: #FFFFFF;
	font-weight: bold;
	padding: 10px;
}

/* ── Right column: Tio senaste ── */

#left {
	float: left;
	width: 120px;
	padding: 20px;
	font-size: x-small;
	background-color: #F5F7F1;
	order: 3;
}

#left h2 {
	font-size: small;
	text-decoration: underline;
	color: #333333;
}

#left ul {
	list-style: url(none) none outside;
	padding: 10px 0px;
}

#left ul li a {
	list-style: url(none) none outside;
	color: #666666;
	text-decoration: none;
	padding: 5px 0px;
}

#left ul li a:hover {
	color: #000000;
}

/* ── Left column: Menu ── */

#menu {
	float: left;
	width: 120px;
	padding: 20px;
	color: #666666;
	text-align: right;
	font-size: x-small;
	background-color: #F5F7F1;
	order: 1;
}

#menu img {
	border-style: none;
}

#menu h2 {
	color: #333333;
	font-size: small;
	text-decoration: underline;
}

#menu ul {
	list-style: url(none) none outside;
	padding: 10px 0px;
}

#menu ul li {
	list-style: url(none) none outside;
}

#menu ul li a {
	text-decoration: none;
	color: #666666;
	list-style: outside;
	padding: 5px 0px;
}

#menu ul li a:hover {
	color: #000000;
}

/* ── Footer ── */

#footer {
	clear: both;
	margin: 0px auto;
	width: 100%;
	max-width: 420px;
	font-size: x-small;
	color: #999999;
	padding: 15px 0px 10px;
	order: 4;
}

#footer a {
	color: #666666;
	text-decoration: none;
}

#categories {
	width: 10px;
	text-align: justify;
}

#categories a {
	text-decoration: none;
}

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

/* ── Code: inline ── */

#content .entrybody code {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.9em;
	background: #3b3228;
	color: #d0c8c6;
	padding: 2px 5px;
	border-radius: 3px;
}

/* ── Code: block-level (direct child of entrybody, not inside a p) ── */

#content .entrybody > code {
	display: block;
	white-space: pre;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	font-size: 0.85em;
	line-height: 1.5;
	background: #3b3228;
	color: #d0c8c6;
	padding: 14px 16px;
	border-radius: 4px;
	border-left: 3px solid #c60;
	margin: 10px 0;
}

/* pre > code for well-formed markup */

#content .entrybody pre {
	white-space: pre;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: #3b3228;
	color: #d0c8c6;
	padding: 14px 16px;
	border-radius: 4px;
	border-left: 3px solid #c60;
	margin: 10px 0;
	font-size: 0.85em;
	line-height: 1.5;
}

#content .entrybody pre code {
	display: inline;
	background: none;
	padding: 0;
	border-radius: 0;
	color: inherit;
	font-size: inherit;
}

/* ══════════════════════════════════════
   Responsive: tablet / small desktop
   ══════════════════════════════════════ */
@media screen and (max-width: 800px) {
	body {
		background-image: none;
	}

	/* ── Hamburger button ── */
	.hamburger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		position: fixed;
		top: 12px;
		right: 12px;
		z-index: 1100;
		width: 44px;
		height: 44px;
		padding: 10px;
		background: #c60;
		border-radius: 4px;
		cursor: pointer;
	}

	.hamburger span {
		display: block;
		height: 3px;
		background: #fff;
		border-radius: 2px;
		transition: transform 0.3s, opacity 0.3s;
	}

	/* Animate to X when open */
	.menu-toggle:checked ~ .hamburger span:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	.menu-toggle:checked ~ .hamburger span:nth-child(2) {
		opacity: 0;
	}

	.menu-toggle:checked ~ .hamburger span:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	/* ── Menu: fixed overlay panel ── */
	#menu {
		position: fixed;
		top: 0;
		right: 0;
		width: 260px;
		height: 100vh;
		height: 100dvh;
		background-color: #F5F7F1;
		padding: 70px 24px 24px;
		text-align: left;
		font-size: 1rem;
		z-index: 1000;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		border-left: 2px solid #c60;
		transform: translateX(100%);
		transition: transform 0.3s ease;
		order: 2;
	}

	#menu h2 {
		font-size: 1.1rem;
		margin-bottom: 4px;
	}

	#menu ul li {
		padding: 2px 0;
	}

	#menu ul li a {
		font-size: 1rem;
		padding: 6px 0;
		display: inline-block;
	}

	/* Show menu when hamburger is checked */
	.menu-toggle:checked ~ #wrap #menu {
		transform: translateX(0);
	}

	/* Dim overlay behind menu */
	.menu-toggle:checked ~ #wrap::before {
		content: "";
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.4);
		z-index: 999;
	}

	/* ── Layout ── */
	#wrap {
		flex-direction: column;
		margin-top: 0;
	}

	#content,
	#left {
		float: none;
		width: 100%;
	}

	#content {
		order: 1;
		padding: 20px 20px 20px 15px;
		padding-right: 60px;
		border-left: none;
		border-right: none;
		font-size: 16px;
	}

	#content .entrytitle a {
		font-size: 1.4rem;
		line-height: 1.3;
		display: block;
	}

	#content .entrydate {
		font-size: 0.8rem;
	}

	#content .entrybody {
		font-size: 1rem;
		line-height: 1.6;
	}

	#content .entrymeta {
		font-size: 0.85rem;
	}

	#left {
		order: 3;
		float: none;
		width: 100%;
		padding: 15px 20px;
		border-top: 1px solid #ccc;
		font-size: 0.9rem;
	}

	#left h2 {
		font-size: 1rem;
	}

	#footer {
		max-width: none;
		text-align: center;
		padding: 15px 20px;
		font-size: 0.8rem;
	}
}

/* ══════════════════════════════════════
   Responsive: phone
   ══════════════════════════════════════ */
@media screen and (max-width: 480px) {
	#content {
		padding: 15px;
		padding-right: 56px;
	}

	#content .entrytitle a {
		font-size: 1.25rem;
	}

	#content .entrybody {
		font-size: 1rem;
		line-height: 1.6;
	}

	#content .entrybody p img {
		float: none;
		display: block;
		padding: 7px 0;
		margin: 0 auto;
	}

	#left {
		padding: 12px 15px;
	}
}
