/**
 * Pattern: Resources
 * Sekcja z tytułem, intro, trzema kartami tematycznymi i przyciskiem CTA.
 * Szerokość ograniczona do sectionWidth, wyśrodkowana.
 *
 * @package nbs-theme
 */

/* Wrapper całej sekcji – pełna szerokość, flex, border green */
.nbs-resources-wrapper {
	box-sizing: border-box;
	width: 100vw;
	margin-left: 50%;
	transform: translateX(-50%);
	display: flex;
	justify-content: center;
	align-items: stretch;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

section.nbs-resources {
	box-sizing: border-box;
	display: flow-root;
	max-width: var(--wp--custom--section-width, 1140px);
	margin-top: var(--wp--custom--section-top-and-bottom-margin, 2rem);
	margin-bottom: var(--wp--custom--section-top-and-bottom-margin, 2rem);
	margin-left: var(--wp--custom--horizontal-section-margin, 24px);
	margin-right: var(--wp--custom--horizontal-section-margin, 24px);
}

/* Tytuł H2 – wyśrodkowany */
.nbs-resources__title {
	text-align: center;
	margin-top: 0;
	margin-bottom: 1rem;
	padding: 0.5rem;
}

/* Intro – body-default */
.nbs-resources__intro {
	margin-top: 0;
	margin-bottom: 0;
	padding: 0px;
}

/* Kontener zbiorczy kart – flex row, gap między kartami, marginy 60px */
.nbs-resources__cards {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-start;
	gap: 24px;
	margin-top: 60px;
	margin-bottom: 60px;
	width: 100%;
	box-sizing: border-box;
}

/* WordPress potrafi narzucić nowrap dla .is-layout-flex – nadpisujemy */
.nbs-resources__cards.is-layout-flex {
	flex-wrap: wrap;
}

/* Pojedyncza karta */
.nbs-resources__card {
	flex: 1 1 calc((100% - 48px) / 3);
	min-width: 0;
	box-sizing: border-box;
	padding: 24px;
	background-color: var(--wp--preset--color--accent-blue, #35ADCB);
	border-radius: 8px;
}

/* Tytuł karty – h3 ze style.css, wyśrodkowany, biały */
.nbs-resources__card-title {
	text-align: center;
	color: var(--wp--preset--color--white, #ffffff);
	margin-top: 0;
	margin-bottom: 1rem;
}

/* Treść karty – body-default, wyśrodkowany, biały */
.nbs-resources__card-text {
	text-align: center;
	color: var(--wp--preset--color--white, #ffffff);
	margin-top: 0;
	margin-bottom: 0;
}

/* CTA – wyśrodkowany */
.nbs-resources__cta {
	margin: 0;
	justify-content: center;
	padding: 0.75rem;
}

/* Responsywność */
@media (max-width: 768px) {
	.nbs-resources__cards {
		flex-wrap: wrap;
	}

	.nbs-resources__card {
		flex: 0 0 100%;
	}
}

