@import 'flickity.css';
@import 'dist/jquery.fancybox.css';

:root {
    --white: #fff;
    --black: #222; 
    --text: #555; 
    --alternate: #1A3F89; 
	--alternate2: #006A36; 
	--darker: #124f9b; 
	--transgrey: rgba(0,0,0,0.1);
	--othercolour: #d82727; 
	--othercolour2: #f22929; 
	--pale: #f0f0f0; 
    --coal: #444; 
    --background: #666;
    --light: #444; /* not light really */
    }


body{
    background-color: var(--black);
    margin: 0;
    font-family: system-ui,  sans-serif, sans;
}
img{
    max-width: 100%;
    border: 0;
}
input, textarea, select {
    font-family: system-ui,  sans-serif, sans;
	font-size: 1rem;
	padding: 7px;
	background-color: var(--white);
	border: 2px solid var(--alternate2);
	max-width: 100%;
    color: var(--text); 

}
table {
	width: 100%;
	border-collapse: collapse;
}
nav .menu{
    width: 50px; 
    display: block;
    margin: auto; 
    padding: 0.5rem; 
}
nav ul a{
    color: var(--white); 
    padding: 1rem 0.5rem;
    text-decoration: none;
    transition: 0.4s;
}
nav ul a:hover{
    background-color: var(--alternate2);
    color: var(--white); 
}
nav li{
    display: grid;
}
nav{
    background-color: var(--pale); 
}
nav ul{
    display: flex;
    margin: 0 auto;
    max-width: 1000px;
    list-style-type: none; 
    padding: 0 1rem 0 1rem;
}
#nav > div a {
	display: none;
}
header{
    background-color: var(--white); 
    padding: 1rem; 
}
header img{
    margin: auto;
    display: block;
    width: 600px; 
}
main, 
footer, 
.herotext{
    color: var(--white); 
    line-height: 1.7;
}
.green{
    background-color: var(--alternate2);
    color: var(--white);
    padding: 1rem;
    text-align: center;
    text-transform: uppercase;
    font-size: 1.2rem;
}
main, 
.herotext{
    font-size: 1.1rem;
}
main > div, 
footer > div, 
.herotext{
    max-width: 1000px;
    margin: auto; 
    padding: 3rem 1rem; 
    color: var(--white); 
}
main h1, 
.herotext h1{
    font-size: 2rem;
    font-weight: 400;
    text-wrap: pretty;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    letter-spacing: 2px;
}
main h3, 
.herotext h3{
    font-size: 1.5rem;
    font-weight: 400;
    text-wrap: pretty;
}
footer{
    background-color: var(--coal);
    margin-top: 2rem;
}
.grid {
	display: grid;
	gap: 0.5rem;
}
main a, 
footer a{
    color: var(--white); 
    text-decoration: none;
}
footer img{
    width: 50px; 
}
footer > div{
    display: grid;
    gap: 1rem; 
}
.front img{
    display: block;
    width: 100%; 
}
.contactform{
	margin: auto;
	transition: 0.5s;
}
.contactform div{
    padding: 0.5rem;
}
.contactform input[type=submit],
.contactform input[type=button],
.contactform input[type=text],
.contactform input[type=email],
.contactform input[type=date],
.contactform input[type=tel],
.contactform textarea,
.contactform label
{
    font-size: 16px;
	border: 2px solid var(--alternate2); 

}
.contactform * + p{
    margin-top: 0; 
}
.contactform label {
    display:block;
    margin-bottom: 10px;
}
.contactform label > span{
    display: inline-block;
    width: 250px;
}
.contactform input[type=text],
.contactform input[type=email],
.contactform input[type=tel],
.contactform input[type=password],
.contactform input[type=date],
.contactform input[type=number]
{
    background: var(--pale);
    width: 275px;
    outline: none;
    padding: 10px;
}
.contactform textarea{
    padding: 10px;
    background: var(--pale);
    outline: none;
    width: 275px;
    overflow: hidden;
    resize:none;
    min-height:100px;
}

.contactform textarea:focus,
.contactform input[type=text]:focus,
.contactform input[type=email]:focus,
.contactform input[type=email] :focus
{
    border: 2px solid var(--alternate2);
}

