/*
Theme Name: Influencer Hub
Theme URI: https://example.com/influencer-hub
Author: Elisabeth
Author URI: https://example.com
Description: Individuelles WordPress-Theme f&uuml;r Influencer Hub. Wird schrittweise um Funktionen erweitert.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: influencer-hub
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* -----------------------------------------------------------------------
   Basis-Reset & Design-Tokens
   -------------------------------------------------------------------- */
:root {
	--ih-color-text: #1a1a1a;
	--ih-color-bg: #ffffff;
	--ih-color-primary: #d6336c;
	--ih-color-secondary: #212529;
	--ih-color-muted: #6c757d;
	--ih-color-border: #e9ecef;
	--ih-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ih-font-heading: var(--ih-font-body);
	--ih-container-width: 1200px;
	--ih-spacing: 1.5rem;
}

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

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

body {
	margin: 0;
	font-family: var(--ih-font-body);
	color: var(--ih-color-text);
	background: var(--ih-color-bg);
	line-height: 1.6;
}

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

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

a:hover,
a:focus {
	text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ih-font-heading);
	line-height: 1.25;
	margin: 0 0 0.75em;
}

ul, ol {
	padding-left: 1.25em;
}

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

.screen-reader-text:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--ih-color-bg);
	color: var(--ih-color-text);
	z-index: 100000;
	clip: auto;
}

/* -----------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------- */
.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.container {
	width: 100%;
	max-width: var(--ih-container-width);
	margin-inline: auto;
	padding-inline: var(--ih-spacing);
}

.site-content {
	flex: 1 0 auto;
	padding-block: var(--ih-spacing);
}

.content-area {
	width: 100%;
}

.has-sidebar .content-area {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ih-spacing);
}

@media (min-width: 782px) {
	.has-sidebar .content-area {
		grid-template-columns: 2fr 1fr;
	}
}

/* -----------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------- */
.site-header {
	position: relative;
	border-bottom: 1px solid var(--ih-color-border);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-block: 1rem;
}

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

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

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

.main-navigation > ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}

.main-navigation a {
	color: var(--ih-color-secondary);
	font-weight: 600;
}

.main-navigation li {
	position: relative;
}

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--ih-color-border);
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	cursor: pointer;
}

.submenu-expand,
.submenu-back {
	display: none;
}

/* -----------------------------------------------------------------------
   Einfaches Dropdown (Menüpunkte ohne Mega-Menü)
   -------------------------------------------------------------------- */
.main-navigation .sub-menu {
	display: none;
	flex-direction: column;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	margin: 0;
	padding: 0.5rem 0;
	background: var(--ih-color-bg);
	border: 1px solid var(--ih-color-border);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
	z-index: 60;
}

.main-navigation .sub-menu li {
	width: 100%;
}

.main-navigation .sub-menu a {
	display: block;
	padding: 0.5rem 1.25rem;
	font-weight: 400;
	white-space: nowrap;
}

@media (min-width: 782px) {
	.main-navigation > ul > .menu-item-has-children:hover > .sub-menu,
	.main-navigation > ul > .menu-item-has-children:focus-within > .sub-menu {
		display: flex;
	}
}

/* -----------------------------------------------------------------------
   Mega-Menü
   -------------------------------------------------------------------- */
:root {
	--ih-mega-bg: #ded2c0;
	--ih-mega-text: #2b241d;
	--ih-mega-border: rgba(43, 36, 29, 0.35);
}

@media (min-width: 782px) {
	.mega-menu-panel {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background: var(--ih-mega-bg);
		color: var(--ih-mega-text);
		z-index: 55;
	}

	.mega-menu-item:hover > .mega-menu-panel,
	.mega-menu-item:focus-within > .mega-menu-panel {
		display: block;
	}

	.mega-menu-inner {
		display: grid;
		grid-template-columns: 1fr 1.4fr 1.4fr 1.4fr;
		gap: 2.5rem;
		padding-block: 3rem;
	}
}

.mega-menu-title {
	font-family: var(--ih-font-heading);
	font-size: 1.5rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.mega-menu-link-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: static;
	background: none;
	border: none;
	box-shadow: none;
}

.mega-menu-link-list li {
	position: static;
}

.mega-menu-link-list a {
	display: inline;
	padding: 0;
	color: var(--ih-mega-text);
	font-weight: 400;
}

.mega-menu-link-list a.mega-menu-view-all {
	font-weight: 700;
	letter-spacing: 0.05em;
}

