/*
 * Simple stylesheet for the Gremcore website rebuild.
 * The design focuses on clarity and ease of reading, using a
 * minimal colour palette and flexible layout. Feel free to
 * adjust colours, fonts or spacing to better suit your brand.
 */

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    line-height: 1.6;
    /*
     * Use a warm off‑white background to echo the beige tones found on
     * the original Gremcore website.  This subtle tint helps images
     * stand out while retaining a professional feel.
     */
    background: #f5f5f0;
}

header {
    /*
     * Use a lighter blue for the navigation bar to complement the
     * refreshed Gremcore logo.  The previous dark navy made the
     * logo difficult to see; this mid‑tone blue better matches the
     * gradient in the new logo and improves contrast.
     */
    background-color: #3b7bbf;
    color: #ffffff;
    padding: 20px 0;
}

header .container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/*
 * Show the Gremcore logo inside the heading.  The image is
 * positioned to the left of the text and scaled down so it sits neatly
 * alongside the company name.  The surrounding h1 uses flex to
 * vertically centre its contents.
 */
/*
 * The company name is now part of the logo graphic, so the text
 * previously displayed next to the logo has been removed.  The
 * heading simply wraps the logo image to allow consistent sizing
 * and alignment.  Remove the right margin on the logo so it
 * appears centred relative to the navigation links.
 */
header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 0; /* Hide any whitespace around the image */
    /* Give the logo a white backdrop so it stands out against
     * the coloured navigation bar. Padding and a subtle border
     * radius ensure it feels integrated rather than floating. */
    background: #ffffff;
    padding: 5px 10px;
    border-radius: 6px;
}
header h1 img {
    height: 45px;
    margin: 0;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    /* Soften the hover colour to a pale blue tint for improved
     * accessibility against the mid‑tone navigation bar. */
    color: #d7e4f5;
}

/*
 * The hero section uses a full‑bleed background image defined in the
 * HTML via inline style.  Provide a lighter fallback colour that
 * complements the refreshed navigation bar.  The generous padding
 * gives the heading and tagline room to breathe.
 */
.hero {
    background: #3b7bbf;
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: 2.8em;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hero p {
    margin-top: 15px;
    font-size: 1.2em;
    color: #f5f5f5;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.section {
    padding: 40px 10%;
    background: #ffffff;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section h2 {
    /* Match section headings to the new mid‑tone navigation colour */
    color: #3b7bbf;
    margin-top: 0;
}

.services {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.service-item {
    flex: 1 1 45%;
    margin-bottom: 20px;
    /* Lighten the card background to harmonise with the new palette */
    background: #eef5fd;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.service-item h3 {
    margin-top: 0;
    color: #3b7bbf;
}

.footer {
    /* Use the same lighter blue for the footer to provide a cohesive
     * bookend to the page.  White text ensures adequate contrast.
     */
    background: #3b7bbf;
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
}

/*
 * Banner image at the top of each service and content page.  The
 * image spans the full width of the page and maintains a fixed
 * height while cropping intelligently via object‑fit.  Rounded
 * corners match the card styling used elsewhere.
 */
/*
 * Banner images on each service and content page should display at
 * their natural aspect ratio without being forcefully cropped.  By
 * removing the fixed height and using height:auto, the image will
 * scale proportionally to fit the width of the container.  This
 * prevents pixelation and ensures the entire photograph is visible
 * rather than cutting off important details.  Rounded corners and
 * bottom margin are retained for visual consistency.
 */
 .page-banner img {
    /* Standardise the height of all banner images across pages.  A fixed
     * height combined with object‑fit: cover ensures that each photo
     * occupies the same vertical space, which eliminates the uneven
     * page layouts seen on mobile devices.  Width 100% allows the
     * image to scale to the width of its container, while object‑fit
     * cropping avoids distortion.  The max‑width prevents images from
     * becoming excessively large on desktop screens.  Rounded
     * corners, bottom margin and centering are retained for
     * consistency. */
    /* Let banner images scale naturally while constraining the maximum
     * height.  A max‑height prevents extremely wide photographs from
     * dominating the page, while height:auto preserves each image’s
     * aspect ratio.  Object‑fit: cover ensures wide banners continue
     * to fill the width without distortion.  The images are
     * centred and constrained to a reasonable width on larger screens. */
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 30px;
    max-width: 600px;
    display: block;
    margin-left: auto;
    margin-right: auto;
 }

/*
 * Call‑to‑action buttons used on the home page and elsewhere.
 * These buttons share the same mid‑tone blue as the navigation bar and
 * footer for a cohesive look.  They include padding and rounded
 * corners for a modern, friendly feel.  The hover state subtly
 * darkens the background colour.
 */
.btn {
    display: inline-block;
    background: #3b7bbf;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: background 0.2s ease;
}
.btn:hover {
    background: #2e4d7f;
}

@media (max-width: 768px) {
    .services {
        flex-direction: column;
    }
    .service-item {
        flex: 1 1 100%;
    }
    /* Stack navigation links vertically on small screens to avoid
     * horizontal overflow.  Centre them and provide spacing on
     * top for separation. */
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav ul li {
        margin-left: 0;
        margin-top: 10px;
    }

    /* Ensure page banner images scale down on very small screens so
     * they do not dominate the viewport.  Setting max-width to 90%
     * gives them breathing room on either side and prevents
     * horizontal scrolling. */
    .page-banner img {
        /* On small screens reduce the width slightly to provide side
         * margins and limit the height so banner images do not
         * dominate the viewport.  Auto height preserves the image
         * aspect ratio, while the max‑height enforces a consistent
         * upper bound. */
        max-width: 90%;
        height: auto;
        max-height: 250px;
    }
}