/* ==========================================================================
   Consolidated Disposal Services site stylesheet. The only stylesheet; no framework.
   Phase 1: reproduces the Blazor site's look (Bootstrap 5 + app.css) without Bootstrap.
   Sections: tokens, base, page frame, header/nav, two-column layout, title bands and
   headings, content blocks (cards, rate tables, hours, addresses), home page, sidebar,
   carousel, footer, utilities, media queries (768 is the old site's only breakpoint)
   ========================================================================== */

/* --- Tokens -------------------------------------------------------------- */
:root {
	--gold: #efd397;             /* title bands, nav hover */
	--gold-text: #daa936;        /* section headings */
	--brown: #755753;            /* band text, rules, sidebar border */
	--text: #333;
	--text-hover: #000;
	--link-blue: blue;
	--surface: #fff;
	--card-line: rgba(0, 0, 0, 0.175);
	--card-radius: 0.375rem;

	--page: 970px;               /* container max width */
	--page-pad: 12px;            /* half the Bootstrap gutter */
	--sidebar-max: 265px;        /* sidebar width on narrow screens */

	--font: arial, helvetica, sans-serif;
	--font-size: 0.85em;         /* 13.6px at the browser default */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: var(--font-size);
	line-height: 1.5;
	color: var(--text);
	background: var(--surface);
}

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

a {
	color: var(--text);
	padding: 0 3px;
	text-decoration: none;
	outline: none;
}
a:hover, a:focus-visible { color: var(--text-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; }

h1, h2, h3 { margin: 0; font-size: inherit; font-weight: bold; line-height: inherit; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 2rem; }
address { margin: 0 0 1rem; font-style: normal; }
small { font-size: 0.875em; }
sup { font-size: 0.75em; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em; }
table { border-collapse: collapse; border-spacing: 0; margin-top: 0.75em; }
th, td { padding: 0; text-align: left; border: 0; }
main { display: block; }

.skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 1000;
	padding: 8px 12px;
	color: #fff;
	background: var(--brown);
}
.skip-link:focus { top: 8px; }

/* --- Page frame ---------------------------------------------------------- */
.page {
	width: 100%;
	max-width: var(--page);
	margin: 0 auto;
	padding: 0 var(--page-pad);
}

/* --- Header and navigation ----------------------------------------------- */
.site-header {
	position: relative;
	padding-top: 0.5rem;
}
.site-header__brand {
	display: block;
	margin: 0 0.5rem;
	padding: 0 0.5rem 0.25rem;
	text-align: center;
}
.site-header__brand:hover { background: transparent; }
.site-header__banner { min-width: 150px; vertical-align: top; }

/* Hamburger: shown on narrow screens only, over the top-right corner of the banner. */
.site-header__toggle {
	position: absolute;
	top: 0.5rem;
	right: 1rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 3.5rem;
	height: 2.5rem;
	padding: 0 1rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(0, 0, 0, 0.1);
	cursor: pointer;
}
.site-header__toggle[aria-expanded="true"] { background: rgba(255, 255, 255, 0.5); }
.site-header__bar {
	display: block;
	height: 2px;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.55);
}

.site-nav { display: none; padding: 0 0 0.25rem; }
.site-nav.is-open { display: block; }
.site-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav li { font-size: 1rem; font-weight: bold; }
.site-nav a {
	display: block;
	padding: 3px 9px;
	color: var(--text);
	text-align: left;
	text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus, .site-nav a:active {
	color: var(--brown);
	background: var(--gold);
	text-decoration: none;
}

/* --- Two-column layout --------------------------------------------------- */
.layout {
	display: grid;
	grid-template-columns: 1fr;
	margin-top: 1rem;
}
.content { min-width: 0; padding: 0 var(--page-pad); }

.sidebar {
	width: 100%;
	max-width: var(--sidebar-max);
	margin: 0 auto;
	padding: 0 var(--page-pad);
	text-align: center;
}

/* Brown rules: desktop only, like the old .hrGreen. */
.rule { display: none; height: 2px; background: var(--brown); }
.rule--footer { margin: 0.25rem 0; }

/* --- Title bands and headings -------------------------------------------- */
.band {
	padding-left: 20px;
	color: var(--brown);
	font-size: 18px;
	font-weight: bold;
	line-height: 1.62857;
	text-align: center;
	background: var(--gold);
}
.band--sub { margin: 20px 0; }

.gold-title, .gold {
	color: var(--gold-text);
	font-size: 16px;
	font-weight: bold;
}
.gold-title { margin: 0 0 1rem; }
.plain-title { margin: 0 0 1rem; }
.is-underlined { text-decoration: underline; }

.link--blue { color: var(--link-blue); }
.link--blue:hover { color: var(--link-blue); }
.link--underline { text-decoration: underline; }

/* --- Sections ------------------------------------------------------------ */
.section { margin-bottom: 1rem; }
.section--center { text-align: center; }
.section--center .rates table { margin-left: auto; margin-right: auto; }
.section--tight .gold-title, .section--tight .plain-title { margin-bottom: 0; }
.section--lg { margin-bottom: 3rem; }
.section > :last-child { margin-bottom: 0; }

/* --- Content blocks ------------------------------------------------------ */
.card {
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--card-line);
	border-radius: var(--card-radius);
}
.card > img { display: block; width: 100%; }
.card--padded { padding: 1rem 3rem; }

.content__image { padding: 20px 0; text-align: center; }
.content__image--padded { padding: 15px 0; }

