/*
 * Footer polish to match Madera Group's design. Structure and content come
 * from Kadence's footer builder (Customize > Footer) and Appearance > Menus.
 * Middle row sections: 1 logo, 2 About, 3 Explore, 4 Take Action, 5 buttons.
 *
 * Button COLORS come from the block editor (each button's Style or Color
 * settings: White = white with terracotta text, Default = terracotta fill).
 * This file only sets layout and size, so editors stay in control of color.
 */

#colophon { font-family: Inter, sans-serif; }

/* ---------- Spacing ---------- */
#colophon .site-middle-footer-inner-wrap { padding-top: 100px !important; padding-bottom: 50px !important; }
#colophon .site-bottom-footer-inner-wrap { padding-top: 0 !important; padding-bottom: 110px !important; }
#colophon .site-middle-footer-wrap,
#colophon .site-bottom-footer-wrap { border: 0 !important; }

/* Desktop column widths from the design: wide logo column, narrow buttons column */
@media (min-width: 1025px) {
	#colophon .site-middle-footer-inner-wrap.site-footer-row-columns-5 {
		grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)) 180px !important;
	}
}

/* ---------- Logo ---------- */
#colophon .site-footer-middle-section-1 img {
	width: 290px !important;
	max-width: 100% !important;
	height: auto !important;
}
#colophon .site-footer-middle-section-1 figure { margin: 0; }

/* ---------- Column titles: ABOUT / EXPLORE / TAKE ACTION ---------- */
#colophon .widget-title,
#colophon .wp-block-heading,
#colophon h2.widgettitle {
	font: 600 22px/1.2 Inter, sans-serif !important;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: #C9C2BC !important;
	margin: 0 0 22px !important;
}

/* ---------- Link lists ---------- */
#colophon .widget_nav_menu ul,
#colophon .wp-block-navigation ul,
#colophon .wp-block-page-list { list-style: none; margin: 0; padding: 0; }
#colophon .widget_nav_menu li,
#colophon .wp-block-navigation-item { margin: 0 0 14px; padding: 0; border: 0; }
#colophon .widget_nav_menu a,
#colophon .wp-block-navigation-item a {
	font: 400 21px/1.3 Inter, sans-serif;
	color: #FFFFFF !important;
	text-decoration: none;
	padding: 0 !important;
}
#colophon .widget_nav_menu a:hover,
#colophon .wp-block-navigation-item a:hover { color: var(--slfp-sand-yellow) !important; }

/* ---------- Buttons: layout and size only ---------- */
#colophon .footer-widget5 .widget { margin: 0 !important; }
#colophon .wp-block-buttons {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 8px !important;
	max-width: 180px;
	margin: 0 !important;
}
#colophon .wp-block-buttons > .wp-block-button { width: 100% !important; margin: 0 !important; }
#colophon .wp-block-button__link {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box;
	font: 500 16px/1 Inter, sans-serif !important;
	letter-spacing: 0.02em !important;
	padding: 16px 20px !important;
	text-align: center;
	border-radius: 0 !important;
}

/* ---------- Bottom row: CONNECT + icons on the left, copyright on one line ---------- */
#colophon .site-bottom-footer-inner-wrap { align-items: end !important; }
#colophon .footer-social-wrap { display: block !important; }
#colophon .footer-social-wrap::before {
	content: "Connect";
	display: block;
	font: 600 22px/1.2 Inter, sans-serif;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: #C9C2BC;
	margin: 0 0 22px;
}
#colophon .footer-social-inner-wrap { display: flex !important; flex-direction: row !important; align-items: center; gap: 22px; }
#colophon .footer-social-wrap .social-button,
#colophon .social-button {
	color: #C9C2BC !important;
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	width: auto !important;
	height: auto !important;
}
#colophon .social-button svg,
#colophon .social-button .kadence-svg-iconset svg { width: 28px !important; height: 28px !important; }
#colophon .social-button:hover { color: #FFFFFF !important; }

#colophon .footer-html,
#colophon .footer-html p {
	font: 400 17px/1.5 Inter, sans-serif;
	color: #A39A94;
	margin: 0;
}

