/*
Theme Name: SR RUC 2025
Theme URI: https://www.sr-ruc.dk
Description: Child theme for Studenterrådet ved Roskilde Universitet, built on Twenty Twenty-Five and following the SR Design Guide 2025 (Purple Pride/Powder palette, Glacial Indifference typography, flat-style aesthetic).
Author: Studenterrådet ved RUC
Template: twentytwentyfive
Version: 1.5.1
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sr-ruc-2025
Tags: student-council, block-theme

Bundled font: Glacial Indifference by Alfredo Marco Pradil / Hanken Design Co,
licensed under the SIL Open Font License 1.1. See assets/fonts/OFL.txt
*/

/* ---------------------------------------------------------------
   1. Navigation
   --------------------------------------------------------------- */

.wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
	border-bottom-color: var(--wp--preset--color--pride);
	color: var(--wp--preset--color--pride);
}

/* Current page gets a persistent marker, so visitors always know where they are */
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content,
.wp-block-navigation .current_page_item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--pride);
	color: var(--wp--preset--color--pride);
	font-weight: 700;
}

/* The header must sit above the white content sheet, or dropdowns open
   behind it. The sheet uses z-index 2, so the header needs more. */
.sr-header,
.wp-block-template-part header,
header.wp-block-template-part {
	position: relative;
	z-index: 50;
}

.wp-block-navigation .wp-block-navigation__submenu-container {
	z-index: 60;
}

/* Dropdown submenus */
.wp-block-navigation .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--powder);
	border-radius: 10px;
	padding: 0.4rem 0;
	box-shadow: 0 8px 24px rgba(37, 37, 37, 0.10);
	background-color: var(--wp--preset--color--white);
	min-width: 16rem;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.5rem 1rem;
	border-bottom: 0;
	border-left: 3px solid transparent;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	border-left-color: var(--wp--preset--color--pride);
	background-color: var(--wp--preset--color--mist);
}

/* ---------------------------------------------------------------
   2. Focus states — keyboard accessibility
   --------------------------------------------------------------- */

:where(a, button, input, select, textarea, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--wp--preset--color--pride);
	outline-offset: 2px;
	border-radius: 3px;
}

/* Skip link */
.skip-link:focus {
	background-color: var(--wp--preset--color--pride);
	color: var(--wp--preset--color--white);
	padding: 0.75rem 1.25rem;
}

/* ---------------------------------------------------------------
   3. Content rhythm
   --------------------------------------------------------------- */

.wp-block-post-content h2,
.entry-content h2 {
	margin-top: 2.75rem;
}

.wp-block-post-content h3,
.entry-content h3 {
	margin-top: 2rem;
}

.wp-block-post-content ul,
.entry-content ul {
	padding-left: 1.15rem;
}

.wp-block-post-content li,
.entry-content li {
	margin-bottom: 0.5rem;
}

/* Separators sit as quiet section dividers rather than hard rules */
.wp-block-separator:not(.is-style-dots) {
	border: 0;
	border-top: 2px solid var(--wp--preset--color--powder);
	opacity: 1;
	margin-block: 3rem;
}

/* ---------------------------------------------------------------
   4. Flat-style accents (per the SR Design Guide)
   --------------------------------------------------------------- */

/* Soft card — used for section landing pages */
.sr-card,
.wp-block-group.is-style-sr-card {
	background-color: var(--wp--preset--color--mist);
	border-radius: 14px;
	padding: 1.75rem;
	height: 100%;
}

.sr-card h3,
.wp-block-group.is-style-sr-card h3 {
	margin-top: 0;
}

/* Sharp accent — draws attention, per the guide's soft/sharp distinction */
.sr-accent,
.wp-block-group.is-style-sr-accent {
	background-color: var(--wp--preset--color--room);
	border-left: 6px solid var(--wp--preset--color--pride);
	padding: 1.5rem 1.75rem;
	border-radius: 0;
}

/* Dashed placeholder used while content is pending */
.sr-placeholder,
.wp-block-group.is-style-sr-placeholder {
	border: 2px dashed var(--wp--preset--color--powder);
	border-radius: 14px;
	padding: 2.5rem 1.5rem;
	text-align: center;
	color: #6b6b6b;
}

/* ---------------------------------------------------------------
   5. Page structure — applied to every page automatically
   --------------------------------------------------------------- */

.sr-header {
	border-bottom: 1px solid var(--wp--preset--color--powder);
}

/* --- Header: logo row, then the menu on its own centred row ------------
   Nine top-level items plus the logo and the switcher do not fit on one
   line, and squeezing them only postpones the problem as pages are added.
   The menu therefore gets a row of its own and centres in it. */

