/**
 * Página Comunidade.
 */

.fbb-main--comunidade {
	background: var( --fbb-color-white );
	color: var( --fbb-color-text );
}

.fbb-comunidade-container {
	width: 100%;
	max-width: var( --fbb-container-max-width );
	margin-inline: auto;
	padding-inline: var( --fbb-page-gutter );
}

.fbb-comunidade-eyebrow {
	margin: 0 0 14px;
	color: var( --fbb-color-red );
	font-size: 13px;
	font-weight: var( --fbb-font-weight-bold );
	letter-spacing: .12em;
	line-height: 1.4;
	text-transform: uppercase;
}

.fbb-comunidade-about h2,
.fbb-comunidade-section-header h2,
.fbb-comunidade-final-cta h2 {
	margin: 0;
	color: var( --fbb-color-navy );
	font-weight: var( --fbb-font-weight-bold );
	letter-spacing: 0;
}

.fbb-comunidade-about,
.fbb-comunidade-gallery {
	/* Padrão de ritmo vertical do site — antes só tinha padding-bottom,
	 * a seção colava direto no hero. */
	padding-block: var( --fbb-section-space-block );
}

.fbb-comunidade-about__grid {
	display: grid;
	grid-template-columns: minmax( 0, .92fr ) minmax( 460px, 1fr );
	gap: 86px;
	align-items: start;
}

.fbb-comunidade-about__content h2,
.fbb-comunidade-section-header h2,
.fbb-comunidade-final-cta h2 {
	font-size: clamp( 30px, 3.6vw, 42px );
	line-height: 1.2;
}

.fbb-comunidade-about__content .fbb-rich-text,
.fbb-comunidade-section-header .fbb-rich-text,
.fbb-comunidade-gallery__header .fbb-rich-text {
	margin: 24px 0 0;
	font-size: var( --fbb-body-size );
	font-weight: var( --fbb-font-weight-medium );
	line-height: 1.7;
}

.fbb-comunidade-about__content .fbb-btn--pill {
	margin-top: 34px;
}

.fbb-comunidade-about__mosaic {
	position: relative;
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 16px;
	align-self: start;
	padding-block: 18px;
}

.fbb-comunidade-gallery__item {
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	background: var( --fbb-color-gray-page-bg );
}

.fbb-comunidade-about__tile {
	position: relative;
	margin: 0;
	border-radius: 8px;
	background: var( --fbb-color-gray-page-bg );
}

.fbb-comunidade-about__tile:nth-child( odd ) {
	transform: translateY( -18px ) rotate( -1deg );
}

.fbb-comunidade-about__tile:nth-child( even ) {
	transform: translateY( 18px ) rotate( 1deg );
}

.fbb-comunidade-about__image,
.fbb-comunidade-gallery__image,
.fbb-comunidade-event-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fbb-comunidade-about__image,
.fbb-comunidade-about__tile .fbb-comunidade-image-placeholder {
	overflow: hidden;
	border-radius: inherit;
}

.fbb-comunidade-about__tile,
.fbb-comunidade-about__image,
.fbb-comunidade-about__tile .fbb-comunidade-image-placeholder {
	min-height: 230px;
}

