/*
 * Homepage Pro 2026
 * Strong editorial portal layer without backend/template changes.
 */

body.home {
	--home-bg-1: #f3f8fc;
	--home-bg-2: #eaf3fa;
	--home-surface: #ffffff;
	--home-surface-soft: #f6fbff;
	--home-ink: #102738;
	--home-ink-soft: #3d5b6f;
	--home-accent: #0f6f97;
	--home-accent-soft: #d7ecf8;
	--home-border: rgba(20, 79, 108, 0.18);
	--home-shadow: 0 16px 34px rgba(11, 43, 60, 0.1), 0 4px 11px rgba(11, 43, 60, 0.06);
	--home-shadow-hover: 0 22px 44px rgba(11, 43, 60, 0.14), 0 6px 15px rgba(11, 43, 60, 0.1);
	background:
		radial-gradient(1400px 620px at 50% -260px, rgba(166, 210, 233, 0.44), transparent 63%),
		linear-gradient(180deg, var(--home-bg-1) 0%, var(--home-bg-2) 56%, var(--home-bg-1) 100%);
	color: var(--home-ink);
}

@media (min-width: 1260px) {
	body.home .container {
		max-width: 1280px;
	}
}

body.home #page {
	background: transparent;
}

body.home .top-header-bar {
	background: linear-gradient(180deg, rgba(234, 243, 250, 0.95) 0%, rgba(226, 239, 248, 0.88) 100%);
	border-bottom: 1px solid var(--home-border) !important;
	backdrop-filter: blur(8px);
}

body.home .mb-latest-posts-label {
	background: #ffffff;
	border: 1px solid rgba(15, 98, 136, 0.26);
	border-radius: 999px;
	color: #0f6188;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

body.home .main-header-bar {
	background: rgba(255, 255, 255, 0.86);
	border-bottom: 0 !important;
}

body.home .site-branding {
	padding: 0.64rem 0 0.8rem;
}

body.home .site-title a {
	color: #0f2738;
	font-size: clamp(2rem, 3.6vw, 3.2rem);
	font-weight: 700;
	letter-spacing: 0.01em;
}

body.home .site-description {
	color: #4a6678;
	font-size: 0.95rem;
	font-weight: 500;
}

body.home .main-header-nav-bar {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 251, 255, 0.86) 100%);
	border-top: 1px solid rgba(19, 78, 105, 0.11) !important;
	border-bottom: 1px solid rgba(19, 78, 105, 0.14) !important;
}

body.home .main-header-nav-bar .main-navigation a {
	padding: 0.45rem 0.84rem;
	border-radius: 999px;
	color: #1f3f53;
	font-size: 0.92rem;
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.home .main-header-nav-bar .main-navigation a::after {
	display: none;
}

body.home .main-header-nav-bar .main-navigation .current-menu-item > a,
body.home .main-header-nav-bar .main-navigation a:hover,
body.home .main-header-nav-bar .main-navigation a:focus {
	background: rgba(188, 223, 240, 0.66);
	color: #0e4d6a;
	transform: translateY(-1px);
}

body.home .front-page-banner-section {
	position: relative;
	margin-top: 1.55rem;
	margin-bottom: 1.45rem;
	padding: 0.25rem 0;
}

body.home .front-page-banner-section::before {
	content: "Top stories";
	display: block;
	margin: 0 0 0.6rem 0.12rem;
	color: #26576f;
	font-family: "Barlow Semi Condensed", sans-serif;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

body.home .front-page-banner-section .theme-banner-slider,
body.home .front-page-banner-section .banner-featured-post {
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid var(--home-border);
	box-shadow: var(--home-shadow);
	background: #ffffff;
}

body.home .front-page-banner-section .theme-banner-content {
	padding: 1rem 1rem 1.14rem;
	background: linear-gradient(0deg, rgba(8, 20, 29, 0.62) 0%, rgba(8, 20, 29, 0.08) 100%);
}

body.home .front-page-banner-section .theme-banner-title {
	font-size: clamp(1.08rem, 1.4vw, 1.46rem);
}

body.home .front-page-banner-section .theme-banner-title a {
	color: #ffffff;
	font-family: "Barlow Semi Condensed", sans-serif;
}

body.home #primary .site-main {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.15rem;
	align-items: start;
}

/* Disable legacy float-based layout from style.css */
body.home #primary .site-main .post,
body.home #primary .site-main .post:nth-child(2n),
body.home #primary .site-main .post:nth-child(2n + 1) {
	float: none !important;
	width: auto !important;
	clear: none !important;
	margin: 0 !important;
}

body.home #primary .site-main > article:first-of-type,
body.home #primary .site-main > .mb-random-posts-grid,
body.home #primary .site-main > .default-theme-posts-navigation {
	grid-column: 1 / -1;
}

body.home #primary .site-main > article:first-of-type {
	position: relative;
	margin-top: 0.1rem;
}

