/*
Theme Name: Nina Wirths
Theme URI: https://ninawirths.de
Author: Nina Wirths
Description: Persönliches Autorinnen-Theme für Nina Wirths – warm und redaktionell, mit Bücher-Wischreihe, automatischem Blog-Bereich, Newsletter- und Instagram-Abschnitt. Schriften sind lokal eingebunden (keine Verbindung zu Google Fonts).
Version: 1.0.6
Requires at least: 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: nina-wirths
*/

/* ---------- Grundlagen ---------- */

html {
	scroll-behavior: smooth;
}

section[id] {
	scroll-margin-top: 16px;
}

a {
	text-underline-offset: 0.18em;
}

/* Wortmarke „Nina Wirths“ */
.nw-wordmark {
	margin: 0;
}

.nw-wordmark a {
	color: inherit;
	text-decoration: none;
}

.nw-wordmark a:hover {
	color: var(--wp--preset--color--rust);
}

/* Kleine Überzeilen in Großbuchstaben */
.nw-kicker {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* „Mehr …“-Links */
.nw-more {
	font-size: 15px;
	font-weight: 600;
}

.nw-more a {
	text-decoration: none;
}

.nw-more a:hover {
	text-decoration: underline;
}

/* ---------- Kopfbereich ---------- */

.wp-block-navigation .nw-nav-cta > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--ink);
	border-radius: 999px;
	color: var(--wp--preset--color--cream);
	padding: 12px 20px;
}

.wp-block-navigation .nw-nav-cta > .wp-block-navigation-item__content:hover,
.wp-block-navigation .nw-nav-cta > .wp-block-navigation-item__content:focus {
	background: var(--wp--preset--color--rust);
	color: #fff;
}

/* ---------- Buttons ---------- */

.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
	padding: 14.5px 26.5px;
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	background: transparent;
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):focus {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
}

/* ---------- Startseite: Neues Buch ---------- */

.nw-hero > .nw-hero-text {
	flex: 999 1 480px;
	min-width: 0;
}

.nw-hero > .nw-hero-cover {
	flex: 1 1 280px;
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: 340px;
}

.nw-hero-title em {
	color: var(--wp--preset--color--navy-text);
	font-style: italic;
}

.nw-hero-pitch {
	max-width: 520px;
}

@media (max-width: 600px) {
	.nw-hero > .nw-hero-cover {
		max-width: 240px;
	}
}

.nw-hero-cover img {
	border-radius: 6px;
	box-shadow: 0 30px 60px -20px rgba(35, 50, 74, 0.5);
	display: block;
	height: auto;
	transform: rotate(2deg);
	width: 100%;
}

/* ---------- Startseite: Bücher-Wischreihe ---------- */

.nw-books-track {
	flex-wrap: nowrap !important;
	overflow-x: auto;
	padding-bottom: 4px;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.nw-books-track::-webkit-scrollbar {
	display: none;
}

.nw-books-track:focus-visible {
	outline: 2px solid var(--wp--preset--color--rust);
	outline-offset: 6px;
}

.nw-books-track > .nw-book {
	flex: 0 0 min(500px, 85%);
	scroll-snap-align: start;
}

.nw-book > .nw-book-cover {
	flex: 0 0 150px;
	margin: 0;
}

.nw-book-cover img {
	border-radius: 4px;
	box-shadow: 0 12px 24px -14px rgba(42, 27, 34, 0.45);
	display: block;
	height: auto;
	width: 150px;
}

.nw-book > .nw-book-text {
	flex: 1 1 200px;
	min-width: 0;
}

.nw-book .nw-kicker {
	font-size: 12px;
	letter-spacing: 0.12em;
}

/* Pfeil-Buttons (werden per Skript ergänzt) */
.nw-carousel-nav {
	display: flex;
	gap: 10px;
}

.nw-carousel-nav[hidden] {
	display: none;
}

.nw-carousel-btn {
	align-items: center;
	background: transparent;
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: 999px;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	display: inline-flex;
	height: 48px;
	justify-content: center;
	padding: 0;
	transition: background-color 0.2s, color 0.2s, opacity 0.2s;
	width: 48px;
}

.nw-carousel-btn.nw-carousel-next {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
}

.nw-carousel-btn:not(:disabled):hover {
	background: var(--wp--preset--color--rust);
	border-color: var(--wp--preset--color--rust);
	color: #fff;
}

.nw-carousel-btn:disabled {
	cursor: default;
	opacity: 0.35;
}

.nw-carousel-btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--rust);
	outline-offset: 2px;
}