@media (min-width: 1025px) {
	#colophon .site-bottom-footer-inner-wrap { grid-template-columns: 340px 1fr !important; }
	#colophon .site-footer-bottom-section-2,
	#colophon .site-footer-bottom-section-2 .footer-html { justify-content: center !important; text-align: center !important; }
	#colophon .footer-html p { white-space: nowrap; }
}
@media (min-width: 1025px) and (max-width: 1240px) {
	#colophon .footer-html p { white-space: normal; }
}

/* ---------- Tablet and phone: one centered column ---------- */
@media (max-width: 1024px) {
	#colophon .site-middle-footer-inner-wrap { padding-top: 56px !important; padding-bottom: 32px !important; }
	#colophon .site-bottom-footer-inner-wrap { padding-bottom: 56px !important; grid-template-columns: 1fr !important; }
	#colophon .site-footer-section,
	#colophon .footer-widget-area,
	#colophon .widget,
	#colophon .footer-html { text-align: center !important; justify-content: center !important; }
	#colophon .footer-social-inner-wrap { justify-content: center; }

	/* Design order on small screens: About, Take Action, Explore */
	#colophon .site-footer-middle-section-1 { order: 1; }
	#colophon .site-footer-middle-section-2 { order: 2; }
	#colophon .site-footer-middle-section-4 { order: 3; }
	#colophon .site-footer-middle-section-3 { order: 4; }
	#colophon .site-footer-middle-section-5 { order: 5; }
	#colophon .site-footer-bottom-section-1 { order: 1; }
	#colophon .site-footer-bottom-section-2 { order: 2; }

	/* Logo centered */
	#colophon .site-footer-middle-section-1 .footer-widget-area,
	#colophon .site-footer-middle-section-1 .widget,
	#colophon .site-footer-middle-section-1 figure { width: 100%; text-align: center !important; margin-left: auto !important; margin-right: auto !important; }
	#colophon .site-footer-middle-section-1 img { display: block; width: 180px !important; margin: 0 auto !important; }
	#colophon .site-footer-middle-section-1 { margin-bottom: 12px; }

	#colophon .widget-title,
	#colophon .wp-block-heading,
	#colophon .footer-social-wrap::before { font-size: 14px !important; letter-spacing: 0.04em; margin-bottom: 12px !important; }
	#colophon .widget_nav_menu a,
	#colophon .wp-block-navigation-item a { font-size: 16px; }
	#colophon .widget_nav_menu li { margin-bottom: 8px; }

	/* Buttons side by side, equal width */
	#colophon .footer-widget5 { width: 100%; margin-top: 16px; }
	#colophon .wp-block-buttons {
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		max-width: none;
		width: 100%;
	}
	#colophon .wp-block-buttons > .wp-block-button { flex: 1 1 0 !important; width: auto !important; }
	#colophon .wp-block-button__link { padding: 15px 10px !important; }

	#colophon .footer-social-wrap { margin: 24px 0 8px; }
	#colophon .footer-social-wrap::before { margin-bottom: 28px !important; }
	#colophon .social-button svg,
	#colophon .social-button .kadence-svg-iconset svg { width: 22px !important; height: 22px !important; }
	#colophon .footer-social-inner-wrap { gap: 26px; }

	#colophon .footer-html,
	#colophon .footer-html p { font-size: 13px; }
}

/* ---------- 1.3.8 buttons column: widgets sit inside .footer-widget-area-inner ---------- */
/* Works whether the buttons are one Buttons block or separate ones. */
#colophon .footer-widget5 .footer-widget-area-inner {
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
	max-width: 180px;
}
#colophon .footer-widget5 .footer-widget-area-inner > .widget { margin: 0 !important; }
@media (max-width: 1024px) {
	#colophon .footer-widget5 .footer-widget-area-inner { flex-direction: row !important; max-width: none; width: 100%; }
	#colophon .footer-widget5 .footer-widget-area-inner > .widget { flex: 1 1 0; min-width: 0; }
	#colophon .footer-widget5 .wp-block-buttons { max-width: none; }
}
