/*
Theme Name: Gast
Theme URI: https://www.stichtinggast.nl
Author: Stichting GAST (ICT)
Author URI: https://www.stichtinggast.nl
Description: Thema van Stichting GAST Nijmegen. Header met paginafoto, plakkend hoofdmenu, inhoud met zijbalk en vier footerkolommen. Werkt samen met SiteOrigin Page Builder.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gast
*/

/* ---------- Fonts (self-hosted; no third-party requests) ---------- */

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/opensans-500.woff2") format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url("fonts/poppins-800.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
	--sg-yellow: #fabb2e;
	--sg-orange: #e37126;
	--sg-red: #cd2220;
	--sg-grey: #595353;
	--sg-text: #333;
	--sg-bg: #f8f6f6;
	--sg-panel: #fff;
	--sg-sidebar-bg: rgba(225, 221, 212, 0.67);
	--sg-border: #eee;
	--sg-sticky-bg: #333;
	--sg-header-height: 300px;
	--sg-font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sg-font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */

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

body {
	margin: 0;
	background-color: var(--sg-bg);
	color: var(--sg-text);
	font-family: var(--sg-font-body);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.55;
	overflow-wrap: break-word;
}

img {
	display: inline-block;
	max-width: 100%;
	height: auto;
}

iframe,
video {
	max-width: 100%;
	border: 0;
}