.mega-menu-post-image {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: rgba(0, 0, 0, 0.1);
}

.mega-menu-post-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mega-menu-read-more {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0;
	color: #fff;
	font-style: italic;
	font-size: 0.85rem;
	white-space: nowrap;
}

.mega-menu-read-more::before,
.mega-menu-read-more::after {
	content: "";
	display: inline-block;
	width: 1.5rem;
	height: 1px;
	background: #fff;
}

.mega-menu-post-cat {
	margin: 0.9rem 0 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.mega-menu-post-title {
	margin: 0;
	font-size: 0.95rem;
}

.mega-menu-post-title a {
	color: var(--ih-mega-text);
	text-decoration: underline;
}

.mega-menu-explore-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 100%;
	min-height: 220px;
	padding: 2rem;
	text-align: center;
	border: 1px solid var(--ih-mega-border);
	outline: 1px solid var(--ih-mega-border);
	outline-offset: -8px;
	color: var(--ih-mega-text);
}

.mega-menu-explore-eyebrow {
	font-style: italic;
	font-size: 1rem;
}

.mega-menu-explore-title {
	font-family: var(--ih-font-heading);
	font-size: 1.4rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.mega-menu-explore-title::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 1px;
	margin: 0.6rem auto;
	background: var(--ih-mega-border);
}

/* -----------------------------------------------------------------------
   Mobile: Hamburger-Menü mit Drill-down (nur Links, kein Mega-Menü-Inhalt)
   -------------------------------------------------------------------- */
@media (max-width: 781px) {
	.menu-toggle {
		display: inline-flex;
	}

	.main-navigation > ul {
		display: none;
		flex-direction: column;
		gap: 0;
		padding-block: 1rem;
	}

	.main-navigation.is-open > ul {
		display: flex;
	}

	.main-navigation li {
		width: 100%;
		border-bottom: 1px solid var(--ih-color-border);
	}

	.main-navigation > ul > li > a {
		display: block;
		padding: 0.85rem 0;
	}

	.submenu-expand {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		width: 3rem;
		height: 3rem;
		background: none;
		border: none;
		cursor: pointer;
	}

	.submenu-expand::after {
		content: "\203A";
		font-size: 1.5rem;
	}

	.menu-item-has-children:not(.submenu-open) > .submenu-expand + * ,
	.menu-item-has-children:not(.submenu-open) > .mega-menu-panel,
	.menu-item-has-children:not(.submenu-open) > .sub-menu {
		display: none;
	}

	/* Geöffnetes Untermenü als eigene, volle Ansicht mit Zurück-Button. */
	.menu-item-has-children.submenu-open {
		position: static;
	}

	.menu-item-has-children.submenu-open > a,
	.menu-item-has-children.submenu-open > .submenu-expand {
		display: none;
	}

	.menu-item-has-children.submenu-open > .mega-menu-panel,
	.menu-item-has-children.submenu-open > .sub-menu {
		display: block;
		position: static;
		width: 100%;
		background: none;
		border: none;
		box-shadow: none;
		padding: 0;
	}

	.submenu-back {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		width: 100%;
		padding: 0.85rem 0;
		margin-bottom: 0.5rem;
		background: none;
		border: none;
		border-bottom: 1px solid var(--ih-color-border);
		font-weight: 700;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		text-align: left;
		cursor: pointer;
	}

	.submenu-back::before {
		content: "\2039";
		font-size: 1.25rem;
		font-weight: 400;
	}

	.mega-menu-title,
	.mega-menu-post,
	.mega-menu-explore {
		display: none;
	}

	.mega-menu-inner {
		display: block;
		padding: 0;
	}

	.mega-menu-link-list {
		gap: 0;
	}

	.mega-menu-link-list li,
	.main-navigation .sub-menu li {
		border-bottom: 1px solid var(--ih-color-border);
	}

	.mega-menu-link-list a,
	.main-navigation .sub-menu a {
		display: block;
		padding: 0.85rem 0;
	}
}

/* -----------------------------------------------------------------------
   Entries / Posts
   -------------------------------------------------------------------- */
.entry-header {
	margin-bottom: 1rem;
}

.entry-title a {
	color: inherit;
}

.entry-meta {
	color: var(--ih-color-muted);
	font-size: 0.9rem;
}

.entry-content > * + * {
	margin-top: 1em;
}

.post-thumbnail {
	margin-bottom: 1rem;
}

