/* =====================================================
   YOKUCHI — GLOBAL STYLES FOR WORDPRESS PAGES
   -----------------------------------------------------
   Zwykłe strony mają być czystym layoutem pod bloki
   Carbon Fields, bez wyglądu wpisu blogowego.
   Celowo umieszczone na końcu pliku, aby nadpisać
   wcześniejsze style .site-main / .ast-article-single.
   ===================================================== */

/* Tylko zwykłe strony — bez strony głównej */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) {
	background: #fff;
}

/* Główny wrapper strony z miejscem pod fixed header */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .site-content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding-top: var(--yokuchi-header-height, 94px);
}

/*
 * Zwykłe strony trzymamy w tej samej szerokości co cały blok
 * "Yokuchi łączy naturę z precyzją nauki" na stronie głównej.
 * Dzięki temu istniejące i ręcznie dodawane strony nie
 * przyklejają się do krawędzi i nie wchodzą pod menu.
 */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .site-main.ast-container {
	display: block !important;
	width: min(calc(100% - 80px), 1440px) !important;
	max-width: 1440px !important;
	margin: 0 auto !important;
	padding: 56px 0 88px !important;
}

/* Główna kolumna treści */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .content-area {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin-right: auto !important;
	margin-left: auto !important;
	padding: 0 !important;
}

/* Bez sidebaru na zwykłych stronach */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .widget-area,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) #secondary {
	display: none !important;
}

/*
 * Najważniejszy reset.
 * .ast-article-single w bazowym CSS wygląda jak karta blogowa:
 * białe tło, border i padding 42px.
 */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .ast-article-single,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) article.page,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .type-page {
	width: 100%;
	max-width: none;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* Ukrywamy automatyczny tytuł/meta generowane przez szablon WP */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-header,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .page-header,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-meta,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-footer,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .post-navigation,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .comments-area {
	display: none !important;
}

/* Treść strony dziedziczy szerokość głównego kontenera */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content {
	width: 100%;
	max-width: none;
	margin: 0 !important;
	padding: 0 !important;
}

/*
 * Carbon Fields i zwykłe grupy trzymają się kontenera strony.
 */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content > section,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content > .wp-block-group,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content > .wp-block-columns {
	width: 100%;
	max-width: none;
	margin-right: auto;
	margin-left: auto;
}

body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content > .wp-block-cover {
	width: 100%;
	max-width: none;
	margin-right: auto;
	margin-left: auto;
}

/* Gutenberg full/wide */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content .alignfull {
	width: 100%;
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
}

body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content .kan-hero.alignfull {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content .alignwide {
	width: 100%;
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
}

/*
 * Pierwszy i ostatni element entry-content nie powinny dostawać
 * przypadkowych marginesów z WordPressa.
 */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content > *:first-child {
	margin-top: 0;
}

body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content > *:last-child {
	margin-bottom: 0;
}

/* Nie narzucamy blogowej typografii nagłówkom z customowych bloków */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content h1,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content h2,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content h3,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content h4,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content h5,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content h6 {
	margin-top: 0;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 781px) {

	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .site-main.ast-container {
		width: calc(100% - 32px) !important;
		max-width: none !important;
		margin-right: auto !important;
		margin-left: auto !important;
		padding: 0 !important;
	}

	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .content-area,
	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content {
		width: 100% !important;
		max-width: none !important;
		margin-right: auto !important;
		margin-left: auto !important;
		padding: 0 !important;
	}

	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .site-content {
		padding-top: var(--yokuchi-header-height, 47px);
	}

	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .site-main.ast-container {
		padding-top: 36px !important;
		padding-bottom: 56px !important;
	}

	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content .alignwide {
		width: 100%;
	}

	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content .alignfull {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page) .entry-content .kan-hero.alignfull {
		width: 100% !important;
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

/* Full-width Carbon hero opt-in: only pages with this block escape the regular page container. */
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.yokuchi-universal-hero--full) .site-content,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.kan-hero--full) .site-content {
	padding-top: 0 !important;
}

body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.yokuchi-universal-hero--full) .site-main.ast-container,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.yokuchi-universal-hero--full) .content-area,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.yokuchi-universal-hero--full) .ast-article-single,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.yokuchi-universal-hero--full) .entry-content,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.kan-hero--full) .site-main.ast-container,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.kan-hero--full) .content-area,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.kan-hero--full) .ast-article-single,
body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.kan-hero--full) .entry-content {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.page:not(.home):not(.front-page):not(.page-template-page-yokuchi-home):not(.page-template-page-blog):not(.page-template-page-blog-php):not(.yokuchi-blog-page):has(.kan-hero--full) .entry-content > .kan-hero--full {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-top: 0 !important;
	margin-right: calc(50% - 50vw) !important;
	margin-left: calc(50% - 50vw) !important;
}
