*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}

/* Begin our styles for Peak Plumbing & Mechanical services */

/* Variables for color and font sizes */
:root {
    /* Site colors */
    --main-blue: #2B3D57;
    --secondary-blue: #2A9AB9;

    /* Font sizes */
    --step--2: clamp(0.6076rem, 0.5686rem + 0.1954vw, 0.72rem);
    --step--1: clamp(0.7292rem, 0.6697rem + 0.2971vw, 0.9rem);
    --step-0: clamp(0.875rem, 0.788rem + 0.4348vw, 1.125rem);
    --step-1: clamp(1.05rem, 0.9261rem + 0.6196vw, 1.4063rem);
    --step-2: clamp(1.26rem, 1.0868rem + 0.8658vw, 1.7578rem);
    --step-3: clamp(1.512rem, 1.2736rem + 1.1918vw, 2.1973rem);
    --step-4: clamp(1.8144rem, 1.4902rem + 1.6212vw, 2.7466rem);
    --step-5: clamp(2.1773rem, 1.7404rem + 2.1843vw, 3.4332rem);
}

/* Setting some site wide styles */
body {
    font-family: "Lato", sans-serif;
    font-size: var(--step--1);
    color: var(--main-blue);
}

img {
    display: block;
}

h1 {
    font-size: var(--step-2); 
}

h2 {
    font-size: var(--step-1);
    padding: 0 0 2rem 0;
}

h3 {
    font-size: var(--step-0);
    padding: 0 0 1.25rem 0;
}

p {
    line-height: 1.5rem;
    padding: 0 0 1.25rem;
}

p:last-child {
    padding: 0;
}

a {
    text-decoration: none;
    color: var(--main-blue);
}

.contact-button {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: var(--main-blue);
    border-radius: .25rem;
    color: #ffffff;
    padding: 1em;
    transition: all 250ms;
    user-select: none;
}

@media (any-hover: hover) {
    .contact-button:hover {
        transform: translateY(-1px);
        background-color: var(--secondary-blue);
    }
}

.instagram-icon img {
    width:  var(--step-0) !important;
    height: var(--step-0) !important;
}

/* Main navigation */

#main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    text-transform: uppercase;
    width: 90%;
    margin-inline: auto;
    animation: fadeIn 1.5s ease-in-out;
}

#main-nav #logo img {
    width: 80px;
    height: 44px;
}

#main-nav-links {
    position: fixed;
    left: -35%;
    top: 0;
    flex-direction: column;
    width: 35%;
    height: 100%;
    text-align: center;
    transition: left 0.6s;
    background-color: var(--main-blue);
    z-index: 3;
}

#main-nav-links, #extra-nav-items {
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-nav-links li {
    padding: 0;
    letter-spacing: .1em;
    line-height: 13px;   
    padding: 0 0 2rem 0;
}

#main-nav-links li:last-child {
    padding: 0;
}

#main-nav-links a {
    color: #ffffff;
}

#extra-nav-items a {
    margin-right: .5em;
}

#extra-nav-items a:nth-child(2) {
    margin-right: 0;
}

#extra-nav-items a:last-child {
    margin: 0 0 0 .5em;
}

@media (any-hover: hover) {
    #main-nav-links a {
        position: relative;
        padding: .5em 0;
    }

    #main-nav li a:after {    
        background: none repeat scroll 0 0 transparent;
        bottom: 0;
        content: "";
        display: block;
        height: 2px;
        left: 50%;
        position: absolute;
        background: var(--secondary-blue);
        transition: width 0.3s ease 0s, left 0.3s ease 0s;
        width: 0;
    }
    
    #main-nav li a:hover:after { 
        width: 100%; 
        left: 0; 
    }
    
    #main-nav li a:hover {
        color: var(--secondary-blue);
    }
}

#main-nav-links.active {
    left: 0;
}

#main-nav-bars {
    padding: 0 0 0 0;
}

#main-nav-bars .bar {
    display: block;
    width: 20px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--main-blue);
}

#main-nav-bars.active .bar:nth-child(2) {
    opacity: 0;
}

#main-nav-bars.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#main-nav-bars.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media screen and (min-width: 370px) {
    #main-nav #logo img {
        width: 100px;
        height: 55px;
    }
}

@media screen and (min-width: 600px) {
    #main-nav #logo img {
        width: 140px;
        height: 77px;
    }
}

@media screen and (min-width: 1000px) {
    #main-nav #logo img {
        width: 140px;
    }

    #main-nav-links {
        position: relative;
        left: auto;
        width: auto;
        flex-direction: row;
        justify-content: space-between;
        background-color: transparent;
    }

    #main-nav-links li {
        padding: 0 2.5rem 0 0;
    }

    #main-nav-links a {
        color: var(--main-blue);
    }

    #main-nav-bars {
        display: none;
    }
}

/* Header content */

#header-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    background-image: url('images/header-image-small.webp');
    background-size: cover;
    background-position: center;
    height: 20%;
    min-height: 400px;
}

