/* Diwan Canada footer
   Graphite background from the Diwan Canada palette, with cream text,
   blush links and orange accents. One compact row on large screens:
   logo and description | link columns | newsletter with "Connect with us"
   and the social icons, then a copyright bar with "Back to the top". */

footer.cs-footer {
	--dwf-footer-bg: #2D2926;
	--dwf-footer-text: #FFF8EF;
	--dwf-footer-muted: rgba(255, 248, 239, 0.72);
	--dwf-footer-link: #F7DFD0;
	--dwf-footer-accent: #F28A3A;
	--dwf-footer-line: rgba(255, 248, 239, 0.16);
	--cs-color-primary: var(--dwf-footer-text);
	--cs-color-secondary: var(--dwf-footer-muted);
	--cs-color-divider: var(--dwf-footer-line);
	--diwan-link: var(--dwf-footer-link);
	background: var(--dwf-footer-bg);
	color: var(--dwf-footer-text);
	margin-top: 64px;
}

/* Flatten the theme's two stacked bars into one grid. */
footer.cs-footer > .cs-container {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "brand" "menu" "news";
	gap: 40px;
	padding-top: 56px;
	padding-bottom: 40px;
}

footer.cs-footer .cs-footer__item,
footer.cs-footer .cs-footer__item-inner {
	display: contents;
}

footer.cs-footer .cs-footer__item,
footer.cs-footer .cs-footer__item + .cs-footer__item,
footer.cs-footer .cs-footer__item-top-bar,
footer.cs-footer .cs-footer__item-bottom-bar:first-child {
	border: 0;
	padding: 0;
}

footer.cs-footer .cs-footer__nav-menu { grid-area: menu; }
footer.cs-footer .cs-col-left { grid-area: brand; }
footer.cs-footer .cs-col-right { grid-area: news; }

footer.cs-footer .cs-footer__col {
	width: auto;
	max-width: none;
	flex: none;
	margin: 0;
	padding: 0;
}

/* ---------- brand column ---------- */

footer.cs-footer .cs-footer__logo img {
	width: auto;
	max-height: 56px;
	filter: brightness(0) invert(1);
}

footer.cs-footer .cs-footer__info {
	display: block;
	margin-top: 18px;
}

