/**
 * Page: Команда klopotenko.com
 * BEM: .page-team__*
 * Reference: Figma 272:197
 */

.page-team {
	--team-red: #9e0909;
	--team-cream: #f5ebdf;
	--team-text: #1e1e1e;
	--team-muted: #731414;
	--team-radius: 14px;
	font-family: 'Rubik', sans-serif;
	color: var(--team-text);
}

.page-team .breadcrumb-area,
.page-team .rt-breadcrumb { margin-bottom: 24px; }

/* ===========================
 * HERO
 * =========================== */
.page-team__hero {
	margin: 0 0 80px;
}

.page-team__hero-card {
	position: relative;
	box-sizing: border-box;
	background-color: var(--team-red);
	background-image: url('../assets/img/bg-team.png');
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100% 100%;
	border-radius: var(--team-radius);
	aspect-ratio: 1000 / 324;
	padding: 64px 80px;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: visible;
}

.page-team__hero-quote {
	position: relative;
	z-index: 1;
	font-family: 'Rubik', sans-serif;
	font-weight: 600;
	font-size: 26px;
	line-height: 1.2;
	color: var(--team-cream);
	text-transform: uppercase;
	margin: 0;
	max-width: 572px;
	white-space: pre-line;
}

/* ===========================
 * GRID
 * =========================== */
.page-team__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 80px 24px;
	margin-bottom: 56px;
    align-items: start;
}

/* ---- Картка з фото ---- */
.page-team__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.page-team__card-visual {
	position: relative;
	width: 100%;
	height: 275px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	overflow: visible;
}

/* Велика червона літера-фон (Figma: 340px Black, tracking 34px, LH 0.8, #9e0909) */
.page-team__card-letter {
	position: absolute;
	left: 55%;
	top: 0;
	transform: translateX(-50%);
	font-family: 'Rubik', sans-serif;
	font-weight: 900;
	font-size: 340px;
	line-height: .8;
	letter-spacing: 34px;
	color: var(--team-red);
	z-index: 0;
	pointer-events: none;
	user-select: none;
	text-transform: uppercase;
}

/* Фото — прозорий PNG поверх літери, без масок */
.page-team__card-photo {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.page-team__card-img,
.page-team__card-photo img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Пігулка з ім'ям */
.page-team__card-name {
	box-sizing: border-box;
	display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    position: relative;
    z-index: 2;
    background: #fff;
    color: var(--team-text);
    border: 1px solid var(--team-red);
    border-radius: 30px;
    padding: 6px 24px;
    min-height: 40px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 100%;
    width: 265px;
}

a.page-team__card-name:hover,
a.page-team__card-name:focus {
	color: var(--team-red);
	text-decoration: none;
}

.page-team__card-role {
	margin: 8px 0 0;
	font-family: 'Rubik', sans-serif;
	font-weight: 300;
	font-size: 18px;
	line-height: 1.2;
	color: var(--team-text);
}

/* ---- Червона картка без фото (Figma: 309×409, rounded-14, ім'я 22px Medium, роль 18px Light — все біле) ---- */
.page-team__card--nophoto {
	box-sizing: border-box;
	background: var(--team-red);
	border-radius: var(--team-radius);
	padding: 38px 27px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	text-align: left;
	align-items: flex-start;
	align-self: stretch;
	justify-content: flex-start;
	min-height: 409px;
    margin-top: -62px;
}
.page-team__nophoto-person {
	margin: 0;
}
.page-team__nophoto-name {
	margin: 0;
	font-family: 'Rubik', sans-serif;
	font-weight: 500;
	font-size: 22px;
	line-height: 1.2;
	color: #fff;
}
.page-team__nophoto-role {
	margin: 8px 0 0;
	font-family: 'Rubik', sans-serif;
	font-weight: 300;
	font-size: 18px;
	line-height: 1.2;
	color: #fff;
}

/* ===========================
 * RESPONSIVE
 * =========================== */
@media (max-width: 991px) {
	.page-team__hero-card {
		padding: 48px 36px;
	}
    #main {
        padding: 0 12px;
    }
	.page-team__hero-quote { font-size: 18px; }

	.page-team__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 56px 20px;
	}
	.page-team__card-visual { height: 280px; }
	.page-team__card-letter { font-size: 260px; letter-spacing: 24px; }
	.page-team__card-name { font-size: 18px; padding: 6px 18px; min-height: 36px; }
	.page-team__card-role { font-size: 16px; }
	.page-team__card--nophoto { min-height: 320px; }
	.page-team__nophoto-name { font-size: 20px; }
	.page-team__nophoto-role { font-size: 16px; }
}

@media (max-width: 575px) {
	.page-team .breadcrumb-area,
	.page-team .rt-breadcrumb { margin-bottom: 32px; }

	.page-team__hero {
		margin: 0 0 48px;
	}

	.page-team__hero-card {
		background-image: none;
		aspect-ratio: 328 / 238;
		padding: 20px 33px 20px;
		min-height: 269px;
		overflow: hidden;
	}

	.page-team__hero-card::before,
	.page-team__hero-card::after {
		position: absolute;
		z-index: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 120px;
		height: 29px;
		border: 1px solid var(--team-cream);
		border-radius: 14px;
		color: var(--team-cream);
		font-family: 'Rubik', sans-serif;
		font-weight: 500;
		font-size: 12px;
		line-height: 1.5;
		text-transform: uppercase;
		white-space: nowrap;
	}

	.page-team__hero-card::before {
		content: 'відеограф';
		left: 31px;
		top: 34px;
		transform: rotate(8.66deg);
	}

	.page-team__hero-card::after {
		content: 'PR-менеджер';
		right: 16px;
		bottom: 18px;
		transform: rotate(-11.62deg);
	}

	.page-team__hero-quote {
		font-weight: 700;
		font-size: 16px;
		line-height: 1.4;
		max-width: 260px;
	}

	.page-team__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-content: stretch;
		align-items: start;
		gap: 24px 8px;
		margin-bottom: 28px;
	}

	.page-team__card {
		width: 100%;
		min-width: 0;
	}

	.page-team__card-visual {
		height: 160px;
	}

	.page-team__card-letter {
		left: 50%;
		font-size: 165px;
		line-height: .8;
		letter-spacing: 16px;
	}

	.page-team__card-img,
	.page-team__card-photo img {
		height: 160px;
	}

	.page-team__card-name {
		width: 160px;
		min-height: 32px;
		padding: 6px 12px;
		font-size: 14px;
	}

	.page-team__card-role {
		width: 100%;
		margin-top: 8px;
		font-size: 14px;
		line-height: 1.2;
	}

	.page-team__card--nophoto {
		width: 100%;
		min-height: 214px;
		padding: 18px 12px;
		gap: 8px;
        margin: 0;
	}

	.page-team__nophoto-name,
	.page-team__nophoto-role {
		width: 100%;
		font-size: 14px;
		line-height: 1.2;
	}


	.page-team__nophoto-name a {
		color: inherit;
		text-decoration: none;
	}

	.page-team__nophoto-name a:hover,
	.page-team__nophoto-name a:focus {
		text-decoration: underline;
	}
	.page-team__nophoto-role {
		margin-top: 4px;
	}
}
