html, 
body, 
*,*::before, 
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0    
}


:root {
    interpolate-size: allow-keywords;
}

body {
    background-image: linear-gradient(45deg, #0f0f0f 25%, #17191a 25%, #17191a 50%, #0f0f0f 50%, #0f0f0f 75%, #17191a 75%, #17191a 100%);
    background-size: 33.94px 33.94px;
    color: #333;
    display: grid;
    grid-template-areas: 'header''main''footer-testimonials''prev-next''footer';
    font-family: 'IBM Plex Sans', Arial, Sans-serif;
    font-size: 100%;
}



ul {
    margin-left: 0;
    margin-bottom: 24px;
}


/*=== UTILITIES ===*/
.hide { 
    display: none;
}

.show {
    display: block;
}

/*=== HEADER === */
header {
    grid-area: header;
    width: 100%;
    margin: 0 auto;
    min-height: 100px;
    background: transparent;
}

#siteHeader {
    background: #fff;
    border-top: solid 7px rgb(214, 33, 40);
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-content: center;
    margin-bottom: 16px;
    padding: 0 16px;
    width: 100%;
}

.logo-header {
   max-width: 200px;
}

.logo-header picture { 
    width: 100%;
}

.logo-header .logo-link img {
    width: 100%;
    height: unset;
}

/*=== HEADER NAVIGATION ===*/
nav {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    margin: auto;
}

.nav-links {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    
    
}


.nav-links a {
    flex: 1 1 auto;
    background-color: transparent;
    color: #000;
    font-weight: 900;
    padding: 8px 0px 8px 8px;
    margin: 2px 0;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    
    /*add a slash after the link in header */
    &::after {
        content: ' /';
    }

    /* remove the slash on last link and change it into more of a button */
    &:last-child {
        border: solid 3px rgb(214, 33, 40);
        color: rgb(214, 33, 40);
        padding: 6px 8px 4px 8px;
        
        &:after{ content: ''; }
    }
    
    /* change the color of the link on hover */
    &:hover {
        background-color: transparent;
        color: rgb(214, 33, 40);
        transition: all 300ms linear;
    }

    /* change the bg-color and color of the last link */
    &:last-child:hover {
        background-color: rgb(214, 33, 40);
        color: #fff;
        &:after{ content: ''; }
    }

    /* remove the slash from the second to last link */
    &:nth-last-child(2)::after {
        content: '';
        padding-right: 8px;
    }
}


.telephone {
    color: black;
    font-weight: 900;
    font-size: 2em;
    text-decoration: none;
}

/*=== ENDS SITE NAVIGATION ===*/


/* ==== PAGINATION ====*/
.pagination {
    width: 80%;
    margin: 0 auto;
    padding: 8px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
}

.pagination a {
    background-color:#dc3545;
    color: #fff;
    padding: 8px 16px;
    font-size: 1em;
    font-weight: 700;
    text-decoration: none;
}

.pagination a:hover {
    background-color: rgb(130, 17, 20);
    color: white;
    transition: all 300ms linear;
}

.btn-next {
    margin-left: auto;
}


.btn-previous {
    margin-right: auto;
}


/* === MAIN CONTENT ===*/

main {
    width: 100%;
    margin: auto;
}

.main-content {
    width: 80%;
    margin: 0 auto;

    @media (max-width: 460px) {
        width: 100%;
    }
}

h2 {
    font-size: 2.5em;
    line-height: 40px;
}


p {
    font-weight: 400;
    line-height: 24px;
    margin-bottom: 1em;
}

label {
    font-weight: 700;
}

li {
    line-height: 24px;
    margin-left: 0;
    margin-bottom: 12px;
    padding: 0;
}


/*=== HOME PAGE ===*/
#contactContent {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(/images/common/barndominium.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
    grid-area: main;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    min-height: 100vh;
}

#contactPage h1 {
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    font-family: 'Epilogue';
    font-weight: 900;
    font-size: clamp(3rem, 2.5vw, 5.5em);
    line-height: .85em;
    margin: 32px 16px 16px 16px;
}