/* Im Editor alle Bücher untereinander zeigen, damit man sie bearbeiten kann */
.editor-styles-wrapper .nw-books-track {
	flex-wrap: wrap !important;
	overflow: visible;
}

/* ---------- Startseite: Über mich ---------- */

.nw-about > .nw-portrait {
	flex: 1 1 320px;
	margin: 0;
	max-width: 420px;
}

.nw-portrait img {
	aspect-ratio: 4 / 5;
	border-radius: 200px 200px 8px 8px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.nw-about > .nw-about-text {
	flex: 999 1 420px;
	min-width: 0;
}

/* ---------- Blog-Karten ---------- */

.nw-post-card .wp-block-post-featured-image {
	margin: 0;
}

.nw-post-card .wp-block-post-featured-image img {
	border-radius: 8px;
}

.nw-post-meta {
	color: var(--wp--preset--color--navy-text);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.nw-post-meta a {
	color: inherit;
}

.nw-post-meta > * + *::before {
	content: "·";
	margin-right: 8px;
}

.nw-post-card .wp-block-post-title {
	margin: 0;
}

.nw-post-card .wp-block-post-excerpt__more-link,
.wp-block-post-excerpt__more-link {
	font-weight: 600;
	text-decoration: none;
}

.wp-block-post-excerpt__more-link:hover {
	text-decoration: underline;
}

.nw-single-image img {
	border-radius: 8px;
}

.wp-block-post-content {
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.75;
}

/* ---------- Newsletter ---------- */

.nw-newsletter h2 {
	margin: 0;
}

.nw-newsletter-note {
	opacity: 0.85;
}

/* ---------- Termine ---------- */

.nw-events {
	border-top: 1px solid var(--wp--preset--color--line);
}

.nw-event {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 24px 0;
}

.nw-event > .nw-event-date {
	min-width: 160px;
}

.nw-event > .nw-event-name {
	flex: 1 1 240px;
}

/* ---------- Fußbereich ---------- */

.nw-footer {
	color: var(--wp--preset--color--muted);
}

.nw-footer .nw-wordmark {
	color: var(--wp--preset--color--ink);
}

.nw-footer-nav a:hover {
	color: var(--wp--preset--color--rust);
	text-decoration: underline;
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
	html,
	.nw-books-track {
		scroll-behavior: auto;
	}

	.nw-carousel-btn {
		transition: none;
	}
}

/* ---------- Kommentare ---------- */

.nw-comments {
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: 64px !important;
	padding-top: 40px;
}

.nw-comments .wp-block-comment-template {
	list-style: none;
	margin: 24px 0;
	padding: 0;
}

.nw-comments .wp-block-comment-template ol {
	list-style: none;
	padding-left: 24px;
}

.nw-comment {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 20px 0;
}

.nw-comment .wp-block-comment-content p {
	margin: 0.25em 0;
}

.nw-comments .comment-form input:not([type="submit"]):not([type="checkbox"]),
.nw-comments .comment-form textarea {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px;
	font: inherit;
	padding: 10px 12px;
	width: 100%;
}

/* ---------- Social-Media-Symbole im Kopfbereich ---------- */

.nw-header-social .wp-social-link {
	transition: color 0.2s;
}

.nw-header-social .wp-social-link:hover,
.nw-header-social .wp-social-link:focus-within {
	color: var(--wp--preset--color--rust) !important;
	transform: none;
}

.nw-header-social .wp-block-social-link-anchor {
	padding: 4px;
}

/* ---------- Instagram-Feed (Plugin Smash Balloon) ---------- */
.nw-instagram-feed #sb_instagram .sbi_photo {
	border-radius: 8px;
	overflow: hidden;
}

/* ---------- Seite „Über mich“ ---------- */
.nw-about-intro > .nw-portrait {
	flex: 0 1 260px;
	margin: 0;
}

.nw-about-intro > .nw-about-intro-text {
	flex: 1 1 320px;
	min-width: 0;
}

@media (max-width: 600px) {
	.nw-about-intro > .nw-portrait {
		flex-basis: 220px;
		margin-inline: auto;
	}
}

/* ---------- Kopfbereich auf dem Handy: Name, Symbole und Menü in einer Zeile ---------- */
@media (max-width: 480px) {
	.wp-block-group.nw-header-right {
		gap: 14px;
	}

	.wp-block-social-links.nw-header-social {
		gap: 4px;
	}
}

@media (max-width: 400px) {
	header .nw-wordmark {
		font-size: 24px !important;
	}
}
