/*
Theme Name: Voltedge
Theme URI: https://voltedgeelectric.co.za/
Template: twentytwentyfive
Author: The Dreamer
Author URI: https://www.linkedin.com/in/joseph-rukobo/
Description: Child theme of Twenty Twenty-Five for VoltedgeElectric – electrical, HVAC and refrigeration services in Gauteng. Brand colours, self-hosted Archivo type, header, footer, landing template and block patterns. Twenty Twenty-Five keeps receiving updates from WordPress.org.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: voltedge
*/

/* ---------- Type character ---------- */
/* Headings use Archivo's wide cut to echo the logo's extended wordmark. */
h1, h2,
.wp-block-heading.has-display-font-size {
	font-stretch: 118%;
}
h3 { font-stretch: 108%; }
.wp-block-navigation,
.wp-element-button,
.wp-block-button__link { font-stretch: 104%; }

p, li { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* ---------- Focus and selection ---------- */
:where(a, button, input, select, textarea, summary, .wp-block-navigation-item__content):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-1);
	outline-offset: 3px;
}
::selection { background: var(--wp--preset--color--accent-1); color: #fff; }

.skip-link.screen-reader-text:focus { z-index: 100001; }

/* ---------- Dark sections: readable links and outline buttons ---------- */
.has-contrast-background-color a:where(:not(.wp-element-button)),
.has-accent-1-background-color a:where(:not(.wp-element-button)),
.has-accent-3-background-color a:where(:not(.wp-element-button)) {
	color: inherit;
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 2px solid currentColor;
	padding: calc(0.95rem - 2px) calc(1.6rem - 2px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: currentColor;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover > * { color: var(--wp--preset--color--base); }
.has-contrast-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-accent-1-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: #fff;
	color: #000;
}
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover { color: var(--wp--preset--color--base); }
.has-contrast-background-color .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover,
.has-accent-1-background-color .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color):hover { color: #000; }

/* White button on red/black bands */
.wp-block-button__link.has-base-background-color:hover {
	background-color: var(--wp--preset--color--contrast) !important;
	color: #fff !important;
}
.has-contrast-background-color .wp-block-button__link.has-base-background-color:hover {
	background-color: var(--wp--preset--color--accent-1) !important;
}

/* ---------- Header ---------- */
.ve-topbar { font-size: 0.875rem; }
.ve-topbar p { margin: 0; }
.ve-topbar a { text-decoration: none; font-weight: 700; }
.ve-topbar a:hover { text-decoration: underline; }

.ve-header { border-bottom: 1px solid var(--wp--preset--color--accent-6); }
.ve-header .wp-block-site-logo img { height: auto; }
.ve-header .wp-block-navigation__submenu-container {
	border: 0 !important;
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
	border-top: 3px solid var(--wp--preset--color--accent-1) !important;
	min-width: 280px !important;
	padding: 0.5rem 0;
}
.ve-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.6rem 1.1rem; }
.ve-header .wp-block-navigation .current-menu-item > a,
.ve-header .wp-block-navigation [aria-current="page"] { color: var(--wp--preset--color--accent-1); }

@media (min-width: 782px) {
	header.wp-block-template-part {
		position: sticky;
		top: 0;
		z-index: 50;
		background: var(--wp--preset--color--base);
	}
	.admin-bar header.wp-block-template-part { top: 32px; }
}
@media (max-width: 781px) {
	.ve-topbar .ve-topbar-extra { display: none; }
	.ve-header .ve-header-cta .wp-block-button__link { padding: 0.7rem 1rem; font-size: 0.9375rem; white-space: nowrap; }
}

/* ---------- Block style: bolt hero ---------- */
/* The red bolt from the logo, cropped off the right edge. One deliberate brand moment. */
.is-style-ve-bolt,
.is-style-ve-bolt-compact {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.is-style-ve-bolt::after,
.is-style-ve-bolt-compact::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: -12%;
	right: -7vw;
	height: 128%;
	aspect-ratio: 780 / 1030;
	background: url("assets/images/bolt.svg") no-repeat center / contain;
	pointer-events: none;
}
.is-style-ve-bolt-compact::after {
	top: -30%;
	height: 175%;
	right: -2vw;
	opacity: 0.9;
}
@media (prefers-reduced-motion: no-preference) {
	.is-style-ve-bolt::after {
		animation: ve-bolt-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
	}
}
@keyframes ve-bolt-in {
	from { transform: translate3d(18%, -6%, 0); opacity: 0; }
}
@media (max-width: 1100px) {
	.is-style-ve-bolt::after { right: -22vw; opacity: 0.45; }
}
@media (max-width: 781px) {
	.is-style-ve-bolt::after { right: -42vw; top: -4%; height: 70%; opacity: 0.32; }
	.is-style-ve-bolt-compact::after { right: -30vw; opacity: 0.35; }
}

/* Keep hero copy clear of the bolt */
.is-style-ve-bolt p.has-large-font-size,
.is-style-ve-bolt-compact p.has-large-font-size { max-width: 36rem; }

/* ---------- Block style: red rule ---------- */
.is-style-ve-red-rule {
	border-top: 4px solid var(--wp--preset--color--accent-1);
	padding-top: 1.25rem;
}

/* ---------- Hero facts row ---------- */
.ve-facts p { margin: 0; }
.ve-facts strong { display: block; font-size: 1.0625rem; font-weight: 700; font-stretch: 108%; margin-bottom: 0.15rem; }

/* ---------- Numbered process (a real sequence) ---------- */
.ve-steps { counter-reset: ve-step; }
.ve-steps > .wp-block-column { counter-increment: ve-step; }
.ve-steps > .wp-block-column::before {
	content: counter(ve-step);
	display: block;
	font-weight: 800;
	font-stretch: 125%;
	font-size: 2.75rem;
	line-height: 1;
	color: var(--wp--preset--color--accent-1);
	margin-bottom: 0.75rem;
}

/* ---------- Service lists ---------- */
.is-style-ve-ticks { list-style: none; padding-left: 0 !important; }
.is-style-ve-ticks li {
	position: relative;
	padding-left: 1.6rem;
	margin-block: 0.35rem;
}
.is-style-ve-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 0.7rem;
	height: 0.7rem;
	background: var(--wp--preset--color--accent-1);
	clip-path: polygon(45% 0, 100% 0, 55% 50%, 85% 50%, 20% 100%, 38% 58%, 0 58%);
}