footer.cs-footer .cs-footer__desc {
	color: var(--dwf-footer-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.55;
}

footer.cs-footer .cs-footer__copyright {
	max-width: 380px;
	margin-top: 16px;
	color: var(--dwf-footer-muted);
	font-size: 14px;
	line-height: 1.6;
}

footer.cs-footer .cs-footer__copyright a,
footer.cs-footer .cs-footer__desc a {
	color: var(--dwf-footer-link);
	text-decoration: underline;
	text-decoration-color: rgba(247, 223, 208, 0.5);
	text-underline-offset: 3px;
}

footer.cs-footer .cs-footer__copyright a:hover,
footer.cs-footer .cs-footer__desc a:hover {
	color: var(--dwf-footer-accent);
	text-decoration-color: currentColor;
}

/* ---------- link columns ---------- */

footer.cs-footer .cs-footer__nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

footer.cs-footer .cs-footer__nav > li {
	margin: 0;
	padding: 0;
}

footer.cs-footer .cs-footer__nav > li > a {
	display: inline-block;
	margin-bottom: 12px;
	color: var(--dwf-footer-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	pointer-events: none;
	background: none;
}

footer.cs-footer .cs-footer__nav > li > ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

footer.cs-footer .cs-footer__nav > li > ul > li {
	margin: 0 0 8px;
	padding: 0;
}

footer.cs-footer .cs-footer__nav > li > ul > li > a {
	color: var(--dwf-footer-link);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: color 0.15s ease, background-size 0.2s ease;
}

footer.cs-footer .cs-footer__nav > li > ul > li > a:hover {
	color: var(--dwf-footer-accent);
	background-size: 100% 1px;
}

/* ---------- newsletter ---------- */

footer.cs-footer .cs-footer__subscribe,
footer.cs-footer .cs-footer__subscribe-container {
	margin: 0;
	padding: 0;
	background: transparent;
	color: var(--dwf-footer-text);
}

footer.cs-footer .cs-footer__subscribe-title {
	margin: 0 0 16px;
	color: var(--dwf-footer-text);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

footer.cs-footer .cs-footer__subscribe-form-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

footer.cs-footer .cs-footer__subscribe-form input[type="email"] {
	flex: 1 1 200px;
	min-width: 0;
	height: 46px;
	padding: 0 14px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: #fff;
	color: #2D2926;
	font-size: 14px;
}

footer.cs-footer .cs-footer__subscribe-form input[type="email"]:focus {
	border-color: var(--dwf-footer-accent);
	outline: 2px solid var(--dwf-footer-accent);
	outline-offset: 1px;
}

footer.cs-footer .cs-footer__subscribe-form button[type="submit"] {
	height: 46px;
	padding: 0 18px;
	border: 0;
	border-radius: 10px;
	background: #C63D32;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

footer.cs-footer .cs-footer__subscribe-form button[type="submit"]:hover {
	background: var(--dwf-footer-accent);
	color: #2D2926;
}

/* Messages under the newsletter form (MailerLite). */
footer.cs-footer .cs-footer__subscribe-form-response .response {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.5;
}

footer.cs-footer #mce-success-response {
	color: var(--dwf-footer-text);
}

footer.cs-footer #mce-error-response {
	color: #F7DFD0;
}

footer.cs-footer .cs-footer__subscribe-form button[type="submit"]:disabled {
	opacity: 0.7;
	cursor: wait;
}

/* ---------- Connect with us (under the newsletter form) ---------- */

/* The theme lays this column out as a row; stack the newsletter and
   "Connect with us" instead. */
footer.cs-footer .cs-col-right {
	flex-direction: column;
	justify-content: flex-start;
	align-items: stretch;
}

/* margin, not margin-top: the theme adds a 60px left margin to later items here. */
footer.cs-footer .dwf-connect {
	margin: 28px 0 0;
}

footer.cs-footer .dwf-connect__title {
	margin: 0 0 12px;
	color: var(--dwf-footer-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

/* Inside the footer the site's link colour (blush) would hide the icons on
   their cream circles, so set the icon colour here. */
footer.cs-footer .dwf-social a,
footer.cs-footer .dwf-social a:hover {
	color: #2D2926;
	text-decoration: none;
}

/* ---------- copyright bar (added by the plugin after the footer) ---------- */

.dwf-footer-bottom {
	background: #2D2926;
	color: rgba(255, 248, 239, 0.72);
}

.dwf-footer-bottom .dwf-footer-bottom__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding-top: 20px;
	padding-bottom: 28px;
	border-top: 1px solid rgba(255, 248, 239, 0.16);
}

.dwf-footer-bottom__copy {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.dwf-social {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dwf-social li {
	margin: 0;
	padding: 0;
}

.dwf-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #FFF8EF;
	color: #2D2926;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.dwf-social a:hover {
	background: #F28A3A;
	transform: translateY(-1px);
}

.dwf-social a:focus-visible {
	outline: 2px solid #F28A3A;
	outline-offset: 2px;
}

.dwf-social svg {
	width: 18px;
	height: 18px;
}

.dwf-footer-bottom a.dwf-back-to-top {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #F7DFD0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	transition: color 0.15s ease;
}

.dwf-footer-bottom a.dwf-back-to-top:hover {
	color: #F28A3A;
}

.dwf-footer-bottom a.dwf-back-to-top:focus-visible {
	outline: 2px solid #F28A3A;
	outline-offset: 3px;
}

.dwf-back-to-top svg {
	width: 16px;
	height: 16px;
}

/* ---------- larger screens ---------- */

@media (min-width: 768px) {
	footer.cs-footer > .cs-container {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas: "brand news" "menu menu";
		gap: 40px 48px;
	}
	footer.cs-footer .cs-footer__nav {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
	.dwf-footer-bottom .dwf-footer-bottom__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

@media (min-width: 1200px) {
	footer.cs-footer > .cs-container {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.9fr) minmax(0, 1fr);
		grid-template-areas: "brand menu news";
		gap: 56px;
		padding-top: 64px;
	}
	footer.cs-footer .cs-footer__nav {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 32px 28px;
	}
}
