/**
 * D&D's Caring Hearts — Homepage sections (part C).
 *
 * Testimonials, contact + map, and the custom homepage footer. Depends on
 * the tokens/utilities defined in homepage-base.css.
 *
 * @package generatepress-ddch
 */

/* ----------------------------------------------------------------------- */
/* Testimonials                                                            */
/* ----------------------------------------------------------------------- */

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

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

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

.ddch-testimonials__card {
	display: flex;
	flex-direction: column;
	position: relative;
}

.ddch-testimonials__quote-mark {
	font-family: var(--ddch-font-heading);
	font-size: 3.5rem;
	line-height: 1;
	color: var(--ddch-peach);
	margin-bottom: 0.5rem;
}

.ddch-testimonials__quote {
	margin: 0 0 1.5rem;
	flex-grow: 1;
}

.ddch-testimonials__quote p {
	color: var(--ddch-ink);
	font-style: italic;
	margin: 0;
}

.ddch-testimonials__author {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.ddch-testimonials__avatar {
	width: 48px;
	height: 48px;
	font-size: 1rem;
}

.ddch-testimonials__author strong {
	display: block;
	font-family: var(--ddch-font-heading);
	font-size: 0.9375rem;
	color: var(--ddch-charcoal);
}

.ddch-testimonials__relationship {
	display: block;
	font-size: 0.8125rem;
	color: var(--ddch-muted);
}

/* ----------------------------------------------------------------------- */
/* Contact + map                                                          */
/* ----------------------------------------------------------------------- */

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

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

.ddch-contact .ddch-eyebrow,
.ddch-contact .ddch-section-title {
	margin-inline: 0;
}

.ddch-contact__list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ddch-contact__list li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--ddch-ink);
}

/*
 * Compounded with the ".ddch-contact" ancestor (specificity 0,2,1) to beat
 * "body.home a" (0,1,2) in homepage-base.css — otherwise this link color
 * is silently overridden by teal. Confirmed via computed-style: without
 * this, links here rendered as teal (an unintended color, though it
 * happens to still pass AA on the cream background at 5.18:1); intended
 * ink-on-cream contrast is far higher and matches the surrounding text.
 */
.ddch-contact .ddch-contact__list a {
	color: var(--ddch-ink);
	text-decoration: none;
}

.ddch-contact__list a:hover {
	color: var(--ddch-teal);
	text-decoration: underline;
}

.ddch-contact__list .dashicons {
	color: var(--ddch-sage-dark);
	font-size: 22px;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

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

.ddch-contact__map iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* ----------------------------------------------------------------------- */
/* Footer                                                                  */
/* ----------------------------------------------------------------------- */

/*
 * Light footer (deliberately, not the original dark-charcoal treatment):
 * the icon-logo in ".ddch-footer__brand" reads poorly against a dark
 * background, so the footer was switched to the same light palette as
 * the rest of the page. A top border stands in for the contrast a color
 * change alone would have given against the ".ddch-contact" section
 * (also cream) that precedes the footer on the homepage; interior pages
 * precede it with the dark ".ddch-cta-band" instead, where the border is
 * superfluous but harmless.
 */
.ddch-footer {
	background-color: var(--ddch-ivory);
	color: var(--ddch-ink);
	border-top: 1px solid rgba(43, 42, 40, 0.08);
}

.ddch-footer__grid {
	display: grid;
	gap: 2.5rem;
	padding-block: var(--ddch-section-pad);
}

.ddch-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

.ddch-footer__logo {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	object-fit: contain;
	object-position: left center;
}

.ddch-footer__name {
	font-family: var(--ddch-font-heading);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--ddch-charcoal);
	margin: 0 0 0.5rem;
}

.ddch-footer__tagline {
	margin: 0;
	max-width: 26rem;
	color: var(--ddch-muted);
}

.ddch-footer__heading {
	font-family: var(--ddch-font-body);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	/* "--ddch-peach" was tuned for white-on-dark; on this light background
	 * it drops well under AA. "--ddch-teal" already measures 5.18:1 on
	 * "--ddch-cream" (see style.css :root comment) and reaches ~5.6:1 on
	 * this ivory, so it's reused here for the same AA-safe accent role. */
	color: var(--ddch-teal);
	margin: 0 0 1rem;
}

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

/*
 * Compounded with the ".ddch-footer" ancestor (specificity 0,2,1) to beat
 * "body.home a" (0,1,2) in homepage-base.css — otherwise this link color
 * is silently overridden by teal. Ink-on-ivory reaches ~11:1 (intended),
 * far above the WCAG AA 4.5:1 minimum; the teal hover state below stays
 * AA-safe too (~5.6:1 on ivory).
 */
.ddch-footer .ddch-footer__list a {
	color: var(--ddch-ink);
	text-decoration: none;
}

.ddch-footer__list a:hover,
.ddch-footer__list a:focus-visible {
	color: var(--ddch-teal);
	text-decoration: underline;
}

.ddch-footer__bottom {
	border-top: 1px solid rgba(43, 42, 40, 0.12);
	padding-block: 1.25rem;
	font-size: 0.875rem;
	color: var(--ddch-muted);
}

.ddch-footer__bottom p {
	margin: 0;
}

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

@media (min-width: 860px) {
	.ddch-contact__inner {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 700px) {
	.ddch-footer__grid {
		grid-template-columns: 1.3fr 1fr 1fr 1fr;
	}
}