#homePage h1 {
    color: #333;
    text-transform: uppercase;
    font-family: 'Epilogue';
    font-weight: 900;
    font-size: clamp(2rem, 2.25vw, 2.9em);
    line-height: .85em;
    margin: 16px 16px 16px 16px;
    text-align: center;
}   

#homeContent ul,
#contactContent ul {
    margin-left: 32px;
}

#homeContent li,
#contactContent li {
    color: #fff;
    font-size: 2em;
    line-height: 32px;
    margin-bottom: .5em;
}

#featuredProjects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding: 0;
    
    .card a {

        border: solid 1px rgb(255 255 255 / 0);
        color: #fff;
        display: block;
        width: 100%;
        height: 100%;
        padding: 8px;
        text-decoration: none;
    }

    .card a:hover {
        color: #fff;
        background: rgb(255 255 255 / 0.2);
        border: solid 1px rgb(255 255 255 / 0.3);
        transition: all 300ms linear;
    }

}



/* === ABOUT PAGE === */

#aboutContent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr) );
    grid-template-rows: repeat(2, auto);
}

.history, 
.what-we-do {
  background: rgb(255 255 255 / .8);
  margin: 8px;
  padding: 32px;
  box-shadow: 6px 6px 5px 0 rgba(0,0,0,0.2);
}

.what-we-do {
    background: #4d595e;
    color: #fff;
}


#aboutContent p, 
#aboutContent li {
    font-size: 1.5em;
    line-height: 1.125em;
}


ul > ul {
    margin-left: 32px;
}

#aboutContent h2 {
    margin-bottom: 24px;
}

.call-us {
    background: #000;
    padding: 16px;
    color: #fff;
    font-weight: 900;
    font-size: 3em !important;
    text-align: center;
}

.call-us a {
    color: rgb(214, 33, 40);
}

.call-us a:hover {
    color: #fff;
    transition: color 300ms linear;
}




/* ==== TESTIMONIALS ==== */

.featured-testimonials {
    background: #fff;
    width: 80%;
    margin: 8px auto;
    padding: 8px;

    @media (max-width:480px) {
        width: 100%;
    }
} 

.testimonial-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    position: relative;    
}

.testimonial-wrap .testimonial {
    position: relative;
    height: 150px;
    overflow: hidden;
    margin: 0 8px;
    padding: 16px;
    transition: height 300ms linear;
    box-shadow: 6px 6px 5px 0 rgba(0,0,0,0.2);
}

.testimonial-wrap .testimonial::after {
    content: '';
    width: 100%;
    height: 50px;
    display: block;
    background-image: linear-gradient(to bottom, transparent, rgb(255 255 255 / 0.9));
    position: absolute; 
    bottom: 0;
    left: 0;
}
.read-more-less {
    position: absolute; 
    bottom: 8px;
    right: 8px;
    z-index: 100; 
}

.read-more,
.read-less {
    background-color: #dc3545;
    border: solid 2px #dc3545;
    border-radius: 0;
    color: #fff;
    font-size: 1em;
    padding: 6px 12px 8px 12px;
    text-decoration: none;
    transition: all 300ms linear;
}

.read-more:hover,
.read-less:hover {
    background-color: #fff;
    border: solid 2px #dc3545;
    color: #dc3545;
    transition: all 300ms linear;
}

.lnk-see-all-testimonials {
    display: block;
    border: solid 4px #dc3545; 
    color: #dc3545;
    font-size: clamp(1em, 1.5vw, 1.25em);
    font-weight: 900;
    padding: 8px 16px;
    text-align: center;
    margin: 16px auto;
    width: 280px;
    text-decoration: none;
    
    &::after {
     content: '>>';
    }

    &:hover {
    background-color: #dc3545;
    color: #fff;
    transition: all 300ms linear;
    }

}

/*=== TESTIMONIAL PAGE ===*/
#testimonialGrid {
    /* display: flex;
    flex-flow: row wrap;
    justify-content: flex-start; */
}