.contactform input[type=submit],
.contactform input[type=button]{
    background: var(--alternate2);
    border: none;
    padding: 8px 10px 8px 10px;
    color: #fff;
	width: 300px;
}
.contactform input[type=submit]:hover,
.contactform input[type=button]:hover{
background: #394D61;
}
.contactform input:not([type="submit"]),
.contactform textarea {
    border: 2px solid var(--alternate2);

}
.contactform:focus-within input:not([type="submit"]):invalid,
.contactform:focus-within textarea:invalid {
	border: 2px solid red !important;

}
.contactform:focus-within input:not([type="submit"]):valid,
.contactform:focus-within textarea:valid {
	border: 2px solid var(--alternate2) !important;

}
.contactform:focus-within input[type="radio"]:invalid{
	outline: 2px solid red;
    outline-offset: 2px;
}
.contactform div:nth-of-type(4n+3), 
.contactform div:nth-of-type(4n+4){
    background-color: var(--nearlywhite);
}
.contactform > div{
    position: relative;
}
.contactform > div:has(textarea:required)::after, 
.contactform > div:has(input:required)::after, 
.contactform > div:has(select:required)::after{
    content: "\002A";
    color: var(--pale); 
    font-size: 2rem;
    inset: 0 1rem auto auto; 
    position: absolute;
}
.contactform > div:has(textarea:required)::after{
    inset: 0 -1rem auto auto; 
}
.contactform div:nth-of-type(4n+3), 
.contactform div:nth-of-type(4n+4){
    background-color: var(--transgrey);
}
#map{
    height: 600px; 
    max-height: 70vh;
}
div#form{
    background-color: var(--alternate);
    max-width: none; 
}
div#form form{
    max-width: 1000px;
    display: block;
    margin: auto;
}
div#form h4,
div#form p{
    max-width: 1000px; 
    margin-inline: auto;
}
.page {
	position: relative;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	height: 300px;
}
.logos{
    background-color: var(--white);
    padding: 1rem 0; 

}
.logos  .gallery-cell{
    display: grid;
    justify-content: center;
}
.logos img{
    max-width: 160px;
    height: auto; 
}
.logos img[src*="svg"]{
    width: 160px; 
}
.logos .gallery-cell div{
    padding: 1rem; 
    display: grid;
    max-width: 200px;
    max-height: 200px;
    justify-content: center;
    align-items: center;
}

.picturegrid {
	display: grid;
	grid-template-columns: repeat(auto-fill,minmax(calc(250px + 7vw), 1fr));
	justify-items: center;
    gap: 0.5rem; 
}
section.cards{
    display: grid;

}
section.cards > .card{
    display: grid;
    color: var(--white); 
}
section.cards h3{
    margin: 0;
}
section.cards h3 a, 
section.cards h4{
    display: block;
    font-weight: 400;
}
section.cards h4{
    font-size: 1.2rem; 
    margin: 0;
}
section.cards .cardtop a:hover{
    background-color: var(--coal);
    color: var(--background); 
    transition: 0.4s;
}
section.cards .cardtop a, 
section.cards .text{
    padding: 1rem; 
}
section.cards a{
    color: var(--white); 
    text-decoration: none;
}
section.cards .text.moretext{
    grid-row: span 2;
}
section.cards.cards > .card img.leaf {
    margin: auto;
    width: 150px;
    object-fit: unset;
    display: block;

}
section.cards img{
    margin: auto;
    display: block;
}
section.cards .more{
    padding: 0 1rem 1rem 1rem;
}
section.cards blockquote{
    display: none;
}
section.cards .more a{
    background-color: var(--grey);
    border-radius: 6px;
    display: block;
    color: var(--background);
    text-transform: uppercase;
    transition: 0.4s;
    padding: 0.5rem 1rem;
    width: fit-content;
}
section.cards .more a:hover{
    background-color: var(--colour);
}
.page.contain{
    background-size: contain; 
    background-color: var(--pale);
}
section.cards .more{
    padding: 0 1rem 1rem 1rem;
}
section.cards blockquote{
    display: none;
}
section.cards .more a{
    background-color: var(--alternate);
    color: var(--white); 
    border-radius: 6px;
    display: block;
    text-transform: uppercase;
    transition: 0.4s;
    padding: 0.5rem 1rem;
    width: fit-content;
}
section.cards .more a:hover{
    background-color: var(--alternate2);
}



@media only screen and ( min-width: 600px ) {

    .front > div > img {
        object-fit: cover;
        height: 100%;
        width: 100%;
    }
    .opening{
        display: grid;
        grid-template-columns: 1fr 1fr;
            }
    .opening > div:first-of-type{
        grid-column: span 2;
    }
    .opening > div{
        padding-right: 1rem; 
    }
    .logos  .gallery-cell{
        grid-template-columns: 1fr 1fr;
    }
    .picturegrid:not(:has(.contain)) > div {
        height: 40vh;
        max-height: 500px;
    }
    .picturegrid > div {
        width: 100%;
        text-align: center;
        position: relative;
    }
    .picturegrid img {
        object-fit: cover;
        object-position: center;
        height: 100%;
        width: 100%;
    }
    }

