/* Capitaloop – układ mobile-first */

.container {
	width: min(1120px, calc(100% - 2rem));
	margin-inline: auto;
}

.container-narrow {
	width: min(760px, calc(100% - 2rem));
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--color-surface);
	border-bottom: 1px solid var(--border-color);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: var(--header-h);
}

.logo-link,
.custom-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.logo-link img {
	max-height: 42px;
	width: auto;
}

.logo-mark {
	display: block;
	width: 42px;
	height: 42px;
	flex: 0 0 auto;
	color: var(--color-text);
}

.logo-mark svg {
	display: block;
	width: 100%;
	height: 100%;
}

.header-tools {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.icon-btn,
.menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--color-text);
	cursor: pointer;
	text-decoration: none;
	position: relative;
}

.icon-btn:hover,
.menu-toggle:hover {
	background: var(--color-accent-soft);
	color: var(--color-deep);
}

.menu-toggle {
	flex-direction: column;
	gap: 5px;
}

.hamburger-line {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.theme-toggle .icon-moon { display: none; }
html.theme-dark .theme-toggle .icon-sun { display: none; }
html.theme-dark .theme-toggle .icon-moon { display: block; }

.cart-count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 1.1rem;
	height: 1.1rem;
	padding: 0 0.25rem;
	border-radius: 999px;
	background: var(--color-accent);
	color: var(--color-on-accent);
	font-size: 0.7rem;
	line-height: 1.1rem;
	text-align: center;
}

.nav-primary { display: none; }

.primary-menu,
.mobile-menu,
.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-menu-panel {
	border-top: 1px solid var(--border-color);
	background: var(--color-surface);
	max-height: calc(100vh - var(--header-h));
	overflow: auto;
}

.mobile-menu a {
	display: block;
	padding: 0.85rem 1.25rem;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 600;
}

.mobile-menu .sub-menu a {
	padding-left: 2rem;
	font-weight: 500;
	color: var(--color-text-secondary);
}

.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 12vh 1rem 1rem;
	background: rgba(12, 40, 80, 0.45);
}

.search-overlay.is-open {
	display: flex;
}

.search-overlay[hidden] {
	display: none !important;
}

.search-overlay-inner {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	width: min(680px, 100%);
	padding: 0.8rem;
	border-radius: 18px;
	background: var(--color-surface);
}

.search-form {
	display: flex;
	gap: 0.5rem;
	flex: 1;
}

.search-field {
	flex: 1;
	min-height: 48px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 0.6rem 0.9rem;
	background: var(--color-bg);
	color: var(--color-text);
	font: inherit;
}

.search-close {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: var(--color-text);
	font-size: 1.8rem;
	line-height: 1;
	width: 44px;
	height: 44px;
	cursor: pointer;
}

html.overlay-open,
body.overlay-open { overflow: hidden; }

.hero {
	background:
		radial-gradient(900px 280px at 90% -10%, rgba(255, 255, 255, 0.28), transparent 60%),
		linear-gradient(155deg, #0c3f86 0%, #1d6fe8 58%, #4c97ff 100%);
	color: #fff;
	padding: 2.5rem 0 2.75rem;
}

.hero h1,
.hero p,
.hero a:not(.button) { color: #fff; }

.eyebrow {
	margin: 0 0 0.6rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-accent);
}

.hero .eyebrow { color: rgba(255, 255, 255, 0.82); }

.hero-lead {
	max-width: 40rem;
	margin: 0;
	font-size: 1.08rem;
	color: rgba(255, 255, 255, 0.92);
}

.hero-align-center .container,
.hero-align-center .hero-lead,
.hero-align-center .button-row {
	margin-inline: auto;
	text-align: center;
	justify-content: center;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-top: 1.3rem;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 48px;
	padding: 0.7rem 1.15rem;
	border-radius: 999px;
	border: 1.5px solid transparent;
	background: var(--color-accent);
	color: var(--color-on-accent);
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.button:hover { background: var(--color-accent-hover); color: var(--color-on-accent); }

.button-light {
	background: #fff;
	color: #0c3f86;
}

.button-light:hover { background: #e8f2ff; color: #0c3f86; }

.button-ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.75);
	color: #fff;
}

.button-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.button-outline {
	background: transparent;
	border-color: var(--color-accent);
	color: var(--color-deep);
}

.chip-bar { padding: 0.9rem 0; }

.chip-scroller {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	padding-bottom: 0.2rem;
}

.chip {
	flex: 0 0 auto;
	padding: 0.45rem 0.85rem;
	border-radius: 999px;
	background: var(--color-surface);
	border: 1px solid var(--border-color);
	color: var(--color-text);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 600;
}

.chip:hover { border-color: var(--color-accent); color: var(--color-deep); }

.section { padding: 2.4rem 0; }
.section-alt { background: var(--color-bg-alt); }

.section-head { margin-bottom: 1.2rem; max-width: 40rem; }
.section-head p { margin: 0.35rem 0 0; color: var(--color-text-secondary); }

.section-head-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	max-width: none;
}

