/**
 * Dreamcloud site styles.
 *
 * Responsive fixes and the footer treatment, i.e. the things theme.json cannot
 * express. Everything here is intentionally low specificity so Global Styles
 * still wins.
 *
 * @package Dreamcloud
 */

/* -----------------------------------------------------------------------------
 * Layout safety
 * -------------------------------------------------------------------------- */

/*
 * Full-bleed sections plus a scrollbar used to produce a sideways scroll on
 * phones. `clip` is used rather than `hidden` so position: sticky keeps working.
 */
html,
body {
	overflow-x: clip;
	max-width: 100%;
}

/* Long URLs and unbroken words used to push the layout sideways on narrow screens. */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
figcaption,
.wp-block-post-title,
.wp-block-post-excerpt__excerpt {
	overflow-wrap: break-word;
}

/* Media never exceeds its column. */
img,
svg,
video,
iframe,
embed,
object {
	max-width: 100%;
}

img,
video {
	height: auto;
}

/* Tables scroll inside themselves instead of widening the page. */
.wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wp-block-table table {
	min-width: 32rem;
}

/* Wide code and preformatted blocks scroll rather than overflow. */
.wp-block-code,
.wp-block-preformatted,
pre {
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-word;
}

/* Embeds keep their aspect ratio on small screens. */
.wp-block-embed__wrapper iframe {
	width: 100%;
}

/* -----------------------------------------------------------------------------
 * Accessibility
 * -------------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.skip-link:focus {
	background-color: var(--wp--preset--color--base-2, #fff);
	color: var(--wp--preset--color--contrast, #16181a);
	clip-path: none;
	font-size: 1rem;
	height: auto;
	left: 8px;
	padding: 14px 22px;
	top: 8px;
	width: auto;
	z-index: 100000;
	text-decoration: none;
	border-radius: 6px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* -----------------------------------------------------------------------------
 * Footer
 * -------------------------------------------------------------------------- */

/*
 * The footer is a band like the sections above it, so it starts flush against
 * the last one. Both the template part and the group inside it pick up the
 * block gap, and either one would open a strip of page background.
 */
footer.wp-block-template-part,
.dc-footer {
	margin-block-start: 0;
}

.dc-footer .wp-block-site-title a {
	text-decoration: none;
}

.dc-footer .wp-block-navigation a {
	text-decoration: none;
	transition: color 0.18s ease, opacity 0.18s ease;
}

.dc-footer .wp-block-navigation a:hover,
.dc-footer .wp-block-navigation a:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.dc-footer .wp-block-social-links .wp-social-link {
	transition: transform 0.18s ease, opacity 0.18s ease;
	opacity: 0.85;
}

.dc-footer .wp-block-social-links .wp-social-link:hover {
	transform: translateY(-2px);
	opacity: 1;
}

.dc-footer__rule {
	border: 0;
	height: 1px;
	opacity: 1;
}

.dc-footer__colophon {
	gap: 0.5rem 1.5rem;
}

.dc-footer__colophon p {
	margin: 0;
}

.dc-footer a:focus-visible,
.dc-footer button:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-2, #5aa5e6);
	outline-offset: 3px;
	border-radius: 4px;
}

/* -----------------------------------------------------------------------------
 * Archive, blog and search listings
 *
 * Built from core query blocks, so these rules carry the whole look: the
 * masthead, the lead story, the cards and the pagination. This file is used
 * rather than blocks.css because that stylesheet only loads when one of the
 * theme's own blocks is on the page, and these templates use none of them.
 * -------------------------------------------------------------------------- */

.dc-archive__masthead {
	margin-block-start: 0;
	position: relative;
}

