/*
Theme Name: Jadav SunGrid
Author: Sanjay Jadav
Author URI: https://profiles.wordpress.org/jadavsanjay/
Description: A modern block theme for solar installers, renewable energy consultants, and sustainability-focused businesses.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.3
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jadav-sungrid
Tags: blog, portfolio, one-column, two-columns, wide-blocks, block-patterns, block-styles, custom-colors, custom-logo, custom-menu, featured-images, full-site-editing, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { text-underline-offset: .18em; }
.wp-site-blocks { min-height: 100vh; }

/* Keep long titles, labels, and unbroken content inside their layout columns. */
.wp-site-blocks > *,
.wp-block-group,
.wp-block-columns,
.wp-block-column,
.wp-block-post-template > li,
.wp-block-navigation,
.wp-block-navigation-item {
	min-width: 0;
}
.wp-block-site-title,
.wp-block-post-title,
.wp-block-query-title,
.wp-block-heading,
.wp-block-navigation-item__label,
.wp-block-post-excerpt,
.wp-block-post-content,
p,
li,
a {
	overflow-wrap: anywhere;
	word-break: normal;
}
.is-style-jadav-sungrid-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 18px;
	box-shadow: 0 18px 60px rgba(15, 45, 37, .08);
	overflow: hidden;
}
.is-style-jadav-sungrid-card:hover { transform: translateY(-4px); transition: transform .2s ease; }
.sungrid-kicker { letter-spacing: .12em; text-transform: uppercase; }
.sungrid-hero { overflow: hidden; position: relative; }
.sungrid-hero::after {
	background: radial-gradient(circle, rgba(246,190,58,.24) 0 23%, transparent 24%), linear-gradient(135deg, transparent 48%, rgba(255,255,255,.08) 49% 51%, transparent 52%);
	background-size: 220px 220px, 56px 56px;
	content: "";
	inset: 0;
	opacity: .7;
	pointer-events: none;
	position: absolute;
}
.sungrid-hero > * { position: relative; z-index: 1; }
.sungrid-panel-art {
	background: linear-gradient(145deg, #183e54, #0b2638);
	border: 10px solid rgba(255,255,255,.9);
	border-radius: 20px;
	box-shadow: 0 28px 70px rgba(3,25,22,.35);
	display: grid;
	gap: 5px;
	grid-template-columns: repeat(4, 1fr);
	min-height: 330px;
	padding: 12px;
	transform: perspective(900px) rotateY(-8deg) rotateX(4deg);
}
.sungrid-panel-art span { background: linear-gradient(135deg, #245d72, #112f46); border: 1px solid rgba(147,220,226,.28); }
.sungrid-icon {
	align-items: center;
	background: var(--wp--preset--color--sun);
	border-radius: 14px;
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	font-size: 1.35rem;
	font-weight: 800;
	height: 48px;
	justify-content: center;
	width: 48px;
}
.sungrid-stat { border-inline-start: 3px solid var(--wp--preset--color--sun); }
.sungrid-project { min-height: 290px; overflow: hidden; position: relative; }
.sungrid-project::before {
	background: linear-gradient(150deg, #d9f0e6 0 45%, #1b5648 46% 48%, #173b50 49% 100%);
	content: "";
	inset: 0;
	position: absolute;
}
.sungrid-project::after {
	background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.22) 39px 41px), repeating-linear-gradient(0deg, transparent 0 38px, rgba(255,255,255,.18) 39px 41px);
	content: "";
	inset: 45% 0 0 44%;
	position: absolute;
	transform: skewY(-8deg);
}
.sungrid-project > * { position: relative; z-index: 1; }
.sungrid-project .has-text-color { color: var(--wp--preset--color--ink) !important; }
.sungrid-header { backdrop-filter: blur(12px); }
.sungrid-header .wp-block-navigation-item__content { text-decoration: none; }
.sungrid-header .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--primary); }
.wp-block-button__link { transition: transform .2s ease, box-shadow .2s ease; }
.wp-block-button__link:hover { box-shadow: 0 10px 28px rgba(15,89,70,.22); transform: translateY(-2px); }
.wp-block-post-title a { text-decoration: none; }
/* Preserve readable links when users add content to a Solar Gold section. */
.has-sun-background-color a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--ink);
	font-weight: 700;
	text-decoration-thickness: .12em;
}
/* Gradient heroes use the consistently high-contrast surface colour. */
.has-primary-to-primary-dark-gradient-background .sungrid-kicker {
	color: var(--wp--preset--color--surface) !important;
}
@media (max-width: 781px) {
	/* Keep the responsive navigation viewport-bound instead of header-bound. */
	.sungrid-header { backdrop-filter: none; }
	.wp-block-navigation__responsive-container.is-menu-open {
		box-sizing: border-box;
		height: 100dvh;
		inset: 0;
		max-height: 100dvh;
		overflow-x: hidden;
		overflow-y: auto;
		position: fixed;
		width: 100vw;
		z-index: 100000;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		box-sizing: border-box;
		min-height: 100%;
		padding: clamp(4rem, 12vh, 7rem) 24px 2rem;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		align-items: stretch;
		max-width: 100%;
		width: 100%;
	}
	.sungrid-panel-art { min-height: 240px; transform: none; }
	.sungrid-hero { text-align: center; }
	.sungrid-hero .wp-block-buttons { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition-duration: .01ms !important; }
}