@media only screen and ( min-width: 800px ) {
    /* .front {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    } */
    .heropicture{
        padding: 3rem 0; 
    }
    nav .menu{
        display: none;
    }
    nav li:nth-child(3){
        margin-left: auto;
    }
    .front {
        gap: 0.5rem;
    }
    .contactform {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }


    nav{
        background-color: var(--alternate); 
    }
    nav > div{
        display: none;
    }
    .logos  .gallery-cell{
        grid-template-columns: 1fr 1fr 1fr;
    }
    .logos .gallery-cell div{
        aspect-ratio: 1;
    } 
    .counter{
        background-image: url('/images/trade-counter.webp');
        background-repeat: no-repeat;
        background-size: cover;
        margin-block: 2rem; 
        background-position: center center;
    }
    .counter > div{
        background-color: rgba(26, 63, 137,0.9);
        height: 100%; 
        display: grid;
        align-items: center;
    }
    .counter h2{
        font-size: 4rem;
        line-height: 4rem;
        margin-block: 2rem;
        font-weight: normal;
        text-transform: uppercase;
    }
    .homepage{
        margin-block: 2rem;
    }
    section.cards{
        display: grid;
        grid-template-columns: repeat(auto-fill,minmax(calc(200px + 7vw), 1fr));
        grid-auto-rows: auto 350px auto auto;
        container-type: inline-size;
    }
    section.cards.landscape{
        grid-template-columns: repeat(auto-fill,minmax(calc(150px + 7vw), 1fr));
        grid-auto-rows: auto 350px auto auto;
    }
    section.cards > .card{
        display: grid;
        grid-row: span 4;
        grid-template-rows: subgrid;
        margin: 0.5rem; 
        background-color: var(--light);
    }
    section.cards > .card img{
        object-fit: cover;
        object-position: center;
        height: 100%; 
        width: 100%; 
    }
    .four04{
        font-size: 10rem; 
    }
}
@media only screen and ( min-width: 1000px ) {
    nav ul a{
        padding: 1rem; 
    }

    footer > div{
         grid-template-columns: 1fr 1fr 1fr;
    }
    footer > div > div:last-of-type{
        text-align: right;
    }
    main > div, 
    footer > div{
        padding: 4rem 1rem; 
    }
    .herotext{
        padding: 3rem;  
}
    header{
        padding-block: 2rem;
    }
    /* header{
        padding-block: 7rem; 
        background-image: url('/images/shop.jpg');
        background-position: center center;
        background-size: cover;
    } */
    /* .front{
        grid-template-columns: 2fr 1fr;
    } */
    .logos  .gallery-cell{
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    }
    /* .picturegrid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    } */
    .picturegrid img {
        object-fit: cover;
    }
    section.cards{
        padding: 1rem; 
        justify-content: center;
    }
    section.cards > .card{
        border-radius: 6px;
    }
    section.cards > .card img, 
    .picturegrid img{
        object-fit: cover;
    }
} 



@media only screen and ( max-width: 800px ) {

    #nav > div a
    {
    width: 1.25rem; 
    height: 1.25rem; 
    text-align: center;
    margin: auto;
    background-repeat: no-repeat;
    background-size: 75%;
    background-position: center;
    position: relative;
    padding: 1rem; 
    }
    #nav:target > ul {
        display: grid;
        background-color: var(--alternate);
    }
    #nav:not( :target ) > a.open,
    #nav:target > a.close
    {
    display: block;
    }
    #nav > div a.open{
        background-image: url('images/menu.svg');
        text-indent: -9999px; 
    }
    #nav:target > div a.close{
      background-image: url('images/close.svg');
      text-indent: -9999px; 
    }
    #nav:not(:target) > div a.open, #nav:target > div a.close {
        display: block;
    }
    #nav > ul {
        height: auto;
        display: none;
        list-style: none;
        padding: 0; 
    }
    #nav > ul li{
        text-align: center;
    }
    #nav > div .phone, 
    #nav > div .email{
        display: block;
        height: 2.5rem;
        width: 2.5rem; 
    }
    #nav > div{
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem; 
        max-width: 300px;
        margin: auto; 
    }
    #nav ul li:nth-of-type(1), 
    #nav ul li:nth-of-type(2){
        display: none;
    }
    a[href^="mailto:"],
    h1,
    h2
    {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-all;
    word-break: break-word;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
    }
    input,
    textarea, 
    select{
        width: auto !important; 
    }


} 

@media only screen and ( max-width: 400px ) {
    #nav > div .phone, 
    #nav > div .email{
        height: 2rem;
        width: 2rem; 
    }
    #nav > div a
    {
    width: 1rem; 
    height: 1rem; 
    }
    #nav > div{
        gap: 0; 
    }
}





@media only screen and ( min-width: 900px ) and (max-height: 1300px) {
    .page {
        height: 60vh;
      }
      .counter{

        background-attachment: fixed;
        height: 80svh; 
    }

} 