/*
Theme Name:  Maša Kores
Template:    kadence
Version:     1.1.13
Description: Dark editorial child theme for Maša Kores Photography.
Author:      Maša Kores
Text Domain: masakores
*/

:root {
	--mk-bg: #121010;
	--mk-bg-2: #1a1616;
	--mk-line: #2b2524;
	--mk-line-2: #3d3431;
	--mk-text: #e6ded3;
	--mk-strong: #f3ece2;
	--mk-muted: #9a8f86;
	--mk-accent: #8e2434;
	--mk-accent-2: #b5384a;
	--mk-serif: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
	--mk-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
	--mk-gap: 18px;
	color-scheme: dark;
}

/* ---------- Base ---------- */
body {
	background: var(--mk-bg);
	color: var(--mk-text);
	font-family: var(--mk-sans);
	-webkit-font-smoothing: antialiased;
}
/* Film grain: a fixed, almost invisible noise layer. */
body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: .055;
	mix-blend-mode: soft-light;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
h1, h2, h3, h4, h5, h6,
.entry-hero .entry-title {
	font-family: var(--mk-serif);
	font-weight: 400;
	color: var(--mk-strong);
	letter-spacing: .01em;
}
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
::selection { background: var(--mk-accent); color: #fff; }
:focus-visible { outline: 2px solid var(--mk-accent-2); outline-offset: 3px; }
.entry-content a:not(.button):not(.kb-button):not(.wp-block-button__link) {
	color: var(--mk-strong);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--mk-accent-2);
	text-underline-offset: .22em;
	transition: color .2s;
}
.entry-content a:not(.button):not(.kb-button):not(.wp-block-button__link):hover { color: var(--mk-accent-2); }
.entry-content p { max-width: 68ch; }
.entry-content .has-text-align-center { margin-left: auto; margin-right: auto; }

/* ---------- Header ---------- */
.site-header .site-main-header-inner-wrap { position: relative; }
.site-header .site-main-header-inner-wrap::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--mk-line-2) 18%, var(--mk-line-2) 82%, transparent);
}
.site-branding img { height: auto; }
.header-navigation .primary-menu-container > ul > li.menu-item > a {
	font-family: var(--mk-serif);
	font-size: 1.2rem;
	font-weight: 400;
	text-transform: none;
	letter-spacing: .02em;
	color: var(--mk-text);
	position: relative;
}
.header-navigation .primary-menu-container > ul > li.menu-item > a::after {
	content: "";
	position: absolute;
	left: 1em; right: 1em; bottom: .6em;
	height: 1px;
	background: var(--mk-accent-2);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s ease;
}
.header-navigation .primary-menu-container > ul > li.menu-item:hover > a::after,
.header-navigation .primary-menu-container > ul > li.current-menu-item > a::after,
.header-navigation .primary-menu-container > ul > li.current-menu-ancestor > a::after { transform: scaleX(1); }
.header-navigation .primary-menu-container > ul > li.menu-item:hover > a,
.header-navigation .primary-menu-container > ul > li.current-menu-item > a { color: var(--mk-strong); }
.header-navigation ul ul.sub-menu {
	background: var(--mk-bg-2);
	border: 1px solid var(--mk-line);
	box-shadow: 0 24px 50px rgba(0, 0, 0, .55);
}
.header-navigation .header-menu-container ul ul.sub-menu { min-width: 240px; }
/* selector matches Kadence's inline dropdown rule (12px) so ours wins */
.header-navigation .header-menu-container ul ul li.menu-item > a {
	font-family: var(--mk-serif);
	font-size: 1.1rem;
	letter-spacing: .02em;
	line-height: 1.3;
	color: var(--mk-text);
	border-bottom: 1px solid var(--mk-line);
	padding: .75em 1.3em;
	width: 100%;
	white-space: nowrap;
}
.header-navigation .header-menu-container ul ul li.menu-item:last-child > a { border-bottom: 0; }
.header-navigation .header-menu-container ul ul li.menu-item > a:hover,
.header-navigation .header-menu-container ul ul li.menu-item.current-menu-item > a { color: var(--mk-strong); background: var(--mk-bg); }
.mobile-navigation ul li a { font-family: var(--mk-serif); font-size: 1.3rem; }
.popup-drawer .drawer-inner { background: var(--mk-bg); }

