/*
 Theme Name:   Hermanns - GeneratePress Child
 Theme URI:    http://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Thomas Usborne
 Author URI:   http://edge22.com
 Template:     generatepress
 Version:      0.1
 Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, fluid-layout, responsive-layout, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, featured-images, theme-options, light, white, dark, black, blue, brown, gray, green, orange, pink, purple, red, silver, tan, yellow
*/

/* ========== TABLE OF CONTENTS ========== 
1. Theme Tweaks
2. Utilities
3. Typography
======================================== */

/*test*/
.wrapper-s {border:1px solid red;}


/*** 1. THEME TWEAKS ***/

/* Body background color (outside wrapper) */ 
body {
    background-color: var(--surface-20);
}

/* Site Wrapper */
.site-wrapper {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    background-color: var(--surface-10);
}

/* Set the main content area height */
#main {
    min-height: 65vh;
}

/* Container Padding Overrides */
.inside-header {
    padding-inline: 0px !important;
}

.site-header {
    padding-inline: clamp(1rem, 0.848rem + 0.758vw, 1.5rem) !important;
}

.site-content, #content {
    padding: 0px;
}

/* Post Editor Width ( BACKEND ) */ 
.post-type-post .block-editor-block-list__layout {
	max-width: 728px !important;
	margin-inline: auto !important;
		padding-inline: 200px !important;
}

.post-type-post .edit-post-visual-editor__post-title-wrapper .editor-post-title {
	max-width: 728px !important;
	margin-inline: auto !important;
	padding-inline: 200px !important;
}

/* -- Search Tweaks -- */

/* Clears the X from Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
	filter: grayscale(100) opacity(.3);
	cursor: pointer;
}
/* Search Block */ 

.wp-block-search {
	border-radius: 4px;
	overflow: hidden;
	outline: 1px solid var(--surface-30);
	box-shadow: 0px 0px 0px #00000010;
	transition: all 250ms ease-in;
}

.wp-block-search:focus-within {
	outline: 1px solid var(--surface-30);
		box-shadow: 0px 4px 10px #00000010
}

.wp-block-search input {
	border: none;
	padding: 0px 1em;
	border-radius: 4px;
	outline: none;
}

.wp-block-search button{
	background: var(--surface-20);
	color: var(--surface-70);
	padding: 10px 12px;
	border-left: 1px solid var(--surface-30)
}

.wp-block-search button:hover{
	background: var(--surface-30);
	color: var(--surface-80);
}

/* Search in Navigation */ 
#site-navigation .menu-bar-item a{
	padding-right: 0
}

/* Modal */ 
.search-modal-fields button{
	background: var(--surface-20) !important;
	color: var(--surface-70) !important;
	line-height: 1;
	font-weight: 600;
	border-left: 1px solid var(--surface-30);	
	padding: 10px 12px;
}

.search-modal-fields button:hover{
  background: var(--surface-30) !important;
  color: var(--surface-90) !important;
}

.search-modal-fields input {
	background-color: white !important;
	border-radius: 4px;
	border: none;
	padding: 0px 1em;
	outline: none;
}

.search-modal-form{
	color: var(--surface-80);
}

.search-modal-fields{
	border-radius: 4px;
	overflow: hidden;
	outline: 1px solid var(--surface-30);
	box-shadow: 0px 0px 0px #00000010;
	transition: all 250ms ease-in;
	background-color: var(--surface-0);
}

.search-modal-fields:focus-within{
	outline: 1px solid var(--surface-30);
	box-shadow: 0px 4px 10px #00000010
}

.gp-search-modal .gp-modal__overlay {
	background-color: #1f293399;
}

/* Search Results / No Search Results template */ 
.search-title-wrapper{
	display: flex;
	align-items: flex-start;
	margin-top: 40px;
	padding-top: 40px;
	border-top: 1px solid var(--surface-30);
}

.search-for {
	line-height: 1.4;
}

.search-title{
	font-size: var(--fs-body);
	text-transform: capitalize;
	margin-left: .4em;
	line-height: 1.4;
}


/* Hamburger Menu */
.mobile-menu-control-wrapper .menu-toggle,
.mobile-menu-control-wrapper .menu-toggle:hover,
.mobile-menu-control-wrapper .menu-toggle:focus,
.has-inline-mobile-toggle #site-navigation.toggled {
    background-color: transparent;
    margin-right: -1rem;
    font-size: 1em;
    line-height: 8px;
}

