/* Shared layout, section headings and buttons for all babe/* blocks. */

[class*="wp-block-babe-"],
[class*="wp-block-babe-"] *,
[class*="wp-block-babe-"] *::before,
[class*="wp-block-babe-"] *::after {
	box-sizing: border-box;
}

.babe-section {
	padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--surface);
}

.babe-section--muted {
	background: var(--wp--preset--color--surface-muted);
}

.babe-container {
	max-width: 1120px;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.babe-section__heading {
	margin: 0 var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	line-height: 1.1;
	color: var(--wp--preset--color--heading);
	text-align: center;
	-webkit-font-smoothing: antialiased;
}

.babe-section__heading--light {
	color: var(--wp--preset--color--surface);
}

.babe-btn {
	display: inline-block;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.25em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	border: 1px solid transparent;
	border-radius: 3px;
	padding: 10px 16px;
	transition: all 0.5s ease;
	cursor: pointer;
}

.babe-btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* atomic-primary-button */
.babe-btn--primary {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	font-size: 20px;
	padding: 20px 48px;
	border-radius: 0;
}
.babe-btn--primary:hover {
	background: #6799b2;
	color: var(--wp--preset--color--primary-bright);
}

/* atomic-outline-button */
.babe-btn--outline {
	background: transparent;
	color: var(--wp--preset--color--text);
	border: 3px solid var(--wp--preset--color--text);
	font-size: 18px;
	padding: 14px 34px;
	border-radius: 0;
}
.babe-btn--outline:hover {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

/* atomic-medium-button */
.babe-btn--medium {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	border: 1px solid var(--wp--preset--color--text);
	padding: 15px 36px;
	border-radius: 0;
}
.babe-btn--medium:hover {
	background: var(--wp--preset--color--primary);
	border-color: #6799b2;
	color: var(--wp--preset--color--surface);
}

/* link_button outline (VIJESTI, Projekti) */
.babe-btn--ghost {
	font-size: var(--wp--preset--font-size--medium);
	background: transparent;
	color: var(--wp--preset--color--text);
	border-color: var(--wp--preset--color--text);
	letter-spacing: normal;
}
.babe-btn--ghost:hover {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

/* Virtualno kućanstvo */
.babe-btn--accent {
	font-size: var(--wp--preset--font-size--medium);
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
	letter-spacing: normal;
}
.babe-btn--accent:hover {
	background: var(--wp--preset--color--accent-hover);
	border-color: var(--wp--preset--color--accent-hover);
}

.babe-btn--accent-outline {
	font-size: var(--wp--preset--font-size--medium);
	background: transparent;
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
	letter-spacing: normal;
}
.babe-btn--accent-outline:hover {
	border-color: var(--wp--preset--color--accent-hover);
	color: var(--wp--preset--color--accent-hover);
}

.babe-empty {
	padding: 1rem;
	border: 1px dashed currentColor;
	font-size: 0.875rem;
	opacity: 0.7;
	text-align: center;
}

@media (max-width: 991px) {
	.babe-btn--primary {
		font-size: 18px;
		padding: 16px 36px;
	}
}

@media (max-width: 767px) {
	.babe-section {
		padding-block: var(--wp--preset--spacing--60);
	}

	.babe-btn--primary,
	.babe-btn--outline {
		font-size: 16px;
	}
}

.wp-block-button[class*="is-style-babe-"] .wp-block-button__link {
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	border-radius: 0;
	transition: all 0.5s ease;
}

.wp-block-button.is-style-babe-primary .wp-block-button__link {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	padding: 16px 36px;
}

.wp-block-button.is-style-babe-primary .wp-block-button__link:hover {
	background: #6799b2;
	color: var(--wp--preset--color--primary-bright);
}

.wp-block-button.is-style-babe-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--text);
	border: 3px solid var(--wp--preset--color--text);
	padding: 14px 34px;
	letter-spacing: normal;
}

.wp-block-button.is-style-babe-outline .wp-block-button__link:hover {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-babe-medium .wp-block-button__link {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	border: 1px solid var(--wp--preset--color--text);
	padding: 15px 36px;
}

.wp-block-button.is-style-babe-medium .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
}

/* page-wide: babe/* sections are full width, core blocks (headings, columns, shortcodes) keep the content width. */
.babe-main--wide .wp-block-post-content > :not([class*="wp-block-babe-"]) {
	max-width: 1120px;
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--40);
}

.babe-main--wide .wp-block-post-content > h1 {
	margin-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--60);
	text-align: center;
}

.babe-main--wide .wp-block-post-content > :last-child:not([class*="wp-block-babe-"]) {
	margin-bottom: var(--wp--preset--spacing--80);
}

