/* Near The Tracks v8 — simple. Montserrat, deep hunter green, light honey (a thin wash of
   Greene & Greene stain), and a double rule: a heavier night-blue line over a thin amber line. */

:root {
	--ntt-green: var(--wp--preset--color--green, #1B2A20);
	--ntt-line: var(--wp--preset--color--line, #D3C7AF);
	--ntt-tan: var(--wp--preset--color--surface, #ECE3D1);
	--ntt-muted: var(--wp--preset--color--muted, #5D5F58);
	--ntt-night: var(--wp--preset--color--night, #121A2B);
	--ntt-amber: var(--wp--preset--color--amber, #C8913A);
}

/* Double rule: night-blue line, small gap, thin amber line. Runs the full width of the page. */
hr.wp-block-separator.is-style-ntt-double,
.wp-block-separator.is-style-ntt-double {
	border: 0 !important;
	display: block !important;
	height: 5px !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	opacity: 1;
	color: transparent;
	background:
		linear-gradient(var(--ntt-night), var(--ntt-night)) top / 100% 2px no-repeat,
		linear-gradient(var(--ntt-amber), var(--ntt-amber)) bottom / 100% 1px no-repeat !important;
}
.ntt-rule-wrap { padding: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; max-width: none !important; }
.ntt-rule-wrap > * { max-width: none !important; margin: 0 !important; }
/* Mirror the double rule around the Services block: the dark lines touch the block, the amber lines sit outside.
   Above the block: amber on top, dark below. Below the block: dark on top, amber below. */
.wp-block-separator.is-style-ntt-double.ntt-double--above {
	background:
		linear-gradient(var(--ntt-amber), var(--ntt-amber)) top / 100% 1px no-repeat,
		linear-gradient(var(--ntt-night), var(--ntt-night)) bottom / 100% 2px no-repeat !important;
}
/* No white gap between the rules and the block, so the white space stays outside the lines */
.ntt-rule-wrap,
.ntt-rule-wrap + .wp-block-group,
.ntt-services-block + .ntt-rule-wrap { margin-block-start: 0 !important; margin-top: 0 !important; }
/* A little white space between the block and the dark line, top and bottom */
.ntt-rule-wrap--above { padding-bottom: 6px !important; }
.ntt-rule-wrap--below { padding-top: 6px !important; }

/* Section labels: small caps with a thin line running to the right */
h1.ntt-label, h2.ntt-label, h3.ntt-label, .ntt-label {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.18em !important;
	text-transform: uppercase;
	color: var(--ntt-green);
	margin-top: 0 !important;
	margin-bottom: 1.5rem !important;
}
.ntt-label::after { content: none; }

/* Home title block */
.ntt-hero-title {
	font-size: clamp(1.25rem, 2vw, 1.5rem) !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em;
	margin: 0 0 0.75rem !important;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--ntt-amber);
	display: inline-block;
}
.ntt-hero-list { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ntt-green); margin: 0 0 0.4rem !important; }
.ntt-page-title { font-size: 1.5rem !important; font-weight: 600 !important; margin-top: 0 !important; margin-bottom: 0 !important; }

/* Home photos: one photo or a small montage (choose the layout in the page editor by class) */
.ntt-hero-photos figure { margin: 0 !important; }
.ntt-montage { position: relative; }
.ntt-montage > * { margin: 0 !important; }
.ntt-montage img { display: block; width: 100% !important; }
/* 2 — two photos, the smaller one offset over the corner */
.ntt-montage--offset { padding-bottom: 18% !important; }
.ntt-montage--offset > :nth-child(1) { width: 82%; margin-left: auto !important; }
.ntt-montage--offset > :nth-child(2) { position: absolute; left: 0; bottom: 0; width: 44%; z-index: 2; box-shadow: 0 0 0 8px var(--wp--preset--color--base, #FFFFFF); }
/* 3 — one large, two stacked */
.ntt-montage--three { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 0.6rem; aspect-ratio: 3 / 2; }
.ntt-montage--three > :nth-child(1) { grid-row: 1 / 3; }
/* 4 — four photos, staggered */
.ntt-montage--four { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(12, 1fr); aspect-ratio: 1 / 0.82; }
.ntt-montage--four > :nth-child(1) { grid-column: 1 / 9; grid-row: 1 / 8; }
.ntt-montage--four > :nth-child(2) { grid-column: 9 / 13; grid-row: 2 / 7; margin-left: 0.6rem !important; }
.ntt-montage--four > :nth-child(3) { grid-column: 1 / 6; grid-row: 8 / 13; margin-top: 0.6rem !important; }
.ntt-montage--four > :nth-child(4) { grid-column: 6 / 12; grid-row: 7 / 13; z-index: 2; box-shadow: 0 0 0 8px var(--wp--preset--color--base, #FFFFFF); }
.ntt-montage--three > *, .ntt-montage--four > * { min-height: 0; min-width: 0; }
.ntt-montage--three img, .ntt-montage--four img { height: 100% !important; object-fit: cover; aspect-ratio: auto !important; }

/* Services as a drawing schedule: thin rules between rows */
.ntt-schedule { border-top: 1px solid var(--ntt-green); border-bottom: 1px solid var(--ntt-green); }
.ntt-schedule-row + .ntt-schedule-row { border-top-color: rgba(200, 145, 58, 0.45) !important; }
.ntt-schedule > .ntt-schedule-row { margin-block-start: 0 !important; margin-top: 0 !important; }
.ntt-schedule-row { border-top: 1px solid var(--ntt-line); padding: 0.6rem 0; gap: 0.25rem 2rem !important; }
.ntt-schedule-row:first-child { border-top: 0; }
.ntt-schedule-row p { margin: 0 !important; }
.ntt-schedule-name { font-weight: 600; color: var(--ntt-green); min-width: 14rem; }
.ntt-schedule-desc { font-size: 0.9rem; }

/* Small square tiles */
.ntt-tiles figure { overflow: hidden; margin: 0 !important; }
.ntt-tiles figure img { width: 100%; transition: opacity 0.2s ease; }
.ntt-tiles figure a:hover img { opacity: 0.85; }
.ntt-more { margin-top: 1rem !important; }
.ntt-more a { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--ntt-green); border-bottom: 1px solid var(--ntt-green); padding-bottom: 2px; }
.ntt-more a:hover { color: var(--wp--preset--color--green-light, #2D4135); }

/* Work page: a wordless flow. Each job = finished photo + shop photos; rows of four in between. */
.ntt-flow > * { margin: 0 !important; }
.ntt-flow > * + * { margin-top: 1.25rem !important; }
.ntt-pair figure { margin: 0 !important; }
.ntt-pair img { cursor: zoom-in; }
.ntt-pair .wp-block-column > * + * { margin-top: 0.5rem !important; }
@media (min-width: 782px) {
	/* Finished photo and shop photos side by side, all one height; every other job flips sides */
	.ntt-pair-cols { aspect-ratio: 16 / 8; align-items: stretch !important; }
	.ntt-pair--flip .ntt-pair-cols { flex-direction: row-reverse; }
	.ntt-pair .wp-block-column { display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; }
	.ntt-pair .wp-block-column > * { margin: 0 !important; }
	.ntt-pair .wp-block-column figure { flex: 1 1 0; min-height: 0; }
	.ntt-pair .wp-block-column figure img { width: 100% !important; height: 100% !important; aspect-ratio: auto !important; object-fit: cover; }
}
@media (max-width: 781px) {
	.ntt-pair-cols { gap: 0.5rem !important; }
}
.ntt-flow [id] { scroll-margin-top: 110px; }

/* Galleries: small squares, click to enlarge */
.ntt-gallery.wp-block-gallery.is-cropped .wp-block-image img { aspect-ratio: 1 / 1; }
/* Keep every square the same size, even on a short last row */
.ntt-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { flex-grow: 0 !important; }
.ntt-gallery .wp-block-image img { cursor: zoom-in; transition: opacity 0.2s ease; }
.ntt-gallery .wp-block-image:hover img { opacity: 0.85; }
.ntt-project [id] { scroll-margin-top: 110px; }

/* Contact line at the bottom of pages */
.ntt-contact-line { border-top: 0; }
.ntt-contact-line .wp-block-columns { align-items: center; }
.ntt-contact-line p { margin: 0; }
.ntt-note { font-size: 0.85rem; }

/* Contact page column */
.ntt-contact-info { border-left: 1px solid var(--ntt-line); padding-left: 2rem !important; }
.ntt-contact-info p { margin: 0 0 1.25rem; }
.ntt-contact-info strong { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ntt-green); margin-bottom: 0.2rem; }

/* v14 Contact page: email / area / license in one compact strip above the form */
.ntt-contact-section { padding-top: 0.5rem !important; }
.ntt-contact > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.ntt-contact-strip {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0;
	padding: 0.7rem 0 !important; margin: 0 0 1.4rem !important;
	border-top: 1px solid var(--ntt-green); border-bottom: 1px solid var(--ntt-line);
}
.ntt-contact-strip > p { margin: 0 !important; font-size: 0.86rem; line-height: 1.45; white-space: nowrap; }
/* a thin divider between items on a computer */
.ntt-contact-strip > p + p { margin-left: 1rem !important; padding-left: 1rem; border-left: 1px solid var(--ntt-line); }
.ntt-contact-strip a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--ntt-line); }
.ntt-contact-strip a:hover { border-bottom-color: var(--ntt-green); }

/* Form */
.ntt-quote { scroll-margin-top: 110px; }
.ntt-quote__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.ntt-quote__form p { margin: 0 0 1rem; }
.ntt-quote__form label { display: block; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.35rem; color: var(--ntt-green); }
.ntt-quote__form label span { color: var(--ntt-muted); }
.ntt-quote__form input,
.ntt-quote__form select,
.ntt-quote__form textarea {
	width: 100%; box-sizing: border-box;
	font: inherit; font-size: 0.95rem; color: var(--wp--preset--color--ink, #1F2421);
	background: #fff; border: 1px solid var(--ntt-line); border-radius: 0;
	padding: 0.65rem 0.75rem; line-height: 1.4;
}
.ntt-quote__form textarea { min-height: 8rem; resize: vertical; }
.ntt-quote__form input:focus,
.ntt-quote__form select:focus,
.ntt-quote__form textarea:focus { outline: 1px solid var(--ntt-green); border-color: var(--ntt-green); }
.ntt-quote__submit button { cursor: pointer; }
.ntt-quote__submit button[disabled] { opacity: 0.6; cursor: wait; }
.ntt-quote__form label em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ntt-muted); }
.ntt-quote__photos input[type=file] { padding: 0.55rem 0.6rem; background: #fff; cursor: pointer; font-size: 0.85rem; }
.ntt-quote__photos input[type=file]::file-selector-button { font: inherit; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; background: var(--ntt-green); border: 0; padding: 0.55em 1.1em; margin-right: 0.9rem; cursor: pointer; }
.ntt-quote__photos small { display: block; margin-top: 0.35rem; font-size: 0.8rem; color: var(--ntt-muted); }
.ntt-quote__notice { padding: 0.8rem 1rem; margin-bottom: 1.25rem; font-size: 0.9rem; }
.ntt-quote__notice.is-success { background: #eef2ea; border: 1px solid #b9c8b1; color: #233b26; }
.ntt-quote__notice.is-error { background: #f6eeea; border: 1px solid #dcc0b3; color: #6a2d1d; }
.ntt-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Footer bits */
.ntt-footer-muted { color: rgba(255, 255, 255, 0.65); }
.ntt-footer-rule.wp-block-separator { border: 0 !important; border-top: 1px solid rgba(200, 145, 58, 0.5) !important; height: 0; max-width: 1140px !important; width: 100% !important; margin: 2rem auto 1.25rem !important; opacity: 1; background: none !important; }

@media (max-width: 781px) {
	.ntt-quote__row { grid-template-columns: 1fr; }
	/* Phone: keep the short pair (phone + city) side by side, tighten the form, and keep the
	   contact strip to three short lines so the form starts on the first screen. */
	.ntt-quote__row--pair { grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
	.ntt-quote__form p { margin-bottom: 0.8rem; }
	.ntt-quote__form label { margin-bottom: 0.25rem; }
	.ntt-quote__form input, .ntt-quote__form select, .ntt-quote__form textarea { padding: 0.55rem 0.65rem; font-size: 16px; }
	.ntt-quote__form textarea { min-height: 6.5rem; }
	.ntt-page-header { padding-top: 1.25rem !important; }
	.ntt-page-header p { margin-top: 0.35rem !important; font-size: 0.9rem; }
	.ntt-contact-section { padding-top: 0.6rem !important; }
	.ntt-contact-strip { flex-direction: column; gap: 0.1rem; padding: 0.55rem 0 !important; margin-bottom: 1.1rem !important; }
	.ntt-contact-strip > p { font-size: 0.85rem; white-space: normal; }
	.ntt-contact-strip > p + p { margin-left: 0 !important; padding-left: 0; border-left: 0; }
	.ntt-contact-strip a { overflow-wrap: anywhere; }
	.ntt-tiles.wp-block-columns { flex-wrap: nowrap !important; gap: 0.4rem !important; }
	.ntt-tiles .wp-block-column { flex-basis: 0 !important; }
	.ntt-schedule-name { min-width: 0; }
	.ntt-schedule-row { flex-direction: column !important; align-items: flex-start !important; gap: 0.1rem !important; }
	.ntt-contact-info { border-left: 0; border-top: 1px solid var(--ntt-line); padding-left: 0 !important; padding-top: 1.5rem; }
	.ntt-hero .wp-block-column:last-child { margin-top: 1.5rem; }
	.ntt-contact-line .has-text-align-right { text-align: left; }
}