article + article {
	margin-top: var(--ih-spacing);
	padding-top: var(--ih-spacing);
	border-top: 1px solid var(--ih-color-border);
}

/* -----------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------- */
.pagination,
.post-navigation {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: var(--ih-spacing);
}

.pagination .page-numbers {
	margin-right: 0.5rem;
}

/* -----------------------------------------------------------------------
   Widgets & Sidebar
   -------------------------------------------------------------------- */
.widget {
	margin-bottom: var(--ih-spacing);
}

.widget-title {
	font-size: 1.1rem;
	border-bottom: 1px solid var(--ih-color-border);
	padding-bottom: 0.5rem;
}

/* -----------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--ih-color-border);
	padding-block: var(--ih-spacing);
	color: var(--ih-color-muted);
	font-size: 0.9rem;
}

.footer-navigation ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 0;
	margin: 0 0 0.75rem;
}

/* -----------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------- */
.search-form {
	display: flex;
	gap: 0.5rem;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
textarea {
	border: 1px solid var(--ih-color-border);
	border-radius: 4px;
	padding: 0.5rem 0.75rem;
	font: inherit;
}

button,
input[type="submit"] {
	background: var(--ih-color-primary);
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.5rem 1rem;
	font: inherit;
	cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
	opacity: 0.9;
}

/* -----------------------------------------------------------------------
   Alignments (Gutenberg)
   -------------------------------------------------------------------- */
.alignwide {
	max-width: calc(var(--ih-container-width) * 1.2);
	margin-inline: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

/* -----------------------------------------------------------------------
   Produktlinks: Filter & Grid
   -------------------------------------------------------------------- */
.produkt-archive .content-area {
	display: block;
}

.produkt-filter {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ih-spacing);
	align-items: flex-end;
	padding: var(--ih-spacing);
	margin-bottom: var(--ih-spacing);
	background: #f8f9fa;
	border: 1px solid var(--ih-color-border);
	border-radius: 6px;
}

.produkt-filter-group {
	border: none;
	margin: 0;
	padding: 0;
	min-width: 140px;
}

.produkt-filter-group legend {
	font-weight: 600;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--ih-color-muted);
	margin-bottom: 0.5rem;
	padding: 0;
}

.produkt-filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
}

.produkt-filter-option {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.9rem;
	cursor: pointer;
}

.produkt-filter-option input[type="checkbox"] {
	margin: 0;
}

.produkt-filter-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.produkt-filter-reset {
	font-size: 0.85rem;
	color: var(--ih-color-muted);
}

.colour-swatch {
	display: inline-block;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	border: 1px solid var(--ih-color-border);
	box-shadow: inset 0 0 0 2px #fff;
}

.colour-swatch-link {
	display: inline-flex;
	margin-right: 0.35rem;
}

.produkt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--ih-spacing);
}

.produkt-card {
	border: 1px solid var(--ih-color-border);
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.produkt-card + .produkt-card {
	margin-top: 0;
	padding-top: 0;
	border-top: 1px solid var(--ih-color-border);
}

.produkt-card-link {
	color: inherit;
	text-decoration: none;
	display: block;
}

.produkt-card-link:hover,
.produkt-card-link:focus {
	text-decoration: none;
}

.produkt-card-link:hover .produkt-card-title {
	text-decoration: underline;
}

.produkt-card-image {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--ih-color-border);
}

.produkt-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.produkt-card-title {
	font-size: 1rem;
	margin: 0.75rem 0.75rem 0;
}

.produkt-card-meta {
	padding: 0.5rem 0.75rem 0.75rem;
	font-size: 0.85rem;
	color: var(--ih-color-muted);
}

.produkt-card-meta p {
	margin: 0.25rem 0;
}

.produkt-card-meta a {
	color: var(--ih-color-muted);
}

/* -----------------------------------------------------------------------
   Website-Modus: Under Construction / Maintenance (Seite ohne Header/Footer)
   -------------------------------------------------------------------- */
.site-mode-page {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	margin: 0;
	padding: var(--ih-spacing);
	text-align: center;
	background: #111827;
	color: #ffffff;
}

.site-mode-content {
	max-width: 640px;
}

.site-mode-content h1 {
	font-size: 3rem;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 2rem;
	animation: ih-site-mode-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.site-mode-entry-content {
	font-size: 1.125rem;
	color: #ffffff;
	margin-bottom: 2rem;
}

.site-mode-entry-content > * + * {
	margin-top: 1em;
}

@keyframes ih-site-mode-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}