#testimonialGrid .testimonial {
    flex: 1 1 48%;
    margin: 4px 8px;
}

#testimonialGrid .testimonial { 
    background: rgb(255 255 255 / .8);
    /* border: solid 4px #333; */
    border-radius: 0;
    margin: 8px;
    padding: 8px;
    box-shadow: 6px 6px 5px 0 rgba(0,0,0,0.2);
} 

.testimonial p {
    font-size: 1.25em;
    line-height: 1.25em;
    margin-inline: 8px;
   
}


.satisfied-client {
    font-style: italic;
}


.testimonial summary {
    font-size: 2em;
    font-weight: 900;
    margin-left: 40px;
    cursor: pointer;
    position: relative;
    transition: color 300ms linear;
}

.testimonial summary:hover {
    color: rgb(214, 33, 40);
}

.details summary::marker {
     content: none;
}

.details summary::before {
    content: '\027BD';
    position: absolute;
	inset-inline-start: -2.05rem;
	inset-block-start: -0.05rem;
	transition: rotate 0.2s;
   
}

.details[open] summary {
    color: #000;
}

.details[open] summary::before {
    rotate: 90deg;
	inset-block-start: 0.8rem;
    color: rgb(214, 33, 40);
    content: '';
    background-image: url(../images/common/square-xmark.svg);
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
}

.details p:last-of-type {
    padding-bottom: 32px;
}  

.details::details-content {
    display: block;
	margin-inline: 2rem;
	block-size: 0;
	overflow: hidden;
	transition-property: block-size, content-visibility;
	transition-duration: 0.5s;
	transition-behavior: allow-discrete;

}

.details[open]::details-content {
    /* Fallback for browsers that don't support calc-size() function */
	block-size: auto;
	
	/* calc-size() function allows transition to height: auto; */
	block-size: calc-size(auto, size);
} 



/*==== FOOTER ====*/
footer {
    grid-area: footer;
    min-height: 300px; 
    width: 100%;
    margin: 16px auto;
    padding: 8px;
}

footer h2 {
    flex: 1 1 100%;
    margin: 0;
}


.footer-ad {
    border-radius: 8px;
}

.footer-ad svg {
  width: 24px;
  fill: #fff;
}

.footer-ad img {
    width: 100%;
}

#siteFooter {
    background: #323d44cf;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px, 1fr));
    gap: 8px;
}

.footer-ad a {
    padding: 8px;
    display: block;
    width: 100%;
    height: 100%;
}

.footer-ad a:hover {
    color:#dc3545 !important;
    border-color: #FFF;
    transition: all 300ms linear;
    background-color: rgba(0 0 0 / 0.2);
    transition: all 300ms linear;
}

#tayValleyFooterAd {
    background: linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0.2) ), url('/images/common/Winchester_black.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    border: solid 4px #000;
    position: relative;
    min-height: 330px;
}

#tayValleyFooterAd h3 {
    position: absolute;
    top: 0px;
    left: 20px;
    right: 20px;
    z-index: 100;
    font-weight: bold;
    font-size: clamp(1.5em, 2vw, 3em);
    color: white !important;
    text-shadow: 2px 2px rgba(0,0,0,0.3);
}

#marlaneGardensFooterAd {
    background: linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0.2) ), url('/images/common/MarLane-Gardens-Ads.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top right;
    border: solid 4px #000;
    min-height: 300px;
    position: relative;
}

#marlaneGardensFooterAd h3 {
    position: absolute;
    top: 0px;
    left: 20px;
    right: 20px;
    z-index: 100;
    font-weight: bold;
    font-size: clamp(1.5em, 2vw, 3em);
    color: white !important;
    text-shadow: 2px 2px rgba(0,0,0,0.3);
}






/*=== FORM ===*/ 
form {
    box-sizing: border-box; 
    
}

form label {
    display: block;
    padding: 4px;
    margin: 8px 0 0 0;
    font-size: 1.25em;
}

