/*
Theme Name: QL Blog Child
Description: Motyw potomny Hello Elementor dla bloga QL Partners (blog.qlpartners.pl).
Author: QL Partners
Template: hello-elementor
Version: 14.0.0
Text Domain: ql-blog-child
*/

:root {
	--ql-primary: #00866a;
	--ql-logo-dark: #16624a;
	--ql-text: #32373c;
	--ql-muted: #646363;
	--ql-light-bg: #ebebeb;
	--ql-white: #ffffff;
	--ql-radius: 8px;
	--ql-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background: var(--ql-white);
	color: var(--ql-text);
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	line-height: 1.6;
}

a {
	color: var(--ql-primary);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
}

.ql-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Nagłówek */
.ql-header {
	padding: 40px 0;
	text-align: center;
}

.ql-logo {
	display: inline-block;
	line-height: 0;
}

.ql-logo img {
	width: 117px;
}

/* Grid wpisów */
.ql-main {
	flex: 1 0 auto;
	padding: 0 0 64px;
}

.ql-divider {
	height: 1px;
	margin: 0 0 56px;
	border: 0;
	background: var(--ql-light-bg);
}

.ql-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ql-card {
	display: flex;
	flex-direction: column;
	background: var(--ql-white);
	border-radius: var(--ql-radius);
	box-shadow: var(--ql-shadow);
	overflow: hidden;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ql-card:hover,
.ql-card:focus-within {
	transform: translateY(-6px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.ql-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--ql-light-bg);
	overflow: hidden;
}

.ql-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.ql-card:hover .ql-card__image img,
.ql-card:focus-within .ql-card__image img {
	transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
	.ql-card,
	.ql-card__image img {
		transition: none;
	}

	.ql-card:hover,
	.ql-card:focus-within,
	.ql-card:hover .ql-card__image img,
	.ql-card:focus-within .ql-card__image img {
		transform: none;
	}
}

.ql-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 24px;
}

.ql-card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	min-height: calc(1.3em * 2);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ql-card__title a {
	color: var(--ql-text);
}

.ql-card__excerpt {
	display: -webkit-box;
	flex: 1;
	overflow: hidden;
	margin: 0 0 20px;
	color: var(--ql-muted);
	font-size: 15px;
	line-height: 1.6;
	min-height: calc(1.6em * 4);
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
}

.ql-card__more {
	font-weight: 600;
	font-size: 15px;
}

.ql-pagination {
	margin-top: 48px;
	text-align: center;
}

.ql-pagination .page-numbers {
	display: inline-block;
	margin: 0 4px;
	padding: 8px 14px;
	border-radius: var(--ql-radius);
	color: var(--ql-text);
	background: var(--ql-light-bg);
}

.ql-pagination .page-numbers.current,
.ql-pagination .page-numbers:hover {
	background: var(--ql-primary);
	color: var(--ql-white);
	text-decoration: none;
}

/* Wpis pojedynczy: treść + sidebar */
.ql-single {
	display: flex;
	gap: 48px;
	padding: 64px 0;
}

.ql-single__content {
	flex: 0 0 70%;
	min-width: 0;
}

.ql-single__title {
	margin: 0 0 12px;
	font-size: 44px;
	font-weight: 300;
	line-height: 1.2;
	color: var(--ql-text);
}

.ql-single__title strong {
	font-weight: 600;
}

.ql-single__excerpt {
	margin: 0 0 24px;
	color: var(--ql-muted);
	font-size: 18px;
}

.ql-single__image {
	margin: 0 0 32px;
	border-radius: var(--ql-radius);
	overflow: hidden;
}

.ql-single__body {
	font-size: 17px;
}

.ql-single__body h2,
.ql-single__body h3 {
	color: var(--ql-logo-dark);
	line-height: 1.3;
}

.ql-sidebar {
	flex: 0 0 30%;
	min-width: 0;
}