/* ---------- Page hero (title over featured image) ---------- */
.entry-hero.page-hero-section .entry-hero-container-inner {
	background-color: var(--mk-bg-2);
	background-size: cover;
	background-position: center 35%;
}
.entry-hero.page-hero-section .hero-section-overlay {
	background: linear-gradient(to top, rgba(18, 16, 16, .92) 0%, rgba(18, 16, 16, .35) 55%, rgba(18, 16, 16, .55) 100%);
	opacity: 1;
}
.entry-hero.page-hero-section .entry-title {
	font-size: clamp(2.2rem, 5.2vw, 4.4rem);
	line-height: 1.05;
	letter-spacing: .02em;
	color: #fff;
	text-shadow: 0 2px 30px rgba(0, 0, 0, .6);
	margin: 0;
}
.entry-hero.page-hero-section .entry-title::after {
	content: "";
	display: block;
	width: 56px;
	height: 1px;
	margin: 1.1rem auto 0;
	background: var(--mk-accent-2);
}
.entry-hero.page-hero-section .entry-header { padding-bottom: clamp(1.5rem, 4vw, 3rem); }
/* Melt the banner into the page. */
.entry-hero.page-hero-section .entry-hero-container-inner::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 40%;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(18, 16, 16, 0), var(--mk-bg));
}
.entry-hero.page-hero-section .entry-hero-container-inner { position: relative; }
.entry-hero.page-hero-section .hero-container { position: relative; z-index: 1; }

