/* ==========================================================================
   Olga Szynkarczuk theme
   1. Tokens          4. Content (pages)        7. Lightbox
   2. Base            5. Posts and lists        8. Utilities
   3. Header (Dawn)   6. Galleries, media
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
	/* Header, identical to the Shopify shop (Dawn) */
	--os-shop-text: #242833;
	--os-shop-text-75: rgba(36, 40, 51, 0.75);
	--os-shop-font: 'Assistant', sans-serif;
	--os-page-width: 1400px;          /* Dawn page_width; 1300px inside the 50px padding */

	/* Content, as on the former Elementor/Yuma pages */
	--os-font: 'Roboto', sans-serif;
	--os-text: #444444;
	--os-ink: #000000;
	--os-link: #0a0e14;
	--os-muted: #7d7d7d;
	--os-container: 1200px;           /* Elementor boxed container */
	--os-col-pad: 10px;               /* Elementor column padding */
	--os-gap: 20px;                   /* Elementor space between widgets */
	--os-admin-bar: 0px;
}
.admin-bar { --os-admin-bar: 32px; }
@media screen and (max-width: 782px) { .admin-bar { --os-admin-bar: 46px; } }

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #fff;
	color: var(--os-text);
	font-family: var(--os-font);
	font-size: 17px;
	font-weight: 300;
	line-height: 24px;           /* fixed 24px, as Yuma set it (big text keeps 24px lines unless set) */
	letter-spacing: 1px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, video, svg { max-width: 100%; height: auto; }
