/* ═══════════════════════════════════════════════════════════════
   Charlie's Garage — Global Styles
   Applies site-wide. Tokens are defined in style.css :root block.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Base ─────────────────────────────────────────────────────── */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--cg-font-body);
	font-size: 16px;
	line-height: 1.75;
	color: var(--cg-text);
	background-color: var(--cg-white);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
}

/* ─── Typography ──────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cg-font-heading);
	font-weight: 700;
	line-height: 1.25;
	color: var(--cg-text);
	margin-top: 0;
}

h1 { font-size: clamp(28px, 5vw, 42px); }
h2 { font-size: clamp(22px, 4vw, 32px); }
h3 { font-size: clamp(18px, 3vw, 24px); }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
	margin-top: 0;
	margin-bottom: 1.25em;
}

a {
	color: var(--cg-maroon);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover,
a:focus {
	color: var(--cg-maroon-dark);
	text-decoration: underline;
}

/* ─── Elementor Container Width ───────────────────────────────── */

.elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--cg-max-width);
}

/* ─── Global Buttons ──────────────────────────────────────────── */

.elementor-button,
.elementor-button.elementor-size-md {
	display: inline-block;
	background-color: var(--cg-maroon);
	color: var(--cg-white) !important;
	border: 2px solid var(--cg-maroon);
	border-radius: var(--cg-radius);
	font-family: var(--cg-font-heading);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.75px;
	text-transform: uppercase;
	padding: 14px 32px;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	text-decoration: none !important;
}

.elementor-button:hover,
.elementor-button:focus {
	background-color: var(--cg-maroon-dark);
	border-color: var(--cg-maroon-dark);
	color: var(--cg-white) !important;
}

/* ─── Section Utility Classes ─────────────────────────────────── */

