/*
Theme Name:        Sewer Site Builder
Theme URI:         https://rightnowmarketinggroup.com
Author:            Right Now Marketing Group LLC
Description:       Complete sewer cleaning company website. Gutenberg-only, no page builder needed. Includes 22 pages, 6 CPTs, dynamic tag system, schema, and one-click site builder.
Version:           4.0.0
Requires at least: 6.4
Tested up to:      7.0
Requires PHP:      8.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       sewer-theme
Tags:              block-editor, custom-colors, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
	--ssb-primary:        #1a3f6f;
	--ssb-primary-dark:   #112a4a;
	--ssb-secondary:      #2563eb;
	--ssb-accent:         #dc2626;
	--ssb-accent-dark:    #991b1b;
	--ssb-neutral-dark:   #1f2937;
	--ssb-neutral-mid:    #6b7280;
	--ssb-neutral-light:  #f3f4f6;
	--ssb-surface:        #f9fafb;
	--ssb-text:           #111827;
	--ssb-white:          #ffffff;
	--ssb-radius:         6px;
	--ssb-shadow:         0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
	--ssb-shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

/* ============================================================
   Base Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ssb-text);
	background: var(--ssb-white);
	-webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ssb-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,h5,h6 {
	font-weight: 700;
	line-height: 1.2;
	color: var(--ssb-neutral-dark);
	margin-bottom: 0.75em;
}
h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }

/* ============================================================
   Full-width block support — CRITICAL
   Makes wp:group alignfull span edge-to-edge with background
   ============================================================ */
.site-content { overflow-x: hidden; }

.wp-block-group.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
}

/* Constrain inner content to 1200px */
.wp-block-group.alignfull > * {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

/* But columns/headings/paragraphs inside alignfull should be full-width of that 1200px box */
.wp-block-group.alignfull > .wp-block-columns,
.wp-block-group.alignfull > .wp-block-heading,
.wp-block-group.alignfull > .wp-block-paragraph,
.wp-block-group.alignfull > .wp-block-buttons,
.wp-block-group.alignfull > .wp-block-query {
	width: 100%;
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}

/* ============================================================
   Buttons
   ============================================================ */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--ssb-radius) !important;
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.15s, transform 0.1s;
	cursor: pointer;
}
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--ssb-secondary);
	outline-offset: 3px;
}
.wp-block-button__link:hover {
	filter: brightness(0.9);
	text-decoration: none;
}
.wp-block-buttons {
	gap: 1rem !important;
}

/* ============================================================
   Columns responsive
   ============================================================ */
@media (max-width: 599px) {
	.wp-block-columns {
		flex-direction: column;
	}
	.wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ============================================================
   FAQ / Details accordion
   ============================================================ */
.wp-block-details {
	border: 1px solid #e5e7eb;
	border-radius: var(--ssb-radius);
	margin-bottom: 0.75rem;
	overflow: hidden;
}
.wp-block-details summary {
	padding: 1rem 1.25rem;
	background: var(--ssb-surface);
	cursor: pointer;
	font-weight: 600;
	color: var(--ssb-primary);
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: '+'; font-size: 1.5rem; font-weight: 300; }
.wp-block-details[open] summary::after { content: '−'; }
.wp-block-details summary:focus-visible { outline: 3px solid var(--ssb-secondary); outline-offset: -3px; }
.wp-block-details > *:not(summary) { padding: 1rem 1.25rem; }

/* ============================================================
   Post template grid (testimonials, projects, etc.)
   ============================================================ */
.wp-block-post-template.is-layout-grid {
	display: grid !important;
	gap: 1.5rem;
}
.wp-block-post-template.columns-3.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.wp-block-post-template.columns-2.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ============================================================
   Accessibility
   ============================================================ */
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link {
	background: var(--ssb-primary); color: var(--ssb-white); font-weight: 700;
	left: 1rem; padding: 0.5rem 1rem; position: absolute; top: -999px;
	z-index: 999999; text-decoration: none; border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
	.wp-block-group.alignfull > * { padding-left: 1rem; padding-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link { transition: none; }
	html { scroll-behavior: auto; }
}