body.home .archive-card {
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--home-border);
	background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
	box-shadow: 0 12px 28px rgba(13, 43, 60, 0.09), 0 2px 6px rgba(13, 43, 60, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.home .archive-card:hover {
	transform: translateY(-2px);
	border-color: rgba(16, 94, 129, 0.34);
	box-shadow: var(--home-shadow-hover);
}

body.home .archive-card__utility {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.44rem 0.7rem;
	background: linear-gradient(180deg, #edf6fd 0%, #e9f3fb 100%);
	border-bottom: 1px solid rgba(19, 85, 114, 0.14);
}

body.home .archive-card__meta {
	font-size: 0.72rem;
	color: #2e576d;
}

body.home .archive-card__media .post-thumbnail {
	display: block;
	margin: 0;
	width: 100%;
	aspect-ratio: 16 / 10;
}

body.home .archive-card__media .post-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

body.home .archive-card__header {
	position: absolute;
	left: 0.68rem;
	right: 0.68rem;
	bottom: 0.56rem;
	z-index: 3;
}

body.home .archive-card__title {
	margin: 0;
	display: inline;
	padding: 0.23em 0.42em 0.24em;
	background: rgba(255, 255, 255, 0.93);
	color: #102a3a;
	border-radius: 8px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	font-family: "Barlow Semi Condensed", sans-serif;
	font-size: clamp(1.04rem, 1.22vw, 1.44rem);
	font-weight: 700;
	line-height: 1.2;
}

body.home .archive-card__title a {
	color: inherit;
	text-decoration: none;
}

body.home .archive-card__excerpt {
	padding: 0.8rem 0.92rem 0.9rem;
}

body.home .archive-card__excerpt p {
	margin: 0;
	font-size: 0.89rem;
	line-height: 1.52;
	color: #2a4455;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Hero lead card */
body.home #primary .site-main > article:first-of-type .archive-card {
	border-radius: 20px;
	box-shadow: 0 20px 42px rgba(12, 41, 59, 0.16), 0 4px 14px rgba(12, 41, 59, 0.09);
}

body.home #primary .site-main > article:first-of-type .archive-card__media .post-thumbnail {
	aspect-ratio: 21 / 9;
}

body.home #primary .site-main > article:first-of-type .archive-card__title {
	font-size: clamp(1.56rem, 2.4vw, 2.2rem);
	line-height: 1.14;
}

body.home #primary .site-main > article:first-of-type .archive-card__excerpt p {
	font-size: 0.97rem;
	-webkit-line-clamp: 3;
}

/* Topic section from random fallback cards */
body.home .mb-random-posts-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin: 0.25rem 0 1.15rem;
	padding: 1.08rem 1.08rem 1rem;
	border-radius: 18px;
	border: 1px solid var(--home-border);
	background: linear-gradient(180deg, #ffffff 0%, var(--home-surface-soft) 100%);
	box-shadow: var(--home-shadow);
}

body.home .mb-random-posts-grid::before {
	content: "Tematy dla Ciebie";
	position: absolute;
	top: -0.58rem;
	left: 1rem;
	padding: 0.2rem 0.6rem 0.24rem;
	border-radius: 999px;
	background: #e6f3fc;
	border: 1px solid rgba(20, 93, 127, 0.22);
	color: #0f6289;
	font-family: "Barlow Semi Condensed", sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

body.home .mb-random-post-card {
	padding: 0;
}

body.home .mb-random-post-card .post-thumbnail {
	display: block;
	margin: 0 0 0.5rem;
	border-radius: 12px;
	overflow: hidden;
}

body.home .mb-random-post-card__title {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.35;
}

body.home .mb-random-post-card__title a {
	color: #173a50;
	text-decoration: none;
}

body.home .mb-random-post-card__title a:hover {
	color: #0f6e96;
}

body.home .default-theme-posts-navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	margin: 0.25rem 0 0.2rem;
}

body.home .default-theme-posts-navigation li {
	margin: 0;
}

body.home .default-theme-posts-navigation a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.48rem 0.86rem;
	border-radius: 999px;
	border: 1px solid rgba(18, 90, 120, 0.22);
	background: rgba(255, 255, 255, 0.92);
	color: #17506c;
	font-size: 0.83rem;
	font-weight: 600;
	text-decoration: none;
}

body.home .default-theme-posts-navigation a:hover {
	background: #e7f3fb;
	color: #0f6489;
}

body.home #secondary .widget {
	border-radius: 16px;
	border: 1px solid var(--home-border);
	background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
	box-shadow: 0 10px 24px rgba(13, 43, 58, 0.08);
	padding: 1.08rem 1rem;
}

body.home #secondary .widget-title,
body.home #secondary .wp-block-heading {
	color: #163a4f;
	font-size: 1.22rem !important;
}

body.home #secondary .wp-block-search__label {
	color: #3f6072;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

body.home #secondary .wp-block-search__input {
	border-color: rgba(20, 84, 113, 0.22);
	background: #ffffff;
}

body.home #secondary .wp-block-search__button {
	background: var(--home-accent);
}

body.home #secondary .wp-block-search__button:hover {
	background: #0c5d7f;
}

body.home .site-footer {
	background: linear-gradient(180deg, rgba(249, 252, 255, 0.96) 0%, rgba(236, 246, 252, 0.96) 100%);
	border-top: 1px solid rgba(20, 86, 116, 0.15);
}

@media (max-width: 1099px) {
	body.home .mb-random-posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	body.home #primary .site-main {
		grid-template-columns: 1fr;
	}

	body.home #primary .site-main > article:first-of-type .archive-card__media .post-thumbnail {
		aspect-ratio: 16 / 9;
	}
}

@media (max-width: 740px) {
	body.home .mb-random-posts-grid {
		grid-template-columns: 1fr;
		padding: 0.86rem 0.86rem 0.82rem;
	}
}

@media (max-width: 900px) {
	body.home .front-page-banner-section .theme-banner-slider,
	body.home .front-page-banner-section .banner-featured-post,
	body.home .archive-card,
	body.home #secondary .widget,
	body.home .mb-random-posts-grid {
		border-radius: 12px;
	}
}
