/* ==========================================================================
   The Capital — Circle Benefits
   Staggered 3×2 grid: alternating photo/card items.
   The centre column is offset downward for a non-uniform look.
   ========================================================================== */

/* ------------------------------------------------------------------
   1. Section
   ------------------------------------------------------------------ */
.tc-benefits {
	text-align: center;
	padding-bottom: 130px !important;

	@media (max-width: 767px) {
		/* padding-top: 0 !important; */
		padding-bottom: 10px !important;
	}
}

.home .tc-benefits {
	@media (max-width: 767px) {
		padding-top: 40px !important;
	}
}

.tc-benefits.circle {
	padding-bottom: 70px !important;

	@media (max-width: 767px) {
		padding-bottom: 10px !important;
	}	
}

/* ------------------------------------------------------------------
   2. Header
   ------------------------------------------------------------------ */
.tc-benefits-eyebrow,
.tc-benefits-subheading {
	margin-bottom: 8px;
}

.tc-benefits-eyebrow .elementor-heading-title,
.tc-benefits-subheading .elementor-heading-title {
	font-family: 'DM Sans', var(--tc-font-body), sans-serif !important;
	font-size: 18px !important;
	font-weight: 500 !important;
	letter-spacing: 3.78px !important;
}

.tc-benefits-title,
.tc-benefits-heading {
	margin-bottom: 0;
}

.tc-benefits-title .elementor-heading-title,
.tc-benefits-heading .elementor-heading-title {
	font-size: 56px !important;
}

/* ------------------------------------------------------------------
   3. Grid Layout — Masonry
   Fine-grained row grid (5px units) with explicit item placement.
   Each column flows independently: taller photos push items below
   them further down than shorter cards, creating true masonry.

   Layout:
     Col 1: Photo (92 rows = 460px)  →  Card  (64 rows = 320px)
     Col 2: Card  (64 rows = 320px)  →  Photo (92 rows = 460px)
     Col 3: Photo (92 rows = 460px)  →  Card  (64 rows = 320px)
   ------------------------------------------------------------------ */
.tc-benefits-grid {

	@media (max-width: 767px) {
		padding-top: 20px !important;
	}
}

.tc-benefits-grid .elementor-row,
.tc-benefits-grid .elementor-container {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 20px;
	row-gap: 0;
	max-width: 1200px !important;
	margin: 0 auto;
}

.tc-benefits-grid:not(.only-cards) .elementor-row,
.tc-benefits-grid:not(.only-cards) .elementor-container {
	grid-auto-rows: 5px;
}

/*
 * Explicit placement for every item.
 * Photos = 92 rows (460px), Cards = 64 rows (320px), Gap = 3 rows (15px).
 *
 * Col 1:  Photo  rows 1–92   |  Card   rows 96–159
 * Col 2:  Card   rows 1–64   |  Photo  rows 68–159
 * Col 3:  Photo  rows 1–92   |  Card   rows 96–159
 *
 * All columns end at row 159 → bottoms align.
 * Col 2 photo starts at row 68 (vs row 96 for outer cards) → masonry stagger.
 */

/* Item 1 — Photo, col 1 top */
.tc-benefits-grid:not(.only-cards) .tc-benefit-item:nth-child(1) { grid-column: 1; grid-row: 1 / span 92; }
/* Item 2 — Card, col 2 top */
.tc-benefits-grid:not(.only-cards) .tc-benefit-item:nth-child(2) { grid-column: 2; grid-row: 1 / span 64; }
/* Item 3 — Photo, col 3 top */
.tc-benefits-grid:not(.only-cards) .tc-benefit-item:nth-child(3) { grid-column: 3; grid-row: 1 / span 92; }
/* Item 4 — Card, col 1 bottom */
.tc-benefits-grid:not(.only-cards) .tc-benefit-item:nth-child(4) { grid-column: 1; grid-row: 96 / span 64; }
/* Item 5 — Photo, col 2 bottom */
.tc-benefits-grid:not(.only-cards) .tc-benefit-item:nth-child(5) { grid-column: 2; grid-row: 68 / span 92; }
/* Item 6 — Card, col 3 bottom */
.tc-benefits-grid:not(.only-cards) .tc-benefit-item:nth-child(6) { grid-column: 3; grid-row: 96 / span 64; }

.tc-benefits-grid.only-cards .tc-benefit-item {
	aspect-ratio: 5 / 4;

	@media (max-width: 1200px) {
		aspect-ratio: auto;
	}
}

/* ------------------------------------------------------------------
   4. Grid Items — common
   ------------------------------------------------------------------ */
