/*
Theme Name: Digital Learning Hub
Theme URI: https://www.manchester.ac.uk/
Author: Philip Boulton
Author URI: https://www.manchester.ac.uk/
Description: Digital Learning Hub theme is a modern, multi-purpose, full-site editing theme developed for the University of Manchester. It focuses on customisability, allowing users to easily customise colours, typography, and the layout to suit their needs.
Tags: block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, full-site-editing, one-column, three-column, template-editing, wide-blocks
Requires at least: 6.4
Tested up to: 6.4
Requires PHP: 7.0
Version: 0.9.0
Text Domain: digitallearninghub
*/


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

html {
	scroll-behavior: smooth;
}

a,
button,
input:focus,
input[type="button"],
input[type="submit"],
textarea:focus,
.wp-element-button {
	transition: all 0.2s ease-in-out;
}

a,
a:focus,
a:hover,
a:not(.wp-element-button) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

b,
strong,
th {
	font-weight: var(--wp--custom--font-weight--medium);
}

mark {
	background: linear-gradient(90deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--primary) 100%);
	background-position: 0 85%;
	background-repeat: repeat-x;
	background-size: 100% 15%;
}

/*
 * Editor Styles
 */
 .editor-styles-wrapper input:focus, .editor-styles-wrapper textarea:focus {
    background-color: var(--wp--preset--color--based);
    outline: none;
} 

/* Forms
---------------------------------------- */
input,
select,
textarea {
	background-color: var(--wp--preset--color--base-4);
	border: 1px solid var(--wp--preset--color--base-6);
	border-radius: 0;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: var(--wp--custom--font-weight--light);
	line-height: var(--wp--custom--line-height--body);
	padding: 10px 20px;
	width: 100%;
}

input:focus,
textarea:focus {
	/*background-color: var(--wp--preset--color--base-7);*/
	outline: none;
	/*border: 1px solid var(--wp--preset--color--base-2);*/
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
	width: auto;
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

::placeholder {
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--medium);
	opacity: 0.5;
}


/*
 * Contact Form 7
 */

input.wpcf7-submit {
	background-color: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--base);
}
/* Blocks
---------------------------------------- */
/* -- Code -- */
*:not(.wp-block-code) > code {
	background-color: var(--wp--preset--color--neutral);
	font-size: var(--wp--preset--font-size--small);
	padding: 5px 8px;
}

/* -- Navigation -- */

.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--custom--spacing--gap);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: var(--wp--custom--spacing--gap);
}

.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
	padding: 2px;
}

.has-background .wp-block-navigation__responsive-container-open:focus,
.has-background .wp-block-navigation__responsive-container-open:hover {
	color: var(--wp--preset--color--base-5);
}

/* -- Navigation Submenu -- */

.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	color: var(--wp--preset--color--base-5);
	padding: 10px;
}

.wp-block-navigation :where(.wp-block-navigation__submenu-container) a {
	padding: 2px 10px;
}

.wp-block-navigation__responsive-container-close svg, .wp-block-navigation__responsive-container-open svg {
    fill: currentColor;
    display: block;
    height: 32px;
    pointer-events: none;
    width: 32px;
}

/* Media Queries
---------------------------------------- */

@media only screen and (min-width: 782px) {

	/* -- Columns -- */
	.is-style-columns-reverse {
		flex-direction: column-reverse;
	}

	.search-form--mobile {
		display: none;
	}
	.navigation--container {
		justify-content:left;
	}
	/* -- Navigation -- */
	.wp-block-navigation.nav-primary--mobile {
		display: none;
	}
}

@media only screen and ( max-width: 781px ) {
	/* -- Navigation -- */
	.nav-primary--desktop {
	 display: none;
	}

	.search-form--desktop {
		display: none;
	}

	.navigation--container {
		justify-content: center;
	}
	
	.wp-block-navigation.nav-primary--mobile {
		display: flex;
	}
}

li.home-icon a {
	display: block;
	padding: 0;
	width: 28px;
	height: auto;
	overflow: hidden;
	background: url(assets/images/home-icon.svg) 0% 0% no-repeat;
	text-indent: -999px;
	color: #fff;
	font-weight: 700;
}

.quicklinks-nav,
.quicklinks-nav .wp-block-navigation__container {
	width: 100%;
}

.quicklinks-nav .wp-block-navigation-item {
	width: 100%;
}

/* The anchor fills the row → full-width border, chevron pushed right */
.quicklinks-nav .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding-block: 0.75rem;
	background-color: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--base-4);	
	padding-left: 10px;
	padding-right: 10px;
}
.quicklinks-nav .wp-block-navigation-item{
	margin-bottom: 3px;
}

