/*
Theme Name: Kadence Child (Greenry Enthusiast)
Theme URI: https://greenryenthusiast.com/
Template: kadence
Author: Greenry Enthusiast
Description: Child theme for the Kadence parent theme, created so homepage/branding customizations survive future Kadence updates.
Version: 1.0.1
Text Domain: kadence-child
*/

/* Site-specific overrides go below this line. Global colors/typography are
   managed through the Kadence Customizer (theme_mods) wherever possible;
   the rules below cover things the Customizer doesn't expose directly. */

/* ---- Fit all 8 primary nav items on one line (prevents "Calculators" from
   wrapping/overflowing out of the header on typical desktop widths) ---- */
@media (min-width: 1025px) {
	.main-navigation .primary-menu-container > ul#primary-menu {
		flex-wrap: nowrap;
	}
	.main-navigation .primary-menu-container > ul#primary-menu > li {
		font-size: .92rem;
	}
	.main-navigation .primary-menu-container > ul#primary-menu > li > a {
		padding-left: .6rem !important;
		padding-right: .6rem !important;
	}
	.main-navigation .primary-menu-container > ul#primary-menu > li .nav-drop-title-wrap {
		gap: .3em;
	}
}

/* ---- Modern dropdown menus (Primary nav "Outdoor Power Equipment" / "Calculators") ---- */
.main-navigation .sub-menu {
	border-radius: 12px;
	padding: 8px;
	border: 1px solid #eef2ec;
	overflow: hidden;
}
.main-navigation .sub-menu li {
	border-radius: 8px;
	overflow: hidden;
}
.main-navigation .sub-menu a {
	padding: 10px 14px !important;
	border-radius: 8px;
	transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}
.main-navigation .sub-menu a:hover {
	padding-left: 18px !important;
}

/* ---- Card hover lift: topic cards, calculator cards, article cards ---- */
.wp-block-kadence-infobox,
.kt-blocks-post-grid-item {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wp-block-kadence-infobox:hover,
.kt-blocks-post-grid-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px -12px rgba(19, 97, 46, 0.25);
}

/* ---- Smoother button interactions site-wide ---- */
.kb-button,
.wp-block-kadence-advancedbtn a {
	transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.kb-button:hover {
	transform: translateY(-2px);
}

/* ---- Consistent rounded corners on topic/article card images ---- */
.kt-info-box-image,
.kt-blocks-post-grid-item .kadence-post-image img {
	border-radius: 10px 10px 0 0;
}

/* ---- Instagram grid: force uniform, cropped tiles (fixes uneven portrait image) ---- */
[class*="kadence-column75_insta-"] img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}
[class*="kadence-column75_insta-"] figure {
	margin: 0;
}

/* ---- Footer ----------------------------------------------------------------
   The footer top row is three columns: brand + tagline, a disclaimer, and the
   menu. The menu was rendering as a right-aligned horizontal list inside a
   narrow third column, so it wrapped into a ragged block ("Privacy Policy" and
   "Terms and Conditions" on their own lines, then "Contact Us" and "About"
   side by side). A footer link list should stack. ------------------------- */

@media (min-width: 768px) {
	#footer-navigation .footer-menu-container > ul.menu {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.55rem;
		margin: 0;
		padding: 0;
	}
	#footer-navigation .footer-menu-container > ul.menu > li {
		margin: 0;
		width: auto;
	}
	#footer-navigation .footer-menu-container > ul.menu > li > a {
		padding: 0;
		display: inline-block;
	}
}

/* Underline on hover only, so the list reads as links without looking noisy. */
#footer-navigation .footer-menu-container > ul.menu > li > a {
	text-decoration: none;
	transition: opacity 0.15s ease;
}
#footer-navigation .footer-menu-container > ul.menu > li > a:hover,
#footer-navigation .footer-menu-container > ul.menu > li > a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
	opacity: 0.85;
}

/* The brand tagline was set at a very loose line-height, which left the three
   lines looking disconnected from each other. */
.site-footer .footer-widget-area .widget_text p,
.site-footer .footer-html-inner p {
	line-height: 1.6;
}

/* Give the disclaimer column room: at three equal columns its text was
   wrapping after three or four words. */
@media (min-width: 992px) {
	.site-footer .site-top-footer-inner-wrap.site-footer-row-columns-3 {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.15fr) minmax(0, 0.9fr);
		gap: 2.5rem;
	}
}

/* Kadence stretches the nav column and aligns it right, which is what forced
   the list into that ragged shape. A stacked list needs neither. */
.site-footer .footer-navigation-wrap.content-align-right {
	text-align: left;
}
.site-footer .footer-navigation-layout-stretch-true #footer-navigation .footer-menu-container > ul.menu > li {
	flex: 0 0 auto;
}

/* Stack cleanly on small screens rather than inheriting the desktop alignment. */
@media (max-width: 767px) {
	#footer-navigation .footer-menu-container > ul.menu {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.4rem 1.25rem;
	}
}