/* ---------- Sections ---------- */
.mk-section { padding: clamp(3rem, 7vw, 6rem) 0; }
.mk-section + .mk-section { padding-top: 0; }
.mk-section--cta {
	border-top: 1px solid var(--mk-line);
	padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem) !important;
	margin-top: clamp(1rem, 3vw, 2rem);
}
.mk-heading {
	font-size: clamp(2rem, 4vw, 3.2rem);
	letter-spacing: .03em;
	margin: 0;
}
.mk-heading + .mk-rule { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.mk-statement {
	font-family: var(--mk-serif);
	font-size: clamp(1.55rem, 3.2vw, 2.7rem);
	font-weight: 400;
	line-height: 1.25;
	color: var(--mk-strong);
	max-width: 26ch !important;
	margin: 0 auto;
}
.mk-kicker {
	font-family: var(--mk-serif);
	font-style: italic;
	color: var(--mk-muted);
	font-size: 1.2rem;
	margin: 0 auto 1rem;
}
.mk-cta {
	font-family: var(--mk-serif);
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	line-height: 1.3;
	color: var(--mk-strong);
	margin: 0 auto;
}
.mk-rule {
	width: 72px;
	height: 1px;
	background: var(--mk-accent-2);
	margin: 1.5rem auto;
	border: 0;
}

/* ---------- Hero slideshow ---------- */
.mk-hero { margin-top: 0 !important; }
.mk-slideshow.wp-block-gallery.has-nested-images {
	display: block;
	position: relative;
	height: min(86vh, 940px);
	min-height: 440px;
	margin: 0;
	background: #000;
	overflow: hidden;
	outline-offset: -3px;
}
.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100%;
	margin: 0 !important;
	max-width: none;
	display: none; /* hidden slides are not fetched until needed */
	opacity: 0;
	transition: opacity 1.6s ease;
	z-index: 0;
}
.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image.is-next { display: flex; }
.mk-slideshow.wp-block-gallery.has-nested-images:not(.mk-slideshow--ready) figure.wp-block-image:first-child,
.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image.is-active { display: flex; opacity: 1; z-index: 1; }
.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
}
.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(to top, rgba(18, 16, 16, .82) 0%, rgba(18, 16, 16, 0) 48%),
		radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .5) 100%);
}
.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	position: absolute;
	left: clamp(1.25rem, 6vw, 5rem);
	right: clamp(1.25rem, 6vw, 5rem);
	bottom: clamp(2rem, 7vh, 4.5rem);
	z-index: 2;
	max-width: 24ch;
	max-height: none; /* WordPress makes gallery captions scrollable; here that showed a stray scrollbar */
	overflow: visible;
	margin: 0;
	padding: 0;
	background: none;
	text-align: left;
	font-family: var(--mk-serif);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(1.35rem, 3vw, 2.5rem);
	line-height: 1.15;
	color: var(--mk-strong);
	text-shadow: 0 2px 28px rgba(0, 0, 0, .75);
}
.mk-ss-bar {
	position: absolute;
	left: 0; bottom: 0;
	height: 2px;
	width: 0;
	background: var(--mk-accent-2);
	z-index: 3;
}
.mk-ss-btn {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 46px; height: 46px;
	margin-top: -23px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(243, 236, 226, .45);
	background: rgba(18, 16, 16, .3);
	color: var(--mk-strong);
	cursor: pointer;
	opacity: .55;
	transition: border-color .2s, background .2s, opacity .2s;
	box-shadow: none;
}
.mk-slideshow:hover .mk-ss-btn,
.mk-ss-btn:focus-visible { opacity: 1; }
.mk-ss-btn:hover { border-color: var(--mk-strong); background: rgba(18, 16, 16, .6); }
.mk-ss-btn::before {
	content: "";
	display: block;
	width: 10px; height: 10px;
	margin: auto;
	border-left: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: translateX(2px) rotate(45deg);
}
.mk-ss-prev { left: clamp(.75rem, 2.5vw, 2rem); }
.mk-ss-next { right: clamp(.75rem, 2.5vw, 2rem); }
.mk-ss-next::before { transform: translateX(-2px) rotate(-135deg); }
@media (max-width: 719px) {
	.mk-slideshow.wp-block-gallery.has-nested-images { height: 72vh; min-height: 380px; }
	.mk-ss-btn { top: auto; bottom: 1rem; margin-top: 0; width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.mk-slideshow figure.wp-block-image { transition: none; }
	.mk-ss-bar { display: none; }
}

/* ---------- Gallery doors (home + gallery index) ---------- */
.mk-door.wp-block-columns { gap: clamp(1.5rem, 4vw, 4rem); margin-bottom: 0; padding: clamp(2rem, 4vw, 3.5rem) 0; }
.mk-door.wp-block-columns + .mk-door.wp-block-columns { border-top: 1px solid var(--mk-line); }
/* The photo sits in a thin mat, like a framed print. */
.mk-door .wp-block-image {
	margin: 0;
	padding: 10px;
	border: 1px solid var(--mk-line);
	background: var(--mk-bg-2);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.mk-door .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	transition: filter .4s ease;
}
.mk-door .wp-block-image a { display: block; }
.mk-door .wp-block-image:hover img { filter: brightness(1.08); }
.mk-door h2 { margin: 0 0 .5rem; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.1; }
.mk-door h2 a { text-decoration: none !important; color: var(--mk-strong) !important; }
.mk-door h2 a:hover { color: var(--mk-accent-2) !important; }
.mk-door p { color: var(--mk-muted); font-size: 1.08rem; max-width: 42ch; }
.mk-door .mk-count { font-family: var(--mk-serif); color: var(--mk-muted); font-style: italic; margin-bottom: .5rem; }
.mk-door .mk-link { margin-top: 1.25rem; }
.mk-door .mk-link a {
	font-family: var(--mk-serif);
	font-size: 1.15rem;
	text-decoration: none !important;
	border-bottom: 1px solid var(--mk-accent-2);
	padding-bottom: .15em;
}
@media (min-width: 782px) {
	.mk-door--flip.wp-block-columns { flex-direction: row-reverse; }
	.mk-door .wp-block-column:last-child { padding-right: clamp(0rem, 3vw, 2rem); }
}

/* ---------- Masonry galleries ---------- */
.mk-masonry.wp-block-gallery.has-nested-images {
	display: block;
	columns: 3;
	column-gap: var(--mk-gap);
}
.mk-masonry.wp-block-gallery.has-nested-images figure.wp-block-image {
	width: 100% !important;
	margin: 0 0 var(--mk-gap) !important;
	display: block;
	break-inside: avoid;
	background: var(--mk-bg-2);
}
.mk-masonry.wp-block-gallery.has-nested-images figure.wp-block-image a { display: block; }
.mk-masonry.wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: auto !important;
	display: block;
	aspect-ratio: auto;
	transition: opacity .3s;
}
.mk-masonry.wp-block-gallery.has-nested-images figure.wp-block-image:hover img { opacity: .85; }
.mk-masonry.wp-block-gallery.has-nested-images figure.wp-block-image figcaption { display: none; }
@media (max-width: 1024px) { .mk-masonry.wp-block-gallery.has-nested-images { columns: 2; } }
/* Phones keep two photos per row (a 44-photo gallery is half as long); only the gap gets tighter. */
@media (max-width: 540px)  { .mk-masonry.wp-block-gallery.has-nested-images { columns: 2; --mk-gap: 8px; column-gap: 8px; } }
.mk-gallery-intro {
	font-family: var(--mk-serif);
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	color: var(--mk-muted);
	font-style: italic;
	max-width: 46ch !important;
	margin: 0 auto 2.5rem;
}