.fbb-comunidade-image-placeholder {
	display: grid;
	min-height: 180px;
	place-items: center;
	background: linear-gradient( 135deg, #e8e8e8, #f5f5f5 );
}

.fbb-comunidade-about__badge {
	position: absolute;
	bottom: -14px;
	left: 50%;
	z-index: 2;
	transform: translateX( -50% );
	padding: 13px 22px;
	color: var( --fbb-color-white );
	background: var( --fbb-color-navy );
	border-radius: var( --fbb-radius-pill );
	font-size: 13px;
	font-weight: var( --fbb-font-weight-bold );
	line-height: 1.2;
}

.fbb-comunidade-about__rows {
	display: grid;
	gap: clamp( 72px, 8vw, 125px );
	margin-top: clamp( 72px, 8vw, 125px );
}

.fbb-comunidade-about__row {
	display: grid;
	grid-template-areas: "media content";
	grid-template-columns: minmax( 0, .9fr ) minmax( 0, 1fr );
	gap: clamp( 40px, 5vw, 77px );
	align-items: center;
}

.fbb-comunidade-about__row--reverse {
	grid-template-areas: "content media";
	grid-template-columns: minmax( 0, .85fr ) minmax( 0, 1.1fr );
}

.fbb-comunidade-about__row-media {
	grid-area: media;
	overflow: hidden;
	margin: 0;
	background: var( --fbb-color-gray-page-bg );
	border-radius: 8px;
}

.fbb-comunidade-about__row--portrait .fbb-comunidade-about__row-media {
	aspect-ratio: 1;
}

.fbb-comunidade-about__row--landscape .fbb-comunidade-about__row-media {
	aspect-ratio: 2.2;
}

.fbb-comunidade-about__row--final .fbb-comunidade-about__row-media {
	aspect-ratio: 1.24;
}

.fbb-comunidade-about__row-image,
.fbb-comunidade-about__row-media .fbb-comunidade-image-placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

.fbb-comunidade-about__row-image {
	object-fit: cover;
	transition: transform .35s ease;
}

.fbb-comunidade-about__row-media:hover .fbb-comunidade-about__row-image {
	transform: scale( 1.06 );
}

.fbb-comunidade-about__row-content {
	grid-area: content;
	max-width: 660px;
}

.fbb-comunidade-about__row-content h3 {
	margin: 0;
	color: var( --fbb-color-navy );
	font-size: 24px;
	font-weight: var( --fbb-font-weight-bold );
	line-height: 1.3;
}

.fbb-comunidade-about__row-content .fbb-rich-text {
	margin: 18px 0 0;
	font-size: var( --fbb-body-size );
	font-weight: var( --fbb-font-weight-medium );
	line-height: 1.7;
}

.fbb-comunidade-about__row-content > .fbb-rich-text:first-child {
	margin-top: 0;
}

.fbb-comunidade-events,
.fbb-comunidade-network {
	padding: 96px 0;
	background: var( --fbb-color-gray-page-bg );
}

.fbb-comunidade-section-header {
	max-width: 720px;
	margin-bottom: 56px;
}

.fbb-comunidade-section-header--center {
	margin-inline: auto;
	text-align: center;
}

.fbb-comunidade-events__grid {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 20px 24px;
}

.fbb-comunidade-event-card {
	overflow: hidden;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
}

.fbb-comunidade-events .fbb-event-card {
	display: grid;
	grid-template-columns: 32% minmax( 0, 1fr );
	height: 250px;
	min-height: 250px;
}

.fbb-comunidade-events .fbb-event-card__data {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 24px;
	color: var( --fbb-color-white );
	background: var( --fbb-color-navy );
	text-align: center;
}

.fbb-comunidade-events .fbb-event-card__dia {
	font-size: 72px;
	font-weight: var( --fbb-font-weight-extrabold );
	line-height: .9;
}

.fbb-comunidade-events .fbb-event-card__mes {
	margin-top: 8px;
	font-size: 22px;
	font-weight: var( --fbb-font-weight-bold );
	line-height: 1;
	text-transform: lowercase;
}

.fbb-comunidade-events .fbb-event-card__ano {
	margin-top: 4px;
	color: var( --fbb-color-white );
	font-size: 17px;
	line-height: 1;
}

.fbb-comunidade-events .fbb-event-card__media {
	position: relative;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	background: #e5e5e5;
	text-decoration: none;
}

.fbb-comunidade-events .fbb-event-card__media:focus-visible {
	outline: 3px solid var( --fbb-color-yellow );
	outline-offset: -3px;
}

.fbb-comunidade-events .fbb-event-card__image,
.fbb-comunidade-events .fbb-comunidade-image-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: cover;
}

.fbb-comunidade-events .fbb-event-card__body {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 16px 20px;
	background: rgba( 0, 35, 120, .88 );
	opacity: 0;
	transform: translateY( 12px );
	transition: opacity .22s ease, transform .22s ease;
}

.fbb-comunidade-events .fbb-event-card:hover .fbb-event-card__body,
.fbb-comunidade-events .fbb-event-card:focus-within .fbb-event-card__body {
	opacity: 1;
	transform: translateY( 0 );
}

.fbb-comunidade-events .fbb-event-card__titulo {
	margin: 0;
	color: var( --fbb-color-white );
	font-size: 16px;
	font-weight: var( --fbb-font-weight-bold );
	line-height: 1.35;
}

