/*
Theme Name: LMK-Foto
Theme URI: https://lmk-foto.de
Author: LMK-Foto
Description: Modernes, schnelles Fotografen-Theme für Hochzeitsfotografie. Großes Hero-Bild, Galerie-Raster mit Lightbox, ohne externe Schriften (DSGVO-freundlich). Texte und Bilder der Startseite sind unter Design → Anpassen änderbar.
Version: 1.2.2
Requires at least: 6.0
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: lmk-foto
*/

/* ---------- Schriften (selbst gehostet, SIL Open Font License) ---------- */
@font-face {
	font-family: 'Crimson Pro';
	src: url('assets/fonts/crimson-pro-regular.woff') format('woff');
	font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
	font-family: 'Crimson Pro';
	src: url('assets/fonts/crimson-pro-italic.woff') format('woff');
	font-weight: 400 500; font-style: italic; font-display: swap;
}
@font-face {
	font-family: 'Instrument Sans';
	src: url('assets/fonts/instrument-sans-regular.woff') format('woff');
	font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
	font-family: 'Instrument Sans';
	src: url('assets/fonts/instrument-sans-bold.woff') format('woff');
	font-weight: 600 700; font-style: normal; font-display: swap;
}

/* ---------- Grundlagen ---------- */
:root {
	--ink: #0f1b2d;
	--brand: #2c5f8e;
	--brand-dark: #1f4a73;
	--mist: #eef2f6;
	--paper: #fbfcfd;
	--line: #d6dde5;
	--muted: #5a6676;
	--champagne: #d8c7a6;
	--serif: 'Crimson Pro', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
	--sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--wrap: 1240px;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--header-h: 76px;
}

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

html { -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.7;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 .6em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1.2em; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; word-wrap: normal;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 1rem; top: 1rem; z-index: 200; padding: .75rem 1rem;
	background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--brand);
}

.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: .9rem 1.7rem; border-radius: 4px;
	font: 500 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
	border: 1px solid transparent;
	transition: background-color .2s, color .2s, border-color .2s;
}
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--champagne); color: var(--ink); }
.btn--line { border-color: rgba(255, 255, 255, .75); color: #fff; }
.btn--line:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--brand); color: #fff; }

.text-link { font-weight: 500; }

/* ---------- Header & Navigation ---------- */
.site-header {
	--hdr-fg: var(--ink);
	position: sticky; top: 0; z-index: 50;
	height: var(--header-h);
	color: var(--hdr-fg);
	transition: color .3s;
}
/* Hintergrund liegt in einem Pseudo-Element: backdrop-filter direkt am Header würde das
   fixierte Mobilmenü an den Header binden und es auf Höhe 0 zusammenfallen lassen. */
