/*
 * One responsive layout for the home page, About page, header, footer, and project posts.
 * These pages used to keep separate desktop and phone copies, shown or hidden by the
 * Conditional Blocks plugin. Now there's one copy, and the differences live here.
 *
 * Breakpoints match the ones Conditional Blocks used:
 * phones up to 767px, tablets 768-1024px, desktops from 1025px.
 */

/* All sizes ------------------------------------------------------------- */
/* Headings keep their exact sizes; WordPress would otherwise scale them with the window */
.dnt-home-welcome {
	font-size: 20px !important;
}

.dnt-about-intro h1,
.dnt-svc-page h1 {
	font-size: 43px !important;
}

/* Project posts: the line that points to Services and Contact */
.dnt-single-cta {
	margin-top: var(--wp--preset--spacing--60) !important;
	margin-bottom: var(--wp--preset--spacing--60) !important;
}

/* Home: space above the services row, which the old copies produced */
.dnt-home-services {
	margin-top: 24px !important;
}

/* The home page's project grids are the one exception: the gallery plugin can't show two
   columns on phones, so there's a grid for each. They fill themselves from the posts. */
@media (min-width: 768px) {
	.dnt-only-phone {
		display: none !important;
	}

	/* Space below the footer, which the old copies produced */
	.dnt-footer {
		margin-bottom: 35px;
	}

	/* The name in the header stays on one line, and so does the menu */
	.dnt-header .wp-block-site-title {
		white-space: nowrap;
	}

	.dnt-header .wp-block-navigation__responsive-container-content {
		flex-wrap: nowrap !important;
	}

	.dnt-header .wp-block-navigation-item__content {
		white-space: nowrap;
	}
}

@media (max-width: 767px) {
	.dnt-only-desktop {
		display: none !important;
	}
}

/* Tablets and small laptops: keep the header on one row -------------------
   Below 1280px the name used to wrap, and "Contact" fell onto a hidden second row. */
@media (min-width: 768px) and (max-width: 1279px) {
	.dnt-header > .wp-block-columns {
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: 24px !important;
	}

	.dnt-header > .wp-block-columns > .wp-block-column:first-child {
		flex: 0 0 auto !important;
		width: auto;
	}

	.dnt-header > .wp-block-columns > .wp-block-column:last-child {
		flex: 1 1 0 !important;
		min-width: 0;
	}

	.dnt-header .wp-block-columns .wp-block-columns {
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: 16px !important;
		margin: 0;
	}

	.dnt-header .wp-block-columns .wp-block-columns > .wp-block-column {
		flex: 0 0 auto !important;
		width: auto;
	}

	.dnt-header .wp-block-site-logo img {
		width: 64px !important;
		height: auto !important;
	}

	.dnt-header .wp-block-site-title {
		margin: 0 !important;
		padding: 8px 16px !important;
		white-space: nowrap;
	}

}

/* From where the hamburger ends (600px): the menu fits on one row */
@media (min-width: 600px) and (max-width: 1279px) {
	.dnt-header .wp-block-navigation__responsive-container-content {
		flex-wrap: nowrap !important;
		justify-content: center;
		gap: clamp(12px, 5.5vw - 34px, 56px) !important;
	}

	.dnt-header ul.wp-block-navigation__container {
		flex: 0 0 auto !important;
		margin: 0 !important;
	}

	.dnt-header .wp-block-navigation-item__content {
		padding-right: 0 !important;
		padding-left: 0 !important;
		white-space: nowrap;
	}
}

/* Tablets: a little more room, so the name and all five menu items fit */
@media (min-width: 768px) and (max-width: 1024px) {
	.dnt-header > .wp-block-columns {
		max-width: 97% !important;
		gap: 16px !important;
	}

	.dnt-header .wp-block-site-logo img {
		width: 52px !important;
	}

	.dnt-header .wp-block-site-title {
		padding: 8px 12px !important;
	}

	.dnt-header .wp-block-navigation-item__content {
		font-size: 15.5px !important;
	}
}

/* Large phones sideways: the menu stops short of the screen edge */
@media (min-width: 600px) and (max-width: 767px) {
	.dnt-header > .wp-block-columns > .wp-block-column:last-child {
		padding-right: 16px;
	}
}