.tc-benefit-item {
	width: 100% !important;
	border-radius: 8px;
	overflow: hidden;
}

/* ------------------------------------------------------------------
   5. Photo Items
   ------------------------------------------------------------------ */
.tc-benefit-photo {
	padding: 0 !important;
	/* Height controlled by grid-row span (92 × 5px = 460px) */
}

.tc-benefit-photo .tc-benefit-img,
.tc-benefit-photo .elementor-widget-image {
	height: 100%;
	margin-bottom: 0;
}

.tc-benefit-photo .tc-benefit-img .elementor-widget-container,
.tc-benefit-photo .elementor-widget-image .elementor-widget-container {
	height: 100%;
}

.tc-benefit-photo img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	display: block;
	border-radius: 8px !important;
}

/* ------------------------------------------------------------------
   6. Text Card Items
   ------------------------------------------------------------------ */
.tc-benefit-card {
	background: #1C1C1C !important;
	padding: 30px 25px !important;
	text-align: left;
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	/* border: 1px solid rgba(255, 255, 255, 0.06); */
	/* Height controlled by grid-row span (64 × 5px = 320px) */
}

/* Ensure widget-wrap fills and is flex column */
.tc-benefit-card > .elementor-widget-wrap,
.tc-benefit-card > .elementor-element-populated {
	display: flex;
	flex-direction: column;
	height: 100%;
	flex-wrap: nowrap;
}

/* Icon */
.tc-benefit-icon {
	margin-bottom: 20px;
}

.tc-benefit-icon svg {
	width: 44px;
	height: 44px;
}

/* Card Title — gold */
.tc-benefit-card-title {
	margin-bottom: 12px;
}

.tc-benefit-item.tc-benefit-card .elementor-widget-heading {
	margin-top: auto;
}

.tc-benefit-item.tc-benefit-card .elementor-heading-title {
	font-family: 'DM Sans', var(--tc-font-body), sans-serif;
	font-size: 25px;
	font-weight: 400;
	color: var(--tc-gold);
	line-height: 33px;
}

/* Card Description */
.tc-benefit-item.tc-benefit-card .elementor-widget-text-editor {
	font-size: 16px;
	color: var(--tc-white);

	p {
		margin-bottom: 0;
	}
}

/* Card Description — pushed to bottom area */
.tc-benefit-card-desc {
	margin-top: auto;
}

/* ------------------------------------------------------------------
   7. (Masonry stagger is handled by the grid placement above)
   ------------------------------------------------------------------ */

/* ------------------------------------------------------------------
   8. Buttons Row
   ------------------------------------------------------------------ */
.tc-benefits-btns .elementor-row,
.tc-benefits-btns .elementor-container {
	display: flex;
	justify-content: center;
	gap: 14px;
	flex-wrap: nowrap !important;
}

/* ------------------------------------------------------------------
   9. Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1200px) {
	.tc-benefits-grid .elementor-row,
	.tc-benefits-grid .elementor-container {
		padding: 0 20px !important;
	}
}

@media (max-width: 1024px) {
	.tc-benefits-grid .tc-benefit-photo { grid-row: span 72; }
	.tc-benefits-grid .tc-benefit-card  { grid-row: span 56; }
}

@media (max-width: 767px) {
	/* Switch to standard 2-column grid (no masonry) */
	.tc-benefits-grid .elementor-row,
	.tc-benefits-grid .elementor-container {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: auto;
		gap: 15px;
		display: flex !important;
		padding: 0 20px !important;
	}

	/* Reset explicit placements */
	.tc-benefits-grid .tc-benefit-item:nth-child(n) {
		grid-column: auto;
		grid-row: auto;
		margin-top: 0;
	}

	.tc-benefit-photo {
		height: auto;
	}

	.tc-benefit-card {
		height: auto;
		min-height: 220px;
		padding: 35px 24px !important;
	}

	.tc-benefits-eyebrow .elementor-heading-title,
	.tc-benefits-subheading .elementor-heading-title {
		font-size: 13px !important;
	}

	.tc-benefits-title .elementor-heading-title,
	.tc-benefits-heading .elementor-heading-title {
		font-size: 40px !important;
	}

	.tc-benefit-item.tc-benefit-card .elementor-heading-title {
		font-size: 22px;
	}

	.tc-benefit-item.tc-benefit-card .elementor-heading-title br {
		display: none;
	}
}

@media (max-width: 480px) {
	.tc-benefits-grid .elementor-row,
	.tc-benefits-grid .elementor-container {
		grid-template-columns: 1fr;
	}

	.tc-benefit-photo {
		height: 280px;
	}
}
