/*  
Responsive Enhancement CSS
Mobile-first approach for modern devices
*/

/* ============================
   CSS VARIABLES FOR EASY THEMING
   ============================ */
:root {
	--primary-color: #a2080e;
	--primary-dark: #810005;
	--text-color: #333;
	--text-light: #666;
	--bg-light: #f5f5f5;
	--border-color: #e0e0e0;
	--shadow: 0 2px 8px rgba(0,0,0,0.1);
	--shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
	--transition: all 0.3s ease;
	--border-radius: 8px;
	--header-height: 70px;
}

/* ============================
   BASE RESPONSIVE RESET
   ============================ */
* {
	box-sizing: border-box;
}

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text-color);
}

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

/* ============================
   RESPONSIVE LAYOUT
   ============================ */
#page {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 10px; /* Reduced base padding */
}

@media screen and (min-width: 768px) {
	#page {
		padding: 0 20px;
	}
}

/* ============================
   MOBILE MENU STYLES
   ============================ */
.mobile-menu-toggle {
	display: none;
	background: var(--primary-color);
	border: none;
	color: white;
	font-size: 24px;
	padding: 10px 15px;
	cursor: pointer;
	border-radius: 4px;
	position: absolute;
	right: 20px;
	top: 15px;
	z-index: 1001;
	transition: var(--transition);
}

.mobile-menu-toggle:hover {
	background: var(--primary-dark);
}

.mobile-menu-toggle span {
	display: block;
	width: 25px;
	height: 3px;
	background: white;
	margin: 5px 0;
	transition: var(--transition);
}

/* Hamburger Animation */
.mobile-menu-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================
   RESPONSIVE MENU
   ============================ */
#menu {
	background: var(--primary-color); /* #a2080e */
	padding: 0;
	height: auto;
	box-shadow: var(--shadow);
	position: relative;
	width: 100%;
}

#header {
	background: linear-gradient(to bottom, var(--primary-dark), #600003); /* #810005 with slight gradient */
}

/* Ensure smooth transition if they are adjacent */
#menu::after {
	content: '';
	display: block;
	height: 5px;
	background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
}

#mainmenu {
	float: none;
	padding: 0;
	width: 100%;
}

#mainmenu ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}

#mainmenu ul li {
	position: relative;
	padding: 0;
	background: none;
}

#mainmenu ul li a {
	display: block;
	padding: 1rem 1.2rem;
	color: white;
	font-size: 0.95rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: var(--transition);
	height: auto;
}

#mainmenu ul li a:hover,
#mainmenu .current_page_item a,
#mainmenu .current-menu-item a {
	background: rgba(255, 255, 255, 0.15);
	text-decoration: none;
}

/* Dropdown Menus */
#mainmenu ul li ul {
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--primary-dark);
	min-width: 220px;
	box-shadow: var(--shadow-hover);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: var(--transition);
	z-index: 1000;
	margin: 0;
	border-radius: 0 0 var(--border-radius) var(--border-radius);
}

#mainmenu ul li:hover > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#mainmenu ul li ul li {
	width: 100%;
	display: block;
	float: none;
}

#mainmenu ul li ul li a {
	padding: 0.8rem 1.2rem;
	font-size: 0.9rem;
	text-transform: capitalize;
	font-weight: normal;
	width: 100%;
	background: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#mainmenu ul li ul li:last-child a {
	border-bottom: none;
}

#mainmenu ul li ul li a:hover {
	background: rgba(255, 255, 255, 0.1);
	padding-left: 1.5rem;
}

/* RSS Button */
#top_rss {
	float: none;
	position: absolute;
	right: 75px;
	top: 5px;
}

#top_rss a {
	display: inline-block;
	padding: 8px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	transition: var(--transition);
}

#top_rss a:hover {
	background: rgba(255, 255, 255, 0.2);
}

#top_rss img {
	width: 24px;
	height: 24px;
}

/* ============================
   RESPONSIVE HEADER
   ============================ */
#header {
	width: 100%;
	height: auto;
	padding: 2rem 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

#header_title {
	flex: 1;
	min-width: 250px;
}

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

#header_right {
	flex: 0 1 auto;
	padding: 0;
}

#main_search {
	width: 100%;
	max-width: 320px;
	background: white;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	height: auto;
	padding: 0;
}

#searchform_top {
	padding: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

#searchform_top_text {
	flex: 1;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	padding: 0.6rem 1rem;
	font-size: 0.9rem;
	color: var(--text-color);
	background: white;
	margin: 0;
	text-align: left;
	transition: var(--transition);
}

#searchform_top_text:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(157, 13, 18, 0.1);
}

#gosearch {
	border: none;
	background: var(--primary-color);
	padding: 0.6rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	transition: var(--transition);
}

#gosearch:hover {
	background: var(--primary-dark);
	transform: translateY(-1px);
}

/* ============================
   RESPONSIVE BODY LAYOUT
   ============================ */
#body {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	padding: 2rem 0;
}

#body_left {
	width: 100%;
	float: none;
}

#body_left_content {
	width: 100%;
	padding: 0;
}

#body_right {
	width: 100%;
	float: none;
}

#body_right_content {
	margin-top: 0;
}

/* ============================
   RESPONSIVE POST STYLES
   ============================ */
.post {
	margin-bottom: 2.5rem;
	padding: 2rem;
	background: white;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	transition: var(--transition);
}

.post:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-2px);
}

.post-title h2 {
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.3;
	margin-bottom: 0.5rem;
}

.entry {
	margin: 1rem 0;
	line-height: 1.8;
	font-size: 1rem;
}