/* Single post / projekt / publikacija */
.babe-single__article {
	max-width: 720px;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.babe-single--wide .babe-single__article {
	max-width: 1120px;
}

.babe-single__date {
	text-align: center;
	color: #6b6266;
	font-size: 1rem;
}

.babe-single__title {
	margin: 0 0 20px;
	text-align: center;
	font-size: clamp(29px, 3vw + 1rem, 39px);
	font-weight: 700;
	color: #000;
}

.babe-single__title--left {
	text-align: left;
	font-size: 2rem;
	line-height: 1.2;
}

.babe-single__image img {
	display: block;
	width: 100%;
	height: auto;
}

.babe-single > .babe-single__image {
	max-width: 860px;
	margin: -24px auto 0;
	padding-inline: var(--wp--preset--spacing--40);
	position: relative;
}

.babe-single > .babe-single__image img {
	border-radius: 16px;
	box-shadow: 0 14px 34px rgba(34, 29, 32, 0.12);
}

.babe-single__image--logo img {
	width: auto;
	max-width: min(500px, 100%);
	object-fit: contain;
}

.babe-single__image--cover img {
	width: auto;
	max-width: min(260px, 100%);
	margin-top: 25px;
}

.babe-single__content {
	font-size: 18px;
	line-height: 1.7;
	color: #2b2c28;
}

.babe-single > .babe-single__content {
	max-width: 720px;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40) 0;
	font-size: 19px;
}

.babe-single > .babe-single__content > p {
	margin-block: 0 1.1em;
}

/* Lead paragraph: larger and darker, not bold (news intros are often long) */
.babe-single > .babe-single__content > p:first-of-type {
	font-size: 21px;
	line-height: 1.6;
	color: #221d20;
}

.babe-single__content img {
	border-radius: 12px;
	height: auto;
}

.babe-single__latest {
	margin-top: var(--wp--preset--spacing--80);
	background: var(--wp--preset--color--surface-warm);
}

.babe-single .wp-block-buttons {
	margin-top: 2rem;
}

.babe-band {
	background: #e8e8e8;
}

.babe-band .babe-single__article {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

/* Archive / search title */
.babe-archive__title {
	max-width: 1120px;
	margin: var(--wp--preset--spacing--80) auto 0;
	margin-bottom: var(--wp--preset--spacing--70);
	padding-inline: var(--wp--preset--spacing--40);
	text-align: center;
}

.babe-search .babe-archive__title {
	font-size: clamp(1.75rem, 4vw, 2.8rem);
	text-align: left;
	margin-bottom: var(--wp--preset--spacing--50);
}

/* 404 */
.babe-404 {
	min-height: 55vh;
	padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--40);
}

.babe-404__logo img {
	max-width: 330px;
	width: 60%;
	height: auto;
	margin-inline: auto;
}

.babe-404__text {
	font-size: clamp(1.75rem, 3.5vw, 2.4rem);
	line-height: 1.3;
	margin-block: var(--wp--preset--spacing--50);
}

/* "Istaknuti okvir" block style (paragraph, group) */
.is-style-babe-note {
	box-sizing: border-box;
	padding: 18px 22px;
	background: #fff7d6;
	border-left: 4px solid var(--wp--preset--color--highlight);
	border-radius: 10px;
}

.is-style-babe-note > :first-child {
	margin-top: 0;
}

.is-style-babe-note > :last-child {
	margin-bottom: 0;
}

/* Regular pages (templates/page.html): readable text column, wide blocks stay wide */
.babe-page__content {
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40) var(--wp--preset--spacing--80);
	font-size: 18px;
	line-height: 1.7;
	color: #2b2c28;
}

.babe-page__content > * {
	max-width: 760px;
	margin-inline: auto;
}

.babe-page__content > :is(.wp-block-columns, .wp-block-media-text, .wp-block-cover, .alignwide, [class*="wp-block-babe-"], .wp-block-group.babe-team) {
	max-width: 1120px;
}

.babe-page__content > .alignfull {
	max-width: none;
}

.babe-page__content > p {
	margin-block: 0 1.1em;
}

.babe-page__content > p:first-child {
	font-size: 21px;
	line-height: 1.6;
	color: #221d20;
}

.babe-page__content :is(h2, h3) {
	margin-top: 1.8em;
	margin-bottom: 0.6em;
	font-family: var(--wp--preset--font-family--heading);
	line-height: 1.25;
	color: #221d20;
}

.babe-page__content li::marker {
	color: var(--wp--preset--color--primary);
}

/* Editors justified text in places (inline style or the justify class); only that is reset to left —
   centred and right-aligned text keeps its alignment. */
:is(.babe-page__content, .babe-single__content) :is(.has-text-align-justify, [style*="text-align:justify"], [style*="text-align: justify"]) {
	text-align: left !important;
}