/* ---------- Lightbox (Kadence / simplelightbox) ---------- */
.sl-overlay { background: #0b0909 !important; opacity: .97 !important; }
.sl-wrapper .sl-close, .sl-wrapper .sl-navigation button, .sl-wrapper .sl-counter { color: var(--mk-text) !important; font-family: var(--mk-serif); }
.sl-wrapper .sl-navigation button { font-size: 3rem !important; }
.sl-wrapper .sl-counter { font-size: 1rem !important; color: var(--mk-muted) !important; }
.sl-wrapper .sl-image img { box-shadow: 0 40px 90px rgba(0, 0, 0, .7); }
.sl-wrapper .sl-caption {
	background: transparent !important;
	font-family: var(--mk-serif);
	font-style: italic;
	font-size: 1.15rem !important;
	color: var(--mk-strong) !important;
	text-shadow: 0 1px 12px rgba(0, 0, 0, .8);
}

/* ---------- About ---------- */
.mk-about.wp-block-columns { gap: clamp(2rem, 5vw, 5rem); align-items: flex-start; }
.mk-about .mk-about__media { position: sticky; top: 6rem; }
.mk-about .mk-about__media img { width: 100%; height: auto; display: block; }
.mk-about .mk-about__media figcaption {
	font-family: var(--mk-serif);
	font-style: italic;
	color: var(--mk-muted);
	text-align: left;
	margin-top: .75rem;
}
.mk-about p { font-size: 1.12rem; line-height: 1.7; }
.mk-about p:first-of-type {
	font-family: var(--mk-serif);
	font-size: clamp(1.4rem, 2.4vw, 1.9rem);
	line-height: 1.3;
	color: var(--mk-strong);
}
.mk-about strong { color: var(--mk-strong); font-weight: 600; }
.mk-facts { margin: 2.5rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--mk-line); }
.mk-facts li { padding: 1rem 0; border-bottom: 1px solid var(--mk-line); font-size: 1.05rem; line-height: 1.6; }
.mk-facts li strong { display: block; font-family: var(--mk-serif); font-weight: 400; font-style: italic; font-size: 1.15rem; color: var(--mk-muted); margin-bottom: .2rem; }

/* ---------- Achievements ---------- */
.mk-list ul { list-style: none; margin: 0 0 3rem; padding: 0; border-top: 1px solid var(--mk-line); }
.mk-list li {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	padding: .95rem 0;
	border-bottom: 1px solid var(--mk-line);
	font-size: 1.05rem;
	line-height: 1.5;
}
.mk-list li .mk-year {
	flex: none;
	min-width: 9ch;
	text-align: right;
	font-family: var(--mk-serif);
	font-variant-numeric: lining-nums;
	color: var(--mk-muted);
}
.mk-list li em { font-style: italic; color: var(--mk-strong); }
.mk-list h2 { margin: 0 0 1rem; }
@media (max-width: 540px) {
	.mk-list li { flex-direction: column; gap: .2rem; }
	.mk-list li .mk-year { text-align: left; }
}

