/*
Theme Name: Norfolk Gardens Trust
Theme URI: https://www.norfolkgt.org.uk
Author: David Earl
Description: Custom lightweight theme for the Norfolk Gardens Trust, replacing the previous Elementor-based build. No page builder required - all layout is native WordPress templates + this stylesheet.
Version: 1.1.2
Requires PHP: 8.1
Text Domain: ngt
*/

/* ==========================================================================
   0. Design tokens
   These are best-guess colours/sizes read off the screenshots. Tweak these
   variables to exactly match the live site - everything below references
   them, so you only need to change values in one place.
   ========================================================================== */
:root{
	--ngt-teal-dark:      #4d7377; /* footer, page banners, primary buttons */
	--ngt-teal:           #5c7f83; /* logo, links, headings */
	--ngt-teal-hover:     #3f5f63;
	--ngt-band-light:     #d9e4e4; /* welcome band / CTA band */
	--ngt-band-lighter:   #eef3f3; /* alternating announcement bands */
	--ngt-band-lighter2:  #e3ecec;
	--ngt-band-gray:      #a3a3a3; /* "Next Event" band */
	--ngt-text:           #333333;
	--ngt-text-light:     #ffffff;
	--ngt-border:         #cddada;
	--ngt-max-width:      1120px;
	--ngt-font: "Open Sans", sans-serif;
	--ngt-font-weight:    300; /* Open Sans Light */
}

/* ==========================================================================
   1. Reset / base
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
body{
	margin:0;
	font-family: var(--ngt-font);
	font-weight: var(--ngt-font-weight);
	color: var(--ngt-text);
	font-size: 19px;
	line-height: 1.5;
	background:#fff;
}
img{ max-width:100%; height:auto; display:block; }
a{ color: var(--ngt-teal); text-decoration: none; font-weight:600; }
a:hover{ color:#000; text-decoration: none; }
ul{ margin:0; padding:0; }
h1,h2,h3,h4{ font-weight:500; color: var(--ngt-teal); margin-top:0; }
.screen-reader-text{
	position:absolute !important;
	width:1px; height:1px;
	overflow:hidden;
	clip:rect(1px,1px,1px,1px);
	white-space:nowrap;
}

.container{
	max-width: var(--ngt-max-width);
	margin:0 auto;
	padding:0 20px;
}

/* Plain content dropped straight into an is-layout-constrained wrapper
   (e.g. the homepage's own content) is centred by WordPress's own layout
   CSS, but that only sets max-width/margin - it doesn't add the 20px
   inset .container uses, so unwrapped blocks would otherwise sit 20px
   further out than everything else on the page. This adds the matching
   inset, without touching full-width/wide blocks (the band patterns),
   which should stay flush to the viewport edge. */
.is-layout-constrained > :where(:not(.alignfull):not(.alignwide)){
	padding-left:20px;
	padding-right:20px;
}