/* Tablets and phones ---------------------------------------------------- */
@media (max-width: 1024px) {
	/* Home: the "Integrated Design" introduction */
	.dnt-home-intro > * {
		max-width: 89.9% !important;
	}

	.dnt-home-intro p {
		font-size: var(--wp--preset--font-size--small) !important;
		text-align: center !important;
	}

	/* Home: the "Contracts and Commissions" heading */
	.dnt-home-contracts {
		margin-top: 24px !important;
	}

	.dnt-home-contracts .blockons-lheading-text,
	.dnt-home-contracts h1,
	.dnt-home-contracts h2,
	.dnt-home-contracts h3,
	.dnt-home-contracts h4 {
		font-size: 18px !important;
	}

	/* Project posts: title and text */
	.dnt-single-body > * {
		max-width: 90% !important;
	}

	.dnt-single-body .wp-block-post-content {
		font-size: var(--wp--preset--font-size--small);
	}
}

/* Phones ---------------------------------------------------------------- */
@media (max-width: 767px) {
	/* Home: services */
	.dnt-home-services > * {
		max-width: 90% !important;
	}

	/* About: introduction and the row of software logos */
	.dnt-about-intro > * {
		max-width: 90% !important;
	}

	.dnt-about-logos > * {
		max-width: 96% !important;
	}

	.dnt-about-intro p {
		font-size: var(--wp--preset--font-size--small) !important;
	}

	/* Contact: full width of the phone */
	.dnt-contact > * {
		max-width: 90% !important;
	}

	.dnt-about-logos .wp-block-group {
		flex-wrap: wrap !important;
		justify-content: center;
		gap: 49px 0 !important;
	}

	.dnt-about-logos .wp-block-image {
		flex: 0 0 33.3% !important;
		width: 33.3% !important;
		margin: 0 !important;
		text-align: center;
	}

	.dnt-about-logos .wp-block-image:nth-of-type(n + 4) {
		flex-basis: 50% !important;
		width: 50% !important;
	}

	.dnt-about-logos .wp-block-image img {
		display: inline-block;
		width: auto !important;
		height: 20px !important;
	}

	/* Header: logo and menu in one row, without the site title */
	.dnt-header {
		border-top: 0 none !important;
		border-right: 0 none !important;
		border-left: 0 none !important;
		min-height: 0 !important;
		padding: 0 !important;
	}

	.dnt-header > * {
		max-width: 100% !important;
	}

	.dnt-header > .wp-block-columns {
		flex-wrap: nowrap !important;
	}

	.dnt-header > .wp-block-columns > .wp-block-column:first-child {
		flex-basis: 15% !important;
	}

	.dnt-header > .wp-block-columns > .wp-block-column:last-child {
		flex-basis: 85% !important;
	}

	.dnt-header .wp-block-columns .wp-block-columns > .wp-block-column:last-child {
		display: none;
	}

	.dnt-header .wp-block-site-logo {
		margin: 0;
		padding: var(--wp--preset--spacing--40);
		text-align: center;
	}

	/* Footer: icons wider, logo centered, short copyright line */
	.dnt-footer-icons > * {
		max-width: 90% !important;
	}

	.dnt-footer-columns {
		display: block !important;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}

	.dnt-footer-columns > .wp-block-column:first-child,
	.dnt-footer-columns > .wp-block-column:last-child .wp-block-spacer,
	.dnt-footer-columns > .wp-block-column:nth-child(2) p {
		display: none;
	}

	.dnt-footer-columns > .wp-block-column:last-child p {
		text-align: center !important;
	}

	/* GoDaddy's stylesheet caps logos at 80px tall on the live site, which would squash this one */
	.dnt-footer-columns .wp-block-site-logo img {
		width: 100px !important;
		height: auto !important;
		max-height: none !important;
	}
}

/* Home: the Learn More button under the four services --------------------- */
.dnt-home-more {
	margin-top: 28px !important;
}

/* Services page: one table, so the page can be taken in at once ------------ */
.dnt-svc-page h1 {
	margin-bottom: 6px;
}

.dnt-svc-intro,
.dnt-svc-after p {
	text-wrap: pretty;
}

.dnt-svc-intro {
	margin-top: 0 !important;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.55;
}

.dnt-svc-table {
	margin-top: 18px !important;
	border-bottom: 2px solid #4f4f4f;
	font-size: var(--wp--preset--font-size--small);
	line-height: 26px;
}

