/**
 * D&D's Caring Hearts — Homepage sections (part B).
 *
 * "Why choose us", Our Team, About Our Center (tabs), In-Home Services
 * grid. Depends on the tokens/utilities defined in homepage-base.css.
 *
 * @package generatepress-ddch
 */

/* ----------------------------------------------------------------------- */
/* Why choose us                                                          */
/* ----------------------------------------------------------------------- */

.ddch-why {
	padding-block: var(--ddch-section-pad);
	background-color: var(--ddch-ivory);
}

.ddch-why__inner {
	display: grid;
	gap: 3rem;
	align-items: center;
}

.ddch-why__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ddch-why__item {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.ddch-why__item .dashicons {
	flex-shrink: 0;
	color: var(--ddch-sage);
	font-size: 26px;
	width: 26px;
	height: 26px;
	margin-top: 0.15rem;
}

.ddch-why__item-title {
	font-family: var(--ddch-font-heading);
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0 0 0.25rem;
	color: var(--ddch-charcoal);
}

.ddch-why__item-text {
	color: var(--ddch-muted);
	margin: 0;
}

.ddch-why__media {
	aspect-ratio: 4 / 3;
	border-radius: var(--ddch-radius-lg);
	overflow: hidden;
	box-shadow: var(--ddch-shadow-sm);
}

/* ----------------------------------------------------------------------- */
/* Our team                                                                */
/* ----------------------------------------------------------------------- */

.ddch-team {
	padding-block: var(--ddch-section-pad);
	background-color: var(--ddch-cream);
	text-align: center;
}

.ddch-team .ddch-section-head {
	margin-inline: auto;
}

.ddch-team__grid {
	display: grid;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	text-align: center;
}

.ddch-team__card {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ddch-team__avatar {
	width: 96px;
	height: 96px;
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

.ddch-team__name {
	font-family: var(--ddch-font-heading);
	font-size: 1.0625rem;
	font-weight: 600;
	margin: 0 0 0.25rem;
	color: var(--ddch-charcoal);
}

.ddch-team__role {
	color: var(--ddch-muted);
	font-size: 0.9375rem;
	margin: 0;
}

/* ----------------------------------------------------------------------- */
/* About Our Center (tabs)                                                */
/* ----------------------------------------------------------------------- */

.ddch-about {
	padding-block: var(--ddch-section-pad);
	background-color: var(--ddch-ivory);
}

.ddch-about .ddch-section-head {
	text-align: center;
	margin-inline: auto;
}

.ddch-about__tablist {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.ddch-about__tab {
	font-family: var(--ddch-font-body);
	font-weight: 600;
	font-size: 0.9375rem;
	padding: 0.7rem 1.5rem;
	border-radius: var(--ddch-radius-pill);
	border: 2px solid var(--ddch-sage);
	background-color: transparent;
	color: var(--ddch-sage-dark);
	cursor: pointer;
	transition: background-color 0.2s var(--ddch-ease), color 0.2s var(--ddch-ease);
}

.ddch-about__tab.is-active {
	/* "--ddch-sage" gives only 3.74:1 with white text (fails AA); swapped
	   to "--ddch-sage-dark" (5.88:1), matching the ":hover" state below. */
	background-color: var(--ddch-sage-dark);
	color: var(--ddch-white);
}

.ddch-about__tab:hover {
	background-color: var(--ddch-sage-dark);
	border-color: var(--ddch-sage-dark);
	color: var(--ddch-white);
}

.ddch-about__panel {
	display: none;
}

.ddch-about__panel.is-active {
	display: block;
}

.ddch-about__panel-inner {
	display: grid;
	gap: 2.5rem;
	align-items: center;
	background-color: var(--ddch-white);
	border-radius: var(--ddch-radius-lg);
	box-shadow: var(--ddch-shadow-sm);
	padding: clamp(1.75rem, 1.5rem + 1vw, 2.75rem);
}

.ddch-about__panel-text h3 {
	font-family: var(--ddch-font-heading);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--ddch-charcoal);
	margin: 0 0 1rem;
}

.ddch-about__panel-text p {
	color: var(--ddch-muted);
	margin: 0 0 1rem;
}

.ddch-about__panel-media {
	aspect-ratio: 4 / 3;
	border-radius: var(--ddch-radius);
	overflow: hidden;
}

/* ----------------------------------------------------------------------- */
/* In-Home Services grid                                                  */
/* ----------------------------------------------------------------------- */

.ddch-inhome {
	padding-block: var(--ddch-section-pad);
	background-color: var(--ddch-cream);
}

.ddch-inhome .ddch-section-head {
	text-align: center;
	margin-inline: auto;
}

.ddch-inhome__grid {
	display: grid;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	grid-template-columns: repeat(2, 1fr);
}

.ddch-inhome__card {
	padding: 0;
	overflow: hidden;
}

/*
 * Compounded with ".ddch-inhome" ancestor (specificity 0,2,0) to beat
 * "body.home a" (0,1,2) in homepage-base.css. Without this, the <a>
 * wrapper's color resolves to teal, which corrupts the currentColor
 * focus-outline (teal on sage background reaches only ~2.41:1, fails
 * WCAG 1.4.11). Same bug pattern as strip, topbar, footer, contact-list.
 */
.ddch-inhome .ddch-inhome__link {
	color: var(--ddch-charcoal);
}

.ddch-inhome__link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 1.5rem;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.ddch-inhome__title {
	font-family: var(--ddch-font-heading);
	font-weight: 600;
	font-size: 1.0625rem;
	color: var(--ddch-charcoal);
}

.ddch-inhome__subtitle {
	font-size: 0.875rem;
	color: var(--ddch-muted);
}

/* ----------------------------------------------------------------------- */
/* Breakpoints                                                             */
/* ----------------------------------------------------------------------- */

@media (min-width: 860px) {
	.ddch-why__inner {
		grid-template-columns: 1.05fr 0.95fr;
	}

	.ddch-about__panel-inner {
		grid-template-columns: 1.1fr 0.9fr;
	}
}

@media (min-width: 640px) {
	.ddch-inhome__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}