/* A brand rule across the top ties the masthead to the section bands. */
.dc-archive__masthead::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	height: 4px;
	background: linear-gradient(
		to right,
		var(--wp--preset--color--accent, #c8191e) 0%,
		var(--wp--preset--color--accent, #c8191e) 45%,
		var(--wp--preset--color--accent-3, #d64b00) 45%,
		var(--wp--preset--color--accent-3, #d64b00) 72%,
		var(--wp--preset--color--accent-2, #5aa5e6) 72%
	);
}

.dc-archive__eyebrow {
	margin-block: 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent, #c8191e);
}

/* The red drops below 3:1 on charcoal, so the masthead eyebrow lightens. */
.dc-archive__masthead .dc-archive__eyebrow {
	color: var(--wp--preset--color--accent-2, #5aa5e6);
}

.dc-archive__eyebrow a {
	color: inherit;
	text-decoration: none;
}

.dc-archive__eyebrow a:hover,
.dc-archive__eyebrow a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.dc-archive__standfirst {
	max-width: 46rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.78);
	text-wrap: pretty;
}

/*
 * Heading and standfirst on one line. The row is a flex container, so the
 * constrained layout no longer centres the standfirst inside the column - that
 * auto margin was what pushed it away from the heading's left edge.
 */
.dc-archive__masthead .dc-archive__headline > * {
	margin-block: 0;
}

.dc-archive__headline-text {
	min-width: 0;
}

.dc-archive__headline .dc-archive__standfirst {
	/* Takes the space the heading leaves, and drops below it under ~20rem. */
	flex: 1 1 20rem;
	max-width: 34rem;
	/* Sits the text off the heading's descenders rather than its box edge. */
	padding-block-end: 0.4rem;
}

/* A plain white field reads clearly against the charcoal masthead. */
.dc-archive__search {
	max-width: 34rem;
}

.dc-archive__search .wp-block-search__inside-wrapper {
	padding: 0.25rem;
	border: 0;
	border-radius: 0.5rem;
	background-color: var(--wp--preset--color--base, #fff);
}

.dc-archive__search .wp-block-search__input {
	padding-inline: 0.75rem;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast, #16181a);
}

.dc-archive__search .wp-block-search__input:focus {
	outline: 2px solid var(--wp--preset--color--accent, #c8191e);
	outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
 * Cards
 * -------------------------------------------------------------------------- */

.dc-archive__grid {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dc-archive__card {
	min-width: 0;
}

.dc-archive__media {
	position: relative;
	overflow: hidden;
	margin-block-end: 0;
	border-radius: 12px;
	aspect-ratio: 16 / 9;
	background-color: var(--wp--preset--color--base-2, #f4f5f6);
}

.dc-archive__media a {
	display: block;
	height: 100%;
}

.dc-archive__media img,
.dc-archive__media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

/*
 * A self hosted video has no poster, so the browser paints its first frame.
 * blocks.css carries the same rule for the section grids, but that stylesheet
 * only loads when one of the theme's own blocks is on the page.
 */
.dc-video-preview {
	pointer-events: none;
	background-color: var(--wp--preset--color--accent-4, #101214);
}

/* The play badge marks these as video, matching the section grids. */
.dc-archive__media.is-video::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent, #c8191e);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='%23ffffff'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 54% center;
	background-size: 24px 24px;
	box-shadow: 0 10px 30px rgba(200, 25, 30, 0.35);
	transition: transform 0.25s ease;
	pointer-events: none;
}

.dc-archive__card:hover .dc-archive__media.is-video::after {
	transform: scale(1.1);
}

.dc-archive__card:hover .dc-archive__media img,
.dc-archive__card:hover .dc-archive__media video {
	transform: scale(1.05);
}

.dc-archive__title {
	letter-spacing: -0.015em;
	text-wrap: pretty;
}

.dc-archive__title a {
	text-decoration: none;
}

.dc-archive__card:hover .dc-archive__title a {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 2px;
}

.dc-archive__excerpt {
	margin-block: 0;
	line-height: 1.6;
	color: var(--wp--preset--color--contrast-2, #4d5257);
	text-wrap: pretty;
}

.dc-archive__date {
	margin-block: 0;
	color: var(--wp--preset--color--contrast-2, #4d5257);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.01em;
}

/* -----------------------------------------------------------------------------
 * Lead story
 *
 * The newest post is promoted to a two column spread rather than being one more
 * identical tile. Done with CSS on the first grid item so the query block keeps
 * inheriting the main query, and pagination keeps working.
 * -------------------------------------------------------------------------- */

@media (min-width: 900px) {
	.dc-archive__grid > li:first-child {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: 1.35fr 1fr;
		column-gap: clamp(1.75rem, 3vw, 3rem);
		align-items: center;
		padding-block-end: clamp(2rem, 4vw, 3rem);
		margin-block-end: clamp(0.5rem, 2vw, 1rem);
		border-block-end: 1px solid var(--wp--preset--color--accent-5, #c0c2c4);
	}

	.dc-archive__grid > li:first-child > .dc-archive__card {
		display: contents;
	}

	.dc-archive__grid > li:first-child .dc-archive__media {
		grid-column: 1;
		grid-row: 1 / span 4;
		aspect-ratio: 4 / 3;
	}

	.dc-archive__grid > li:first-child .dc-archive__eyebrow,
	.dc-archive__grid > li:first-child .dc-archive__title,
	.dc-archive__grid > li:first-child .dc-archive__excerpt,
	.dc-archive__grid > li:first-child .dc-archive__date {
		grid-column: 2;
		align-self: end;
	}

	.dc-archive__grid > li:first-child .dc-archive__eyebrow {
		align-self: end;
		margin-block-end: 0.25rem;
	}

	.dc-archive__grid > li:first-child .dc-archive__title {
		align-self: center;
		font-size: clamp(1.75rem, 3.2vw, 2.75rem);
		line-height: 1.05;
		letter-spacing: -0.03em;
	}

	.dc-archive__grid > li:first-child .dc-archive__excerpt {
		align-self: start;
		font-size: 1.0625rem;
		margin-block-start: 0.75rem;
	}

	.dc-archive__grid > li:first-child .dc-archive__date {
		align-self: start;
		margin-block-start: 0.5rem;
	}
}

/*
 * Core writes a fixed column count for the grid layout, which leaves three
 * cramped columns on a phone.
 */
@media (max-width: 899px) {
	.dc-archive__grid.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.dc-archive__grid.is-layout-grid {
		grid-template-columns: 1fr;
	}
}

/* -----------------------------------------------------------------------------
 * Pagination
 * -------------------------------------------------------------------------- */

.dc-archive .wp-block-query-pagination {
	padding-block-start: clamp(1.5rem, 3vw, 2rem);
	border-block-start: 1px solid var(--wp--preset--color--accent-5, #c0c2c4);
	font-size: 0.9375rem;
	font-weight: 600;
}

.dc-archive .wp-block-query-pagination a {
	text-decoration: none;
}

.dc-archive .wp-block-query-pagination a:hover,
.dc-archive .wp-block-query-pagination a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.dc-archive .wp-block-query-pagination-numbers .current {
	color: var(--wp--preset--color--accent, #c8191e);
}

/* -----------------------------------------------------------------------------
 * Single post
 * -------------------------------------------------------------------------- */

.dc-article__header {
	margin-block-start: 0;
}

.dc-article__standfirst {
	max-width: 46rem;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast-2, #4d5257);
	text-wrap: pretty;
}

.dc-article__media img {
	border-radius: 12px;
}

/* -----------------------------------------------------------------------------
 * Header
 * -------------------------------------------------------------------------- */

/* The logo and the menu button were colliding at small widths. */
.wp-block-template-part header .wp-block-group.alignwide {
	row-gap: 0.5rem;
}

/*
 * A hairline separates the masthead from whatever follows it. Without it the
 * header floats, because the page background and the header share a colour.
 */
header.wp-block-template-part {
	border-block-end: 1px solid var(--wp--preset--color--accent-5, #c0c2c4);
}

/* Sits the nav optically on the same line as the site title. */
header.wp-block-template-part .wp-block-navigation {
	column-gap: clamp(1.25rem, 2vw, 2rem);
}

/* -----------------------------------------------------------------------------
 * Mobile
 * -------------------------------------------------------------------------- */

@media (max-width: 781px) {
	/* Comfortable, thumb sized tap targets. */
	.wp-block-navigation__responsive-container-open,
	.wp-block-navigation__responsive-container-close {
		min-width: 44px;
		min-height: 44px;
	}

	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content {
		padding-block: 0.35rem;
	}

	/* A long menu needs to scroll rather than clip. */
	.wp-block-navigation__responsive-container.is-menu-open {
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-container-content {
		padding-block-end: 3rem;
	}

	/* Buttons go full width so they are easy to hit. */
	.wp-block-buttons > .wp-block-button {
		width: 100%;
	}

	.wp-block-buttons > .wp-block-button .wp-block-button__link {
		display: block;
		width: 100%;
		text-align: center;
		min-height: 48px;
	}

	/* Columns that core leaves side by side at this width. */
	.wp-block-columns.is-not-stacked-on-mobile {
		flex-wrap: wrap !important;
	}

	.dc-footer__colophon {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 600px) {
	/* iOS zooms the viewport when a focused field is under 16px. */
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="tel"],
	input[type="number"],
	input[type="search"],
	input[type="password"],
	textarea,
	select {
		font-size: 16px;
		max-width: 100%;
	}

	/* Search and comment forms stack instead of squeezing. */
	.wp-block-search__inside-wrapper {
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.wp-block-search__input {
		flex: 1 1 100%;
	}

	.wp-block-search__button {
		flex: 1 1 100%;
		margin-left: 0;
		min-height: 48px;
	}

	/* Big display headings were overflowing on 320px screens. */
	.wp-block-post-title,
	h1 {
		hyphens: auto;
	}

	/* Galleries drop to two columns rather than staying at four. */
	.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image,
	.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image,
	.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image {
		width: calc(50% - var(--wp--style--gallery-gap-default, 0.5rem));
	}
}

/* Landscape phones: keep the hero from swallowing the whole screen. */
@media (max-height: 520px) and (orientation: landscape) {
	.dc-slider__viewport,
	.dc-slide {
		min-height: 380px;
	}
}

/* -----------------------------------------------------------------------------
 * Header
 *
 * The bar is charcoal, so the search block - which core paints for a light
 * background - needs its own treatment.
 * -------------------------------------------------------------------------- */

.dc-header {
	border-block-end: 1px solid rgba(255, 255, 255, 0.08);
}

.dc-header__end {
	gap: var(--wp--preset--spacing--20, 1.25rem);
}

/*
 * The wordmark. Kept as the Site Title block rather than baked into the logo,
 * so renaming the site still renames the header.
 */
.dc-header .wp-block-site-title {
	margin-block: 0;
	line-height: 1.05;
}

.dc-header .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: clamp(1.05rem, 2.2vw, 1.5rem);
	font-weight: 800;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--accent-3, #d64b00);
}

.dc-header .wp-block-site-title a:hover,
.dc-header .wp-block-site-title a:focus-visible {
	color: var(--wp--preset--color--base, #fff);
}

.dc-header .wp-block-site-logo img {
	display: block;
	height: auto;
}

/* Nav items: small caps, wide tracking, amber on hover and for the open page. */
.dc-header .wp-block-navigation {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.dc-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	padding-block: 0.35rem;
	color: var(--wp--preset--color--base, #fff);
	text-decoration: none;
}

.dc-header .wp-block-navigation a:where(:not(.wp-element-button)):hover,
.dc-header .wp-block-navigation a:where(:not(.wp-element-button)):focus-visible,
.dc-header .wp-block-navigation .current-menu-item > a,
.dc-header .wp-block-navigation .current_page_item > a {
	color: var(--wp--preset--color--accent-3, #d64b00);
}

/* Submenus are light by default, which breaks against the charcoal bar. */
.dc-header .wp-block-navigation .wp-block-navigation__submenu-container {
	border: 1px solid rgba(255, 255, 255, 0.12);
	background-color: var(--wp--preset--color--accent-4, #101214);
}

/* The mobile overlay inherits the page, so it is painted here instead. */
.dc-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--accent-4, #101214);
	color: var(--wp--preset--color--base, #fff);
}

.dc-header__search .wp-block-search__button {
	padding: 0.35rem;
	border: 0;
	background-color: transparent;
	color: currentColor;
}

.dc-header__search .wp-block-search__button:hover,
.dc-header__search .wp-block-search__button:focus-visible {
	background-color: rgba(255, 255, 255, 0.12);
	color: currentColor;
}

.dc-header__search .wp-block-search__button svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

/* The field only appears once the icon is clicked; it has to read on charcoal. */
.dc-header__search .wp-block-search__input {
	padding: 0.4rem 0.7rem;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 6px;
	background-color: rgba(255, 255, 255, 0.06);
	color: var(--wp--preset--color--base, #fff);
}

.dc-header__search .wp-block-search__input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

/* -----------------------------------------------------------------------------
 * Home: content column and sidebar
 * -------------------------------------------------------------------------- */

/*
 * Core stacks columns below 782px. Until then the sidebar holds a fixed share,
 * and neither column is allowed to be pushed wider by a long headline.
 */
.dc-home__main,
.dc-home__aside {
	min-width: 0;
}

@media (max-width: 781px) {
	.dc-home__aside {
		margin-block-start: 2.5rem;
	}
}

.dc-home__split > .wp-block-column {
	min-width: 0;
}

/*
 * The articles and the leaderboard sit side by side inside a column that is
 * itself two thirds of the page, so they run out of room long before core's own
 * 782px stacking point. `!important` mirrors the rule core uses for the same
 * job - the widths it writes are inline styles, and nothing else can beat them.
 */
@media (max-width: 1099px) {
	.dc-home__split.wp-block-columns {
		flex-wrap: wrap !important;
	}

	.dc-home__split > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* -----------------------------------------------------------------------------
 * Sidebar widgets
 *
 * Light cards on the dark body. The card colours come from block attributes so
 * they stay editable; what lives here is the row and chevron treatment that
 * block supports cannot express.
 * -------------------------------------------------------------------------- */

.dc-widget__title {
	margin-block: 0 0.75rem;
	line-height: 1.3;
}

.dc-widget__media {
	margin-block: 0;
}

.dc-widget__media img {
	display: block;
	width: 100%;
	height: auto;
}

.dc-widget__nav,
.dc-widget__nav .wp-block-navigation__container {
	width: 100%;
	gap: 0;
}

.dc-widget__nav .wp-block-navigation-item {
	width: 100%;
	border-block-start: 1px solid rgba(22, 24, 26, 0.1);
}

.dc-widget__nav .wp-block-navigation-item:first-child {
	border-block-start: 0;
}

.dc-widget__nav .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	padding-block: 0.7rem;
	color: inherit;
	line-height: 1.35;
	text-decoration: none;
}

/* A chevron drawn from two borders, so it inherits the row's colour. */
.dc-widget__nav .wp-block-navigation-item__content::after {
	content: "";
	flex: 0 0 auto;
	width: 0.45rem;
	height: 0.45rem;
	border-block-start: 2px solid currentColor;
	border-inline-end: 2px solid currentColor;
	opacity: 0.45;
	transform: rotate(45deg);
	transition: transform 0.18s ease, opacity 0.18s ease;
}

.dc-widget__nav .wp-block-navigation-item__content:hover,
.dc-widget__nav .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--accent-3, #d64b00);
}

.dc-widget__nav .wp-block-navigation-item__content:hover::after,
.dc-widget__nav .wp-block-navigation-item__content:focus-visible::after {
	opacity: 1;
	transform: rotate(45deg) translate(2px, -2px);
}

.dc-widget__cta .wp-block-button__link {
	width: 100%;
	text-align: center;
}

footer{
    margin-top:20px !important; 
}