/**
 * 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-hero {
	padding: 0 0 88px;
	background: var( --fbb-color-navy );
}

.fbb-comunidade-hero .fbb-comunidade-container {
	max-width: none;
	padding-inline: 0;
}

.fbb-comunidade-hero__frame {
	position: relative;
	/* Sem trust bar nesta página — o hero sozinho preenche a primeira
	 * dobra (100svh menos header e o padding-bottom da seção). */
	height: calc( 100svh - 278px );
	min-height: 430px;
	overflow: hidden;
	background: var( --fbb-color-navy );
}

.fbb-comunidade-hero__image,
.fbb-comunidade-hero__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fbb-comunidade-hero__placeholder {
	background: linear-gradient( 135deg, var( --fbb-color-navy ), #1b367f );
}

.fbb-comunidade-hero__overlay {
	position: relative;
	z-index: 1;
	display: grid;
	align-content: center;
	min-height: inherit;
	max-width: 760px;
	margin-left: max( var( --fbb-page-gutter ), calc( ( 100vw - var( --fbb-container-max-width ) ) / 2 + var( --fbb-page-gutter ) ) );
	padding: 76px 92px 76px 0;
	color: var( --fbb-color-white );
	background: linear-gradient( 90deg, rgba( 0, 35, 120, .78 ), rgba( 0, 35, 120, .18 ) 72%, transparent );
}

.fbb-comunidade-breadcrumb {
	display: flex;
	gap: 7px;
	margin-bottom: 26px;
	color: rgba( 255, 255, 255, .76 );
	font-size: 13px;
	font-weight: var( --fbb-font-weight-medium );
}

.fbb-comunidade-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.fbb-comunidade-hero h1,
.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-hero h1 {
	color: var( --fbb-color-white );
	font-size: clamp( 36px, 4.6vw, 56px );
	line-height: 1.08;
}

.fbb-comunidade-hero .fbb-rich-text {
	max-width: 620px;
	margin: 24px 0 0;
	color: rgba( 255, 255, 255, .88 );
	font-size: var( --fbb-body-size );
	font-weight: var( --fbb-font-weight-medium );
	line-height: 1.7;
}

.fbb-comunidade-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 34px;
}

.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: center;
}

.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;
}

.fbb-comunidade-about__tile,
.fbb-comunidade-gallery__item {
	margin: 0;
	overflow: hidden;
	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__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;
	right: 22%;
	bottom: -14px;
	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-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( 3, minmax( 0, 1fr ) );
	gap: 24px;
}

.fbb-comunidade-event-card {
	overflow: hidden;
	background: var( --fbb-color-white );
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba( 0, 35, 120, .08 );
}

.fbb-comunidade-event-card--featured {
	grid-column: span 2;
}

.fbb-comunidade-event-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
}

.fbb-comunidade-event-card__media .fbb-comunidade-image-placeholder {
	width: 100%;
	height: 100%;
	min-height: 0;
}

.fbb-comunidade-event-card--featured .fbb-comunidade-event-card__media {
	height: clamp( 240px, 24vw, 300px );
	aspect-ratio: auto;
}

.fbb-comunidade-event-card__date {
	position: absolute;
	top: 16px;
	left: 16px;
	overflow: hidden;
	min-width: 58px;
	text-align: center;
	color: var( --fbb-color-white );
	background: var( --fbb-color-navy );
	border-radius: 8px;
}

.fbb-comunidade-event-card__date strong {
	display: block;
	padding: 8px;
	font-size: 26px;
	line-height: 1;
}

.fbb-comunidade-event-card__date span {
	display: block;
	padding: 5px 8px;
	background: var( --fbb-color-red );
	font-size: 11px;
	font-weight: var( --fbb-font-weight-bold );
	text-transform: uppercase;
}

.fbb-comunidade-event-card__body {
	padding: 24px;
}

.fbb-comunidade-event-card h3,
.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-event-card p,
.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-event-card a,
.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-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 {
		grid-template-columns: 1fr;
	}

	.fbb-comunidade-events__grid,
	.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;
	}
}

/* Mobile (≤767px) */
@media ( max-width: 767px ) {
	.fbb-comunidade-hero__overlay {
		margin-left: 0;
		padding: 56px var( --fbb-page-gutter );
		background: linear-gradient( 90deg, rgba( 0, 35, 120, .86 ), rgba( 0, 35, 120, .44 ) );
	}

	.fbb-comunidade-hero h1 {
		font-size: 36px;
	}

	.fbb-comunidade-about__grid {
		grid-template-columns: 1fr;
	}

	.fbb-comunidade-events__grid,
	.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-hero,
	.fbb-comunidade-about,
	.fbb-comunidade-gallery {
		padding-bottom: 64px;
	}

	.fbb-comunidade-hero__frame {
		height: calc( 100svh - 192px );
	}

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

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

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