img { vertical-align: middle; border: 0; }
a { color: var(--os-link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
b, strong { font-weight: 700; }
h1, h2, h3, h4, h5, h6 { font-family: var(--os-font); color: var(--os-link); margin: 0.6em 0 0.4em; letter-spacing: 1px; }
h1 { font-size: 52px; font-weight: 500; line-height: 1.2; }
h2 { font-size: 30px; font-weight: 500; line-height: 1.6; }
h3 { font-size: 1.3em; font-weight: 600; line-height: 1.7; }
h4 { font-size: 33px; font-weight: 400; line-height: 1.3; }
h5 { font-size: 20px; font-weight: 500; line-height: 1.4; }
h6 { font-size: 17px; font-weight: 500; line-height: 1.4; }
@media (max-width: 767px) {
	h1 { line-height: 1.3; }
	h4 { line-height: 1.2; }
}
p { margin: 0.8em 0; }
ul, ol { margin: 0.8em 0; padding-left: 1.5em; }
blockquote { margin: 1.2em 0; padding-left: 1.2em; border-left: 2px solid currentColor; }
hr { border: 0; border-top: 1px solid rgba(0, 0, 0, 0.15); margin: 2em 0; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { border: 1px solid rgba(0, 0, 0, 0.15); padding: 0.5em 0.75em; text-align: left; vertical-align: top; }

.visually-hidden,
.screen-reader-text {
	position: absolute !important;
	width: 1px !important; height: 1px !important;
	margin: -1px !important; padding: 0 !important;
	overflow: hidden !important; clip: rect(0 0 0 0) !important;
	white-space: nowrap !important; border: 0 !important;
}
.skip-to-content-link:focus {
	z-index: 9999; position: fixed !important; top: 10px; left: 10px;
	width: auto !important; height: auto !important; clip: auto !important;
	padding: 10px 16px !important; background: #fff; color: var(--os-shop-text);
	font-family: var(--os-shop-font); outline: 2px solid var(--os-shop-text);
}
:focus-visible { outline: 2px solid rgba(36, 40, 51, 0.5); outline-offset: 3px; }

/* 3. Header (copy of the Dawn header on shop.olgaszynkarczuk.com) ----------- */
.section-header {
	position: sticky;
	top: var(--os-admin-bar);
	z-index: 100;
	background: #fff;
}
.header-wrapper { position: relative; background: #fff; }
.page-width {
	max-width: var(--os-page-width);
	margin: 0 auto;
	padding: 0 15px;
}
@media (min-width: 750px) { .page-width { padding: 0 50px; } }

.header {
	display: grid;
	grid-template-areas: 'left-icons heading icons';
	grid-template-columns: 1fr 2fr 1fr;
	align-items: center;
	padding: 10px 30px;
	min-height: 64px;
	font-family: var(--os-shop-font);
	font-size: 15px;
	letter-spacing: 0.6px;
	color: var(--os-shop-text-75);
}
@media (min-width: 750px) { .header { padding: 10px 50px; } }
@media (min-width: 990px) {
	.header {
		grid-template-areas: 'heading navigation';
		grid-template-columns: auto 1fr;
		padding: 20px 50px;
		min-height: 84px;
	}
}

.header__heading-link { grid-area: heading; justify-self: center; display: block; min-width: 1px; min-height: 1px; }
@media (min-width: 990px) { .header__heading-link { justify-self: start; } }

.header__inline-menu { display: none; grid-area: navigation; justify-self: end; margin-right: -12px; }
@media (min-width: 990px) { .header__inline-menu { display: block; } }

.list-menu { list-style: none; padding: 0; margin: 0; }
.list-menu--inline { display: inline-flex; flex-wrap: wrap; }
.os-menu__item { position: relative; }

.header__menu-item {
	display: flex;
	align-items: center;
	padding: 12px;
	font-family: var(--os-shop-font);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--os-shop-text-75);
	text-decoration: none;
	cursor: pointer;
}
.header__menu-item:hover, .header__menu-item:focus-visible { color: var(--os-shop-text); text-decoration: none; }
.header__menu-item span { transition: text-decoration 0.1s ease; }
.header__menu-item:hover span { text-decoration: underline; text-underline-offset: 3px; }
.header__active-menu-item {
	color: var(--os-shop-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.header__menu-item[aria-current] { color: var(--os-shop-text); }
.header__menu-item:hover .header__active-menu-item { text-decoration-thickness: 2px; }

/* Menu item that takes the place of the shop's icon set (search, account, cart).
   Add the CSS class "os-shop-icons-width" to the item in Appearance → Menus.
   Measured on shop.olgaszynkarczuk.com: icons 128px wide, 20px after the last menu item,
   ending at the right edge of the 1300px content. */
@media (min-width: 990px) {
	.header__inline-menu .os-shop-icons-width {
		flex: 0 0 128px;
		width: 128px;
		margin-left: 20px;
		margin-right: 12px; /* the menu is pulled 12px right; this puts the box's edge on the content edge */
	}
	.header__inline-menu .os-shop-icons-width > .header__menu-item { justify-content: center; }
}

/* dropdowns (used by the CSM menu) */
.os-submenu {
	list-style: none; margin: 0; padding: 8px 0;
	position: absolute; top: 100%; right: 0; min-width: 220px;
	background: #fff; border: 1px solid rgba(36, 40, 51, 0.1);
	opacity: 0; visibility: hidden; transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 10;
}
.os-menu__item--parent:hover > .os-submenu,
.os-menu__item--parent:focus-within > .os-submenu { opacity: 1; visibility: visible; transform: none; }
.header__menu-item--sub { padding: 8px 20px; text-transform: none; font-size: 14px; }

/* CSM BLOG second row */
.os-subnav { display: none; border-top: 1px solid rgba(36, 40, 51, 0.08); }
@media (min-width: 990px) { .os-subnav { display: block; } }
.os-subnav__inner { display: flex; justify-content: flex-end; }
.os-subnav__list { margin-right: -12px; }
.os-subnav .header__menu-item { font-size: 13px; padding: 8px 12px; }
.os-subnav .header__menu-item--sub { font-size: 13px; padding: 8px 20px; }

/* hamburger */
.header__icon--menu {
	grid-area: left-icons;
	justify-self: start;
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; margin-left: -12px;
	padding: 0; border: 0; background: none; cursor: pointer;
	color: var(--os-shop-text);
	position: relative;
}
.header__icon--menu .icon { width: 20px; height: 20px; }
.header__icon--menu .icon-close { display: none; }
.header__icon--menu[aria-expanded='true'] .icon-hamburger { display: none; }
.header__icon--menu[aria-expanded='true'] .icon-close { display: block; }
@media (min-width: 990px) { .header__icon--menu { display: none; } }

/* drawer */
.menu-drawer {
	position: absolute;
	top: 100%; left: 0;
	width: 100vw;
	height: calc(100vh - 100% - var(--os-admin-bar));
	height: calc(100dvh - var(--os-header-bottom, 64px) - var(--os-admin-bar));
	overflow-y: auto;
	background: #fff;
	border-top: 1px solid rgba(36, 40, 51, 0.08);
	z-index: 99;
	font-family: var(--os-shop-font);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform 0.2s ease, visibility 0.2s;
}
@media (min-width: 750px) {
	.menu-drawer { width: 400px; border-right: 1px solid rgba(36, 40, 51, 0.08); }
}
.menu-drawer.is-open { transform: none; visibility: visible; }
.menu-drawer[hidden] { display: block; }
.os-drawer-overlay {
	position: fixed; inset: 0; z-index: 90;
	background: rgba(36, 40, 51, 0.5);
	opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s;
}
.os-drawer-overlay.is-visible { opacity: 1; visibility: visible; }
body.os-drawer-open { overflow: hidden; }
@media (min-width: 990px) { .menu-drawer, .os-drawer-overlay { display: none !important; } }

.menu-drawer__navigation { padding: 30px 0; }
.menu-drawer__menu { list-style: none; margin: 0; padding: 0; }
.menu-drawer__submenu { list-style: none; margin: 0; padding: 0 0 0 16px; }
.menu-drawer__menu-item {
	display: block;
	padding: 11px 30px;
	font-family: var(--os-shop-font);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.6px;
	color: var(--os-shop-text);
	text-decoration: none;
}
.menu-drawer__menu-item:hover, .menu-drawer__menu-item--active { background: rgba(36, 40, 51, 0.04); color: var(--os-shop-text); text-decoration: none; }
.menu-drawer__menu-item--sub { font-size: 16px; padding-top: 8px; padding-bottom: 8px; }
.menu-drawer__menu-item--label { color: var(--os-shop-text-75); }
.menu-drawer__group-title {
	margin: 24px 30px 8px; padding-top: 24px;
	border-top: 1px solid rgba(36, 40, 51, 0.08);
	font-size: 13px; letter-spacing: 1.3px; color: var(--os-shop-text-75);
}

/* 4. Content (pages) -------------------------------------------------------- */
.site-main {
	display: block;
	outline: 0;
	/* galleries pull their outer gap past the column edge (as Elementor did); never let that scroll sideways */
	overflow-x: hidden;
	overflow-x: clip;
}
.os-container {
	max-width: var(--os-container);
	margin: 0 auto;
	padding: var(--os-col-pad);
}
@media (max-width: 1024px) { .os-container { max-width: 1024px; } }
@media (max-width: 767px) { .os-container { max-width: 767px; } }

.os-page-title {
	font-size: 35px; font-weight: 100; line-height: 1.2; letter-spacing: 0;
	color: var(--os-ink); margin: 0 0 var(--os-gap);
}

/* Each former Elementor widget is one block; the gap between them is 20px. */
.os-content > *,
.os-col > * { margin-top: 0; margin-bottom: var(--os-gap); }
.os-content > *:last-child,
.os-col > *:last-child { margin-bottom: 0; }
/* wpautop safety: empty paragraphs created around shortcodes/divs */
.os-content > p:empty { display: none; }

.os-text > :first-child { margin-top: 0.8em; }
.os-text a { color: inherit; }
.os-heading { margin-top: 0; margin-bottom: var(--os-gap); }
.os-spacer { display: block; font-size: 0; line-height: 0; overflow: hidden; }

.os-image { margin-left: 0; margin-right: 0; text-align: center; }
.os-image img { display: inline-block; max-width: 100%; height: auto; }
.os-image figcaption { margin-top: 8px; font-size: 1em; }

/* Two columns (former Elementor sections with 2 columns) */
.os-row {
	display: flex;
	flex-wrap: wrap;
	margin-left: calc(var(--os-col-pad) * -1);
	margin-right: calc(var(--os-col-pad) * -1);
}
.os-col { position: relative; width: 100%; min-height: 1px; padding: 0 var(--os-col-pad); }
@media (min-width: 768px) {
	.os-col-50 { width: 50%; }
	.os-col-33 { width: 33.333%; }
	.os-col-66 { width: 66.666%; }
	.os-col-25 { width: 25%; }
	.os-col-75 { width: 75%; }
}
@media (max-width: 767px) {
	.os-col + .os-col { margin-top: var(--os-gap); }
	.os-image[style*='width'] { width: 100% !important; }
}

/* Classic-editor alignment classes */
.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.alignnone { margin: 0; }
.wp-caption { max-width: 100%; margin-bottom: 1em; }
.wp-caption-text, figcaption { font-size: 0.9em; line-height: 1.5; margin-top: 0.5em; }
.entry-content::after { content: ''; display: table; clear: both; }

/* 5. Posts and lists -------------------------------------------------------- */
.os-single .os-container { padding-top: var(--os-col-pad); padding-bottom: 40px; }
.os-post-title {
	font-size: 35px; font-weight: 100; line-height: 1.2; letter-spacing: 0;
	color: var(--os-ink); margin: 10px 0 40px;
}
.os-post-featured { margin: 0 0 40px; }
.os-post-featured img { display: block; width: 100%; height: auto; }
.os-post-content { color: var(--os-ink); }
.os-post-content p { margin: 0.8em 0 1.2em; }
.os-post-content h1, .os-post-content h2, .os-post-content h3,
.os-post-content h4, .os-post-content h5, .os-post-content h6 { color: var(--os-ink); }
.os-post-content figure { margin: 1.5em 0; }
.os-post-content img { height: auto; }

.os-list { padding-top: 20px; padding-bottom: 40px; }
.os-list__header { margin-bottom: 20px; }
.os-post-list { display: grid; grid-template-columns: 1fr; row-gap: 35px; }
.os-post-card { display: flex; flex-direction: column; padding: 17px; background: #fff; text-align: left; }
.os-post-card__thumb { display: block; margin-bottom: 41px; }
.os-post-card__thumb img { display: block; width: 100%; height: auto; }
.os-post-card__title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; letter-spacing: 0; color: var(--os-ink); }
.os-post-card__title a { color: var(--os-ink); }
.os-post-card__meta { margin: 0 0 13px; font-size: 17px; line-height: 1.2; color: var(--os-muted); }
.os-post-card__excerpt { font-size: 16px; font-weight: 300; line-height: 24px; color: var(--os-ink); margin-bottom: 13px; }
.os-post-card__excerpt p { margin: 0; }
.os-post-card__more { font-size: 16px; font-weight: 600; color: #939393; }
.os-pagination { margin-top: 30px; text-align: center; font-size: 17px; }
.os-pagination .page-numbers { display: inline-block; margin: 0 6px; color: var(--os-text); }
.os-pagination .page-numbers.current { color: var(--os-ink); font-weight: 600; }
.os-empty { margin: 2em 0; }

/* 6. Galleries, media ------------------------------------------------------- */
.os-gallery {
	--os-ggap: 10px;
	display: flex;
	flex-wrap: wrap;
	/* items carry the gap on their right/bottom side; pull it back like Elementor did */
	margin: 0 calc(var(--os-ggap) * -1) calc(var(--os-ggap) * -1) 0;
}
.os-content > .os-gallery:not(:last-child),
.os-col > .os-gallery:not(:last-child) { margin-bottom: calc(var(--os-gap) - var(--os-ggap)); }
.os-gallery__item {
	margin: 0;
	padding: 0 var(--os-ggap) var(--os-ggap) 0;
	text-align: center;
	vertical-align: top;
}
/* Column widths follow Elementor's gallery rules exactly:
   768px and wider: the chosen number of columns; 480-767px: two columns; below 480px: one. */
.os-gallery__item { width: 100%; }
@media (min-width: 480px) and (max-width: 767px) {
	.os-gallery:not(.os-gallery--cols-1) .os-gallery__item { width: 50%; }
}
@media (min-width: 768px) {
	.os-gallery--cols-2 .os-gallery__item { width: 50%; }
	.os-gallery--cols-3 .os-gallery__item { width: 33.333%; }
	.os-gallery--cols-4 .os-gallery__item { width: 25%; }
	.os-gallery--cols-5 .os-gallery__item { width: 20%; }
	.os-gallery--cols-6 .os-gallery__item { width: 16.666%; }
	.os-gallery--cols-7 .os-gallery__item { width: 14.28%; }
	.os-gallery--cols-8 .os-gallery__item { width: 12.5%; }
	.os-gallery--cols-9 .os-gallery__item { width: 11.11%; }
}

/* Plain WordPress gallery markup (e.g. pasted into old posts): same behaviour. */
.gallery { display: flex; flex-wrap: wrap; margin: 0 -10px 1.5em 0; }
.gallery-item { width: 100%; margin: 0; padding: 0 10px 10px 0; text-align: center; vertical-align: top; }
.gallery-item img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.gallery-caption { display: block; margin-top: 8px; }
@media (min-width: 480px) and (max-width: 767px) {
	.gallery:not(.gallery-columns-1) .gallery-item { width: 50%; }
}
@media (min-width: 768px) {
	.gallery-columns-2 .gallery-item { width: 50%; }
	.gallery-columns-3 .gallery-item { width: 33.333%; }
	.gallery-columns-4 .gallery-item { width: 25%; }
	.gallery-columns-5 .gallery-item { width: 20%; }
	.gallery-columns-6 .gallery-item { width: 16.666%; }
}
.os-gallery__item a { display: block; }
.os-gallery__item img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.os-gallery__caption {
	margin-top: var(--os-cap-space, 8px);
	font-size: var(--os-cap-size, 17px);
	font-weight: 300;
	line-height: 27px;
	letter-spacing: 0.2px;
	text-align: var(--os-cap-align, center);
	color: var(--os-text);
}

.os-embed--video { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.os-embed--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
iframe { max-width: 100%; }

/* 7. Lightbox (white, like the former Elementor lightbox) -------------------- */
.os-lightbox {
	position: fixed; inset: 0; z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	background: #fff;
	opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s;
}
.os-lightbox.is-open { opacity: 1; visibility: visible; }
.os-lightbox__img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; user-select: none; }
@media (max-width: 767px) { .os-lightbox__img { max-width: 100vw; max-height: calc(100vh - 100px); } }
.os-lightbox__btn {
	position: absolute; display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer;
	color: var(--os-shop-text); opacity: 0.6; transition: opacity 0.15s;
}
.os-lightbox__btn:hover, .os-lightbox__btn:focus-visible { opacity: 1; }
.os-lightbox__close { top: 12px; right: 12px; }
.os-lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.os-lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }
.os-lightbox__btn svg { width: 22px; height: 22px; }
.os-lightbox__counter {
	position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
	font-family: var(--os-shop-font); font-size: 13px; letter-spacing: 1px; color: var(--os-shop-text-75);
}
body.os-lightbox-open { overflow: hidden; }

/* 8. Utilities -------------------------------------------------------------- */
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