a {
	color: var(--sg-orange);
	font-weight: 700;
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

:focus-visible {
	outline: 2px solid var(--sg-orange);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 10px;
	color: var(--sg-orange);
	font-family: var(--sg-font-head);
	font-weight: 800;
	letter-spacing: 0.015rem;
	line-height: 1.3;
	hyphens: auto;
}

h1 { font-size: 36px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5,
h6 { font-size: 16px; }

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
	color: var(--sg-grey);
}

p {
	margin: 0 0 20px;
}

ul,
ol {
	margin: 0 0 20px;
	padding-left: 20px;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

td,
th {
	padding: 6px 8px;
	border-bottom: 1px solid var(--sg-border);
	line-height: 1.4;
	text-align: left;
	vertical-align: top;
}

th {
	background-color: var(--sg-bg);
}

.alignleft {
	float: left;
	margin: 0 15px 10px 0;
}

.alignright {
	float: right;
	margin: 0 0 10px 15px;
}

.aligncenter {
	display: block;
	margin: 0 auto 10px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 1000;
	width: auto;
	height: auto;
	padding: 10px 15px;
	clip: auto;
	background: var(--sg-panel);
}

/* ---------- Buttons ---------- */

button,
input[type="button"],
input[type="submit"],
.button,
.wpcf7 input[type="submit"] {
	display: inline-block;
	padding: 10px;
	border: 0;
	border-radius: 3px;
	background-color: var(--sg-yellow);
	color: #fff;
	cursor: pointer;
	font-family: var(--sg-font-head);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 1px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.4s, color 0.4s;
}

button:hover,
input[type="submit"]:hover,
.button:hover,
.button:focus,
.wpcf7 input[type="submit"]:hover {
	background-color: var(--sg-orange);
	color: #000;
	text-decoration: none;
}

.sg-svg {
	vertical-align: -0.15em;
}

.sg-icon {
	width: 1.2em;
	height: 1.2em;
	margin-right: 6px;
}

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

.site-header {
	position: relative;
	width: 100%;
	height: var(--sg-header-height);
	background-color: transparent;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.site-header .wrap {
	max-width: 100%;
}

.title-area {
	float: left;
	padding-top: 8%;
}

.site-title {
	display: inline-block;
	margin: 0 0 0 100px;
	color: #fff;
	font-family: var(--sg-font-head);
	font-size: 4rem;
	line-height: 1.1;
}

.site-title a {
	color: #fff;
	text-shadow: 1px 1px 1px #333;
}

.site-title a:hover,
.site-title a:focus {
	color: #fff;
	text-decoration: none;
}

/* ---------- Primary navigation ---------- */

.nav-primary {
	clear: both;
	float: left;
	margin: 0 0 0 100px;
}

.gast-nav-menu {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	font-family: var(--sg-font-head);
	list-style: none;
}

.gast-nav-menu li {
	position: relative;
}

.gast-nav-menu a {
	display: block;
	padding: 5px 15px;
	color: #fff;
	font-size: 20px;
	font-weight: 800;
	text-shadow: 1px 1px 1px #333;
}

.gast-nav-menu .current-menu-item > a,
.gast-nav-menu .current-page-ancestor > a,
.gast-nav-menu .current-menu-ancestor > a {
	color: var(--sg-orange);
}

.gast-nav-menu .sub-menu {
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 0;
	display: none;
	min-width: 200px;
	padding: 5px 0;
	margin: 0;
	background-color: rgba(51, 51, 51, 0.95);
	list-style: none;
}

.gast-nav-menu li:hover > .sub-menu,
.gast-nav-menu li:focus-within > .sub-menu,
.gast-nav-menu li.sub-menu-open > .sub-menu {
	display: block;
}

.gast-nav-menu .sub-menu a {
	font-size: 16px;
	font-weight: 600;
	text-shadow: none;
	white-space: nowrap;
}

.sub-menu-toggle {
	position: absolute;
	top: 4px;
	right: -6px;
	width: 28px;
	height: 28px;
	padding: 0;
	background: none;
}

.sub-menu-toggle::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin: 0 auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.nav-primary.is-sticky {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	width: 100%;
	margin: 0;
	padding-left: 130px;
	background-color: var(--sg-sticky-bg);
}

.admin-bar .nav-primary.is-sticky {
	top: 32px;
}

.nav-primary.is-sticky a {
	font-size: 14px;
}

.menu-toggle {
	display: none;
	background: none;
	color: #fff;
	font-size: 16px;
	text-transform: none;
}

/* Both menu toggles are bare glyphs, not buttons to look at: the generic button
   styling would paint a coloured block behind them, and on touch that hover state
   lingers after the tap. */
.menu-toggle:hover,
.menu-toggle:focus,
.sub-menu-toggle:hover,
.sub-menu-toggle:focus {
	background: none;
}

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
	display: block;
	width: 22px;
	height: 2px;
	background-color: currentColor;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
	content: "";
	position: relative;
	top: -6px;
}

.menu-toggle-icon::after {
	top: 4px;
}

/* ---------- Front-page banner ---------- */

.after-header {
	padding: 30px;
	color: var(--sg-text);
	font-family: var(--sg-font-head);
	font-size: 50px;
	font-weight: 400;
	line-height: 1;
	text-align: center;
}

.after-header-sub {
	color: var(--sg-orange);
	font-size: 80%;
}

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

.site-inner {
	display: flow-root;
	max-width: 90%;
	margin: 0 auto;
	padding: 30px 30px 0;
}

.content {
	float: left;
	width: 79%;
}

.sidebar {
	float: right;
	width: 20%;
	padding: 30px 10px 0;
	background-color: var(--sg-sidebar-bg);
	font-size: 15px;
	line-height: 1.5;
}

.layout-no-sidebar .content,
.layout-full-width .content {
	float: none;
	width: 100%;
}

.breadcrumb {
	margin: -20px 0 10px 10px;
	font-size: 14px;
}

.entry {
	margin-bottom: 30px;
}

.entry-title {
	margin-bottom: 10px;
}

.entry-content::after {
	content: "";
	display: block;
	clear: both;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin-right: 4px;
	border: 1px solid var(--sg-border);
	background: var(--sg-panel);
}

.pagination .page-numbers.current {
	background: var(--sg-yellow);
	color: #fff;
}

/* ---------- SiteOrigin panels ---------- */

.panel-grid-cell .so-panel {
	padding: 20px;
	background-color: var(--sg-panel);
}

.panel-grid-cell-empty,
/* Page Builder puts a widget's style class on an inner wrapper, so the panel is matched through it. */
.panel-grid-cell .so-panel:has(> .sg-plain) {
	padding: 0;
	background-color: transparent;
}

.panel-grid-cell .so-panel:has(> .sg-center) {
	text-align: center;
}

.so-panel .widget-title {
	font-size: 22px;
}

.sg-cols {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.sg-col-2 {
	flex: 2 1 320px;
}

.sg-col-1 {
	flex: 1 1 200px;
}

/* ---------- Widgets ---------- */

.widget {
	margin-bottom: 20px;
}

.widget-title {
	margin-bottom: 10px;
	font-size: 22px;
	font-weight: 700;
	hyphens: auto;
}

.sg-help-box {
	padding: 30px 0;
	border: 3px solid var(--sg-red);
	background-color: #fff;
}

.sg-help-box h5 {
	padding: 10px;
	color: var(--sg-red);
	font-size: 20px;
}

.gast-news-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gast-news-item {
	margin-bottom: 30px;
}

.gast-news-title {
	display: block;
	margin: 10px 0 0;
	font-family: var(--sg-font-head);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.gast-news-image img {
	height: auto;
}

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

.footer-widgets {
	clear: both;
	padding: 30px 0 10px;
	border-top: 1px solid var(--sg-border);
	background-color: var(--sg-panel);
}

.footer-widgets .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	max-width: 90%;
	margin: 0 auto;
}

.footer-widget-area {
	flex: 1 1 200px;
	min-width: 0;
}

.footer-widgets .widget-title {
	margin-bottom: 10px;
	font-size: 18px;
	font-weight: 700;
	text-align: left;
}

.footer-widgets .menu {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-widgets .menu a {
	display: inline-block;
	color: var(--sg-orange);
}

.footer-widgets .menu-icon {
	width: 30px;
	height: 30px;
}

.site-footer {
	padding: 20px 0;
	background-color: var(--sg-panel);
	font-size: 12px;
	text-align: center;
}

/* ---------- Forms (Contact Form 7) ---------- */

.wpcf7 label {
	display: block;
	margin-bottom: 12px;
}

.wpcf7 label > span:first-child {
	display: block;
	margin-bottom: 4px;
}

.wpcf7 label:has([aria-required="true"]) > span:first-child::after {
	content: " *";
	color: var(--sg-red);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	max-width: 100%;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background-color: #fff;
	font-family: inherit;
	font-size: 16px;
}

.wpcf7 textarea {
	min-height: 140px;
}

.wpcf7-response-output {
	padding: 10px;
	border: 1px solid var(--sg-text);
	background: #fff;
}

/* ---------- Responsive ---------- */

@media only screen and (max-width: 1023px) {
	.content {
		float: none;
		width: 100%;
	}

	.sidebar {
		float: none;
		width: 100%;
		padding: 10px;
		background-color: #fff;
	}
}

@media only screen and (max-width: 960px) {
	:root {
		--sg-header-height: 200px;
	}

	.site-header {
		background-position: center;
	}

	.title-area {
		float: none;
		padding-top: 5%;
		text-align: center;
	}

	.site-title {
		margin: 0;
		font-size: 4rem;
	}

	/* The bar sits on top of the header photo, so it only paints a background once
	   there is a menu to read: when it is open, or when it is stuck to the top. */
	.nav-primary {
		float: none;
		margin: 20px 0 0;
		background-color: transparent;
	}

	.nav-primary.menu-open,
	.nav-primary.is-sticky {
		background-color: var(--sg-bg);
	}

	.nav-primary.is-sticky {
		padding-left: 0;
	}

	.menu-toggle {
		display: block;
		margin: 10px;
		color: #fff;
	}

	/* The icon bars are backgrounds, not text, so they need a drop shadow rather
	   than a text shadow to stay visible on a light part of the photo. */
	.menu-toggle-icon {
		filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
	}

	.nav-primary.menu-open .menu-toggle,
	.nav-primary.is-sticky .menu-toggle {
		color: var(--sg-text);
	}

	.nav-primary.menu-open .menu-toggle-icon,
	.nav-primary.is-sticky .menu-toggle-icon {
		filter: none;
	}

	.gast-nav-menu {
		display: none;
		flex-direction: column;
	}

	.nav-primary.menu-open .gast-nav-menu {
		display: flex;
	}

	.gast-nav-menu a,
	.nav-primary.is-sticky a {
		padding: 4px 15px;
		color: var(--sg-text);
		font-size: 14px;
		font-weight: 300;
		text-shadow: none;
	}

	.gast-nav-menu .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		padding-left: 15px;
		background: none;
	}

	.gast-nav-menu .sub-menu a {
		color: var(--sg-text);
	}

	.sub-menu-toggle {
		display: none;
	}

	.after-header {
		font-size: 25px;
	}

	.site-inner {
		max-width: 100%;
		padding: 20px;
	}

	.footer-widgets .wrap {
		max-width: 100%;
	}

	h3 {
		font-size: 17px;
	}
}

@media only screen and (max-width: 480px) {
	:root {
		--sg-header-height: 150px;
	}

	.site-title {
		font-size: 2rem;
	}

	.menu-toggle {
		margin: 6px 10px;
	}

	.site-inner {
		padding: 10px;
	}

	.panel-grid-cell .so-panel {
		padding: 15px 5px;
	}
}

@media print {
	.site-header,
	.nav-primary,
	.sidebar,
	.footer-widgets {
		display: none;
	}
}

/* Two-column field group (name split into first and last). */
.sg-field-row {
	display: flex;
	gap: 10px;
}

.sg-field {
	flex: 1 1 0;
}

.sg-sub {
	display: block;
	font-size: 13px;
	font-weight: 400;
}