#header-content::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.55);
    z-index: 1;
}

#header-content-text {
    width: 85%;
    font-weight: 300;
    z-index: 2;
    animation: fadeInUp 1s ease-in-out .5s forwards;
    opacity: 0;
}

#header-content h1, #header-content h2 {
    text-shadow: 1px 1px 2px #000;
}

#header-content h1 {
    font-size: var(--step-3);
    padding: 0 0 .6rem 0;
    line-height: 1.2em;
}

#header-content h2 {
    font-size: var(--step-2);
    padding: 0 0 1rem 0;
    line-height: 1.4em;
}

#header-content .contact-button {
    font-size: var(--step-0);
}

@media screen and (min-width: 700px) {
    #header-content .mobile-break {
        display: none;
    }

    #header-content {
        background-image: url('images/header-image-medium.webp');
        min-height: 500px;
    }
}

@media screen and (min-width: 700px) {
    #header-content {
        background-image: url('images/header-image-medium.webp');
    }
}

@media screen and (min-width: 1000px) {
    #header-content {
        background-image: url('images/header-image-large.webp');
    }
}

@media screen and (min-width: 1400px) {
    #header-content {
        min-height: 700px;
    }
}

@media screen and (min-width: 1600px) {
    #header-content {
        background-image: url('images/header-image-extra-large.webp');
    }
}

/* CONTENT SECTIONS STYLES */

.content-section {
    position: relative;
    width: 90%;
    max-width: 1400px;
    margin-inline: auto;
    padding: 2rem 0;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 250ms ease-in, transform 500ms ease-in;
}

.fade-in-up.scrolled-in {
    opacity: 1;
    transform: translateY(0);
}

.new-bg-color-wrap {
    width: 100%;
    background-color: var(--main-blue);
    background-image: linear-gradient(to bottom right, #2B3D57,#2A9AB9);
}

.new-bg-color-wrap h2 {
    color: #fff;
}

.columns {
    display: grid;
    grid-template-columns: auto;
    column-gap: 1rem;
    row-gap: 1rem;
}

.columns img {
    width: 100%;
    height: 100%;
}

/* ABOUT CONTENT SECTIONS STYLES */

#about {
    max-width: 800px;
    /*max-width: 1200px;*/
    /*padding-bottom: 0;*/
    opacity: 0;
    animation: fadeInUp 1s ease-in-out 1s forwards;
}

#about .columns {
    row-gap: 2rem;
}

#about h2 {
    padding-bottom: 1.25rem;
}

#about img {
    width: 50%;
    margin-inline: auto;
}

/*@media screen and (min-width: 1000px) {
    #about .columns {
        grid-template-columns: auto auto;
        column-gap: 2em;
    }

    #about .column:nth-child(2) {
        order: -2;
    }

    #about img {
        width: 100%;
    }

    #about .column {
        display: flex;
        align-items: center;
    }
}

@media screen and (min-width: 1100px) {
    #about .columns {
        column-gap: 6em;
    }

    #about .column {
        display: flex;
        align-items: center;
    }
}*/

/* SERVICES CONTENT SECTION STYLES */

#services.content-section {
    padding-bottom: 0;
}

#services h3 {
    padding: 1.25em 0 0 0;
    transition: transform 1s;
}

#services .columns {
    column-gap: 10px;
    row-gap: 10px;
}

#services .column {
    background-color: #fff;
    padding: 2rem 0;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.4);
    text-align: center;
    transition: transform 500ms ease-out;
}

#services i {
    display: inline-block;
    font-size: 50px;
    transition: transform 1s;
}

@media (any-hover: hover) {
    #services .column:hover i {
        transform: rotateY(360deg);
        color: var(--secondary-blue);
    }

    #services .column:hover h3 {
        transform: rotate(-1deg);
        color: var(--secondary-blue);
    }
}

@media screen and (min-width: 700px) {
    #services .columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (min-width: 1200px) {
    #services .columns {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* REIEWS CONTENT SECTION STYLES */

#reviews-header {
    display: block;
    justify-content: space-between;
    align-items: center;
    padding: 1.5em;
    background-color: #fff;
    margin-bottom: 10px;
}

#reviews-header-left img {
    width: 79px;
    height: 25px;
}

.stars {
    display: inline-block;
    vertical-align: text-top;
}

.stars i {
    font-size: 16px;
    color: #EDBC41;
}

#reviews-header span {
    display: block;
    font-size: var(--step-0);
    padding: .4em 0 .4em 0;
}

#reviews-header span:last-child {
    padding-bottom: .5em;
}

@media screen and (min-width: 700px) {
    #reviews-header-left img {
        position: relative;
        top: 7px;
        padding-right: 1em;
        display: inline-block;
    }
}

.review-slider {
    position: relative;
    display: flex;
    margin: 0 -5px;
}

.review-wrapper {
    padding: 0 5px;
    flex: 0 0 100%;
}

