/*
Theme Name: Northgowerhistory
Theme URI: https://peek-design-swansea.co.uk
Description: A premium theme by Peek Design
Version: 1
Author: Chris Thomas
Author URI: https://peek-design-swansea.co.uk
*/

/* --- Core layout primitives --- */
.is-layout-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.is-layout-flow > * {
    margin-block-start: 1rem;
    margin-block-end: 0;
}

.is-layout-constrained > * {
    margin-block-start: 1rem;
    margin-block-end: 0;
}

.is-layout-grid {
    display: grid;
}

/* --- Columns block --- */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.75em;
}

.wp-block-column {
    flex-grow: 1;
    min-width: 0;
}

/* Prevent columns from collapsing */
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 0;
}

/* Mobile stacking */
@media (max-width: 781px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-direction: column;
    }
}

/* --- Group block --- */
.wp-block-group {
    display: block;
}

/* --- Separator block --- */
.wp-block-separator {
    border: none;
    border-bottom: 1px solid currentColor;
    opacity: .4;
    margin: 2em 0;
}

.wp-block-separator.has-css-opacity {
    opacity: .4;
}


/**/

:root {
  --bg-color: #fffff4;
	--contrast-bg-color: #e8f1e8;
  --main-color: #265a55;
  --white-hover: #fff9c4;
--grey:	#222;
}


body{
	font-family: "Open Sans", sans-serif;
	margin: 0;
	padding: 0;
	font-size: 18px;
	line-height: 1.4;
	height: 100%;
	width: 100vw;
	color: var(--main-color);
	font-weight:400; overflow-x: hidden;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings:"wdth" 100; background-color: var(--bg-color);
}

@media (max-width: 1024px) {
	body{font-size: 16px;}
}



h1, h2, h3, p, .content ul, .content ul li {margin-top: 0}

@media only screen and (max-width : 480px) {
	h2 {margin-top: 0 !important;}
}

h2 {color: var(--button-color); text-transform: uppercase;}

a {transition: all .2s ease-in-out; color: var(--main-color); text-decoration: none}
p a:hover {text-decoration: underline;}

img {width: 100%; height: auto}

@media screen and (min-width:1480px) {
  .header .content, #content .content .wp-block-group__inner-container{
    width:1384px;
  }
}


.lazy-load {
  opacity: 0;
  transition: opacity 1s ease; /* added semicolon */
}

.lazy-load.loaded {
  opacity: 1;
}

/* Disable lazy-load fade on non-home pages */
body:not(.home) .site-header,
body:not(.home) .header-inner {
  opacity: 1 !important;
  transition: none !important;
}

/* Disable lazy-load fade on second+ homepage visits */
body.home-return .site-header,
body.home-return .header-inner, body.home-return .quote-landing .lazy-load {
  opacity: 1 !important;
  transition: none !important;
}


/* Delay utilities */
.delay-0-5 { transition-delay: 0.5s; }
.delay-1   { transition-delay: 1s; }
.delay-1-5 { transition-delay: 1.5s; }
.delay-2   { transition-delay: 2s; }
.delay-2-5 { transition-delay: 2.5s; }
.delay-3   { transition-delay: 3s; }
.delay-3-5 { transition-delay: 3.5s; }
.delay-4   { transition-delay: 4s; }






.site-header {
  padding: 2rem 1rem;
  background-color: var(--bg-color);
  text-align: center;
  position:fixed; width: 100%; left: 0; top: 0; z-index: 9; 
}

 .site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; pointer-events: none; background: linear-gradient( to bottom, rgba(38, 90, 85, 0.2), rgba(38, 90, 85, 0) ); }

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.logo img {
	width: auto;
	height: 23vh;
}

/* Burger button */
.burger {
  position: fixed;        /* detach from header stacking */
  right: 2rem;
  top: 1rem;              /* adjust to taste */
  background: none;
  border: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100;          /* higher than overlay */
}

.burger span {
  position: absolute;
  width: 28px;
  height: 3px;
  background-color: var(--main-color);
  transition: all 0.3s ease;
}