/* Card Styles */
.thecard {
	width: 100%;
	max-width: 700px;
	margin: 2rem auto;
	box-shadow: var(--shadow);
	border-radius: var(--border-radius);
	overflow: hidden;
	transition: var(--transition);
}

.thecard:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-4px);
}

.card-img {
	height: auto;
	max-height: 300px;
	overflow: hidden;
}

.card-img img {
	width: 100%;
	border-radius: 0;
	transition: transform 0.3s ease;
}

.thecard:hover .card-img img {
	transform: scale(1.05);
}

.card-caption {
	padding: 1.5rem;
}

.card-outmore {
	width: 100%;
	padding: 1rem 1.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* ============================
   RESPONSIVE SIDEBAR
   ============================ */
#sidebar {
	width: 100%;
	margin: 0;
}

.sidebars {
	background: white;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
}

.sidebars h2 {
	font-size: 1.4rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--primary-color);
}

.einheitsnavigation {
	box-shadow: var(--shadow);
	border-radius: var(--border-radius);
	padding: 1rem;
	margin-bottom: 1rem;
	background: white;
	width: 100%;
}

/* ============================
   RESPONSIVE FOOTER
   ============================ */
#footer {
	width: 100%;
	height: auto;
	padding: 2rem 1rem;
	background: var(--bg-light);
	border-top: 3px solid var(--primary-color);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
    position: absolute;
    left: 0;
}

#footer_title {
	flex: 1;
	min-width: 200px;
}

#footer_title h2 {
	font-size: clamp(1.5rem, 4vw, 2rem);
	padding: 0;
	margin: 0;
}

#footer_text {
	flex: 1;
	padding: 0;
	text-align: right;
}

/* ============================
   TABLET BREAKPOINT
   ============================ */
@media screen and (min-width: 768px) {
	#page {
		padding: 0 30px;
	}

	#body {
		grid-template-columns: 1fr 300px;
	}

	#header {
		padding: 2.5rem 0;
	}

	.post {
		padding: 2.5rem;
	}
}

/* ============================
   DESKTOP BREAKPOINT
   ============================ */
@media screen and (min-width: 1024px) {
	#body {
		grid-template-columns: 1fr 320px;
		gap: 3rem;
	}

	#body_left_content {
		padding: 0 2rem 0 0;
	}
}

/* ============================
   MOBILE MENU STYLES
   ============================ */
@media screen and (max-width: 767px) {
	.mobile-menu-toggle {
		display: block;
	}

	#mainmenu {
		position: fixed;
		top: 0;
		right: -100%;
		width: 280px;
		height: 100vh;
		background: var(--primary-dark);
		box-shadow: -5px 0 15px rgba(0,0,0,0.3);
		overflow-y: auto;
		transition: right 0.3s ease;
		z-index: 1000;
		padding-top: 60px;
	}

	#mainmenu.active {
		right: 0;
	}

	#mainmenu ul {
		flex-direction: column;
		align-items: stretch;
	}

	#mainmenu ul li {
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	#mainmenu ul li a {
		padding: 1rem 1.5rem;
	}

	#mainmenu ul li ul {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.2);
		min-width: 0;
		border-radius: 0;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
	}

	#mainmenu ul li.has-submenu.open > ul {
		max-height: 500px;
	}

	#mainmenu ul li ul li a {
		padding: 0.8rem 2rem;
	}

	#mainmenu ul li ul li a:hover {
		padding-left: 2.5rem;
	}

	/* Add submenu indicator */
	#mainmenu ul li.has-submenu > a::after {
		content: '+';
		float: right;
		font-size: 1.5rem;
		line-height: 1;
		transition: transform 0.3s ease;
	}

	#mainmenu ul li.has-submenu.open > a::after {
		transform: rotate(45deg);
	}

	#header {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 1.5rem 0;
	}

	#header_title,
	#header_right {
		width: 100%;
		float: none;
	}

	#main_search {
		max-width: 100%;
	}

	#top_rss {
		right: 80px;
		top: 10px;
	}

	.post {
		padding: 1.5rem;
	}

	#footer {
		flex-direction: column;
		text-align: center;
		padding: 2rem 1rem;
	}

	#footer_text {
		text-align: center;
	}
}

/* ============================
   SMALL MOBILE
   ============================ */
@media screen and (max-width: 480px) {
	html {
		font-size: 14px;
	}

	#page {
		padding: 0 15px;
	}

	.post {
		padding: 1rem;
	}

	.sidebars {
		padding: 1rem;
	}
}

/* ============================
   PRINT STYLES
   ============================ */
@media print {
	.mobile-menu-toggle,
	#menu,
	#main_search,
	#sidebar,
	#footer {
		display: none;
	}

	#page {
		width: 100%;
		max-width: none;
	}

	.post {
		box-shadow: none;
		border: 1px solid #ddd;
		page-break-inside: avoid;
	}
}

/* ============================
   ACCESSIBILITY IMPROVEMENTS
   ============================ */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
	outline: 3px solid var(--primary-color);
	outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: var(--primary-color);
	color: white;
	padding: 8px;
	z-index: 101;
	transition: top 0.3s;
}

.skip-link:focus {
	top: 0;
}

/* ============================
   DARK MODE - DISABLED
   ============================ */
/* Dark mode disabled per user request */
/*
@media (prefers-color-scheme: dark) {
	body {
		background: #121212;
		color: #e0e0e0;
	}

	.post, 
	.sidebars,
	#main_search,
	.thecard,
	.einheitsnavigation {
		background: #1a1a1a;
		color: #e0e0e0;
	}

	#main_search,
	#searchform_top_text {
		background: #2a2a2a;
		color: #e0e0e0;
		border-color: #444;
	}
}
*/
