body {
    background-color: #fff5ec;
    font-family: 'Frank Ruhl Libre', serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    background-color: white;
    color: black;
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: nowrap;
    gap: 15px;
    box-sizing: border-box;
    max-height: 100vh;
    overflow-y: auto;
}

.top-header a {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.top-header a:hover {
    color: #ffb4a2;
}

.top-header img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    /* Ensures the image fits perfectly without stretching */
    margin-right: auto;
}

/* Hamburger Menu Base Styles */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

@media (max-width: 1100px) {
    .top-header a {
        font-size: 0.8rem;
    }
    .top-header {
        gap: 10px;
        padding: 10px 15px;
    }
    .nav-links {
        gap: 10px;
    }
}

@media (max-width: 900px) {
    .top-header {
        flex-wrap: wrap;
        justify-content: flex-end;
        padding: 10px 20px;
        gap: 15px;
    }
    .top-header img {
        margin-right: auto;
    }
    .top-header a.persistent-link {
        font-size: 0.85rem !important;
    }
    .hamburger {
        display: block;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 15px;
        gap: 15px;
    }
    .menu-toggle:checked ~ .nav-links {
        display: flex;
    }
}

.header-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 4px;
}

h1 {
    color: #333;
    font-family: 'Frank Ruhl Libre', serif;
    margin: 0;
    font-size: 50px;
    display: inline-block;
    padding-bottom: 5px;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    /* Adjust this percentage to make it shorter or longer */
    height: 3px;
    background-color: #dd22a8;
}

.page-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 1200px;
    margin: 10px auto 40px;
    padding: 0 20px;
    position: relative;
    flex: 1;
}

.image-block {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Base scattered image styling */
.scatter {
    position: absolute;
    width: clamp(88px, 12vw, 220px);
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    object-fit: cover;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 1;
    pointer-events: auto;
    border: 3px solid #dd22a8;
}

/* Positions around the central text column */
.scatter.pos-left {
    left: 4%;
    top: 0%;
    width: clamp(90px, 13vw, 220px);
    transform: rotate(-6deg) scale(1.12);
}

.scatter.pos-left2 {
    left: 4%;
    top: 65%;
    width: calc(clamp(88px, 12vw, 220px) + 3px);
    transform: rotate(10deg) translateY(-6%);
}

.scatter.pos-right {
    right: 3%;
    top: 5%;
    width: clamp(90px, 13vw, 220px);
    transform: rotate(8deg) scale(1.02);
}

.scatter.bottom-right {
    right: 2%;
    bottom: 0%;
    width: clamp(110px, 15vw, 260px);
    transform: rotate(4deg) translateY(-4%);
}

/* Keep the text column centered and give it breathing room so images don't overlap the copy */
.text-column {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    z-index: 2;
    margin: 0 clamp(120px, 18vw, 260px);
}

/* Tweak to allow larger left-side images */
.scatter.pos-left.large-image {
    width: clamp(220px, 40vw, 550px);
    transform: rotate(-3deg);
    top: 2%;
    left: 2%;
}

/* Tweak to allow larger right-side images */
.scatter.pos-right.large-image {
    width: clamp(220px, 40vw, 550px);
    transform: rotate(3deg);
    top: 2%;
    right: 2%;
}

/* Potable Water page specific styling - centered on left with standard Hook Bins size */
.potable-water-page .scatter.pos-left.large-image {
    width: clamp(220px, 40vw, 550px);
    left: -3%;
}

/* Potable Water page: explicit side-by-side layout */
.potable-water-page .page-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(20px, 4vw, 48px);
    width: min(1200px, 100%);
    padding: 0 20px 40px;
    box-sizing: border-box;
}

.potable-water-page .image-block {
    position: static;
    inset: auto;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.potable-water-page .scatter,
.potable-water-page .scatter.pos-left,
.potable-water-page .scatter.pos-left.large-image {
    position: relative;
    left: auto;
    top: auto;
    transform: rotate(2deg);
    display: block;
    box-sizing: border-box;
    margin: 0;
    width: auto;
    height: auto;
    max-width: 100%;
    aspect-ratio: auto;
    object-fit: fill;
    border: 3px solid #dd22a8;
    background-color: transparent;
    filter: none;
}

.potable-water-page .text-column {
    margin: 0 !important;
    max-width: none;
    align-self: start;
}

.potable-water-page .service-container {
    height: auto !important;
}

/* Mining page: explicit side-by-side layout with image scaled to text block */
.mining-page .page-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(20px, 4vw, 48px);
    width: min(1200px, 100%);
    padding: 0 20px 40px;
    box-sizing: border-box;
}

.mining-page .image-block {
    position: static;
    inset: auto;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.mining-page .scatter,
.mining-page .scatter.pos-left,
.mining-page .scatter.pos-left.large-image {
    position: relative;
    left: auto;
    top: auto;
    transform: rotate(2deg);
    display: block;
    box-sizing: border-box;
    margin: 0;
    width: auto;
    height: auto;
    max-width: 100%;
    border: 3px solid #dd22a8;
    object-fit: cover;
}

.mining-page .text-column {
    margin: 0 !important;
    max-width: none;
    align-self: start;
}

@media (min-width: 901px) {
    .has-large-image .text-column {
        margin-left: clamp(250px, 43vw, 590px);
        margin-right: 20px;
    }

    .has-large-image-right .text-column {
        margin-right: clamp(250px, 43vw, 590px);
        margin-left: 20px;
    }
}

/* Utility to crop white letterboxing out of images */
.crop-letterbox {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
}

.service-container {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 40px;
}

.service-container h2 {
    color: #333;
    display: inline-block;
    padding-bottom: 5px;
    margin-top: 0;
    font-size: 32px;
    position: relative;
}

.service-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    /* Adjust this fixed width to make it shorter or longer */
    height: 3px;
    background-color: #dd22a8;
}

.service-container p {
    font-size: 20px;
    color: #444;
    line-height: 1.6;
    margin: 15px 0;
}

.service-container ul {
    font-size: 20px;
    color: #444;
    line-height: 1.6;
}

.site-footer {
    text-align: center;
    padding: 20px;
    color: #666;
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
    background-color: white;
}

.site-footer p {
    margin: 0;
}

/* Stacks into a single column on mobile screens */
@media (max-width: 900px) {
    .page-content {
        flex-direction: column;
        align-items: center;
    }

    /* On smaller screens list images below the text and remove absolute positioning */
    .image-block {
        position: static;
        display: block;
        width: 100%;
        pointer-events: auto;
        margin: 20px auto;
        text-align: center;
    }

    .scatter {
        position: static;
        width: 80%;
        max-width: 420px;
        transform: none;
        margin: 16px auto;
    }

    .text-column {
        margin: 0;
        padding: 0 12px;
    }

    .potable-water-page .page-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 12px 24px;
    }

    .potable-water-page .image-block {
        justify-content: center;
    }

    .potable-water-page .scatter,
    .potable-water-page .scatter.pos-left,
    .potable-water-page .scatter.pos-left.large-image {
        width: min(100%, 460px);
        height: auto;
        max-width: 460px;
    }

    .mining-page .page-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 12px 24px;
    }

    .mining-page .image-block {
        justify-content: center;
    }

    .mining-page .scatter,
    .mining-page .scatter.pos-left,
    .mining-page .scatter.pos-left.large-image {
        width: min(100%, 460px);
        height: auto;
        max-width: 460px;
    }
}
