/*
Theme Name:   Chimney Magic
Theme URI:    https://chimneymagic.co.nz/
Description:  Custom child theme for Chimney Magic Ltd, built on Kadence. Holds the site's custom styles for go-live.
Author:       VL Studio
Author URI:   https://vlstudio.co.nz/
Template:     kadence
Version:      1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v3 or later
License URI:  https://www.gnu.org/licenses/gpl-3.0.html
Text Domain:  chimney-magic
*/

/* ==========================================================================
   CHIMNEY MAGIC CUSTOM CSS
   Moved from Appearance > Customize > Additional CSS.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Grid layouts
   -------------------------------------------------------------------------- */

/* Equal-height cards across all grids */
.wp-block-group.is-layout-grid > * {
	margin-block: 0 !important;
	align-self: stretch;
}

/* Single column on mobile for any grid with the .cm-stack-mobile class */
@media (max-width: 782px) {
	.cm-stack-mobile {
		grid-template-columns: 1fr !important;
	}
}


/* --------------------------------------------------------------------------
   2. Service cards (.svc-card)
   The whole card is clickable: the title link is stretched over the card.
   -------------------------------------------------------------------------- */

.svc-card {
	position: relative; /* anchors the stretched title link */
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	height: 100%;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Keep the title and its link unpositioned so the stretch anchors to the card */
.svc-card .svc-card__title,
.svc-card .svc-card__title a {
	position: static;
}

/* Stretch the title link to cover the whole card */
.svc-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Push the chevron to the bottom inside WordPress's inner wrapper */
.svc-card > .wp-block-group__inner-container {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.svc-card > .wp-block-group__inner-container > :last-child {
	margin-top: auto;
}

.svc-card .wp-block-icon.alignright {
	display: flex;
	justify-content: flex-end;
}

/* Hover and keyboard focus: lift the card so it reads as clickable */
.svc-card:hover,
.svc-card:focus-within {
	box-shadow: 0 15px 20px -7px rgba(255, 0, 0, 0.3);
	transform: translateY(-4px);
}

.svc-card:hover {
	cursor: pointer;
}

/* No lift animation for visitors who have reduced motion turned on */
@media (prefers-reduced-motion: reduce) {
	.svc-card {
		transition: none;
	}

	.svc-card:hover,
	.svc-card:focus-within {
		transform: none;
	}
}


/* --------------------------------------------------------------------------
   3. About page hero (.cm-hero-image-left)
   -------------------------------------------------------------------------- */

.wp-block-group.cm-hero-image-left {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 2rem;
	align-items: center;
}

/* Stack image above text on mobile */
@media (max-width: 782px) {
	.wp-block-group.cm-hero-image-left {
		grid-template-columns: 1fr;
	}
}