.sr-header-top {
	margin-bottom: 0.9rem;
}

.sr-header .wp-block-site-logo img {
	max-width: 260px;
	height: auto;
}

@media (max-width: 600px) {
	.sr-header .wp-block-site-logo img {
		max-width: 190px;
	}
}

/* Let the menu use the full wide column, not the narrow content width. */
.sr-header-nav > .wp-block-navigation {
	max-width: none;
	width: 100%;
}

.sr-header-nav .wp-block-navigation {
	font-size: 0.875rem;
	justify-content: center;
	flex-wrap: wrap;
	row-gap: 0.4rem;
}

.sr-header-nav .wp-block-navigation__container {
	justify-content: center;
	row-gap: 0.4rem;
}

/* Dropdowns open rightwards from their parent by default; the last three
   open leftwards instead, so nothing is ever positioned off-screen. */
.sr-header .wp-block-navigation__container > li > .wp-block-navigation__submenu-container {
	left: 0;
	right: auto;
}

.sr-header .wp-block-navigation__container > li:nth-last-child(-n+3) > .wp-block-navigation__submenu-container {
	left: auto;
	right: 0;
}

/* On mobile the menu collapses to the overlay button, which sits right. */
@media (max-width: 600px) {
	.sr-header-nav .wp-block-navigation {
		justify-content: flex-end;
	}
}

/* Title band in Powder. The SR crescent bleeds off the right edge as a
   flat watermark — the guide's "framing and overlapping shapes". */
.sr-page-header {
	position: relative;
	overflow: hidden;
}

.sr-page-header::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -70px;
	width: 300px;
	height: 300px;
	transform: translateY(-50%);
	background-image: url('assets/img/sr-mark-pride.png');
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	opacity: 0.13;
	pointer-events: none;
}

@media (max-width: 782px) {
	.sr-page-header::after {
		width: 190px;
		height: 190px;
		right: -60px;
		opacity: 0.1;
	}
}

.sr-page-header > * {
	position: relative;
	z-index: 1;
}

.sr-page-header h1 {
	margin: 0;
}

.sr-page-header p {
	margin-top: 0.6rem;
	max-width: 46ch;
}

/* Front page hero */
.sr-hero {
	position: relative;
	text-align: center;
	overflow: hidden;
}

/* A second crescent, mirrored to the left, so the hero is not a plain
   block of colour and the two bands answer each other. */
.sr-hero::after {
	content: "";
	position: absolute;
	left: -110px;
	bottom: -90px;
	width: 360px;
	height: 360px;
	background-image: url('assets/img/sr-mark-powder.png');
	background-repeat: no-repeat;
	background-size: contain;
	opacity: 0.14;
	pointer-events: none;
}

.sr-hero > * {
	position: relative;
	z-index: 1;
}

@media (max-width: 782px) {
	.sr-hero::after {
		width: 220px;
		height: 220px;
		left: -80px;
		bottom: -60px;
	}
}

/* The sheet below lifts 2.75rem into whichever band sits above it, so both
   bands need clear space beneath their content — otherwise the overlap
   reads as the sheet crowding the text rather than as a deliberate step.
   The templates set padding inline, hence !important. */
.sr-page-header {
	padding-bottom: 6.75rem !important;
}

.sr-hero {
	padding-bottom: 7.5rem !important;
}

@media (max-width: 600px) {
	.sr-page-header {
		padding-bottom: 4.5rem !important;
	}
	.sr-hero {
		padding-bottom: 5.25rem !important;
	}
}

.sr-hero-logo {
	background-image: url('assets/img/sr-logo-text-powder.png');
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	height: 92px;
	margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
	.sr-hero-logo {
		height: 64px;
	}
}

.sr-hero p {
	max-width: 34ch;
	margin-inline: auto;
}

/* The content sits as a white sheet on the coloured canvas, lifted slightly
   into the title band above it. */
.sr-page-body {
	background-color: var(--wp--preset--color--white);
	border: 1px solid rgba(103, 60, 148, 0.10);
	border-radius: 18px;
	padding: clamp(1.5rem, 4vw, 3.25rem);
	max-width: min(880px, 100% - 2.5rem) !important;
	margin-inline: auto !important;
	margin-top: -2.75rem;
	margin-bottom: var(--wp--preset--spacing--60);
	position: relative;
	z-index: 2;
	min-height: 140px;
}

@media (max-width: 600px) {
	.sr-page-body {
		border-radius: 14px;
		margin-top: -1.5rem;
	}
}

/* News listings skip the sheet — the cards are the surfaces there. */
.sr-page-body.sr-no-sheet {
	background-color: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	max-width: none !important;
	margin-top: var(--wp--preset--spacing--50);
	min-height: 0;
}