.btn{
	display:inline-block;
	background: var(--ngt-teal-dark);
	color:#fff;
	padding:12px 26px;
	border-radius:2px;
	font-size:18px;
	font-weight:400;
	line-height:1.2;
	border:none;
	cursor:pointer;
	font-family: var(--ngt-font);
}
.btn:hover{ background: var(--ngt-teal-hover); color:#fff; text-decoration:none; }

/* The core Buttons block, styled the same as .btn. Outline-style buttons
   are left alone, and colours picked in the block editor still win (they
   use !important utility classes). */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link{
	display:inline-block;
	background: var(--ngt-teal-dark);
	color:#fff;
	padding:12px 26px;
	border-radius:2px;
	font-size:18px;
	font-weight:400;
	line-height:1.2;
	border:none;
	font-family: var(--ngt-font);
	text-decoration:none;
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover{
	background: var(--ngt-teal-hover);
	color:#fff;
	text-decoration:none;
}
/* Buttons blocks saved by the earlier patterns carry an extra .btn class
   on the wrapper div; neutralise it so the button isn't styled twice. */
.wp-block-button.btn,
.wp-block-button.btn:hover{
	background:none;
	padding:0;
	border-radius:0;
	font-size:inherit;
	line-height:inherit;
}

/* ==========================================================================
   2. Site header
   ========================================================================== */
.site-header{
	position:relative;
	background:#fff;
	padding-top:18px;
}
.header-row{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:20px;
	padding-bottom:18px;
}
.site-logo img{ max-height:64px; width:auto; }
.site-logo{ flex:0 0 auto; }
.site-logo a{ display:block; }

.header-join-btn{ flex:0 0 auto; }

.menu-toggle{
	display:flex;
	align-items:center;
	gap:10px;
	background:none;
	border:none;
	cursor:pointer;
	color: var(--ngt-teal);
	font-family: var(--ngt-font);
	font-weight:700;
	letter-spacing:.03em;
	font-size:17px;
	text-transform:uppercase;
	padding:0;
	flex:0 0 auto;
}
.menu-toggle .hamburger{
	display:flex;
	flex-direction:column;
	gap:5px;
}
.menu-toggle .hamburger span{
	display:block;
	width:26px;
	height:3px;
	background: var(--ngt-teal);
}

/* ==========================================================================
   3. Mega menu panel (opens below header): pale band with three menu
   columns, then a plain white strip containing the search box.
   ========================================================================== */
.site-navigation{
	max-height:0;
	overflow:hidden;
	visibility:hidden;
	transition: max-height 800ms ease, visibility 0s linear 800ms;
}
.site-navigation.is-open{
	visibility:visible;
	transition: max-height 800ms ease, visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce){
	.site-navigation{ transition:none; }
}

.nav-menu-panel{ background: var(--ngt-band-light); }
.nav-search-panel{ background:#fff; }

.nav-columns{
	display:grid;
	grid-template-columns:repeat(3, 1fr);
	gap:20px 40px;
	padding:32px 0 24px;
}
.nav-columns ul{ list-style:none; }
.nav-columns li{ margin-bottom:10px; text-align:center; }
.nav-columns a{
	color: var(--ngt-teal);
	font-size:19px;
}
.nav-columns .current-menu-item > a{
	color:#000;
}

.nav-search{
	padding:24px 0;
	text-align:center;
}
.nav-search .search-form{
	display:inline-flex;
	width:50%;
	min-width:280px;
	max-width:100%;
}
.nav-search input[type="search"]{
	flex:1 1 auto;
	min-width:0;
	padding:12px 16px;
	border:none;
	background: var(--ngt-band-lighter);
	color: var(--ngt-text);
	font-family: var(--ngt-font);
	font-size:18px;
}
.nav-search input[type="search"]::placeholder{ color:#8a9494; }
.nav-search button{
	flex:0 0 auto;
	display:flex;
	align-items:center;
	justify-content:center;
	width:48px;
	background: var(--ngt-teal-dark);
	border:none;
	color:#fff;
	cursor:pointer;
}
.nav-search .search-icon{ width:20px; height:20px; }

@media (max-width: 600px){
	.nav-search .search-form{ width:100%; }
}

/* ==========================================================================
   4. Hero slider (front page)
   ========================================================================== */
.hero-slider{
	position:relative;
	overflow:hidden;
	height:640px; /* explicit height, since slides now stack via position:absolute for the crossfade rather than contributing their own height to the flow */
}
.hero-slide{
	position:absolute;
	inset:0;
	opacity:0;
	transition:opacity 1000ms ease;
	pointer-events:none;
}
.hero-slide.is-active{
	opacity:1;
	pointer-events:auto;
	z-index:1;
}
.hero-slide img{
	width:100%;
	height:100%;
	object-fit:cover;
	display:block;
}
.hero-slide-content{
	position:absolute;
	left:0;
	top:0;
	height:100%;
	display:flex;
	align-items:center;
	width:100%;
}
.hero-slide-content .inner{
	max-width:620px;
	margin-left:8%;
	color:#fff;
	text-shadow:0 1px 4px rgba(0,0,0,.5);
}
.hero-slide-content h2{
	color:#fff;
	font-size:40px;
	margin-bottom:12px;
}
.hero-slide-content p{ margin-bottom:20px; font-size:19px; }

.hero-dots{
	position:absolute;
	bottom:18px;
	left:0;
	width:100%;
	display:flex;
	justify-content:center;
	gap:8px;
	z-index:2;
}
.hero-dots button{
	width:11px; height:11px;
	border-radius:50%;
	border:1px solid #fff;
	background:rgba(255,255,255,.4);
	padding:0;
	cursor:pointer;
}
.hero-dots button.is-active{ background: var(--ngt-teal); border-color: var(--ngt-teal); }

/* ==========================================================================
   5. Home page content bands
   ========================================================================== */
.band{ padding:56px 0; text-align:center; }
.band-welcome{ background: var(--ngt-band-light); }
.band-welcome h1{ font-size:38px; }
.band-welcome p{ max-width:700px; margin:0 auto 26px; }

.band-announcement{ padding:36px 0; background: var(--ngt-band-lighter); }
.band-announcement h2{ font-size:31px; margin-bottom:8px; }
.band-announcement p{ color: var(--ngt-text); margin:0; }

.band-event{ background: var(--ngt-band-gray); color:#fff; }
.band-event h2{ color:#fff; font-size:33px; margin-bottom:4px; }
.band-event a:not(.btn){ color:#fff; }
.band-event a:not(.btn):hover{ color:var(--ngt-teal-dark); }
.band-event .ngt-widget-card{ margin-bottom:18px; }
.band-event .ngt-widget-card:empty{ display:none; }

/* ==========================================================================
   6. Global call-to-action band (appears on every page, above footer)
   ========================================================================== */
.band-cta{
	background: var(--ngt-band-light);
	padding:32px 0;
}
.band-cta p{ margin:0 0 6px; }

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer{
	background: var(--ngt-teal-dark);
	color:#fff;
	text-align:center;
	padding:22px 0;
	font-size:17px;
}
.site-footer p{ margin:0 0 6px; }
.site-footer a{ color:#fff; text-decoration:underline; }
.site-footer a:hover{ color:#fff; }

/* Footer Bar widget area: text, headings and menus all follow the look of
   the original built-in footer text (white, centred, 17px). */
.site-footer .footer-widget{ margin:0 0 6px; }
.site-footer .footer-widget p{ margin:0 0 6px; }
.site-footer .footer-widget-title,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4{
	color:inherit;
	font-size:inherit;
	font-weight:600;
	margin:0 0 6px;
}
.site-footer .footer-widget ul,
.site-footer .footer-widget .wp-block-navigation__container{
	list-style:none;
	margin:0 0 6px;
	padding:0;
	display:flex;
	flex-wrap:wrap;
	justify-content:center;
	gap:0 1.5em;
}
.site-footer .wp-block-navigation{ justify-content:center; font-size:inherit; }
.site-footer .wp-block-navigation a{ color:#fff; }

/* ==========================================================================
   8. Subsidiary page banner + content + sidebar
   ========================================================================== */
.page-banner{
	background: var(--ngt-teal-dark);
	color:#fff;
	padding:1px 0;
	margin-bottom:18px;
}
.page-banner h1{ color:#fff; font-size:31px; margin:0; }

.page-layout{
	display:grid;
	grid-template-columns:1fr;
	gap:40px;
	padding-bottom:40px;
}
.page-layout.has-sidebar{
	grid-template-columns: 2fr 1fr;
}
.page-content img{ display:inline-block; }
.page-content .wp-block-columns,
.page-content .image-row{
	display:flex;
	gap:20px;
	margin-bottom:20px;
	flex-wrap:wrap;
}
.page-content .image-row img{ flex:1 1 260px; }

/* Generic card styling applied to every widget dropped into the Page
   Sidebar or Home - Next Event Band areas: dark teal title bar, pale
   body - matches the "Events" panel look from the original site, but
   applies to whatever you actually put there. */
.ngt-widget-card .widget-title{
	background: var(--ngt-teal-dark);
	color:#fff;
	padding:14px 20px;
	font-size:26px;
	margin:0;
}
.ngt-widget-card .widget-content,
.ngt-widget-card > *:not(.widget-title){
	background: var(--ngt-band-light);
}
.ngt-widget-card{ margin-bottom:0; }
.ngt-widget-card h1,
.ngt-widget-card h2,
.ngt-widget-card h3,
.ngt-widget-card h4,
.band-cta h1,
.band-cta h2,
.band-cta h3,
.band-cta h4{
	color: inherit;
}
.ngt-widget-card:empty{ display:none; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 900px){
	.page-layout.has-sidebar{ grid-template-columns:1fr; }
	.nav-columns{ grid-template-columns:1fr; text-align:center; }
	.hero-slider{ height:420px; }
	.hero-slide-content .inner{ margin-left:6%; max-width:80%; }
}

@media (max-width: 600px){
	.site-header .container{ flex-wrap:wrap; }
	.header-join-btn .btn{ padding:10px 16px; font-size:17px; }
	.hero-slider{ height:320px; }
	.hero-slide-content h2{ font-size:28px; }
	.page-content .image-row{ flex-direction:column; }
}

/* ==========================================================================
   10. Site-specific additions (folded in from Appearance > Customise >
   Additional CSS). Cameo-specific styling stays in Additional CSS.
   ========================================================================== */

/* Content width: at viewports wide enough to show the full 1120px column,
   drop the 20px gutters so the header, bands and text all line up on the
   column edge. Below that the gutters stay, so nothing touches the screen
   edge on phones/tablets. */
@media (min-width: 1160px){
	.container{ padding-left:0; padding-right:0; }
	/* Only the page's own top-level blocks - not the children of Group
	   blocks (sidebar boxes, bands), which keep their 20px inset. */
	.entry-content.is-layout-constrained > :where(:not(.alignfull):not(.alignwide)){
		padding-left:0;
		padding-right:0;
	}
}

.band-cta{
	max-width: var(--ngt-max-width);
	margin: 0 auto;
}
/* The band is a 1120px panel with its own edges, so its content needs an
   inset from them even when .container has no gutters at wide widths. */
.band-cta .container{
	padding-left:20px;
	padding-right:20px;
}

/* Reusable blocks / patterns */
.ngt-personnel{ row-gap:1.5em; }
.ngt-personnel h2{ margin-bottom:0.5em; }
p.wp-block-paragraph{ margin:0.5em 0; }
h2:where(.wp-block-heading).has-background{ padding:0.25em 1em; }
.ngt-membership-current{
	padding:0.5em;
	background:#668E971C;
}
.ngt-nextevent{ text-shadow:2px 2px #000000; }
.accent-bar{
	border-left:4px solid #4A6E71;
	padding-left:15px;
}
.ngt-unbold-links a{ font-weight:normal; }

/* Email links get an envelope icon (assets/images/envelope.svg) */
a[href^="mailto:"]::before{
	content:"";
	padding-left:1.3em;
	background:url(assets/images/envelope.svg) no-repeat;
	background-size:1em;
	background-position-y:70%;
}
a[href^="mailto:"]{ font-weight:normal; }
li:has(>a[href^="mailto:"]){ list-style:none; }

strong{ font-weight:600; }
figure.alignright{
	float:right;
	margin-inline-start:2em;
	margin-inline-end:0;
}
figure.alignleft{
	float:left;
	margin-inline-start:0;
	margin-inline-end:2em;
}
ul ul{ margin:1em; }
