/* ==========================================================
   Sewer Theme — Layout (header, nav, footer)
   ========================================================== */

/* ── Top Bar ─────────────────────────────────────────────── */
.ssb-top-bar {
	background: var(--ssb-primary-dark);
	color: rgba(255,255,255,.9);
	font-size: 0.8125rem;
	padding: 0.5rem 1.5rem;
}
.ssb-top-bar .ssb-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.ssb-top-bar a { color: var(--ssb-white); font-weight: 700; text-decoration: none; }
.ssb-top-bar a:hover { text-decoration: underline; }
.ssb-top-bar__hours { color: rgba(255,255,255,.7); }

/* ── Site Header ─────────────────────────────────────────── */
.site-header {
	background: var(--ssb-white);
	border-bottom: 1px solid #e5e7eb;
	position: sticky;
	top: 0;
	z-index: 200;
	box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.ssb-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 70px;
}

/* Branding */
.site-branding { flex-shrink: 0; }
.site-branding img { max-height: 60px; width: auto; }
.site-title-link { text-decoration: none; }
.site-title { font-size: 1.375rem; font-weight: 800; color: var(--ssb-primary); letter-spacing: -0.01em; }

/* ── Primary Nav ─────────────────────────────────────────── */
.main-navigation { flex: 1; }

#primary-menu {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	align-items: center;
	gap: 0.125rem;
	flex-wrap: wrap;
}
#primary-menu li { position: relative; }
#primary-menu a {
	display: block;
	padding: 0.5rem 0.875rem;
	color: var(--ssb-neutral-dark);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.12s, color 0.12s;
	white-space: nowrap;
}
#primary-menu a:hover,
#primary-menu .current-menu-item > a,
#primary-menu .current-page-ancestor > a {
	background: var(--ssb-neutral-light);
	color: var(--ssb-primary);
}
/* Dropdown */
#primary-menu .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	background: var(--ssb-white);
	border: 1px solid #e5e7eb;
	border-radius: var(--ssb-radius);
	box-shadow: var(--ssb-shadow-md);
	min-width: 200px;
	list-style: none;
	padding: 0.5rem 0;
	z-index: 300;
}
#primary-menu li:hover > .sub-menu,
#primary-menu li:focus-within > .sub-menu { display: block; }
#primary-menu .sub-menu a { padding: 0.5rem 1.125rem; border-radius: 0; font-size: 0.875rem; font-weight: 500; }

/* Header CTA */
.site-header__cta { flex-shrink: 0; }
.site-header__cta a {
	display: inline-block;
	background: var(--ssb-accent);
	color: var(--ssb-white);
	padding: 0.625rem 1.25rem;
	border-radius: var(--ssb-radius);
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	transition: background 0.15s;
}
.site-header__cta a:hover { background: var(--ssb-accent-dark); text-decoration: none; }

/* Hamburger */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	flex-direction: column;
	gap: 5px;
}
.menu-toggle__bar {
	display: block;
	width: 24px; height: 2px;
	background: var(--ssb-primary);
	border-radius: 2px;
	transition: transform 0.2s, opacity 0.2s;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--ssb-neutral-dark); color: rgba(255,255,255,.85); }

.footer-cta-band {
	background: var(--ssb-primary);
	padding: 3.5rem 1.5rem;
	text-align: center;
}
.footer-cta-band h2 { color: var(--ssb-white); margin-bottom: 0.75rem; }
.footer-cta-band p  { color: rgba(255,255,255,.85); margin-bottom: 1.5rem; }
.ssb-section--primary { background: var(--ssb-primary); }

.ssb-cta-group {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
}
.ssb-cta-group--center { justify-content: center; }

.ssb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.75rem;
	border-radius: var(--ssb-radius);
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	border: 2px solid transparent;
	transition: filter 0.15s;
}
.ssb-btn--primary  { background: var(--ssb-accent); color: var(--ssb-white); border-color: var(--ssb-accent); }
.ssb-btn--secondary{ background: var(--ssb-white); color: var(--ssb-primary); border-color: var(--ssb-white); }
.ssb-btn:hover { filter: brightness(0.9); text-decoration: none; }

.footer-widgets {
	padding: 3rem 1.5rem;
}
.footer-widgets .ssb-container {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
}
.footer-col h3 {
	color: var(--ssb-white);
	font-size: 1rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--ssb-accent);
	display: inline-block;
}
.footer-col p  { color: rgba(255,255,255,.75); font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.375rem; }
.footer-col a  { color: rgba(255,255,255,.75); font-size: 0.9rem; text-decoration: none; }
.footer-col a:hover { color: var(--ssb-white); text-decoration: underline; }
.footer-brand { font-size: 1.25rem; font-weight: 800; color: var(--ssb-white); display: block; margin-bottom: 0.75rem; }

.footer-col #footer-menu, .footer-col ul.menu { list-style: none; padding: 0; margin: 0; }
.footer-col ul.menu li { margin-bottom: 0.375rem; }

.footer-bottom {
	background: rgba(0,0,0,.3);
	padding: 1rem 1.5rem;
}
.footer-bottom .ssb-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: rgba(255,255,255,.55);
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 900px) {
	.menu-toggle { display: flex; }
	.main-navigation { position: relative; }
	#primary-menu {
		display: none;
		flex-direction: column;
		align-items: flex-start;
		position: absolute;
		top: calc(100% + 0.5rem);
		right: 0;
		background: var(--ssb-white);
		border: 1px solid #e5e7eb;
		border-radius: var(--ssb-radius);
		box-shadow: var(--ssb-shadow-md);
		min-width: 240px;
		z-index: 400;
		padding: 0.75rem 0;
	}
	#primary-menu.is-open { display: flex; }
	#primary-menu a { padding: 0.625rem 1.25rem; border-radius: 0; }
	#primary-menu .sub-menu {
		display: none;
		position: static;
		box-shadow: none;
		border: none;
		border-top: 1px solid #f0f0f0;
		border-radius: 0;
		padding-left: 1rem;
		background: var(--ssb-surface);
	}
	#primary-menu li.is-open > .sub-menu { display: block; }
	.ssb-header-inner { gap: 0.75rem; }
}
@media (max-width: 480px) {
	.ssb-top-bar .ssb-container { flex-direction: column; text-align: center; }
	.footer-bottom .ssb-container { flex-direction: column; text-align: center; }
	.footer-widgets .ssb-container { grid-template-columns: 1fr; }
}