/* ---------------------------------------------------------------
   6. News cards
   --------------------------------------------------------------- */

.sr-post-card {
	background-color: var(--wp--preset--color--white);
	border: 1px solid rgba(103, 60, 148, 0.18);
	border-radius: 14px;
	padding: 1.25rem;
	height: 100%;
	transition: border-color 0.15s ease;
}

.sr-post-card:hover {
	border-color: var(--wp--preset--color--pride);
}

.sr-post-card .wp-block-post-title {
	margin: 0.35rem 0 0.6rem;
}

.sr-post-card .wp-block-post-title a {
	text-decoration: none;
}

.sr-post-card .wp-block-post-title a:hover {
	text-decoration: underline;
}

.sr-post-card .wp-block-post-date {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
}

/* ---------------------------------------------------------------
   7. Footer — Purple Pride anchor
   --------------------------------------------------------------- */

.sr-footer-mark {
	background-image: url('assets/img/sr-mark-powder.png');
	background-repeat: no-repeat;
	background-position: left center;
	background-size: contain;
	height: 50px;
	margin-bottom: 1.75rem;
	opacity: 0.9;
}

.sr-footer a {
	color: var(--wp--preset--color--powder);
	text-decoration: none;
}

.sr-footer a:hover {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}

.sr-footer .sr-footer-rule {
	opacity: 0.3;
	margin-block: 2rem 1.25rem;
}

.sr-footer :where(a):focus-visible {
	outline-color: var(--wp--preset--color--room);
}

/* ---------------------------------------------------------------
   8. Print — governance documents get printed
   --------------------------------------------------------------- */

@media print {
	.wp-block-navigation,
	.sr-footer,
	.wp-block-template-part header {
		display: none !important;
	}

	body {
		color: #000;
		font-size: 11pt;
	}
}


/* ---------------------------------------------------------------
   9. Sprogskifter
   --------------------------------------------------------------- */

.sr-lang {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.sr-lang-item {
	padding: 0.3rem 0.55rem;
	border-radius: 999px;
	text-decoration: none;
	color: var(--wp--preset--color--dark);
	line-height: 1;
}

a.sr-lang-item:hover {
	background-color: var(--wp--preset--color--powder);
	color: var(--wp--preset--color--pride);
	text-decoration: none;
}

.sr-lang-item.is-current {
	background-color: var(--wp--preset--color--pride);
	color: var(--wp--preset--color--white);
}

/* ---------------------------------------------------------------
   10. Kontaktpersoner
   --------------------------------------------------------------- */

.sr-people {
	margin-top: 2.5rem;
}

.sr-people-heading {
	margin-bottom: 1rem;
}

.sr-people-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1rem;
}

.sr-person {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
	background-color: var(--wp--preset--color--mist);
	border-radius: 14px;
	padding: 1rem;
}

.sr-person-img {
	flex: 0 0 auto;
}

.sr-person-photo {
	width: 58px;
	height: 58px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.sr-person-body p {
	margin: 0;
}

.sr-person-name {
	font-weight: 700;
	color: var(--wp--preset--color--pride);
	line-height: 1.3;
}

.sr-person-role {
	font-size: 0.875rem;
	color: #5c5c5c;
	margin-top: 0.15rem !important;
}

.sr-person-mail {
	font-size: 0.875rem;
	margin-top: 0.35rem !important;
	word-break: break-word;
}

/* ---------------------------------------------------------------
   11. Ledige stillinger
   --------------------------------------------------------------- */

.sr-jobs {
	display: grid;
	gap: 0.85rem;
	margin-top: 1.5rem;
}

.sr-job {
	display: block;
	background-color: var(--wp--preset--color--white);
	border: 1px solid rgba(103, 60, 148, 0.18);
	border-radius: 14px;
	padding: 1.15rem 1.35rem;
	text-decoration: none;
	color: var(--wp--preset--color--dark);
	transition: border-color 0.15s ease;
}

.sr-job:hover {
	border-color: var(--wp--preset--color--pride);
	text-decoration: none;
}

.sr-job-date {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--pride);
}

.sr-job-title {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--wp--preset--color--pride);
	margin-top: 0.2rem;
}

.sr-job-excerpt {
	display: block;
	font-size: 0.9375rem;
	margin-top: 0.4rem;
	color: var(--wp--preset--color--dark);
}

.sr-empty {
	border: 2px dashed var(--wp--preset--color--powder);
	border-radius: 14px;
	padding: 2.25rem 1.5rem;
	text-align: center;
	color: #6b6b6b;
	margin-top: 1.5rem;
}

.sr-empty p {
	margin: 0;
}