/* Primary Menu Button Styles */
@media (min-width: 1025px) {
    .main-navigation .main-nav ul li.nav-cta a {
        background: var(--contrast) !important;
        color: var(--surface-10) !important;
        padding: 1em 1.5em;
        margin-left: 16px;
        border-radius: 4px;
        line-height: 1;
        font-weight: 600;
    }
    .main-navigation .main-nav ul li.nav-cta a:hover {
        background: var(--contrast-alt) !important;
        color: var(--surface-0) !important;
    }
}

@media (max-width: 1024px) {
    .main-navigation .main-nav ul li.nav-cta a {
        margin-left: 0px;
    }
}

/* Post Editor Width & Title */
body .editor-styles-wrapper .post-type-post .block-editor-block-list__layout,
body .editor-styles-wrapper .post-type-post .edit-post-visual-editor__post-title-wrapper .editor-post-title {
    max-width: 768px !important;
    margin-inline: auto !important;
}


/* Password Protected Pages */
.post-password-form {
    max-width: 768px;
    padding: 8rem 0px;
    margin-inline: auto;
    text-align: center;
}

/*** 2. UTILITIES ***/

.ar-16-9 {
    aspect-ratio: 16/9;
}

.ar-9-16 {
    aspect-ratio: 9/16;
}

.ar-4-3 {
    aspect-ratio: 4/3;
}

.ar-1-1 {
	aspect-ratio: 1/1;
}

/* Visually Hidden */
.visually-hidden:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Line Limits */
.line-limit-3, .line-limit-2, .line-limit-4 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-limit-3 {
    -webkit-line-clamp: 3;
}

.line-limit-2 {
    -webkit-line-clamp: 2;
}

.line-limit-4{
    -webkit-line-clamp: 4;
}


/* No Underline */
.no-ul, .no-ul a {
	text-decoration: none;
}

/* Text Balance / Pretty */

.balance {
	text-wrap: balance;
}


/*** 3. TYPOGRAPHY  ***/ 

:root {
	/* These HAVE TO match what is in the Customizer > Typography. Pull in font families using font manager. Set headline-font as 'All Headlings', set body-font as HTML */
	
	--headline-font: "span", sans-serif;
	--body-font: Roboto, sans-serif;

	/*https://www.fluid-type-scale.com/calculate?minFontSize=16&minWidth=400&minRatio=1.125&maxFontSize=18&maxWidth=1280&maxRatio=1.2&steps=body-xs%2C+body-s%2Cbody%2Cbody-l%2Ch6%2Ch5%2Ch4%2Ch3%2Ch2%2Ch1%2Cxl&baseStep=body&prefix=fs&useContainerWidth=false&includeFallbacks=false&useRems=true&remValue=16&decimals=2&previewFont=Inter&previewText=Almost+before+we+knew+it%2C+we+had+left+the+ground&previewWidth=1280*/
	--fs-body-xs: clamp(0.79rem, -0.02vi + 0.79rem, 0.78rem);
	--fs-body-s: clamp(0.89rem, 0.09vi + 0.87rem, 0.94rem);
	--fs-body: clamp(1rem, 0.23vi + 0.94rem, 1.13rem);
	--fs-body-l: clamp(1.13rem, 0.41vi + 1.02rem, 1.35rem);
	--fs-body-xl: clamp(1.27rem, 0.64vi + 1.1rem, 1.62rem);
	--fs-h6: clamp(1.27rem, 0.64vi + 1.1rem, 1.62rem);
	--fs-h5: clamp(1.42rem, 0.95vi + 1.19rem, 1.94rem);
	--fs-h4: clamp(1.6rem, 1.33vi + 1.27rem, 2.33rem);
	--fs-h3: clamp(1.8rem, 1.81vi + 1.35rem, 2.8rem);
	--fs-h2: clamp(2.03rem, 2.42vi + 1.42rem, 3.36rem);
	--fs-h1: clamp(2.28rem, 3.18vi + 1.49rem, 4.03rem);
	--fs-xl: clamp(2.57rem, 4.13vi + 1.53rem, 4.84rem);
	
	--fs-pre: clamp(0.97rem, calc(1.01rem + -0.05vw), 1rem);
	--text-s: clamp(0.89rem, calc(0.87rem + 0.08vw), 0.94rem);
    --text-xs: clamp(0.78rem, calc(0.79rem + -0.01vw), 0.79rem);
	
	/*PADDING*/
	--padding-xs: clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
	--padding-s: clamp(1.5rem, 1.5rem + 0vw, 1.5rem);
	--padding-m: clamp(1.5rem, 1.197rem + 1.515vw, 2.5rem);
	--padding-d: clamp(3rem, 2.394rem + 3.03vw, 5rem);
	--padding-l: clamp(4.5rem, 3.591rem + 4.545vw, 7.5rem);
	--padding-xl: clamp(6rem, 4.788rem + 6.061vw, 10rem);
	--padding-xxl: clamp(22.5rem, 21.6667rem + 4.1667vw, 25rem);
}