.site-header::before {
	content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: rgba(251, 252, 253, .94);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
	transition: opacity .3s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header.is-overlay { position: fixed; left: 0; right: 0; }
.site-header.is-overlay:not(.is-scrolled):not(.nav-open)::before { opacity: 0; }
.site-header.is-overlay:not(.is-scrolled):not(.nav-open) { --hdr-fg: #fff; }
.site-header.is-overlay:not(.is-scrolled):not(.nav-open) .custom-logo { filter: brightness(0) invert(1); }
.site-header.is-overlay:not(.is-scrolled):not(.nav-open) :focus-visible { outline-color: #fff; }

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand a { text-decoration: none; color: inherit; display: block; }
.brand-name { font-family: var(--serif); font-size: 1.8rem; letter-spacing: .01em; }
.custom-logo { max-height: 46px; width: auto; transition: filter .3s; }

.nav-toggle {
	width: 44px; height: 44px; padding: 0; border: 0; background: none;
	color: inherit; cursor: pointer; position: relative;
}
.nav-toggle .bars, .nav-toggle .bars::before {
	content: ''; position: absolute; left: 10px; right: 10px; height: 2px;
	background: currentColor; transition: transform .25s;
}
.nav-toggle .bars { top: 19px; }
.nav-toggle .bars::before { top: 8px; left: 0; right: 0; }
.nav-open .nav-toggle .bars { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle .bars::before { transform: translateY(-8px) rotate(-90deg); }

.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; color: inherit; }

/* Mobil: Vollbild-Menü */
.primary-nav {
	position: fixed; inset: var(--header-h) 0 0 0;
	background: var(--paper); color: var(--ink);
	padding: 1.5rem var(--gutter) 3rem; overflow-y: auto;
	opacity: 0; visibility: hidden; transform: translateY(-8px);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.admin-bar .primary-nav { top: calc(var(--header-h) + 46px); }
.nav-open .primary-nav { opacity: 1; visibility: visible; transform: none; }
.primary-nav .menu > li { border-bottom: 1px solid var(--line); }
.primary-nav .menu a { display: block; padding: 1rem 0; font-family: var(--serif); font-size: 1.8rem; }
.primary-nav .sub-menu { padding: 0 0 1rem 1rem; }
.primary-nav .sub-menu a { font-family: var(--sans); font-size: 1rem; padding: .4rem 0; color: var(--muted); }

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.primary-nav {
		position: static; inset: auto; background: none; color: inherit; padding: 0;
		opacity: 1; visibility: visible; transform: none; overflow: visible;
	}
	.admin-bar .primary-nav { top: auto; }
	.primary-nav .menu { display: flex; gap: .25rem; align-items: center; }
	.primary-nav .menu > li { border: 0; position: relative; }
	.primary-nav .menu a { padding: .55rem .9rem; font: 500 .98rem/1.2 var(--sans); }
	.primary-nav .menu > li > a { border-bottom: 1px solid transparent; }
	.primary-nav .menu > li > a:hover,
	.primary-nav .current-menu-item > a,
	.primary-nav .current_page_item > a { border-bottom-color: currentColor; }
	.primary-nav .sub-menu {
		position: absolute; right: 0; top: 100%; min-width: 220px; padding: .5rem;
		background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 4px;
		opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
	}
	.primary-nav .sub-menu a { color: var(--ink); padding: .6rem .8rem; }
	.primary-nav li:hover > .sub-menu,
	.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; }
}

/* ---------- Hero ---------- */
.hero {
	position: relative; display: flex; align-items: flex-end;
	min-height: 100vh; min-height: 100svh;
	background: linear-gradient(160deg, var(--brand-dark), var(--ink) 70%);
	color: #fff; overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background:
		linear-gradient(to top, rgba(10, 18, 32, .82) 0%, rgba(10, 18, 32, .25) 50%, rgba(10, 18, 32, .35) 100%);
}
.hero-inner { position: relative; z-index: 1; padding-top: calc(var(--header-h) + 3rem); padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero-title {
	font-size: clamp(3rem, 8.6vw, 7.2rem); line-height: .98; letter-spacing: -0.02em;
	max-width: 14ch; margin-bottom: .35em;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 34rem; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin: 1.8rem 0 0; }

@media (prefers-reduced-motion: no-preference) {
	.hero-img { animation: lmk-zoom 2.6s cubic-bezier(.2, .6, .2, 1) both; }
	.hero-inner { animation: lmk-rise 1s .25s ease-out both; }
}
@keyframes lmk-zoom { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes lmk-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(4rem, 9vw, 8rem); }

.intro-grid { display: grid; gap: 1.5rem 4rem; align-items: start; }
.intro-title { font-size: clamp(2.1rem, 4.4vw, 3.5rem); margin: 0; }
.intro-text { font-size: 1.2rem; color: var(--muted); max-width: 36rem; margin: 0; }
@media (min-width: 900px) { .intro-grid { grid-template-columns: 1.3fr 1fr; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.section-head h2 { margin: 0; }

/* Galerie-Raster */
.gal-grid {
	list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1rem, 2vw, 1.75rem);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.gal-card { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.gal-media {
	position: relative; display: block; overflow: hidden; background: var(--mist);
	aspect-ratio: 4 / 3; border-radius: 2px;
}
.gal-media img, .card-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-ph { background: linear-gradient(135deg, var(--mist), var(--line)); }
.gal-media img { transition: transform .6s ease; }
.gal-card:hover .gal-media img { transform: scale(1.035); }
.gal-title { font-family: var(--serif); font-size: 1.5rem; padding-top: .8rem; }
.gal-card:hover .gal-title { color: var(--brand); }

@media (min-width: 900px) {
	.gal-grid:not(.is-even) { grid-template-columns: repeat(3, 1fr); }
	.gal-grid:not(.is-even) .gal-item:first-child { grid-column: span 2; grid-row: span 2; }
	.gal-grid:not(.is-even) .gal-item:first-child .gal-media { flex: 1; aspect-ratio: auto; min-height: 380px; }
	.gal-grid:not(.is-even) .gal-item:first-child .gal-title { font-size: 1.9rem; }
	/* Letzte Reihe füllen, damit keine Lücken entstehen */
	.gal-grid:not(.is-even) .gal-item:nth-child(3n+2):last-child:not(:nth-child(2)) { grid-column: span 2; }
	.gal-grid:not(.is-even) .gal-item:nth-child(3n+1):last-child:not(:first-child) { grid-column: span 3; }
	.gal-grid:not(.is-even) .gal-item:nth-child(3n+1):last-child:not(:first-child) .gal-media { aspect-ratio: 21 / 9; }
}

/* Leistungen */
.services { background: var(--mist); }
.services h2 { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem 2rem; grid-template-columns: 1fr; }
.svc-list li { border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.svc-list h3 { margin-bottom: .4em; }
.svc-list p { color: var(--muted); margin: 0; }
@media (min-width: 640px) { .svc-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .svc-list { grid-template-columns: repeat(4, 1fr); } }

/* Kontakt-Banner */
.cta { background: var(--brand); color: #fff; padding-block: clamp(4rem, 9vw, 7rem); }
.cta-inner { max-width: 52rem; }
.cta h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.cta p { font-size: 1.2rem; opacity: .95; }
.cta :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

/* Instagram-Leiste */
.insta { padding-block: clamp(3.5rem, 7vw, 6rem); }
.insta-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.insta-head h2 { margin: 0; }
.insta-head p { margin: 0; color: var(--muted); max-width: 30rem; }
.insta-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(2, 1fr); }
.insta-grid a, .insta-grid span.insta-item { display: block; overflow: hidden; border-radius: 2px; background: var(--mist); aspect-ratio: 1; }
.insta-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.insta-grid a:hover img { transform: scale(1.05); }
.insta-more { margin: 1.5rem 0 0; }
@media (min-width: 560px) { .insta-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .insta-grid { grid-template-columns: repeat(6, 1fr); gap: .75rem; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd5df; padding-top: clamp(3rem, 6vw, 5rem); font-size: .98rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--champagne); }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-name { font-family: var(--serif); font-size: 2rem; color: #fff; margin-bottom: .3em; }
.footer-h { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: .8em; letter-spacing: 0; }
.footer-col .menu li { margin-bottom: .45rem; }
.footer-bottom { margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }

/* ---------- Seiten & Beiträge ---------- */
.page-body { padding-bottom: clamp(3rem, 8vw, 6rem); }
.page-head { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.page-head h1 { margin: 0; max-width: 20ch; }
.entry-meta { color: var(--muted); margin: .8rem 0 0; }
.entry-hero { margin: 0 0 clamp(2rem, 5vw, 4rem); }
.entry-hero img { width: 100%; max-height: 70vh; object-fit: cover; border-radius: 2px; }

.entry-content > * { max-width: 44rem; margin-inline: auto; }
.entry-content > .alignwide, .entry-content > .wp-block-gallery { max-width: var(--wrap); }
.entry-content.is-elementor > * { max-width: none; margin-inline: 0; }

/* Galerie-Bilder (Fallback) */
.lmk-photos { columns: 3 280px; column-gap: .75rem; }
.lmk-photos a { display: block; margin-bottom: .75rem; break-inside: avoid; }
.lmk-photos img { width: 100%; height: auto; border-radius: 2px; }
.entry-content > .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote {
	margin-block: 2rem; padding-left: 1.4rem; border-left: 3px solid var(--champagne);
	font-family: var(--serif); font-style: italic; font-size: 1.55rem; line-height: 1.45;
}
.entry-content img { border-radius: 2px; }
.entry-content figure { margin-block: 2rem; }
.entry-content figcaption, .wp-caption-text { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }

.site-main--full > * { max-width: none; }

/* Galerien (klassisch & Block) */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); max-width: var(--wrap); }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.gallery-caption { display: none; }
@media (min-width: 700px) {
	.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
	.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
	.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
	.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
}
.wp-block-gallery { gap: .75rem; }
.wp-block-gallery img { border-radius: 2px; }

/* Beitrags-Navigation, Seitenzahlen */
.post-navigation, .pagination { margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.post-navigation a { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; color: var(--ink); }
.post-navigation .nav-sub { display: block; font: 500 .85rem var(--sans); color: var(--muted); }
.pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-numbers { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink); }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Formulare (inkl. Contact Form 7, WPForms, Forminator) ---------- */
input[type='text'], input[type='email'], input[type='tel'], input[type='url'], input[type='search'],
input[type='password'], input[type='number'], input[type='date'], select, textarea {
	width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink);
	background: #fff; border: 1px solid var(--line); border-radius: 4px;
	transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(44, 95, 142, .2); }
textarea { min-height: 9rem; }
label { font-weight: 500; display: inline-block; margin-bottom: .3rem; }
input[type='submit'], button[type='submit'], .wpcf7-submit, .wpforms-submit, .forminator-button-submit {
	display: inline-flex; padding: .9rem 1.8rem; border: 0; border-radius: 4px;
	background: var(--ink); color: #fff; font: 500 1rem var(--sans); cursor: pointer;
	transition: background-color .2s;
}
input[type='submit']:hover, button[type='submit']:hover { background: var(--brand); }
.search-form { display: flex; gap: .6rem; max-width: 30rem; margin-bottom: 1.5rem; }
.search-form input { flex: 1; }
.wpcf7 p { margin-bottom: 1.1rem; }

/* Kommentare */
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-meta a { color: var(--muted); font-size: .9rem; }

/* ---------- Lightbox ---------- */
.lb-ready { cursor: zoom-in; }
.lb {
	position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
	background: rgba(8, 14, 24, .94); padding: 3.5rem 4rem;
}
.lb[hidden] { display: none; }
.lb-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; object-fit: contain; }
.lb-fig figcaption { color: #cdd5df; font-size: .9rem; margin-top: .75rem; text-align: center; }
.lb-btn {
	position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
	transition: background-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb :focus-visible { outline-color: #fff; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) { .lb { padding: 3.5rem .5rem; } .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; } }

@media print {
	.site-header, .site-footer, .cta, .lb { display: none; }
}