.fbb-comunidade-events .fbb-event-card__descricao {
	display: -webkit-box;
	overflow: hidden;
	margin: 6px 0 0;
	color: var( --fbb-color-white );
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 12px;
	font-weight: var( --fbb-font-weight-medium );
	line-height: 1.45;
}

.fbb-comunidade-network-card h3 {
	margin: 0;
	color: var( --fbb-color-navy );
	font-size: 20px;
	font-weight: var( --fbb-font-weight-bold );
	line-height: 1.35;
}

.fbb-comunidade-network-card .fbb-rich-text {
	margin: 12px 0 0;
	font-size: 14px;
	font-weight: var( --fbb-font-weight-medium );
	line-height: 1.7;
}

.fbb-comunidade-network-card a {
	display: inline-flex;
	margin-top: 18px;
	color: var( --fbb-color-navy );
	font-size: 13px;
	font-weight: var( --fbb-font-weight-bold );
	text-decoration: none;
}

.fbb-comunidade-events__cta {
	display: table;
	margin: 34px auto 0;
}

.fbb-comunidade-agenda {
	padding: 96px 0;
	background: var( --fbb-color-white );
}

.fbb-comunidade-agenda__header {
	max-width: 720px;
	margin-bottom: 42px;
}

.fbb-comunidade-agenda__header .fbb-rich-text {
	margin-top: 18px;
	font-size: 17px;
	font-weight: var( --fbb-font-weight-medium );
	line-height: 1.7;
}

.fbb-comunidade-agenda__list {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 18px 24px;
}

.fbb-comunidade-agenda-card {
	display: grid;
	grid-template-columns: 150px minmax( 0, 1fr );
	min-height: 152px;
	overflow: hidden;
	background: var( --fbb-color-gray-page-bg );
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba( 0, 35, 120, .06 );
}

.fbb-comunidade-agenda-card__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 152px;
	padding: 24px 18px;
	color: var( --fbb-color-white );
	background: var( --fbb-color-navy );
	text-align: center;
}

.fbb-comunidade-agenda-card__day {
	display: block;
	font-size: clamp( 46px, 4vw, 64px );
	font-weight: var( --fbb-font-weight-extrabold );
	line-height: .9;
}

.fbb-comunidade-agenda-card__month {
	display: block;
	margin-top: 6px;
	font-size: 19px;
	font-weight: var( --fbb-font-weight-bold );
	line-height: 1;
	text-transform: lowercase;
}

.fbb-comunidade-agenda-card__year {
	display: block;
	margin-top: 4px;
	font-size: 17px;
	line-height: 1;
}

.fbb-comunidade-agenda-card__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 26px 30px;
}

.fbb-comunidade-agenda-card h3 {
	margin: 0;
	color: var( --fbb-color-navy );
	font-size: 21px;
	font-weight: var( --fbb-font-weight-bold );
	line-height: 1.25;
}

.fbb-comunidade-agenda-card p {
	margin: 12px 0 0;
	color: var( --fbb-color-text );
	font-size: 14px;
	font-weight: var( --fbb-font-weight-medium );
	line-height: 1.6;
}

.fbb-comunidade-agenda__empty {
	margin: 0;
	padding: 28px;
	color: var( --fbb-color-navy );
	background: var( --fbb-color-gray-page-bg );
	border-radius: 8px;
	font-weight: var( --fbb-font-weight-bold );
	text-align: center;
}

.fbb-comunidade-gallery {
	padding-top: 96px;
}

.fbb-comunidade-gallery__header {
	display: flex;
	gap: 28px;
	align-items: end;
	justify-content: space-between;
	max-width: none;
}

.fbb-comunidade-gallery__header > div {
	max-width: 660px;
}

.fbb-comunidade-gallery__grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 16px;
}

.fbb-comunidade-gallery__item:nth-child( 1 ),
.fbb-comunidade-gallery__item:nth-child( 5 ) {
	grid-row: span 2;
}

.fbb-comunidade-gallery__item,
.fbb-comunidade-gallery__image,
.fbb-comunidade-gallery__item .fbb-comunidade-image-placeholder {
	min-height: 220px;
}