input {
    height: 40px;
    padding: 4px;
    width: calc(100% - 16px);
    font-size: 1.25em;
}

form textarea {
    padding: 8px;
    font-size: 1.5em;
}

#formContact {
    color: #fff;
    background-color: rgba(0,0,0,0.3);
    border: solid 0 transparent;
    padding: 0 32px;
}

#formContact h2 {
    margin-top: 16px;
}

.btn-wrap {
    margin: 24px 16px;
}

#btnFormSubmit {
 background-color: rgb(214, 33, 40);
 border: none;
 color: #fff;
 font-size: 1.25em;
 padding: 12px 8px 12px 12px;
 transition: background-color 300ms linear;
 display: flex;
 align-items: center;
}

#btnFormSubmit:hover {
   background-color: rgb(133, 24, 27);
   cursor: pointer;
}

#btnFormSubmit svg {
    width: 24px;
    fill: #fff;
    margin: 0 8px;
}

#message {
    width: 100%;
    height: 300px;
}

.btn-wrap {
    margin: 8px;
}

button {
    box-sizing: border-box;
    padding: 4px 8px 8px 8px;
}


.btn-submit {
    height: 48px;
    font-size: 1.75em;
    text-transform: uppercase;
}


.invalid-feedback,
.empty-feedback {
  display: none;
}

.was-validated :placeholder-shown:invalid ~ .empty-feedback {
  display: block;
}

.was-validated :not(:placeholder-shown):invalid ~ .invalid-feedback {
  display: block;
}

.is-invalid,
.was-validated :invalid {
  border-color: #dc3545;
  border-width: 2px;
  
}

.required-star {
    color: #dc3545;
}

/*=== ENDS FORM ===*/


/* === BLOG === */

#projectContent,
#postContent {
    display: grid;
    grid-template-columns: 1fr 200px;
    grid-template-areas: 'content posts';
    gap: 8px;
    width: 80%;
}


.cover-image {
    width: 100%;
    height: 300px;
}


.cover-image img {
    width: 1000%;
    height: 100%;
    object-fit: cover;
} 

.card-blog-post {
    background-color: #79888f;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: solid 4px rgb(41, 1, 2);
    box-shadow: 5px 6px 5px rgba(0,0,0,0.4);
    margin-bottom: 0;
    padding: 8px;
    min-height: 430px;
}



.blog-post-link {
    display: flex;
    flex-flow: column nowrap;
    color: #fff;
    text-decoration: none;
    height: 100%;
    width: 100%;
   
}

#blog-post h1 {
    font-family: Epilogue;
    font-weight: 900;
    font-size: 2.5em;
    margin-top: 24px;
    margin-bottom: 0;
    line-height: 48px;
    text-transform: none;
}

.blog-title {
    font-family: Epilogue;
    font-weight: 900;
    font-size: 2.5em;
    line-height: 48px;
    text-transform: none;
}

.card-blog-post .blog-title {
    font-size: clamp(2em, 2vw, 3em);
    line-height: 36px;
    margin: 8px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.card-blog-post img {
    width: 100%;
}

#postLinks {
    background: #fff;
    padding: 15px;
    margin: 16px 0;
    height: fit-content;
}

#postLinks a {
    color:rgb(41, 1, 2);
    display: block;
    font-size: 1em;
    font-weight: 900;
    margin: 0 0 16px 0;
    text-decoration: none;
} 

#postLinks a:hover {
    color:rgb(214, 33, 40);
    transition: color 300ms linear; 
}

#blog-post h3 
 {
    color:rgb(214, 33, 40);
    font-family: Epilogue;
    font-weight: 900;
    font-size: 2em;
    text-transform: uppercase;
    line-height: 40px;
    margin-bottom: 0;
}

.blog-title a {
    color: #333;
    text-decoration: none;
}

.blog-title a:hover {
    color: rgb(214, 33, 40);
    transition: color 300ms linear; 
}

.project-post,
.blog-post {
    background: #fff;
    width: 100%;
    min-width: 300px;
    margin: 16px auto;
    padding: 0 32px 32px;
}