/* ---------- Contact ---------- */
.mk-contact.wp-block-columns { gap: clamp(2rem, 5vw, 5rem); align-items: flex-start; }
.mk-contact .wp-block-image img { width: 100%; height: auto; display: block; }
.mk-contact .wp-block-column:first-child p:first-child {
	font-family: var(--mk-serif);
	font-size: clamp(1.3rem, 2.2vw, 1.7rem);
	line-height: 1.3;
	color: var(--mk-strong);
}
.mk-contact .wp-block-column:first-child p { color: var(--mk-muted); }
.kb-advanced-form .kb-adv-form-field label,
.kb-advanced-form .kb-adv-form-label {
	font-family: var(--mk-serif);
	font-style: italic;
	font-size: 1.1rem;
	font-weight: 400;
	color: var(--mk-muted);
	margin-bottom: .35rem;
}
.kb-advanced-form .kb-adv-form-field .kb-adv-form-required { color: var(--mk-accent-2); }
.kb-advanced-form .kb-adv-form-field input:not([type="submit"]),
.kb-advanced-form .kb-adv-form-field textarea,
.kb-advanced-form .kb-adv-form-field select {
	background: var(--mk-bg-2);
	border: 1px solid var(--mk-line-2);
	border-radius: 0;
	color: var(--mk-text);
	font-family: var(--mk-sans);
	font-size: 1.05rem;
	padding: .9rem 1rem;
	box-shadow: none;
	transition: border-color .2s;
}
.kb-advanced-form .kb-adv-form-field textarea { min-height: 200px; }
.kb-advanced-form .kb-adv-form-field { margin-bottom: 1.4rem; }
.kb-advanced-form .kb-adv-form-field input:focus,
.kb-advanced-form .kb-adv-form-field textarea:focus { border-color: var(--mk-accent-2); outline: 0; box-shadow: none; }
.kb-advanced-form .kb-adv-form-submit-button,
.kb-advanced-form button[type="submit"] {
	font-family: var(--mk-serif);
	font-size: 1.15rem;
	background: transparent;
	color: var(--mk-strong);
	border: 1px solid var(--mk-accent-2);
	border-radius: 0;
	padding: .85rem 2.2rem;
	box-shadow: none;
	transition: background .2s;
}
.kb-advanced-form .kb-adv-form-submit-button:hover,
.kb-advanced-form button[type="submit"]:hover { background: var(--mk-accent); color: #fff; }
.kb-adv-form-message { border-radius: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--mk-line); margin-top: clamp(2rem, 5vw, 4rem); }
.site-footer .site-footer-row-container-inner { background: transparent; }
.site-middle-footer-inner-wrap { padding-top: clamp(2.5rem, 5vw, 4rem) !important; padding-bottom: 1.5rem !important; }
.site-bottom-footer-inner-wrap { padding-top: 1.5rem !important; padding-bottom: clamp(2rem, 4vw, 3rem) !important; }
.footer-social-wrap .social-button {
	width: 44px;
	height: 44px;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-color: var(--mk-line-2) !important;
	color: var(--mk-muted) !important;
	border-radius: 50% !important;
	transition: color .2s, border-color .2s;
}
.footer-social-wrap .social-button svg { width: 18px; height: 18px; }
.footer-social-wrap .social-button:hover { color: var(--mk-strong) !important; border-color: var(--mk-strong) !important; }
.footer-html { font-size: .92rem; color: var(--mk-muted); }
.footer-navigation ul li a { font-family: var(--mk-serif); font-size: 1.05rem; color: var(--mk-muted); }
.footer-navigation ul li a:hover { color: var(--mk-strong); }
#kt-scroll-up, #kt-scroll-up-reader { display: none !important; }

/* ---------- Column alignment overrides (top-aligned editorial pages) ---------- */
.mk-about.wp-block-columns .wp-block-column,
.mk-contact.wp-block-columns .wp-block-column { align-self: flex-start !important; }

/* Contact: portrait beside the form */
.mk-contact .mk-contact__media .wp-block-image { margin: 0 0 1.5rem; }
.mk-contact .mk-contact__media .wp-block-image img { width: 100%; height: auto; display: block; }
.mk-contact .mk-contact__media .wp-block-image figcaption {
	font-family: var(--mk-serif);
	font-style: italic;
	color: var(--mk-muted);
	text-align: left;
	margin-top: .6rem;
}
@media (min-width: 782px) { .mk-contact .mk-contact__media { position: sticky; top: 6rem; } }
.mk-contact .mk-contact__media .wp-block-image + p {
	font-family: var(--mk-serif);
	font-size: clamp(1.25rem, 2vw, 1.55rem);
	line-height: 1.3;
	color: var(--mk-strong);
}

/* ==========================================================================
   Additions 1.1.0
   ========================================================================== */

/* Film grain is decoration; skip it on touch devices and small screens where it costs scrolling smoothness. */
@media (hover: none), (max-width: 782px) { body::after { display: none; } }