.fbb-comunidade-gallery__item:nth-child( 1 ),
.fbb-comunidade-gallery__item:nth-child( 1 ) .fbb-comunidade-gallery__image,
.fbb-comunidade-gallery__item:nth-child( 1 ) .fbb-comunidade-image-placeholder,
.fbb-comunidade-gallery__item:nth-child( 5 ),
.fbb-comunidade-gallery__item:nth-child( 5 ) .fbb-comunidade-gallery__image,
.fbb-comunidade-gallery__item:nth-child( 5 ) .fbb-comunidade-image-placeholder {
	min-height: 456px;
}

.fbb-comunidade-network__grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 24px;
}

.fbb-comunidade-network-card {
	padding: 28px;
	background: var( --fbb-color-white );
	border-radius: 8px;
	box-shadow: 0 10px 26px rgba( 0, 35, 120, .08 );
}

.fbb-comunidade-network-card__logo {
	display: grid;
	min-height: 86px;
	margin-bottom: 24px;
	place-items: center;
	color: var( --fbb-color-text );
	background: var( --fbb-color-gray-page-bg );
	border-radius: 6px;
	font-size: 12px;
	font-weight: var( --fbb-font-weight-bold );
	text-transform: uppercase;
}

.fbb-comunidade-network-card__logo img {
	max-width: 160px;
	max-height: 70px;
	object-fit: contain;
}

.fbb-comunidade-final-cta {
	padding: 76px 0 88px;
	background: var( --fbb-color-gray-page-bg );
	text-align: center;
}

.fbb-comunidade-final-cta > div > div {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	margin-top: 32px;
}

/* Tablet e abaixo (≤1023px) */
@media ( max-width: 1023px ) {
	.fbb-comunidade-about__grid,
	.fbb-comunidade-about__row,
	.fbb-comunidade-about__row--reverse {
		grid-template-columns: 1fr;
	}

	.fbb-comunidade-about__row,
	.fbb-comunidade-about__row--reverse {
		grid-template-areas:
			"media"
			"content";
	}

	.fbb-comunidade-events__grid,
	.fbb-comunidade-agenda__list,
	.fbb-comunidade-network__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.fbb-comunidade-gallery__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.fbb-comunidade-event-card--featured,
	.fbb-comunidade-gallery__item:nth-child( 1 ),
	.fbb-comunidade-gallery__item:nth-child( 5 ) {
		grid-column: auto;
		grid-row: auto;
	}

	.fbb-comunidade-events .fbb-event-card__body {
		opacity: 1;
		transform: none;
	}
}

/* Mobile (≤767px) */
@media ( max-width: 767px ) {
	.fbb-comunidade-about__grid {
		grid-template-columns: 1fr;
	}

	.fbb-comunidade-events__grid,
	.fbb-comunidade-agenda__list,
	.fbb-comunidade-network__grid,
	.fbb-comunidade-gallery__grid {
		grid-template-columns: 1fr;
	}

	.fbb-comunidade-event-card--featured,
	.fbb-comunidade-gallery__item:nth-child( 1 ),
	.fbb-comunidade-gallery__item:nth-child( 5 ) {
		grid-column: auto;
		grid-row: auto;
	}

	.fbb-comunidade-gallery__header {
		display: grid;
	}

	.fbb-comunidade-about,
	.fbb-comunidade-gallery {
		padding-bottom: 64px;
	}

	.fbb-comunidade-about,
	.fbb-comunidade-events,
	.fbb-comunidade-agenda,
	.fbb-comunidade-network,
	.fbb-comunidade-gallery {
		padding-top: 64px;
	}

	.fbb-comunidade-agenda-card {
		grid-template-columns: 112px minmax( 0, 1fr );
		min-height: 128px;
	}

	.fbb-comunidade-agenda-card__date {
		min-height: 128px;
		padding: 18px 12px;
	}

	.fbb-comunidade-agenda-card__day {
		font-size: 42px;
	}

	.fbb-comunidade-agenda-card__month {
		font-size: 15px;
	}

	.fbb-comunidade-agenda-card__year {
		font-size: 14px;
	}

	.fbb-comunidade-agenda-card__content {
		padding: 22px 20px;
	}

	.fbb-comunidade-about__mosaic {
		grid-template-columns: 1fr;
		padding-block: 0;
	}

	.fbb-comunidade-about__tile {
		transform: none !important;
	}

	.fbb-comunidade-about__rows {
		gap: 64px;
		margin-top: 64px;
	}

	.fbb-comunidade-about__row {
		gap: 28px;
	}
}