.dnt-svc-table > .wp-block-columns {
	flex-wrap: nowrap !important;
	gap: 32px;
	margin: 0 !important;
	padding: 12px 0;
	border-top: 1px solid rgb(79 79 79 / 35%);
}

.dnt-svc-table > .dnt-svc-head {
	padding: 0 0 5px;
	border-top: 0;
	border-bottom: 2px solid #4f4f4f;
}

.dnt-svc-head + .dnt-svc-row {
	border-top: 0 !important;
}

.dnt-svc-table p,
.dnt-svc-table ul {
	margin: 0;
}

.dnt-svc-table > .dnt-svc-head p {
	color: #4f4f4f;
	font-family: Cinzel, serif;
	font-size: 15px;
	line-height: 20px;
}

/* The same three columns on every row, so everything lines up */
.dnt-svc-table > .wp-block-columns > .wp-block-column:first-child {
	flex: 0 0 224px !important;
}

.dnt-svc-table > .wp-block-columns > .wp-block-column:nth-child(2) {
	flex: 1 1 0 !important;
	min-width: 0;
}

.dnt-svc-table > .wp-block-columns > .wp-block-column:nth-child(3) {
	flex: 0 0 256px !important;
}

.dnt-svc-name {
	gap: 12px;
	align-items: center;
}

.dnt-svc-name .wp-block-image {
	flex: 0 0 46px;
	margin: 0;
}

.dnt-svc-table h2 {
	margin: 0;
	font-size: 19px !important;
	line-height: 25px !important;
}

/* The small open circle matches the lists on the home page */
.dnt-svc-list {
	padding: 0;
	list-style: none;
	columns: 2;
	column-gap: 28px;
}

.dnt-svc-list li {
	position: relative;
	padding-left: 20px;
	break-inside: avoid;
}

.dnt-svc-list li::before {
	content: "○";
	content: "○" / "";
	position: absolute;
	left: 0;
}

.dnt-svc-examples {
	padding: 0;
	list-style: none;
}

/* Below the table: where I work, then one centered call to action */
.dnt-svc-after,
.dnt-svc-cta {
	font-size: var(--wp--preset--font-size--small);
	line-height: 26px;
}

.dnt-svc-after {
	margin-top: 14px !important;
}

.dnt-svc-cta {
	margin-top: 20px !important;
}

.dnt-svc-after h2,
.dnt-svc-cta h2 {
	margin: 0 0 4px;
	font-size: 20px !important;
	line-height: 25px !important;
}

.dnt-svc-after p,
.dnt-svc-cta p {
	margin: 0;
}

.dnt-svc-cta p {
	text-wrap: balance;
}

.dnt-svc-cta .wp-block-buttons {
	margin-top: 10px;
}

/* Below this the first column is too narrow for the service names, so each name gets its own line */
@media (max-width: 1279px) {
	.dnt-svc-table > .dnt-svc-head {
		display: none;
	}

	.dnt-svc-table > .wp-block-columns {
		flex-wrap: wrap !important;
		gap: 6px 24px;
		padding: 14px 0;
	}

	.dnt-svc-table > .wp-block-columns > .wp-block-column:first-child,
	.dnt-svc-table > .wp-block-columns > .wp-block-column:nth-child(2),
	.dnt-svc-table > .wp-block-columns > .wp-block-column:nth-child(3) {
		flex: 0 0 100% !important;
	}

	.dnt-svc-examples {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 0 18px;
	}

	.dnt-svc-examples::before {
		content: "Related Projects";
		color: #4f4f4f;
		font-family: Cinzel, serif;
		font-size: 15px;
	}

	.dnt-svc-table h2 {
		font-size: 20px !important;
	}
}

/* Phones: one column */
@media (max-width: 767px) {
	.dnt-svc-page > * {
		max-width: 90% !important;
	}

	.dnt-svc-page h1 {
		font-size: 32px !important;
		line-height: 40px !important;
	}

	.dnt-svc-table {
		font-size: 15px;
	}

	.dnt-svc-list {
		columns: 1;
	}

	.dnt-svc-examples::before {
		flex: 0 0 100%;
	}

	.dnt-svc-after,
	.dnt-svc-cta {
		font-size: 15px;
	}
}

/* Very wide screens: the table stops growing, so its rows stay easy to read across */
@media (min-width: 1600px) {
	.dnt-svc-page > * {
		max-width: 1440px !important;
	}
}