.ql-sidebar .widget {
	margin-bottom: 40px;
	padding: 24px;
	background: var(--ql-light-bg);
	border-radius: var(--ql-radius);
}

.ql-sidebar .widget-title {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 600;
	color: var(--ql-logo-dark);
}

.ql-sidebar ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ql-sidebar li {
	padding: 6px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ql-sidebar li:last-child {
	border-bottom: 0;
}

.ql-sidebar .widget_recent_entries li,
.ql-sidebar .wp-block-latest-posts__list li {
	margin: 0;
	padding: 6px 0;
	line-height: 1.35;
	font-size: 15px;
}

.ql-sidebar .widget_recent_entries ul,
.ql-sidebar .wp-block-latest-posts__list {
	margin: 0;
	padding: 0;
}

.ql-single__back {
	margin: 48px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--ql-light-bg);
	font-size: 15px;
}

.ql-single__back a {
	font-weight: 600;
}

.ql-sidebar input[type="search"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: var(--ql-radius);
	font: inherit;
}

.ql-sidebar input[type="submit"],
.ql-sidebar button {
	margin-top: 8px;
	padding: 10px 18px;
	border: 0;
	border-radius: var(--ql-radius);
	background: var(--ql-primary);
	color: var(--ql-white);
	font: inherit;
	cursor: pointer;
}

.ql-sidebar .tagcloud a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ql-white);
	color: var(--ql-primary);
	font-size: 13px !important;
}

/* Stopka */
.ql-footer {
	margin: auto 0 0;
	padding: 56px 0;
	background: #f5f5f5;
	color: var(--ql-text);
	font-size: 15px;
}

.ql-footer__top {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 32px;
}

.ql-footer__label {
	margin: 0;
	font-size: 15px;
}

.ql-footer__phone {
	margin: 0 0 20px;
	font-size: 22px;
	font-weight: 700;
}

.ql-footer__phone a {
	color: var(--ql-logo-dark);
	text-decoration: none;
}

.ql-footer__item {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
}

.ql-footer__item svg {
	flex: 0 0 18px;
	color: var(--ql-muted);
}

.ql-footer__item a {
	color: var(--ql-text);
	text-decoration: none;
}

.ql-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	text-align: center;
}

.ql-footer__logo {
	display: inline-block;
	line-height: 0;
}

.ql-footer__logo img {
	width: 200px;
}

.ql-footer__cta {
	display: inline-block;
	padding: 14px 40px;
	background: var(--ql-primary);
	color: var(--ql-white);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	text-decoration: none;
}

.ql-footer__cta:hover,
.ql-footer__cta:focus {
	background: var(--ql-logo-dark);
	color: var(--ql-white);
	text-decoration: none;
}

.ql-footer__offer {
	justify-self: end;
}

.ql-footer__offer ul {
	display: inline-block;
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: left;
}

.ql-footer__offer li {
	position: relative;
	padding-left: 35px;
	margin-bottom: 12px;
	font-size: 20px;
	line-height: 1.3;
}

.ql-footer__offer li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 12px;
	height: 12px;
	transform: translateY(-50%);
	background: var(--ql-primary);
}

.ql-footer__offer a {
	color: var(--ql-primary);
	text-decoration: none;
}

.ql-footer__offer a:hover,
.ql-footer__offer a:focus {
	text-decoration: underline;
}

@media (max-width: 768px) {
	.ql-footer__top {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.ql-footer__item {
		justify-content: center;
	}

	.ql-footer__offer {
		justify-self: center;
	}
}

/* Responsywność */
@media (max-width: 1024px) {
	.ql-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.ql-grid {
		grid-template-columns: 1fr;
	}

	.ql-single {
		flex-direction: column;
		gap: 40px;
	}

	.ql-single__content,
	.ql-sidebar {
		flex: 1 1 auto;
		width: 100%;
	}

	.ql-single__title {
		font-size: 32px;
	}
}