/* ---------- Slideshow: pause / play ---------- */
.mk-ss-pause { top: auto; bottom: clamp(1.5rem, 6vh, 4rem); right: clamp(.75rem, 2.5vw, 2rem); margin-top: 0; }
.mk-ss-pause::before {
	width: 10px; height: 12px; border: 0; transform: none;
	border-left: 3px solid currentColor; border-right: 3px solid currentColor;
	box-sizing: border-box;
}
.mk-ss-pause.is-paused::before {
	width: 0; height: 0; transform: translateX(2px);
	border: 7px solid transparent; border-left: 11px solid currentColor; border-right: 0;
}
.mk-ss-next::before { transform: translateX(-2px) rotate(-135deg); }
@media (max-width: 719px) {
	.mk-ss-pause { bottom: 1rem; right: 50%; transform: translateX(50%); }
}

/* ---------- Gallery grid in reading order (set up by slideshow.js; CSS columns remain the no-JS fallback) ---------- */
.mk-masonry.mk-masonry--js.wp-block-gallery.has-nested-images {
	display: flex;
	align-items: flex-start;
	gap: var(--mk-gap);
	columns: auto;
}
.mk-masonry--js .mk-col { flex: 1 1 0; min-width: 0; }

/* ---------- End of a gallery: where to go next ---------- */
.mk-gallery-nav {
	display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; flex-wrap: wrap;
	margin: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem); padding-top: 1.75rem; /* same width as the text column, so it never touches the screen edge */
	border-top: 1px solid var(--mk-line);
	font-family: var(--mk-serif);
}
.entry-content .mk-gallery-nav a { text-decoration: none !important; }
.mk-gallery-nav .mk-gallery-nav__all { color: var(--mk-muted) !important; font-size: 1.1rem; }
.mk-gallery-nav .mk-gallery-nav__all:hover { color: var(--mk-strong) !important; }
.mk-gallery-nav .mk-gallery-nav__next { text-align: right; margin-left: auto; }
.mk-gallery-nav .mk-gallery-nav__next span { display: block; color: var(--mk-muted); font-style: italic; font-size: 1.05rem; }
.mk-gallery-nav .mk-gallery-nav__next strong {
	font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; color: var(--mk-strong);
	border-bottom: 1px solid var(--mk-accent-2); padding-bottom: .1em; transition: color .2s;
}
.mk-gallery-nav .mk-gallery-nav__next:hover strong { color: var(--mk-accent-2); }

/* ---------- Full-screen view (the script Kadence ships uses "slb" class names) ---------- */
.slbOverlay { background-color: #0b0909 !important; opacity: .97 !important; }
.slbImage { box-shadow: 0 40px 90px rgba(0, 0, 0, .7); }
.slbCaption {
	font-family: var(--mk-serif); font-style: italic; font-size: 1.15rem;
	color: var(--mk-strong); text-shadow: 0 1px 12px rgba(0, 0, 0, .8);
}
.slbCloseBtn, .slbArrow { color: var(--mk-text); }
.mk-lb-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
	display: flex; justify-content: space-between; align-items: center; gap: 1rem;
	padding: .9rem clamp(1rem, 4vw, 2.5rem);
	font-family: var(--mk-serif);
	background: linear-gradient(to top, rgba(11, 9, 9, .9), rgba(11, 9, 9, 0));
}
.mk-lb-count { color: var(--mk-muted); font-size: 1rem; font-variant-numeric: lining-nums; }
.mk-lb-ask {
	color: var(--mk-strong); font-size: 1.1rem; text-decoration: none;
	border-bottom: 1px solid var(--mk-accent-2); padding-bottom: .12em;
}
.mk-lb-ask:hover, .mk-lb-ask:focus-visible { color: var(--mk-accent-2); }