/* Adjusted spacing */
.burger span:nth-child(1) {
  top: 14px;
}
.burger span:nth-child(2) {
  top: 22px;
}
.burger span:nth-child(3) {
  top: 30px;
}

/* Transform into X */
.burger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 22px;
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 22px;
}

/* White X */
.burger.active span {
  background-color: #fff;
}



/* Overlay menu */
.overlay-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--main-color);
  color: #fff;
  display: flex;              /* always flex, but hidden via opacity */
  justify-content: center;
  align-items: center;
  opacity: 0 !important;                 /* start invisible */
  visibility: hidden;         /* not clickable */
  transition: opacity 0.5s ease, visibility 0.5s ease !important;
  z-index: 1000;
}

.overlay-nav.active {
  opacity: 1 !important;                 /* fade in */
  visibility: visible;        /* clickable */
}


.overlay-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.overlay-menu li {
  margin: 1rem 0;
}

.overlay-menu a {
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.overlay-menu a:hover {
  color: var(--white-hover);
}

/* Hero section now sits outside header */
.hero {
  margin-top: 0;
  padding: 3rem 1rem;
  background-color: #eaf5f3;
  text-align: center; background-size: cover;
  background-position: center;
}

.home-hero {
  min-height: calc(70vh - 23vh - 4rem);
  padding-top: calc(23vh + 4rem);
  display: flex;              /* enable flexbox */
  justify-content: center;    /* horizontal centering */
  align-items: center;        /* vertical centering */
  text-align: center;         /* optional: center text inside */
color: #fff; position: relative
}

.hero-internal {
  margin-top: calc(23vh + 4rem);
	padding-top: 4em; padding-bottom: 4em;
  display: flex;              /* enable flexbox */
  justify-content: left;    /* horizontal centering */
  align-items: center;        /* vertical centering */
  text-align: center;         /* optional: center text inside */
color: #fff; position: relative
}

.home-hero::before, .hero-internal::before { content: ""; position: absolute; inset: 0; background-color: #255955; opacity: 1; z-index: 0; transition: opacity 1s ease;}

.home-hero.loaded::before, .hero-internal.loaded::before { opacity: 0.7;  }

.home-hero span, .hero-internal h1 {font-family: "EB Garamond", serif;}
.hero-internal h1 {z-index: 9; padding-left: 15%;
  padding-right: 15%; text-transform: uppercase; margin-bottom: 0}

.page-content {
	padding-left: 15%;
	padding-right: 15%;
	padding-top: 2.5%;
	padding-bottom: 2.5%; min-height: calc(60vh - 23vh - 4rem);
}

@media (max-width: 1133px) {
	.page-content {
	padding-left: 5%;
		padding-right: 5%;}
	
}


/*
body:not(.home) .page-content {
	min-height: calc(100vh - 23vh - 4rem);
	margin-top: calc(23vh + 4rem);
}
*/

.page-content p, .page-content h2, .page-content .wp-block-button {margin-bottom: 1em}




.quote-landing {
  max-width: 80ch; /* keeps line length readable */
  margin: 0 auto;
  line-height: 1; position: relative;
}

@media only screen and (max-width : 480px) {
.quote-landing {margin: 0 3rem; font-size: 75%;}
}

.quote-landing p {
  position: relative;
  font-size: 112.5%; /* ~18px */
  margin-bottom: 1rem; line-height: 1.4;
}

/* Large opening quote */

.quote-landing p::before {
  content: "";
  position: absolute;
  left: -2.5em;
  top: -0.2em;
  width: 2em;
  height: 2em;
  background: url('images/quote1.svg') no-repeat center/contain;
}

.quote-landing p::after {
  content: "";
  position: absolute;
  right: -2.5em;
  bottom: 0;
  width: 2em;
  height: 2em;
  background: url('images/quote2.svg') no-repeat center/contain;
}





.quote-landing cite {
  display: block;
  font-family: "EB Garamond", serif;
  font-size: 150%; /* ~24px, stands out */
  font-style: normal; /* avoid italic if you want a clean look */
  margin-top: 1rem; font-weight: bold; color: #7baca3;
}


footer {padding: 1% 2%; font-size: 80%; background-color: var(--contrast-bg-color);}

footer p {margin-bottom: 0; }
footer a {text-decoration: underline;}

footer .footer-inner {
  display: flex;
  justify-content: space-between; /* pushes items left/right */
  align-items: center; 
}

@media only screen and (max-width : 480px) {
	footer .footer-inner {flex-direction: column}
	footer {padding: 4% 2%; }
}



footer  .footer-inner p {
  margin: 0;
}

/* --- Programme Layout Styling (Page 43 only) --- */

.page-id-43 .wp-block-columns {
    align-items: flex-start;
    margin-bottom: 2rem;
}

/* Date column */
.page-id-43 .wp-block-column:first-child p strong {
    font-size: 1.05rem;
    font-weight: 600;
    display: block;
    margin-top: 0.2rem; opacity: 0.7;
}

/* Title column – main talk title */
.page-id-43 .wp-block-column:nth-child(2) p strong:first-child {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

/* Secondary titles (e.g., AGM subheading) */
.page-id-43 .wp-block-column:nth-child(2) p strong:not(:first-child) {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-top: 0.5rem;
    display: block;
}

/* Description text */
.page-id-43 .wp-block-column:nth-child(2) p {
    margin-top: 0.4rem;
    line-height: 1.55;
}

/* Separator styling */
.page-id-43 hr.wp-block-separator {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2.5rem 0;
    opacity: 1 !important; width: 100% !important;
}



/* Mobile improvements */
@media (max-width: 700px) {
    .page-id-43 .wp-block-column:first-child {
        margin-bottom: 0.5rem;
    }

    .page-id-43 .wp-block-column:first-child p strong {
        font-size: 1rem;
        color: #666;
    }

    .page-id-43 .wp-block-column:nth-child(2) p strong:first-child {
        font-size: 1.15rem;
    }
}

/* Add spacing under button blocks */
.page-content .wp-block-buttons {
    margin-bottom: 2rem;
	margin-top: 1rem;
}

@media (max-width: 480px) {
.wp-block-column.is-layout-flow.wp-block-column-is-layout-flow > .wp-block-buttons.is-layout-flex.wp-block-buttons-is-layout-flex:last-child {margin-bottom: 0}
}




.wp-block-table table {
    table-layout: fixed;
    width: 100%;
}

@media (max-width: 768px) {
.wp-block-table table {table-layout: auto; width: 100%;}	}



.wp-block-table thead {
  border-bottom: none !important;
}
.wp-block-table table td:first-child,
.wp-block-table table th:first-child {
    width: 90%;
}

.wp-block-table table th {text-align: left}

.wp-block-table table td:last-child,
.wp-block-table table th:last-child {
    width: 10%;
}

.quick-reads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Two-column layout */
.home-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 6em;
    margin: 3em 0;
}

/* Quick Reads grid (already have this) */
.quick-reads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3em;
}


@media only screen and (max-width : 480px) {
	.quick-reads-grid {display: block;}
	.qr-item {margin-bottom: 4rem}
}



/* Programme mini list */
.programme-mini {
    margin-bottom: 1.5rem;
}

.programme-date {
    margin: 0 !important;
    font-size: 0.9rem;
    opacity: 0.8;
}

.programme-title {
    margin: 0.2rem 0 0;
}

/* Mobile stacking */
@media (max-width: 900px) {
    .home-two-col {
        grid-template-columns: 1fr;
    }
}



.right-col-menu {
    list-style: none;
    margin: 0 0 2rem 0;
    padding: 0;
}

.right-col-menu li {
    margin-bottom: 0.4rem;
}

.right-col-menu a {
    text-decoration: none;
    color: var(--main-color);
    font-weight: 500; transition: color 0.5s ease;
}

.right-col-menu a:hover {
    text-decoration: underline; color: #000;
}

.wp-block-button__link {
	color: #fff;
	background-color: #32373c;
	border-radius: 9999px;
	box-shadow: none;
	text-decoration: none;
	padding: calc(.667em + 2px) calc(1.333em + 2px);
	font-size: 1.125em;
	display: inline-block;
}

.home-menu {margin-top: 4em}
.home-menu h2 {margin-bottom: 0.5em;}
.home-menu .menu-item-17 {display:none}

.page .wp-block-button .wp-block-button__link,
.page .wp-block-button .wp-element-button, .archive .wp-block-button .wp-block-button__link {
  display: inline-block;
  color: #fff;
  border-radius: 9999px;
  box-shadow: none;
  text-decoration: none;
  padding: calc(.667em + 2px) calc(1.333em + 2px);
  font-size: 80%;
  background-color: var(--main-color);
  transition: all 1s ease; font-weight: bold;
}

.page .wp-block-button .wp-block-button__link:hover,
.page .wp-block-button .wp-element-button:hover, .archive .wp-block-button .wp-block-button__link:hover {
  background-color: #000;
}

.home .wp-block-button .second-button.wp-block-button__link{
  background-color: color-mix(in srgb, var(--main-color) 30%, transparent) ;
  color: var(--main-color);
  border: 1px solid var(--main-color);
}

.home .wp-block-button .second-button.wp-block-button__link:hover {
  color: #fff !important; border: 1px solid #000; background-color: #000;
}

.quick-home {margin-top: 2em}

.wp-block-columns.is-layout-flex {
  gap: 6em;
}

@media (max-width: 1024px) {
.wp-block-columns.is-layout-flex {gap: 2rem;}	
}



.page-id-48 h3 {margin-top: 4rem}

/**/

/* Add spacing + border to square gallery images */
.wp-block-gallery .wp-block-image.size-square {
    box-sizing: border-box;
    background: #fff;
}

/* Ensure the image itself fits inside the padded/bordered figure */
.wp-block-gallery .wp-block-image.size-square img {
    display: block;
    width: 100%;
    height: auto; border-radius: 5px;
}

/* Increase spacing between items */
.wp-block-gallery.columns-4.is-layout-flex {
    gap: 2rem !important; margin-top: 2.5vw;
}

/* Keep 4 columns even with larger gaps */
.wp-block-gallery.columns-4.is-layout-flex .wp-block-image {
    flex: 1 0 calc(25% - 2rem) !important;
	max-width: calc(25% - 2rem); border-radius: 5px;
}


.wpcf7-form p {margin-bottom:4%}
.wpcf7-form-control {width:100%; padding:2%; -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; font-family: 'Open Sans', sans-serif;
	-webkit-text-size-adjust: 100%; color: var(--main-color);}
.wpcf7 input, .wpcf7 textarea {font-size:100%; border:none; background-color: #e9efee}
.wpcf7 input::placeholder, .wpcf7 textarea::placeholder{
    color: var(--main-color) !important;
	font-family: 'Open Sans', sans-serif;
	font-size: 100%; opacity: 1;
}
.wpcf7-form {width:100%; position:relative; margin-left:0; margin-right:auto; margin-top:4%}
@media only screen and (max-width : 812px) {.wpcf7-form {width:100%}}

.wpcf7 input:focus::placeholder {opacity: 0}
.wpcf7-submit {width:33.33%; background-color: var(--main-color) !important; color:#fff; -moz-transition: all .4s ease-in-out;
    -o-transition: all .4s ease-in-out;
    -webkit-transition: all .4s ease-in-out;
    transition: all .4s ease-in-out; }
@media only screen and (max-width : 812px) {
	.wpcf7-submit {display:block}}
	
.wpcf7-submit:hover {background-color:#6d6e70 !important; cursor: pointer}

.form {text-align:center; margin-top:5%}

.wpcf7-response-output, .wpcf7-not-valid-tip {color: #6d6e70 !important; font-size:80% !important;}
div.wpcf7-mail-sent-ok {border: 2px solid #6d6e70 !important;}

.small {font-size: 75%}
.small a {text-decoration: underline}