.quicklinks-nav .wp-block-navigation-item__content::after {
	content: "";
	flex: none;
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.support-link {
	color: var(--wp--preset--color--base-2);
}

.support-link:hover {
	color: var(--wp--preset--color--base-5);
}

.has-background .wp-block-navigation__responsive-container-open:focus, .has-background .wp-block-navigation__responsive-container-open:hover {
    color: var(--wp--preset--color--base-4)!important;
}
/* Unify the inner wrapper to ensure straight layout alignment */
.wp-block-search__inside-wrapper {
    display: flex !important;
    align-items: stretch !important;
}

/* Set the input field dimensions */
.wp-block-search__inside-wrapper input.wp-block-search__input {
    height: 35px !important;
    min-height: 35px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
}

/* Force flex centering and reset line-height on the icon button */
.wp-block-search__inside-wrapper .wp-block-search__button {
    height: 35px !important;
    min-height: 35px !important;
    box-sizing: border-box !important;
    
    /* Centering engine */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Reset properties that skew text or SVGs */
    line-height: 1 !important; 
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure the SVG icon inside obeys the flexbox centering rules */
.wp-block-search__inside-wrapper .wp-block-search__button svg {
    margin: 0 !important;
    display: block !important;
}

/* Set a specific width for the search button */
.wp-block-search__inside-wrapper .wp-block-search__button {
    width: 60px !important;       /* Change this value to your preferred width */
    min-width: 60px !important;   /* Prevents the browser from shrinking the button */
    padding-left: 0 !important;   /* Clears side padding to ensure exact width math */
    padding-right: 0 !important;  /* Clears side padding to ensure exact width math */
}

/* Ensure the input field automatically grows to fill the remaining space */
.wp-block-search__inside-wrapper input.wp-block-search__input {
    flex-grow: 1 !important;
    width: auto !important;
}

.boxshadow--topicboxes {
	box-shadow: 0 1px 0 var(--wp--preset--color--base-6);
}

.mini-topic-box, .topic-box, .large-topic-box {
    position: relative;
    background-color: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 5px;
    /*padding: 1.75rem;*/
    transition: box-shadow 0.15s ease, transform 0.15s ease;
	box-shadow: 0 1px 0 var(--wp--preset--color--base-6);
}

.mini-topic-box:hover, .topic-box:hover, .large-topic-box:hover {
	background-color: #f2f2f2;
	-webkit-transition: background-color 200ms linear;
    -ms-transition: background-color 200ms linear;
    transition: background-color 200ms linear;
}

.mini-topic-box h4, .topic-box h3, .large-topic-box h2 {
	color: var(--wp--preset--color--base-2);
	margin-top:0;
	margin-bottom:0;
	font-weight:500;
}

.mini-topic-box h4:hover, .topic-box h3:hover, .large-topic-box h3:hover {
	color: var(--wp--preset--color--base-5);
}

.mini-topic-box:hover, .topic-box:hover, .large-topic-box:hover {
    box-shadow: 0 2px 2px var(--wp--preset--color--accent-3);
    /*transform: translateY(-2px);*/
}

/*.topic-box h3 a:hover, .large-topic-box h2 a:hover {
    text-decoration: underline;
}*/

.mini-topic-box h4 a::after, .topic-box h3 a::after, .large-topic-box h2 a::after {
    content: "";
    position: absolute;
    inset: 0; /* stretches the click target over the whole card */
}

.topic-box p, .large-topic-box p {
	font-size: var(--wp--preset--font-size--small);
}
/* --------------------------------
   Clickable column
   -------------------------------- */

.link-column {
	position: relative;
}

/* Stretch the heading's link across the whole column */
.link-column :where(h1, h2, h3, h4, h5, h6) a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Optional: whole column shows the pointer + a hover cue */
.link-column {
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.link-column:hover {
	background-color: var(--wp--preset--color--base-2, rgba(0, 0, 0, 0.03));
}

/* Any OTHER real links/buttons inside must sit above the overlay */
.link-column a:not(:where(h1, h2, h3, h4, h5, h6) a),
.link-column button {
	position: relative;
	z-index: 2;
}

.related-posts-query ul li + li {
	border-top: 1px solid var(--wp--preset--color--base-7);
	padding-top: 1.2rem;
	margin-top: 1.2rem;
}

.single-post-grid {
	grid-template-columns: 1fr 320px !important;
	gap: var(--wp--preset--spacing--80, 100px);
}

.header-container {
	background: #37629E;
	background: linear-gradient(18deg,rgba(55, 98, 158, 1) 50%, rgba(46, 147, 147, 1) 100%);
}

@media (max-width: 782px) {
	.single-post-grid {
		grid-template-columns: 1fr!important;
	}
}

.footer-list-items li + li {
	padding-top: 0.6rem;
}

.wp-block-breadcrumbs a {
	color: var(--wp--preset--color--base-2);
    text-decoration: none;
}

.wp-block-breadcrumbs [aria-current="page"] {
	color: var(--wp--preset--color--base-5);
}

.search-results-container { 
	max-width: 720px!important; 
} 