/* ---------- Slideshow: position indicator ---------- */
/* One short line per slide along the bottom edge; the current one is longer and bright. */
.mk-ss-dots {
	position: absolute; z-index: 3; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
	display: flex; align-items: center; justify-content: center; gap: 6px;
	width: min(60%, 520px);
}
.mk-ss-dot {
	flex: 1 1 0; max-width: 26px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer;
	position: relative; box-shadow: none; border-radius: 0;
}
.mk-ss-dot::before {
	content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px;
	background: rgba(243, 236, 226, .38); transition: background .25s, height .25s, top .25s;
}
.mk-ss-dot:hover::before { background: rgba(243, 236, 226, .8); }
.mk-ss-dot.is-current::before { top: 7px; height: 4px; background: var(--mk-accent-2); }
.mk-ss-dot:focus-visible { outline: 2px solid var(--mk-strong); outline-offset: 1px; }
/* "3 / 17" beside the pause button */
.mk-ss-count {
	position: absolute; z-index: 3;
	right: calc(clamp(.75rem, 2.5vw, 2rem) + 46px + .9rem);
	bottom: clamp(1.5rem, 6vh, 4rem); height: 46px; line-height: 46px;
	font-family: var(--mk-serif); font-size: 1.15rem; font-variant-numeric: lining-nums tabular-nums;
	color: var(--mk-strong); text-shadow: 0 1px 14px rgba(0, 0, 0, .8);
}
@media (max-width: 719px) {
	/* On phones the arrows and pause already sit along the bottom, so the lines move just above them. */
	.mk-ss-dots { bottom: 4.1rem; width: 82%; gap: 4px; }
	.mk-ss-count { right: auto; left: 50%; bottom: 5.2rem; height: auto; line-height: 1.2; transform: translateX(-50%); font-size: 1rem; }
	.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image figcaption { bottom: 7.4rem; }
}

/* ---------- Slideshow: keep it from ever moving the page ---------- */
/* Each slide is a sealed box, so nothing inside it (photo, caption) can change the layout around it. */
.mk-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image { contain: layout paint; backface-visibility: hidden; }
.mk-ss-count { min-width: 4.2em; text-align: right; }

/* Slideshow controls: the theme's general button styles colour a clicked button red; keep these plain. */
.mk-slideshow .mk-ss-dot,
.mk-slideshow .mk-ss-dot:hover,
.mk-slideshow .mk-ss-dot:focus,
.mk-slideshow .mk-ss-dot:active {
	background: none !important; border: 0 !important; box-shadow: none !important; outline: 0; color: inherit;
}
.mk-slideshow .mk-ss-dot:focus-visible { outline: 1px solid rgba(243, 236, 226, .7); outline-offset: 2px; }
.mk-slideshow .mk-ss-btn:focus,
.mk-slideshow .mk-ss-btn:active { background: rgba(18, 16, 16, .6); color: var(--mk-strong); box-shadow: none; outline: 0; }
.mk-slideshow .mk-ss-btn:focus-visible { outline: 2px solid var(--mk-strong); outline-offset: 2px; }

/* ---------- Phone menu button: bigger icon and a finger-sized tap area (48px) ---------- */
body .mobile-toggle-open-container .menu-toggle-open,
body .mobile-toggle-open-container .menu-toggle-open:focus {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 48px; min-height: 48px; padding: 8px;
	color: var(--mk-strong);
}
body .mobile-toggle-open-container .menu-toggle-open .menu-toggle-icon { font-size: 30px; line-height: 1; display: inline-flex; }
body .mobile-toggle-open-container .menu-toggle-open:hover,
body .mobile-toggle-open-container .menu-toggle-open:focus-visible { color: var(--mk-accent-2); }
/* the close (×) button inside the open menu */
body .popup-drawer .drawer-header .drawer-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 48px; min-height: 48px; padding: 8px; font-size: 30px; color: var(--mk-strong);
}

/* ---------- Phone header: slightly larger logo with a finger-sized tap area ---------- */
body #mobile-header .site-branding a.brand {
	display: inline-flex; align-items: center;
	min-height: 48px; padding: 4px 12px 4px 0; /* the link home is as tall as the menu button */
}
body #mobile-header .site-branding a.brand img { width: 160px; max-width: 160px; height: auto; }
@media (max-width: 359px) {
	body #mobile-header .site-branding a.brand img { width: 136px; max-width: 136px; } /* very narrow phones */
}

/* ---------- Shorter title banner on text pages (About, Achievements, Contact, Gallery list) ---------- */
/* Gallery pages keep the tall banner: there the cover photo is part of the experience. */
body.page:not(.mkc-gallery-page) .entry-hero.page-hero-section .entry-header { min-height: 240px; padding-bottom: 1.25rem; }
body.page:not(.mkc-gallery-page) .entry-hero.page-hero-section .entry-title { font-size: clamp(2rem, 4.2vw, 3.4rem); }
@media (max-width: 1024px) {
	body.page:not(.mkc-gallery-page) .entry-hero.page-hero-section .entry-header { min-height: 200px; }
}
@media (max-width: 767px) {
	body.page:not(.mkc-gallery-page) .entry-hero.page-hero-section .entry-header { min-height: 150px; padding-bottom: 1rem; }
}
