/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Fonts and texts */
h1 {
	font-size: clamp(2rem, 5vw, 3.5rem);
	line-height: 1.15;
	font-weight: normal;
	margin-bottom: 1.5rem;
}

h2 {
	font-size: clamp(1.8rem, 3.5vw, 2.4rem);
	line-height: 1.25;
	font-weight: normal;
	margin-bottom: 1.5rem;
	margin-top: 3rem;
}

h3 {
	font-size: 2rem;
	line-height: 1.35;
	font-weight: normal;
	margin-bottom: 1.5rem;
}

h4 {
	font-size: 20px;
	line-height: 1.35;
	font-weight: normal;
	margin-bottom: 1.5rem;
}

.smol {
	font-size: 14px;
}

/* Lists */
ol, ul {
    margin: 0 0 1.5em 1em;
}

/* Header */
.site-header {
	box-shadow: 0 1px 0 rgba(0,0,0,0.08);
	margin-bottom: 30px;
}
@media (min-width: 320px) and (max-width: 480px) {
	.header-image {
		max-width: 70px;
	}
}

.main-navigation .main-nav > ul > li > a::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 10px;
    height: 2px;
    background: var(--contrast-2);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.main-navigation .main-nav > ul > li > a:hover::after {
    transform: scaleX(1);
}

/* Title and date */
.title-date {
	flex-direction: column;
	max-width: 905px;
	padding-bottom: 0 !important;
}
/* Exclusions */
.postid-285 .title-date {
	max-width: 100%;
}
.postid-414 .title-date,
.postid-923 .title-date {
	max-width: 950px;
}

/* Footer */
.site-footer {
	margin-top: 3rem;
}

/* Misc */
.credit {
	font-size: 17px;
	line-height: 1.2;
	color: #6e7178;
	font-style: italic;
	text-align: center;
	padding: 5px 0 20px 0;
}
.submit {
	border-radius: 25px;
	transition: all 0.25s ease 0s;
	padding: 0.8rem 1.6rem !important;
    font-weight: 700;
}
.wp-embed-responsive .wp-has-aspect-ratio iframe {
	border-radius: 25px;
}
.margin-30 {
	margin-bottom: 30px;
}
.generate-back-to-top {
	border-radius: 50%;
}
.no-margin-bottom {
	margin-bottom: 0;
}

/* Comments */
#comment,
#author,
#email {
	background-color: #e5e5e5;
	border-radius: 25px;
	max-height: 180px;
}

/* Ninja form */
.nf-form-content input[type=submit] {
    background-color: var(--accent) !important;
    padding: 0.8rem 1.6rem
}

.nf-form-content input[type=submit]:hover {
    background-color: var(--contrast-2) !important;
}

.nf-field-container input,
.nf-field-container textarea {
	border-radius: 20px;
	background-color: #e5e5e5;
}
.nf-field-element textarea {
	height: 150px !important;
}

.bottom-margin {
	margin-bottom: 10px !important;
}

.nf-field-element input[type="checkbox"],
#wp-comment-cookies-consent {
    -webkit-appearance: none;
    appearance: none;
    width: 25px !important; 
    height: 25px;
    background: #e5e5e5;
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
	margin-top: 5px;
	border-radius: 25px;
}

.nf-field-element input[type="checkbox"]:checked,
#wp-comment-cookies-consent:checked {
    background: var(--contrast-2);
}

.nf-field-element input[type="checkbox"]:checked::before,
#wp-comment-cookies-consent:checked::before {
    content: "✔";
    color: white;
    font-weight: bold;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.nf-field-element input[type="checkbox"]:hover,
.nf-field-element input[type="checkbox"]:focus,
#wp-comment-cookies-consent:hover,
#wp-comment-cookies-consent:focus {
    border-color: var(--gp-primary-color, #0366d6);
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.2);
}

/* YouTube custom thumbnail */
.yt-wrapper iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.yt-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
	border-radius: 25px;
	margin-bottom: 10px;
}

.yt-thumb {
    width: 100%;
    display: block;
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    pointer-events: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.yt-play-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid;
    border-width: 14px 0 14px 24px;
    border-color: transparent transparent transparent #fff;
}

.yt-wrapper:hover .yt-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* ---------- Slider container ---------- */
.gp-fade-slider {
	max-width: 1000px;
	margin: 1rem auto;
	position: relative;
	overflow: hidden;
	--arrow-size: 64px;
	--dot-size: 12px;
}

/* slide group and slides */
.gp-slides {
	position: relative;
	width: 100%;
	height: 100%;
}
.gp-slide {
	display: none;
	width: 100%;
	box-sizing: border-box;
	animation-name: gp-fade;
	animation-duration: 450ms;
}
.gp-slide img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	border-radius: 25px;
}

/* active slide */
.gp-slide.is-active {
	display: block;
}

/* arrows */
.gp-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: var(--arrow-size);
	height: var(--arrow-size);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.45);
	border-radius: 50%;
	cursor: pointer;
	border: none;
	padding: 0;
	box-shadow: 0 2px 8px rgba(0,0,0,0.25);
	transition: background 150ms ease, transform 150ms ease;
	z-index: 10;
}
.gp-arrow:hover,
.gp-arrow:focus {
	background: rgba(0,0,0,0.7);
	transform: translateY(-50%) scale(1.02);
	outline: none;
}
.gp-arrow svg {
	width: 36px;
	height: 36px;
	fill: #fff;
	pointer-events: none;
}

/* position arrows */
.gp-prev { left: 12px; }
.gp-next { right: 12px; }

/* ---------- Dots ---------- */
.gp-dots {
	text-align: center;
	margin-top: 0.5rem;
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: center;
}
.gp-dot {
	width: var(--dot-size);
	height: var(--dot-size);
	border-radius: 50%;
	background: #bbb;
	cursor: pointer;
	display: inline-block;
	transition: background-color 200ms ease, transform 150ms ease;
	border: none;
	padding: 0;
}
.gp-dot:hover { transform: scale(1.08); }
.gp-dot.is-active { background: #333; }

/* ---------- Accessibility helpers ---------- */
.gp-arrow[aria-hidden="true"],
.gp-dot[aria-hidden="true"] { display: none; }

/* ---------- Fade keyframes ---------- */
@keyframes gp-fade {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

/* responsive tweaks */
@media (max-width: 480px) {
	.gp-arrow { --arrow-size: 38px; }
	.gp-dot { width: 10px; height: 10px; }
}

/* ----- News grids ----- */
/* home page */
.forside-grid :where(.wp-block-post-template.is-layout-grid) {
	gap: 40px;
}

.forside-grid a {
	text-decoration: none;
	color: black;
}

.forside-grid .wp-block-post:hover a {
	color: var(--contrast-2);
}

/* inside posts */
.inside-grid :where(.wp-block-post-template.is-layout-grid) {
	gap: 30px;
}
.inside-grid a {
	text-decoration: none;
	color: black;
}
.inside-grid .wp-block-post:hover a {
	color: var(--contrast-2);
}

/* Pagination */
.pagination,
.nav-links {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin: 3rem 0;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 500;
	color: #1d1d1f;
	background: #f5f5f7;
	border: 1px solid #e5e5e7;
	transition: all 0.25s ease;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.page-numbers:hover {
	background: #ebebef;
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.page-numbers.current {
	background: #1d1d1f;
	color: #ffffff;
	border-color: #1d1d1f;
}

.page-numbers.dots {box-shadow: 0 4px 12px rgba(0,0,0,0.04);

	background: transparent;
	border: none;
}

.page-numbers.prev,
.page-numbers.next {
	font-weight: 600;
}