/* Variables ---------------------------------------------------------- */
:root {
    --backgroundCoulor: #a32020;
    --secondaryColour: #f5f5f5;
    --blackTextColour: #000000;
    --lightGray: #f5f5f5;
    --white: #ffffff; 
}

/* End of Variables --------------------------------------------------------*/


*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "Segoe", Arial, sans-serif;
}

/* Site logo ---------------------------------------------------------- */
#siteLogo {
    display: none;
}
/* End of Site logo --------------------------------------------------- */

/* header -------------------------------------------------------------- */
header {
    background-color: var(--backgroundCoulor);
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--secondaryColour);
    padding: 12px 16px;
    border-radius: 0 0 12px 12px;
}

/* Only make header transparent on homepage  */
body.homepage header {
    background-color: transparent;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}

/* Search bar  */
.predictiveResults li.highlighted {
    color: var(--backgroundCoulor);
    cursor: pointer;
    font-weight: 800;
}

.searchBar {
    width: 100%;
    position: relative;
}

.searchBar .row {
    display: flex;
}

#searchText {
    background-color: var(--secondaryColour);
    padding: 8px 12px;
    border: none;
    font-size: 1rem;
    width: 100%;
    color: var(--blackTextColour);
    border-radius: 4px 0 0 4px;
}

.searchBar button {
    background-color: var(--secondaryColour);
    color: var(--blackTextColour);
    border: none;
    padding: 8px 16px;
    cursor: pointer;
}

/* End of Search bar */

/* Predictive search results  */
.predictiveResults ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.predictiveResults li {
    padding: 10px 16px;
    color: var(--blackTextColour);
    background-color: var(--secondaryColour);
    top: 100%;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--secondaryColour);
}

.predictiveResults li:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.predictiveResults {
    position: absolute;
    z-index: 1000;
    background-color: white;
    width: 100%;
    top: 100%;
}
/* End of predictive search results   */

/* back button  */
.backBtn {
    background-color: transparent;
    margin-top: 12px;
    font-size: 1.75rem;
    border: none;
    color: var(--secondaryColour);
}

/* End of back button   */

/* Navigation bar  */
nav {
    margin-top: 12px;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav a {
    display: block;
    background-color: var(--secondaryColour);
    color: var(--blackTextColour);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0;
    border: 2px solid transparent;
}

/* End of Header ------------------------------------------------------------ */

/* Cookie Banner ---------------------------------------------------------- */
#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--backgroundCoulor);
    color: var(--white);
    padding: 16px;
    z-index: 200;
    border-radius: 12px 12px 0 0;
    display: none;
}

#cookieBannerContent {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#cookieBannerContent p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--white);
}

#privacyPolicyLink {
    color: var(--white);
    font-weight: 600;
}

#cookieBannerButtons {
    display: flex;
    gap: 12px;
}

#acceptCookies {
    background-color: var(--white);
    color: var(--backgroundCoulor);
    border: none;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

#declineCookies {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

/* End of Cookie Banner ---------------------------------------------------------- */

/* Cookie Re accept option  */

#googleMapsPlaceholder,
#googleReviewsPlaceholder {
    padding: 8px 0;
}

#googleMapsPlaceholder p,
#googleReviewsPlaceholder p {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--blackTextColour);
}

#googleMapsPlaceholder button,
#googleReviewsPlaceholder button {
    margin-top: 12px;
    padding: 10px 24px;
    background-color: var(--backgroundCoulor);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

/* end of Cookie Re accept option   */

/* Homepage image ---------------------------------------------------------- */
/* Hidden by default shown on homepage only  */
.image {
    display: none;
}

/* Show image on homepage with transparent header   */
body.homepage .image {
    display: block;
    width: 100%;
    height: 225px;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

body.homepage .image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

body.homepage .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* End of homepage image ---------------------------------------------------- */


/* Main --------------------------------------------------------------------------- */
main {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--backgroundCoulor);
    margin-bottom: 8px;
    margin-top: 24px;
}

.sectionBox {
    background-color: var(--lightGray);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.sectionBox img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 12px;
}