.review {
    background: #fff;
    padding: 1.2rem;  
}

.review-header {
    display: flex;
    align-items: center;
}

.review-header img {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    display: inline-block;
}

.review-header h3 {
    padding: 0;
}

.review .stars {
    padding: .7em 0 .4em;
}

.review-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    padding: 0;
    height: 72px;
    transition: height 0.5s ease-in;
}

.read-more-wrap {
    display: block;
    padding-top: 10px;
}

.read-more {
    display: inline-block;
    white-space: nowrap;
    font-size: var(--step--1);
    cursor: pointer;
}

@media (any-hover: hover) {
    .read-more:hover {
        text-decoration: underline;
    }
}

@media screen and (min-width: 600px) {
    #reviews-header span {
        display: inline-block;
    }

    #reviews-header .stars {
        margin-top: -1px;
        padding: 0 1em;
    }

    .review .stars {
        margin-top: 0;
    }
}

.swiper-horizontal>.swiper-scrollbar, .swiper-scrollbar.swiper-scrollbar-horizontal {
    position: relative;
    width: 100%;
    top: 0;
    left: 0;
    margin: 10px auto 0;
    background-color: var(--main-blue);
    opacity: .5;
}

.swiper-scrollbar-drag {
    background-color: var(--secondary-blue);
}

.swiper-button {
    display: none;
}

@media screen and (min-width: 400px) {
    #reviews-header {
        display: flex;
    }

    #reviews-header span:last-child  {
        padding-bottom: 0;
    }
}

@media screen and (min-width: 600px) {
    .review-wrapper {
        flex: 0 0 50%;
    }
}

@media screen and (min-width: 1000px) {
    .review-wrapper {
        flex: 0 0 33.3%;
    }

    .swiper-scrollbar {
        display: none;
    }

    .swiper-button {
        display: block;
        top: 65%;
        color: var(--main-blue);
        opacity: .6;
        transition: opacity .5s ease-out;
    }

    .swiper-button::after {
        font-size: 35px;
    }

    .swiper-button-next {
        right: -4%;
    }

    .swiper-button-prev {
        left: -4%;
    }

    @media (any-hover: hover) {
        .swiper-button:hover {
            opacity: 1;
        }
    }
}

@media screen and (min-width: 1400px) {
    .review-wrapper {
        flex: 0 0 25%;
    }
}

/* CONTACT CONTENT SECTION STYLES */

#contact .columns {
    row-gap: 2rem;
}

#contact ul {
    padding-bottom: 1.5rem;
}

#contact li {
    padding-bottom: .7rem;
}

#contact ul:last-child, #contact li:last-child {
    padding-bottom: 0;
}

#contact a {
    text-decoration: underline;
}

#contact-form {
    display: grid;
    grid-template-columns: auto;
    column-gap: 2rem;
    row-gap: 2rem;
}

#contact-form label, #contact-form input, #contact-form textarea, #contact-form input[type="submit"] {
    font-size: var(--step--1);
}

#contact-form label {
    display: block;
    text-transform: uppercase;
    color: var(--main-blue);
    margin-bottom: .313rem;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    border: 1px solid #eaeaea;
    padding: 10px;
    font-weight: 300;
    color: #bbb;
    outline: none;
    appearance: none;
    border-radius: 0;
    font-family: inherit;
}

#contact-form input {
    height: 50px
}

#contact-form textarea {
    height: 160px;
}

#contact-form input[type="submit"] {
    text-align: center;
    color: #fff;
    font-weight: 400;
    text-transform:uppercase;
    border: 0;
    cursor: pointer;
}

.form-error {
    color: #ffffff;
    background: #d43939;
    display: none;
    padding: .3rem;
}

.invalid .form-error {
    display: block;
}

.form-message {
    padding: .5rem;
    margin-bottom: 2rem;
    color: #fff;
}

.form-success {
    background-color: #5cb85c;
}

.form-failure {
    background-color: #d43939;
}

@media screen and (min-width: 800px ) {
    #contact .columns {
        grid-template-columns: clamp(250px, 40%, 350px) 1fr;
    }

    #contact-form {
        grid-template-columns: auto auto;
    }

    #contact-form div:nth-child(5), #contact-form div:nth-child(6) {
        grid-column: 1 / span 2;
    }
}

/* FOOTER STYLES */

#map {
    background-color: #f2f2f2;
}

iframe {
    display: block;
    width: 100%;
}

#footer {
   padding: .625rem 0;
   text-align: center;
}

#footer p, #footer a {
    font-size: 12px;

    line-height: 12px;
    padding: 0;
}

/* ANIMATIONS */

@keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
      transform: translateY(20px);
      opacity: 0;
    }
    100% {
      transform: translateY(0%);
      opacity: 1;
    }
}

@keyframes button-loading-spinner {
    from {
      transform: rotate(0turn);
    }
  
    to {
      transform: rotate(1turn);
    }
}