/* Naš tim: "Ime / uloga" cards */
.babe-team {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.babe-team > p {
	margin: 0;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid #ece7e4;
	border-top: 3px solid var(--wp--preset--color--primary);
	border-radius: 12px;
	font-size: 16px;
	line-height: 1.5;
	color: #4a4346;
}

.babe-team > p strong {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 19px;
	color: #221d20;
}

@media (max-width: 991px) {
	.babe-team {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.babe-team {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* "Povezano": related pages at the end of key pages */
.babe-related {
	margin-top: var(--wp--preset--spacing--60);
	margin-bottom: var(--wp--preset--spacing--60);
	padding-top: 24px;
	border-top: 1px solid #ece7e4;
}

.babe-related h2 {
	margin: 0 0 14px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 20px;
}

.babe-related ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.babe-related li::marker {
	content: none;
}

.babe-related a {
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid #ddd5d1;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	color: #221d20;
	text-decoration: none;
	background: #fff;
}

.babe-related a::after {
	content: " →";
	color: var(--wp--preset--color--primary);
}

.babe-related a:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* Shared blocks used by posts-grid and filter-grid: babe-pagination, babe-placeholder */
.babe-pagination {
	margin-top: 2em;
	text-align: center;
	font-size: 0.8em;
}

.babe-pagination .page-numbers {
	display: inline-block;
	padding: 0.25em 0.5em;
	color: #000;
	text-decoration: none;
}

.babe-pagination .current {
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

.babe-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 160px;
	background: linear-gradient(135deg, var(--wp--preset--color--primary), #e8737a);
}

.babe-placeholder__logo {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 800;
	font-style: italic;
	color: #fff;
	letter-spacing: -0.02em;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Compact placeholder (small thumbnails): no minimum height, smaller logo */
.babe-placeholder--compact {
	min-height: 0;
}

.babe-placeholder--compact .babe-placeholder__logo {
	font-size: 28px;
}

/* O nama (babe-about): intro, mission & vision cards, program cards */
.babe-page__content > [class*="babe-about__"] {
	max-width: 1120px;
}

.babe-about__intro {
	gap: clamp(28px, 5vw, 64px);
	margin-bottom: var(--wp--preset--spacing--80);
}

.babe-about__lead {
	margin: 0;
	padding-left: 20px;
	border-left: 4px solid var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(20px, 2.2vw, 24px);
	line-height: 1.5;
	color: #221d20;
}

.babe-about__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 18px;
	box-shadow: 0 18px 40px rgba(34, 29, 32, 0.15);
}

.babe-about__values {
	gap: 24px;
	margin-bottom: var(--wp--preset--spacing--80);
}

.babe-about__value {
	height: 100%;
	box-sizing: border-box;
	padding: clamp(24px, 4vw, 40px);
	border-radius: 18px;
	overflow: hidden;
}

.babe-about__value--mission {
	background: var(--wp--preset--color--surface-warm);
}

.babe-about__value--vision {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

.babe-about__value-image {
	margin: 0 0 20px;
}

.babe-about__value-image img {
	display: block;
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 12px;
}

.babe-about__value--mission .babe-about__value-image img {
	object-fit: contain;
	background: #fff;
}

.babe-page__content .babe-about__label {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.babe-page__content .babe-about__value--vision .babe-about__label {
	color: var(--wp--preset--color--highlight);
}

.babe-about__statement {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(20px, 2.2vw, 26px);
	font-weight: 700;
	line-height: 1.35;
}

.babe-about__value--mission .babe-about__statement {
	color: #221d20;
}

.babe-page__content .babe-about__heading {
	text-align: center;
	margin-bottom: 32px;
}

.babe-page__content .babe-about__heading::after {
	content: "";
	display: block;
	width: 44px;
	height: 3px;
	margin: 16px auto 0;
	border-radius: 2px;
	background: var(--wp--preset--color--primary);
}

.babe-about__programs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.babe-about__program {
	overflow: hidden;
	background: #fff;
	border: 1px solid #ece7e4;
	border-radius: 14px;
}

.babe-about__program-image {
	margin: 0;
}

.babe-about__program-image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.babe-page__content .babe-about__program-title {
	margin: 22px 24px 8px;
	font-size: 21px;
}

.babe-about__program-text {
	margin: 0 24px 26px;
	font-size: 16px;
	line-height: 1.65;
	color: #4a4346;
}

/* Program cards are links to the program (title link stretched over the card) */
.babe-about__program {
	position: relative;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.babe-about__program:hover,
.babe-about__program:focus-within {
	box-shadow: 0 12px 30px rgba(34, 29, 32, 0.1);
	transform: translateY(-3px);
}

.babe-about__program:focus-within {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

.babe-page__content .babe-about__program-title a {
	color: #221d20;
	text-decoration: none;
}

.babe-about__program-title a::before {
	content: "";
	position: absolute;
	inset: 0;
}

.babe-about__program-title a:focus-visible {
	outline: none;
}

.babe-page__content .babe-about__program:hover .babe-about__program-title a {
	color: var(--wp--preset--color--primary);
}

.babe-page__content .babe-about__program-more {
	margin: auto 24px 24px;
	font-size: 15px;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

@media (max-width: 781px) {
	.babe-about__programs {
		grid-template-columns: minmax(0, 1fr);
	}

	.babe-about__photo img {
		aspect-ratio: 16 / 10;
	}
}