/* Google Review Button  */
.googleReviewBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: var(--white);
    color: var(--backgroundCoulor);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    margin-top: 8px;
    border: 2px solid var(--backgroundCoulor);
    font-weight: 600;
}

.review {
    background-color: var(--white);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--backgroundCoulor);
}

.review strong {
    color: var(--backgroundCoulor);
    font-size: 1rem;
}

.review p {
    margin: 4px;
    color: var(--blackTextColour);
    font-size: 0.8rem;
}

/* End of Google Review Button   */
/* End of Main ---------------------------------------------------------- */


/* Contact us page ---------------------------------------------------------- */
/* Contact Details  */
.contactDetails {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.contactDetails p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 1rem;
    color: var(--blackTextColour);
}

.contactDetails i {
    color: var(--backgroundCoulor);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.contactDetails a {
    color: var(--blackTextColour);
    text-decoration: none;
    font-size: 1rem;
}


/* End of contact details  */

/* Contact form  */
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
    max-width: 500px;
}

.required {
    color: var(--backgroundCoulor);
    font-size: 1.2em;
}

.formGroup {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.formGroup label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--blackTextColour);
    margin-bottom: 4px;
}

.formGroup input,
.formGroup select,
.formGroup textarea {
    width: 100%;
    max-width: 460px;
    padding: 10px 12px;
    border: 2px solid var(--secondaryColour);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--blackTextColour);
    background-color: var(--white);
}

#submitBtn {
    padding: 10px 24px;
    background-color: var(--backgroundCoulor);
    color: var(--secondaryColour);
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* Make an Enquiry Button  */
.makeAnEquiryBtn {
    padding: 10px 24px;
    text-align: center;
    background-color: var(--backgroundCoulor);
    color: var(--secondaryColour);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: block;
    margin: 0 auto;
}

/* End of Make Enquiry Button  */
/* End of contact form   */

/* Google Maps  */
.googleMaps iframe {
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

/* End of Google Maps  */
/* End of contact us page ------------------------------------------------------- */


/* Services page ----------------------------------------------------------  */
.servicesGrid {
    display: grid;
    /* 1 column in the grid  */
    grid-template-columns: 1fr;
    /* Gap between service cards  */
    gap: 16px;
    margin-top: 16px;
}

.serviceCard {
    position: relative;
    border-radius: 12px;
    /* Images match the shape of the service card  */
    overflow: hidden;
    /* Removes the underline  */
    text-decoration: none;
    display: block;
    margin-bottom: 16px;
}

.serviceCard img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.serviceLabel {
    position: absolute;
    /* pins label to bottom left and right of the card  */
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background-color: rgba(163, 32, 32, 0.75);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
}

/* Services teaser on homepage  */
.servicesTeaser {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
}

/* View all services button  */
.viewAllServices {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* End of services page ----------------------------------------------------------   */

/* Mobile only — max 767px ----------------------------------- */
@media (max-width: 767px) {

    /* Header flex layout on mobile */
    header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }

    .backBtn {
        order: 1;
        flex: 0 0 auto;
        margin-top: 0;
    }

    /* Subtitle — same row as back button, single line */
    #subtitle {
        order: 2;
        flex: 1 1 auto;
        font-size: 1.05rem;
        font-weight: 600;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .searchBar {
        order: 3;
        flex: 0 0 100%;
    }

    nav {
        order: 4;
        flex: 0 0 100%;
        margin-top: 4px;
    }

    /* Smaller search bar and nav on mobile */
    #searchText {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .searchBar button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    nav a {
        padding: 5px 10px;
        font-size: 0.85rem;
    }

    /* Homepage mobile header layout */
    body.homepage #subtitle {
        display: none;
    }

    body.homepage #siteLogo {
        display: block;
        position: absolute;
        top: 12px;
        left: 16px;
        height: 85px;
        width: auto;
    }

    body.homepage .searchBar {
        margin-top: 135px;
    }

    body.homepage nav {
        margin-top: 6px;
    }

    body.homepage nav a {
        padding: 5px 10px;
        font-size: 0.85rem;
    }

    body.homepage #searchText {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    body.homepage .searchBar button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Tablet — 768px -------------------------------------------- */