.blog-post-banner {
 width: 100%;
}

.blog-post-banner img {
    width: 100%;
}

.project-header {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    margin-inline: 0;
    position: relative;
    padding: 0 8px;
}

.tasks  {
    border-radius: 4px 4px 0 0;
    position: absolute;
    top: 65%; 
    left: 8px;
    z-index: 1000;
    padding: 0;
    background: rgb(255 255 255 / 0.9);
    width: calc(66% - 8px);

    @media (max-width: 760px) {
        width: calc(100% - 16px);
        
    }

    @media (max-width: 408px) {
        width: calc(100% - 16px);
        
    }
}

.tasks ul {
    margin-inline: 16px;
    padding-left: 16px;
}

.tasks summary {
    background: #bdc4c9;
    border-radius: 4px 4px 0 0;
    color: #000;
    width: 100%;
    font-size: 1.75em;
    font-weight: 900;
    margin-inline: 0;
    padding-left: 40px;
    width: 100%;

    &::marker {
        content: none;
    }

    &::before {
        content: '\027BD';
        position: absolute;
        inset-inline-start: 8px;
        inset-block-start: 0;
        transition: rotate 0.2s;
    }
}

.tasks summary:hover {
    color: rgb(214, 33, 40);
    cursor: pointer;
    
}

.tasks[open] summary {
    
    &::before {
        content: '';
        background-image: url(../images/common/square-xmark.svg);
        background-repeat: no-repeat;
        width: 20px;
        height: 20px;
        rotate: 90deg;
        inset-block-start: 0.6rem;
    }
}


.tasks[open] {
    border-radius: 4px 4px 0 0;
    box-shadow: 5px 5px 10px rgb(0 0 0 / 0.4);
}


#projectPosts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr ));
    grid-auto-rows: 1fr;
    min-height: 300px;
    gap: 16px;
}


#projectPosts a {
    border: solid 1px rgb(255 255 255 / 0);
    color: #fff;
    display: block;
    width: 100%;
    height: 100%;
    padding: 8px;
    text-decoration: none;
    transition: color 300ms linear;

    &:hover {
        color: #fff;
        background: rgb(255 255 255 / 0.2);
        border: solid 1px rgb(255 255 255 / 0.3);
        transition: all 300ms linear;
    }
}



.tasks ul {
    font-size: 1.5em;
    margin-top: 16px;
}

#blogGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 16px;
}

.card-blog-post a picture,
.card-blog-post a picture img {
    width: 100%;
}

.blog-post p {
    font-size: 1.75em;
    line-height: 40px;
    font-weight: 400;
    margin: 0 0 40px 0;
}

.post-date {
    margin-top: 0;
    font-size: 1em !important;
    font-weight: bold !important;
    font-style: italic;
}

h1 {
    font-family: Epilogue, sans-serif;
    font-size: 28px;
    text-transform: uppercase;
    font-weight: 900;
    margin: 8px;

    @media (max-width: 440px) {
        font-size: 20px;
    }
}

.blog-post h2 {
    font-family: Epilogue, sans-serif;
    font-weight: 700;
    font-size: 2em;
}

.content {
    background: #bdc3c7cf;
    margin: 0 auto;
    padding: clamp(0px, .5vw, 16px);
    min-width: 300px;
    @media (max-width:360px){
        padding: 0;
    }
}

/*==== IMAGES ==== */
.img-right {
    margin: 16px;
    float: right;
}

.img-left {
    margin: 16px;
    float: left;
}

.img-width-300 {
    width: 300px;
}

.img-width-300 img {
    width: 100%;
}


.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
    padding: 8px;
    position: relative;
}

.gallery picture {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.gallery picture img {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    object-fit: cover; 
}

.gallery img {
    width: 100%;
}


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

    #projectContent,
    #postContent {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas: 'content' 'posts';
        gap: 8px;
        width: 100%;
    }
}


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

    nav {
        justify-content: center;
    }
}