/* Rate tables (Markdown tables wrapped in <div class="rates rates--…">). */
.rates table { width: 100%; margin: 0.75em 0 1.5rem; text-align: left; }
.rates th, .rates td { padding: 0.5rem; vertical-align: top; }
.rates th { font-weight: bold; }
.rates--wide table { margin-bottom: 3rem; }
.rates--indent { margin: 0 3rem; }
.rates--narrow table { width: 75%; margin-left: 1rem; margin-right: 1rem; }
.rates--gold th { color: var(--gold-text); font-size: 16px; }

/* Transfer station hours and price lists: a narrow centred two-column table. */
table.hours { width: 50%; margin: 0.75em auto 0; }
table.hours td:last-child { text-align: right; }

/* Drop box rate blocks (Commercial). */
.drop-box-rates { width: 483px; max-width: 100%; margin: 20px auto 10px; }
.drop-box-rates p { text-align: left; }

/* Employment: the four address blocks. */
.addresses { margin-left: 15px; }
.addresses address { font-style: italic; }

/* --- Home page ----------------------------------------------------------- */
.company { padding: 1rem 0 0.5rem; text-align: center; }
.company__tagline { padding-bottom: 20px; }
.company__phones { margin: 0 auto; }
.company__phones th { padding-right: 20px; font-weight: normal; text-align: right; }
.company__phones a { padding: 0; }
.company__line { margin: 0; padding: 1rem 0 0.5rem; }
.company__credentials { display: inline-block; text-align: left; }
.company__credentials ul { margin: 0; padding-left: 40px; }

/* --- Sidebar ------------------------------------------------------------- */
.downloads {
	margin-left: 2px;
	padding-bottom: 1rem;
	background: var(--gold);
	border: 1px solid var(--card-line);
	border-radius: var(--card-radius);
}
.downloads__title {
	margin: 0;
	padding-top: 1rem;
	color: var(--brown);
	font-size: 18px;
	font-weight: bold;
	line-height: 1.62857;
}
.downloads__icon { display: block; margin: 0 auto; }
.downloads__group {
	margin: 1rem 0 0.5rem;
	color: var(--brown);
	font-size: 14px;
	font-weight: bold;
	line-height: 1.62857;
}
.downloads__list { margin: 0; padding-left: 2rem; text-align: left; }
.downloads__list a { text-decoration: none; }
.downloads__list a:hover { text-decoration: underline; }

.pay-online {
	display: block;
	overflow: hidden;
	margin-top: 1rem;
	padding: 0;
	border: 1px solid var(--card-line);
	border-radius: var(--card-radius);
}
.pay-online img { display: block; width: 100%; }

/* --- Carousel ------------------------------------------------------------ */
.carousel { position: relative; }
.carousel__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel__slide img { display: block; width: 100%; height: auto; }

.carousel__control {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 15%;
	padding: 0;
	font-size: 2.5rem;
	line-height: 1;
	color: #fff;
	background: transparent;
	border: 0;
	opacity: 0.5;
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.carousel__control:hover, .carousel__control:focus-visible { opacity: 0.9; }
.carousel__control--prev { left: 0; }
.carousel__control--next { right: 0; }

.carousel__dots {
	position: absolute;
	left: 15%;
	right: 15%;
	bottom: 5px;
	display: flex;
	justify-content: center;
	gap: 3px;
	margin: 0;
	padding: 0;
}
.carousel__dot {
	width: 30px;
	height: 3px;
	padding: 0;
	margin: 0;
	background: #fff;
	border: 0;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	background-clip: padding-box;
	opacity: 0.5;
	cursor: pointer;
	transition: opacity 0.6s ease;
}
.carousel__dot.is-active { opacity: 1; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
	clear: both;
	height: auto;
	padding: 10px 0;
	font-size: 0.8em;
	text-align: center;
	background: var(--surface);
}
.site-footer p { margin: 0; }

/* --- Utilities ----------------------------------------------------------- */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.carousel__track { scroll-behavior: auto; }
}

/* ==========================================================================
   Media queries. The old site had one breakpoint: 768px (Bootstrap "md").
   ========================================================================== */
@media (min-width: 768px) {
	.site-header__brand { margin: 0 1rem; padding: 0 0 0.25rem; }
	.site-header__toggle { display: none; }

	.site-nav { display: block; }
	.site-nav ul {
		display: flex;
		justify-content: space-evenly;
		margin: -9px 0 0;
		padding: 1px 0 3px 37px;
	}
	.site-nav a { font-size: 15px; text-align: center; }

	.layout { grid-template-columns: 3fr 1fr; }
	.sidebar {
		max-width: 100%;
		margin: 0;
		border-left: 2px solid var(--brown);
	}
	.page-home .sidebar { padding: 0 var(--page-pad); }
	.page-home .sidebar > * { max-width: 230px; margin-left: auto; margin-right: auto; }
	.page-home .pay-online { margin-top: 1rem; }

	.rule { display: block; }
	.rule--footer { margin: 1rem 0 0.25rem; }
	.band { text-align: left; }
	.site-footer { height: 50px; padding: 0; text-align: left; }
	.site-footer p { margin: 0 0 1rem; }
}

@media (max-width: 767px) {
	.rates--indent { margin: 0; }
	.rates--narrow table { width: 100%; margin-left: 0; margin-right: 0; }
	.card--padded { padding: 1rem; }
	table.hours { width: 100%; }
}