/* ---------- FAQ (details) ---------- */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	padding-block: 1.1rem;
	margin-block-start: 0 !important;
}
.wp-block-details summary {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2.5rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: -0.1em;
	font-size: 1.75rem;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--accent-1);
}
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { margin-top: 0.75rem; max-width: 70ch; }

/* ---------- Breadcrumbs ---------- */
.ve-breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	font-size: 0.875rem;
}
.ve-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; opacity: 0.6; }
.ve-breadcrumbs a { color: inherit; text-decoration: none; opacity: 0.8; }
.ve-breadcrumbs a:hover { text-decoration: underline; opacity: 1; }

/* ---------- Landing template: sections sit flush ---------- */
.ve-landing > .wp-block-post-content > * { margin-block: 0; }
.ve-landing > .wp-block-post-content > .alignfull { margin-block: 0; }

/* ---------- Footer ---------- */
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }
.ve-footer-links { list-style: none; padding-left: 0 !important; }
.ve-footer-links li { margin-block: 0.45rem; }
.ve-footer a:where(:not(.wp-element-button)) { text-decoration: none; }
.ve-footer a:where(:not(.wp-element-button)):hover { text-decoration: underline; }
.ve-footer .wp-block-navigation .wp-block-navigation-item__content { color: inherit; }
.ve-footer h2 { font-stretch: 108%; }

/* ---------- Prose pages (privacy, terms) ---------- */
.ve-prose h2 { margin-top: 2.5rem; font-size: var(--wp--preset--font-size--large); font-stretch: 108%; }
.ve-prose h3 { margin-top: 1.75rem; font-size: var(--wp--preset--font-size--medium); }

@media print {
	header.wp-block-template-part { position: static; }
	.is-style-ve-bolt::after, .is-style-ve-bolt-compact::after { display: none; }
}