.step-grid,
.card-grid,
.calc-grid,
.articles-grid {
	display: grid;
	gap: 0.9rem;
}

.step-card,
.info-card,
.calc-card,
.article-card,
.widget,
.summary-box,
.toc,
.author-bio,
.bridge {
	background: var(--color-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

.step-card,
.info-card,
.calc-card { padding: 1.1rem 1.15rem 1.2rem; }

.step-grid { list-style: none; margin: 0; padding: 0; }

.step-index {
	display: inline-block;
	margin-bottom: 0.45rem;
	color: var(--color-accent);
	font-weight: 800;
	letter-spacing: 0.04em;
}

.step-card h3 a,
.info-card,
.calc-card,
.article-card-link,
.news-row a,
.plain-list a,
.product-card-link {
	color: inherit;
	text-decoration: none;
}

.info-card p,
.step-card p,
.calc-card span { color: var(--color-text-secondary); }

.info-card h3,
.step-card h3,
.product-card h3 { color: var(--color-text); }

.text-link {
	display: inline-block;
	margin-top: 0.7rem;
	color: var(--color-accent);
	font-weight: 700;
}

.calc-grid { grid-template-columns: 1fr; }
.calc-card {
	display: flex;
	align-items: center;
	min-height: 64px;
	font-weight: 700;
	background: var(--color-accent-soft);
	border-color: transparent;
	box-shadow: none;
}
.calc-card span { color: var(--color-deep); }

.carousel-nav { display: flex; gap: 0.3rem; }
.carousel-track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 0.4rem;
}
.carousel-card {
	flex: 0 0 min(84vw, 340px);
	scroll-snap-align: start;
}
.carousel-card a { color: inherit; text-decoration: none; }
.carousel-image {
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 0.7rem;
	background: var(--color-accent-soft);
	aspect-ratio: 16 / 10;
}
.carousel-image img { width: 100%; height: 100%; object-fit: cover; }
.carousel-card p { color: var(--color-text-secondary); margin: 0.3rem 0 0; }

.news-list { display: grid; gap: 0.75rem; }
.news-row a {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 0.85rem;
	align-items: center;
}
.news-thumb {
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--color-accent-soft);
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-row p { margin: 0.25rem 0 0; color: var(--color-text-secondary); font-size: 0.95rem; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { border-top: 1px solid var(--border-color); }
.plain-list a {
	display: grid;
	gap: 0.2rem;
	padding: 0.85rem 0;
}
.plain-list span { color: var(--color-text-secondary); font-size: 0.95rem; }

.articles-grid { grid-template-columns: 1fr; }
.article-card-link { display: block; height: 100%; }
.article-card-image { aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-accent-soft); }
.article-card-image img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 0.95rem 1rem 1.1rem; }
.article-card-meta {
	display: flex;
	gap: 0.7rem;
	margin: 0 0 0.35rem;
	color: var(--color-text-secondary);
	font-size: 0.85rem;
}
.article-card-excerpt { margin: 0.35rem 0 0; color: var(--color-text-secondary); }

.page-hero { padding: 1.6rem 0 0.4rem; }
.page-hero-title { margin-bottom: 0.4rem; }
.page-hero-lead,
.entry-meta { color: var(--color-text-secondary); }
.entry-meta a { color: var(--color-text-secondary); }

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.5rem;
	list-style: none;
	margin: 0 0 0.8rem;
	padding: 0;
	color: var(--color-text-secondary);
	font-size: 0.88rem;
}
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; }
.breadcrumbs a { color: var(--color-text-secondary); text-decoration: none; }

.section-block { padding-bottom: 2.5rem; }