/* Default Body / p font settings */ 
p {
    font-size: var(--fs-body);
	font-weight: 400;
	line-height: 1.5;
	font-family: var(--body-font);
}

p {
	margin-bottom: 1.5rem;
}

/* Default Headings weight, margin, font-family */ 
h1, h2, h3, h4, h5, h6, 
.h1, .h2, .h3, .h4, .h5, .h6,
.gb-headline-xxl, .gb-headline-xl, .gb-headline-h1, .gb-headline-h2, .gb-headline-h3, .gb-headline-h4, .gb-headline-h5, .gb-headline-h6 {
	font-weight: 600;
	margin-bottom: .5em;	
	font-family: var(--headline-font);
}

/* Heading font-size and line-height */ 

.hxl{
    font-size: var(--fs-xl);
    line-height: 1.05;
}

h1, .h1 {
    font-size: var(--fs-h1);
    line-height: 1.05;
}

h2, .h2 {
font-size: var(--fs-h2);
    line-height: 1.1;
}

h3, .h3 {
    font-size: var(--fs-h3);
    line-height: 1.15;
}

h4, .h4 {
    font-size: var(--fs-h4);
    line-height: 1.1;
}

h5, .h5 {
    font-size: 1.375rem;
    font-size: var(--fs-h5);
    line-height: 1.25;
}

h6, .h6 {
    font-size: 1.25rem;
    font-size: var(--fs-h6);
    line-height: 1.4;
}

.pre-header, .gb-headline-pre {
    font-size: var(--fs-pre);
	text-transform: uppercase; 
	letter-spacing: .1em
}

/* Additional Body font-size */ 

.body-xl {
	font-family: var(--body-font);
    font-size: var(--fs-body-xl);
}

.body-l {
	font-family: var(--body-font);
    font-size: var(--fs-body-l);
}

.body-s {
	font-family: var(--body-font);
    font-size: var(--fs-body-s);
}

.body-xs {
	font-family: var(--body-font);
    font-size: var(--fs-body-xs);
}

/* Add top margin to blog post H2-H6 */

.single-post :is(h2, h3, h4, h5, h6) {
	margin-top: 1.5em;
}

/* Button Global Line Height */
.gb-button {
    line-height: 1em;
}

/* Remove bottom margin on last paragraph */
.gb-container p:last-child:last-of-type {
    margin-bottom: 0px;
}

.block-editor-block-list__layout .gb-container p:nth-last-child(2) {
    margin-bottom: 0px;
}

/* -- SECTIONS --  */
.gb-container-section-xs {
	padding:var(--padding-xs);
}

.gb-container-section-s {
	padding:var(--padding-s) var(--padding-xs);
}

.gb-container-section-m {
	padding:var(--padding-m) var(--padding-xs);
}

.gb-container-section-d {
	padding:var(--padding-d) var(--padding-xs);
}

.gb-container-section-l {
	padding:var(--padding-l) var(--padding-xs);
}

.gb-container-section-xl {
	padding:var(--padding-xl) var(--padding-xs);
}

/*aspect ratio*/
.ar-16-9 {
    aspect-ratio: 16/9;
}

.ar-9-16 {
    aspect-ratio: 9/16;
}

.ar-4-3 {
    aspect-ratio: 4/3;
}

.ar-1-1 {
	aspect-ratio: 1/1;
}


/* Container Widths */ 
:root{
	--width-m: 64rem;
	--width-s: 48rem;
	--width-xs: 40rem;
}

