/**
 * Footer Styles (Blocksy Footer Builder)
 * Styled using 100% Blocksy CSS custom properties (light & dark mode compliant).
 */

/* Footer container */
footer#footer.ct-footer {
	background-color: var(--theme-palette-color-6);
	border-top: 1px solid var(--theme-border-color);
	color: var(--theme-text-color);
	direction: rtl;
}

/* Guard against old JS adding .ekrd-footer-upgraded before deletion */
footer#footer.ct-footer > [data-row] {
	display: block !important;
}
footer#footer.ct-footer .ekrd-footer-shell {
	display: none !important;
}

/* Middle row layout */
footer#footer [data-row="middle"] {
	padding-block: 48px 40px;
}

footer#footer [data-row="middle"] > .ct-container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	column-gap: 32px;
	row-gap: 32px;
}

/* Column titles */
footer#footer .ekbs-footer-title,
footer#footer [data-row="middle"] .widget-title,
footer#footer [data-row="middle"] h2 {
	color: var(--theme-headings-color);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 14px 0;
	padding: 0;
	border: none;
}

/* Lists in middle row */
footer#footer ul.ekbs-footer-links,
footer#footer .widget_nav_menu ul.widget-menu,
footer#footer [data-row="middle"] ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

footer#footer ul.ekbs-footer-links li,
footer#footer .widget_nav_menu ul.widget-menu li,
footer#footer [data-row="middle"] li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

/* Links in middle row */
footer#footer [data-row="middle"] a,
footer#footer ul.ekbs-footer-links a,
footer#footer .widget-menu a {
	color: var(--theme-text-color) !important;
	text-decoration: none !important;
	font-size: 14px;
	line-height: 1.5;
	transition: color 0.15s ease;
}

footer#footer [data-row="middle"] a:hover,
footer#footer ul.ekbs-footer-links a:hover,
footer#footer .widget-menu a:hover {
	color: var(--theme-link-initial-color) !important;
}

/* Footer category post count */
footer#footer .ekbs-footer-count {
	color: color-mix(in srgb, var(--theme-text-color) 65%, transparent);
	font-size: 12.5px;
	margin-inline-start: 4px;
}

/* Brand paragraph */
footer#footer [data-column="widget-area-1"] p,
footer#footer [data-column="widget-area-1"] .wp-block-paragraph {
	font-size: 14px;
	line-height: 1.8;
	color: var(--theme-text-color);
	margin: 0;
}

/* Bottom row / copyright */
footer#footer [data-row="bottom"] {
	border-top: 1px solid var(--theme-border-color);
	padding-block: 20px;
}

footer#footer [data-row="bottom"] .ct-footer-copyright,
footer#footer [data-row="bottom"] p {
	font-size: 13px;
	line-height: 1.7;
	color: var(--theme-text-color);
	text-align: center;
	margin: 0;
}

footer#footer [data-row="bottom"] a {
	color: var(--theme-link-initial-color);
	text-decoration: underline;
}

footer#footer [data-row="bottom"] a:hover {
	color: var(--theme-link-hover-color, var(--theme-palette-color-1));
}

/* Responsive adjustments */
@media (min-width: 690px) and (max-width: 960px) {
	footer#footer [data-row="middle"] > .ct-container {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 28px;
		row-gap: 28px;
	}
}

@media (max-width: 689px) {
	footer#footer [data-row="middle"] {
		padding-block: 36px 28px;
	}

	footer#footer [data-row="middle"] > .ct-container {
		grid-template-columns: 1fr;
		row-gap: 28px;
	}
}

/* Heading and menu are separate widgets in columns 3–4; drop Blocksy's 40px spacing between them */
footer#footer [data-row="middle"] .ct-widget + .ct-widget {
	margin-top: 0;
}