.content-sidebar-wrap { display: block; }
.site-sidebar { display: none; margin-top: 1.5rem; }

.widget { padding: 1rem 1.05rem; margin-bottom: 0.9rem; }
.widget-title { font-size: 1rem; }
.widget ul { margin: 0; padding-left: 1.1rem; }
.widget li { margin: 0.3rem 0; }

/* Strona „link w bio” (template-linki.php, 1.0.7) */
.linki-home { margin-top: 1.5rem; text-align: center; }

/* Miniatura wpisu nad ramką „W skrócie” (1.0.7) */
.article-cover {
	margin: 0 0 1.1rem;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-card);
}
.article-cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1200 / 630;
	object-fit: cover;
}

.summary-box,
.toc { padding: 1rem 1.1rem; margin-bottom: 1.1rem; }
.summary-box { background: var(--color-accent-soft); border-color: transparent; }
.summary-label {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-accent);
}
.toc ol { margin: 0; padding-left: 1.15rem; }
.toc-level-3 { margin-left: 0.8rem; }

.entry-content { font-size: 1.05rem; }
.entry-content > * + * { margin-top: 0.9rem; }
.entry-content h2,
.entry-content h3 { margin-top: 1.6rem; }
.entry-content a { font-weight: 600; }
.entry-content-full { width: min(1120px, calc(100% - 2rem)); margin: 1.5rem auto 2rem; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.entry-tags a {
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	background: var(--color-accent-soft);
	text-decoration: none;
	font-size: 0.88rem;
}

.author-bio {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 0.9rem;
	padding: 1rem;
	margin-top: 1.4rem;
}
.author-bio img { border-radius: 50%; }
.author-name { margin: 0; font-weight: 800; }

.related-posts ul { margin: 0; padding-left: 1.1rem; }
.related-posts li { margin: 0.4rem 0; }

.faq-list { display: grid; gap: 0.6rem; }
.faq-item {
	border: 1px solid var(--border-color);
	border-radius: 14px;
	background: var(--color-surface);
	padding: 0.2rem 1rem;
}
.faq-item summary {
	cursor: pointer;
	font-weight: 700;
	padding: 0.8rem 0;
}
.faq-item p { margin: 0 0 0.9rem; color: var(--color-text-secondary); }
#faq-expand-btn { margin-top: 0.8rem; }

.bridge {
	display: grid;
	gap: 1rem;
	padding: 1.3rem;
	background: linear-gradient(160deg, var(--color-accent-soft), var(--color-surface));
}
.bridge p { color: var(--color-text-secondary); }

.partner-row {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	align-items: center;
}
.partner-slide {
	flex: 0 0 140px;
	padding: 0.6rem;
	background: var(--color-surface);
	border-radius: 12px;
	border: 1px solid var(--border-color);
}
.partner-slide img { max-height: 48px; width: auto; margin-inline: auto; object-fit: contain; }

.site-footer {
	background: #0c2e52;
	color: #d5e6f7;
	padding: 2.2rem 0 1.4rem;
	margin-top: 1rem;
}
html.theme-dark .site-footer { background: #08111d; }
.site-footer a { color: #fff; text-decoration: none; }
.footer-logo { margin: 0; font-size: 1.25rem; font-weight: 800; color: #fff; }
.footer-tagline,
.footer-note,
.footer-copy { color: #b7cce4; }
.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin: 1rem 0;
}
.footer-widgets {
	display: grid;
	gap: 1rem;
	margin-top: 1.2rem;
}
.site-footer .widget { background: transparent; border: 0; box-shadow: none; padding: 0; color: #d5e6f7; }

.error-404 { padding: 3rem 0 4rem; }
.empty-note { color: var(--color-text-secondary); }

.pagination,
.nav-links,
.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	padding: 1rem 0 0;
	margin: 0;
}
.page-numbers {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--color-surface);
	border: 1px solid var(--border-color);
	text-decoration: none;
	color: var(--color-text);
	font-weight: 600;
}

.page-numbers.current {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: var(--color-on-accent);
	font-weight: 800;
}

ul.products {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 0.8rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
}
.product-card-link { display: block; }
.product-card-image {
	aspect-ratio: 1;
	border-radius: 12px;
	overflow: hidden;
	background: var(--color-accent-soft);
	margin-bottom: 0.55rem;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card-price,
.product-price { font-weight: 800; color: var(--color-deep); }
.product-card-actions { margin-top: 0.45rem; }
.product-card-actions .button,
.single-product-layout .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	border-radius: 999px;
	background: var(--color-accent);
	color: var(--color-on-accent);
	font-weight: 700;
}
.shop-toolbar {
	display: flex;
	justify-content: space-between;
	gap: 0.8rem;
	align-items: center;
	margin: 1rem 0;
}
.product-top { display: grid; gap: 1.2rem; margin: 1rem 0 1.5rem; }
.trust-list { margin: 0.8rem 0 0; padding-left: 1.1rem; color: var(--color-text-secondary); }
.woocommerce-wrap { padding: 1.2rem 0 2.5rem; }
.search-form-inline { display: flex; gap: 0.5rem; margin-top: 1rem; }

.comment-list { list-style: none; padding: 0; }
.comment { margin: 0.8rem 0; padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 12px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 0.7rem 0.8rem;
	font: inherit;
	background: var(--color-surface);
	color: var(--color-text);
}

@media (min-width: 720px) {
	.step-grid,
	.card-grid { grid-template-columns: 1fr 1fr; }
	.calc-grid { grid-template-columns: 1fr 1fr; }
	.articles-grid { grid-template-columns: 1fr 1fr; }
	.news-row a { grid-template-columns: 140px 1fr; }
	.product-top { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
	.bridge { grid-template-columns: 1fr auto; align-items: center; }
	.footer-widgets { grid-template-columns: 1fr 1fr; }
	ul.products { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
	.menu-toggle { display: none; }
	.nav-primary { display: block; flex: 1; }
	.header-tools { margin-left: 0; }
	.primary-menu { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
	.primary-menu > li { position: relative; }
	.primary-menu a {
		display: block;
		padding: 0.45rem 0.7rem;
		color: var(--color-text);
		text-decoration: none;
		font-weight: 600;
		font-size: 0.96rem;
	}
	.primary-menu .sub-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 230px;
		padding: 0.4rem;
		background: var(--color-surface);
		border: 1px solid var(--border-color);
		border-radius: 14px;
		box-shadow: var(--shadow-card);
		z-index: 20;
	}
	.primary-menu li:hover > .sub-menu,
	.primary-menu li:focus-within > .sub-menu { display: block; }
	.primary-menu .sub-menu a { border-radius: 10px; }
	.primary-menu .sub-menu a:hover { background: var(--color-accent-soft); }
	.mobile-menu-panel { display: none !important; }

	body.sidebar-on-desktop .content-sidebar-wrap {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 1.6rem;
		align-items: start;
	}
	body.sidebar-on-desktop .site-sidebar { display: block; margin-top: 0; }
	.step-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1023px) {
	body.sidebar-on-mobile .site-sidebar { display: block; }
}

.site-sidebar .search-form,
.site-sidebar .widget_search .search-form,
.site-sidebar .wp-block-search,
.site-sidebar .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper,
.site-sidebar .wp-block-search__inside-wrapper {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.75rem;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.site-sidebar .wp-block-search__label,
.site-sidebar .search-form label {
	display: block;
	margin: 0;
}

.site-sidebar .search-field,
.site-sidebar .widget_search .search-field,
.site-sidebar .wp-block-search__input,
.site-sidebar .search-form button,
.site-sidebar .search-form input[type="submit"],
.site-sidebar .wp-block-search__button,
.site-sidebar .widget_search .search-submit,
.site-sidebar .widget_search button {
	position: static;
	flex: 0 0 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	box-sizing: border-box;
}

.site-sidebar .search-form button,
.site-sidebar .search-form input[type="submit"],
.site-sidebar .wp-block-search__button,
.site-sidebar .widget_search .search-submit,
.site-sidebar .widget_search button {
	background-color: var(--color-accent);
	background-image: none;
	color: var(--color-on-accent);
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	min-height: 44px;
	padding: 0.55rem 1.05rem;
	cursor: pointer;
	white-space: nowrap;
}

.site-sidebar .search-form button:hover,
.site-sidebar .search-form input[type="submit"]:hover,
.site-sidebar .wp-block-search__button:hover,
.widget_search .search-submit:hover,
.widget_search button:hover {
	background-color: var(--color-accent-hover);
	color: var(--color-on-accent);
}