.cg-bg-maroon      { background-color: var(--cg-maroon)       !important; }
.cg-bg-nav-dark    { background-color: var(--cg-nav-dark)      !important; }
.cg-bg-slate       { background-color: var(--cg-footer-slate)  !important; }
.cg-bg-light       { background-color: var(--cg-section-light) !important; }
.cg-bg-gray        { background-color: var(--cg-light-gray)    !important; }
.cg-bg-white       { background-color: var(--cg-white)         !important; }
.cg-bg-dark        { background-color: #3a3a3a                 !important; }

.cg-text-white  *  { color: var(--cg-white)  !important; }
.cg-text-maroon *  { color: var(--cg-maroon) !important; }

/* ─── Inner Page Banner ───────────────────────────────────────── */
/*
 * Structure (two Elementor sections stacked):
 *   1. .cg-page-banner  — thin gray strip above the red bar
 *   2. .cg-page-banner-bar — maroon section; CSS adds orange corner triangles
 *
 * The triangles are CSS border-trick pseudo-elements.
 * ::before → bottom-left orange right-triangle
 * ::after  → bottom-right orange right-triangle (mirror)
 */

/* Gray strip above the red bar */
.elementor-section.cg-page-banner,
.e-con.cg-page-banner {
	background-color: #d4d4d4 !important;
	min-height: 20px !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Force the column wrap inside to not collapse to zero */
.elementor-section.cg-page-banner > .elementor-container > .elementor-column > .elementor-widget-wrap,
.elementor-section.cg-page-banner > .elementor-container > .elementor-column > .elementor-column-wrap > .elementor-widget-wrap {
	min-height: 20px !important;
}

/* Maroon red bar */
.elementor-section.cg-page-banner-bar,
.e-con.cg-page-banner-bar {
	background-color: #8B1A1A !important;
	min-height: 44px !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	position: relative !important;
	overflow: visible !important;
}

/* Force the column wrap inside to not collapse to zero */
.elementor-section.cg-page-banner-bar > .elementor-container > .elementor-column > .elementor-widget-wrap,
.elementor-section.cg-page-banner-bar > .elementor-container > .elementor-column > .elementor-column-wrap > .elementor-widget-wrap {
	min-height: 44px !important;
}

/* Ensure parent wrappers don't clip the pseudo-elements */
.elementor-section-wrap,
.elementor-inner,
.elementor {
	overflow: visible !important;
}

/* Orange triangles at bottom-left and bottom-right corners of the red bar */
.elementor-section.cg-page-banner-bar::before,
.e-con.cg-page-banner-bar::before {
	content: '' !important;
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 0 !important;
	height: 0 !important;
	border-top: 44px solid #e67e22 !important;
	border-right: 44px solid transparent !important;
	z-index: 99 !important;
}

.elementor-section.cg-page-banner-bar::after,
.e-con.cg-page-banner-bar::after {
	content: '' !important;
	position: absolute !important;
	bottom: 0 !important;
	right: 0 !important;
	width: 0 !important;
	height: 0 !important;
	border-top: 44px solid #e67e22 !important;
	border-left: 44px solid transparent !important;
	z-index: 99 !important;
}

/* Page title below the banner bar */
.cg-page-title {
	padding: 24px 0 30px;
	background-color: var(--cg-white);
}

.cg-page-title .elementor-heading-title {
	font-family: var(--cg-font-heading);
	font-size: clamp(24px, 4vw, 36px);
	font-weight: 700;
	color: var(--cg-text);
	margin: 0;
}

/* ─── Icon List ───────────────────────────────────────────────── */

.elementor-icon-list-items .elementor-icon-list-icon {
	color: var(--cg-maroon);
}

.elementor-icon-list-items .elementor-icon-list-text {
	font-size: 0.975rem;
	color: var(--cg-text);
}

/* ─── Icon Box ────────────────────────────────────────────────── */

.elementor-icon-box-icon .elementor-icon {
	color: var(--cg-maroon);
	border-color: var(--cg-maroon);
}

.elementor-icon-box-title {
	font-family: var(--cg-font-heading);
	font-weight: 700;
	color: var(--cg-text);
}

/* ─── Welcome section heading accent bar ─────────────────────── */
/* Apply class "cg-welcome-heading" to the heading widget container */

.cg-welcome-heading .elementor-heading-title {
	border-left: 5px solid var(--cg-maroon);
	padding-left: 14px;
	background-color: var(--cg-maroon);
	color: #ffffff !important;
	padding: 10px 20px;
	display: block;
}

/* ─── Sidebar Box ─────────────────────────────────────────────── */

.cg-sidebar-box {
	background: var(--cg-section-light);
	border-top: 4px solid var(--cg-maroon);
	padding: 24px !important;
	border-radius: var(--cg-radius);
}

/* ─── Testimonial Cards ───────────────────────────────────────── */

.cg-testimonial {
	background: var(--cg-white);
	border-radius: var(--cg-radius);
	padding: 28px;
	box-shadow: 0 2px 16px rgba(0,0,0,0.07);
	border-top: 4px solid var(--cg-maroon);
}

.cg-testimonial blockquote,
.cg-testimonial p {
	font-style: italic;
	color: var(--cg-mid-gray);
	margin-bottom: 16px;
}

.cg-testimonial cite {
	font-style: normal;
	font-weight: 700;
	color: var(--cg-text);
	font-size: 0.9rem;
}

/* ─── CTA Image Boxes (homepage) ──────────────────────────────── */

.cg-cta-box {
	position: relative;
	overflow: hidden;
}

.cg-cta-box img {
	width: 100%;
	display: block;
	transition: transform 0.3s ease;
}

.cg-cta-box:hover img {
	transform: scale(1.04);
}

.cg-cta-box-label {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: rgba(0,0,0,0.55);
	padding: 12px;
	text-align: center;
}

.cg-cta-box-label .elementor-heading-title {
	color: #ffffff !important;
	font-family: var(--cg-font-heading);
	font-size: 1.1rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0;
}

/* ─── Google Map Widget ───────────────────────────────────────── */

.elementor-widget-google_maps .elementor-custom-embed {
	border-radius: var(--cg-radius);
	overflow: hidden;
}

/* ─── Accessibility ───────────────────────────────────────────── */

:focus-visible {
	outline: 3px solid var(--cg-orange);
	outline-offset: 2px;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}