@media (min-width: 768px) {

    /* Header — two row layout */
    header {
        padding: 14px 32px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 16px;
        row-gap: 8px;
    }

    /* Cookie banner placeholder must not take flex space */
    #cookieBannerPlaceholder {
        display: contents;
    }

    /* Row 1: subtitle spans full width */
    #subtitle {
        order: 1;
        flex: 0 0 100%;
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
    }

    /* Row 2: back button */
    #backBtn {
        order: 2;
        flex: 0 0 auto;
        font-size: 1.25rem;
        margin-top: 0;
    }

    /* Row 2: search bar grows to fill available space */
    .searchBar {
        order: 3;
        flex: 1 1 auto;
        width: auto;
        max-width: 320px;
    }

    /* Row 2: nav */
    nav {
        order: 4;
        flex: 0 0 auto;
        margin-top: 0;
    }

    nav ul {
        gap: 4px;
    }

    nav a {
        border-radius: 4px;
        white-space: nowrap;
    }

    nav a:hover {
        border-color: var(--backgroundCoulor);
    }

    /* Cookie Banner */
    #cookieBannerContent {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    #cookieBannerContent p {
        max-width: 70%;
    }

    /* End of Cookie Banner  */

    /* Main */
    main {
        padding: 24px 32px;
        max-width: 100%;
    }

    /* Service grid — 2 columns */
    .servicesGrid {
        grid-template-columns: 1fr 1fr;
    }

    /* Services Homepage — 3 columns */
    .servicesTeaser {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .serviceCard img {
        height: 220px;
    }

    #contactForm {
        max-width: 100%;
    }

    .formGroup input,
    .formGroup select,
    .formGroup textarea {
        max-width: 100%;
    }
}


/* Desktop — 1024px ------------------------------------------ */
@media (min-width: 1024px) {

    /* Desktop header: two rows — controls top, subtitle bottom */
    header {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0;
        column-gap: 16px;
        row-gap: 8px;
    }

    #siteLogo {
        display: block;
        height: 60px;
        width: auto;
        flex: 0 0 auto;
        align-self: center;
        order: 1;
    }

    #backBtn {
        order: 2;
        flex: 0 0 auto;
        align-self: center;
    }

    .searchBar {
        order: 3;
        flex: 1 1 auto;
        width: auto;
        max-width: 400px;
    }

    nav {
        order: 4;
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* Full-width subtitle row below controls */
    #subtitle {
        display: block;
        order: 5;
        flex: 0 0 100%;
        font-size: 1.2rem;
        font-weight: 700;
        margin: 4px 0 0 0;
        padding-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.3);
    }

    nav a {
        padding: 10px 20px;
        font-size: 1rem;
    }

    /* Main */
    main {
        padding: 32px 48px;
        max-width: 100%;
    }

    /* Homepage image — taller on desktop */
    body.homepage .image {
        height: 500px;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Section boxes more space */
    .sectionBox {
        padding: 24px;
    }

    /* Service grid — 3 columns */
    .servicesGrid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 20px;
    }

    .serviceCard img {
        height: 240px;
    }

    .serviceCard {
        transition: transform 0.2s ease;
    }

    .serviceCard:hover {
        transform: scale(1.03);
    }

    .serviceLabel {
        font-size: 1.05rem;
        padding: 14px 18px;
    }


    /* Centre last card if it sits alone on a row */
    .serviceCard:last-child:nth-child(3n + 1) {
        grid-column: 2;
    }

    /* View all services button  */
    .viewAllServices {
        display: flex;
        justify-content: center;
        margin-top: 16px;
    }

    /* Contact Details  */
.contactDetails a:hover {
    color: var(--backgroundCoulor);
}
}

/* Wide / Large desktop — 1280px ----------------------------- */
@media (min-width: 1280px) {

    header {
        padding: 18px 80px;
    }

    .searchBar {
        width: 480px;
    }

    main {
        padding: 40px 80px;
        max-width: 100%;
    }

    .servicesGrid {
        grid-template-columns: repeat(3, 1fr);
    }

    .serviceCard img {
        height: 260px;
    }


    /* Centre last card if it sits alone on a row */
    .serviceCard:last-child:nth-child(3n + 1) {
        grid-column: 2;
    }
}