/* =====================
   GLOBAL BASE STYLES
   ===================== */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Calibri, sans-serif;
    background-color: #f6f4f1;
    color: #2c2c2c;
}

/* Global link colours (body content) */
a:link,
a:visited {
    color: #381C22;
    text-decoration: none;
}

a:hover {
    color: #C9B488;
    text-decoration: underline;
}


/* =====================
   HEADER / NAVIGATION
   ===================== */

header {
    background-color: #381C22;
    color: #fff;
    padding: 32px 30px;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 26px;
}

.header-left img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.brand-text-title {
    font-size: 26px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.brand-text-sub {
    font-size: 14px;
    opacity: 0.85;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 15px;
}

.header-nav {
    display: flex;
    gap: 26px;
    font-size: 15px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Nav links override global link colours */
.header-nav a:link,
.header-nav a:visited {
    color: #f6f4f1;
    text-decoration: none;
}

.header-nav a:hover {
    color: #C9B488;
    text-decoration: underline;
}

.header-contact {
    color: #C9B488;
    font-size: 15px;
}


/* =====================
   HERO SECTION
   ===================== */

.hero-wrapper {
    position: relative;
    overflow: hidden;
    height: 75vh;
    min-height: 460px;
    max-height: 800px;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Enlarged white hero seal logo */
.hero-seal {
    position: absolute;
    right: 40px;
    bottom: 36px;
    z-index: 3;
    width: 150px;
    height: 150px;
    opacity: 0.85;
    pointer-events: none;
    filter: brightness(5);
}

.hero-seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hero text content */
.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    color: #fff;
}

.hero-inner {
    max-width: 760px;
}

.hero-kicker {
    font-size: 16px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.9;
}

.hero-content h1 {
    font-size: 48px;
    margin: 0 0 18px;
}

.hero-content p {
    font-size: 22px;
    margin: 0 0 30px;
    line-height: 1.55;
}

.hero-tagline {
    font-size: 16px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 30px;
    opacity: 0.95;
}

.button-primary {
    background-color: #C9B488;
    padding: 16px 38px;
    border-radius: 999px;
    display: inline-block;
    color: #381C22;
    font-weight: bold;
    text-decoration: none;
    font-size: 19px;
}


/* =====================
   MAIN SECTIONS
   ===================== */

.section {
    padding: 56px 20px;
    max-width: 1120px;
    margin: 0 auto;
}

.section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 32px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #381C22;
}

.section-intro {
    max-width: 720px;
    margin: 0 auto 38px;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
    color: #4a4a4a;
}

/* =====================
   ARTICLE IMAGES (AP / DAP)
   ===================== */

.article-image {
    max-width: 360px;          /* controls visible size */
    margin: 40px auto 36px;    /* nice breathing space */
    text-align: center;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.10);
    cursor: zoom-in;
}

.article-image figcaption {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #555;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* =====================
   SERVICES GRID
   ===================== */

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

/* Make the whole card clickable (anchors styled as blocks) */
.service-box {
    position: relative;             /* 🔑 allows .service-bg to fill the card */
    display: block;
    background: #fff;
    padding: 26px 22px;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    overflow: hidden;              /* keeps bg inside rounded corners */
    text-decoration: none;         /* no underline on the whole card */
    color: inherit;                /* text colour comes from inner elements */
}

/* Text sits above the background image */
.service-box h3,
.service-box p {
    position: relative;
    z-index: 1;
}

.service-box h3 {
    font-size: 20px;
    margin: 0 0 10px;
    color: #381C22;
}

.service-box p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.service-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-size: cover;
    background-position: center;

    /* DEBUG SETTINGS */
    background-color: red;   /* <– ADD THIS */
    opacity: 0.8;            /* <– TEMP: make it obvious */
    z-index: 0;
}


/* Per-service images – paths from the web root (/public_html) */
.service-patios .service-bg {
    background-image: url('/button_images/button-driveway-entrance-gravel-country-house.avif');
}

.service-driveways .service-bg {
    background-image: url('/button_images/button-driveway-entrance-granite-gravel.avif');
    /* change filename here if yours is different */
}

.service-garden .service-bg {
    background-image: url('/button_images/button-garden-construction.avif');
}

.service-plan .service-bg {
    background-image: url('/button_images/button-plan-build-transform.avif');
}

/* Optional hover lift */
.service-box:hover {
    box-shadow: 0 10px 26px rgba(0,0,0,0.12);
    transform: translateY(-1px);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}




/* =====================
   PARALLAX DIVIDER
   ===================== */

.divider {
    background-image: url('slide4.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 130px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    margin-top: 50px;
    margin-bottom: 50px;
}

.divider::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.45);
}

.divider-inner {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    font-size: 28px;
    line-height: 1.65;
    font-style: italic;
}


/* =====================
   CONTACT SECTION
   ===================== */

.contact-details {
    text-align: center;
    font-size: 17px;
    line-height: 1.7;
}

.contact-details strong {
    color: #381C22;
}

.locations {
    margin-top: 22px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #666;
}


footer {
    width: 100%;
    background-color: #381C22;
    color: #fff;
    margin-top: 40px;

    /* nice simple centring */
    text-align: center;
    padding: 20px 16px;

    /* make sure padding doesn’t push it wider than the screen */
    box-sizing: border-box;
}


/* =====================
   KNOWLEDGE HUB LINKS
   ===================== */

.hub-links {
    margin-top: 20px;
    text-align: center;
    font-size: 15px;
    line-height: 2;
}

.hub-links a {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    white-space: nowrap;
}

.hub-links span {
    margin: 0 6px;
    color: #C9B488;
}

/* Hub CTA links – mobile-safe wrapping with branding */
.hub-links .hub-link-button {
    display: inline-block;
    max-width: 100%;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;

    /* FORCE BRANDING */
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}



/* =====================
   RESPONSIVE TWEAKS
   ===================== */

/* === TABLET DOWN ===================================== */
@media (max-width: 900px) {
    /* Header stacks nicely */
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-right {
        align-items: flex-start;
        text-align: left;
    }

    /* Hero a bit shorter and softer */
    .hero-wrapper {
        height: 70vh;
        min-height: 420px;
    }
    .hero-content h1 {
        font-size: 34px;
    }
    .hero-content p {
        font-size: 18px;
    }

    /* Sections a touch tighter */
    .section {
        padding: 44px 16px;
    }

    /* Location cards: 2 per row on tablets */
    .location-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* === SMALL PHONES ==================================== */
@media (max-width: 600px) {
    /* Hero more compact on small phones */
    .hero-wrapper {
        height: auto;
        min-height: 380px;
    }
    .hero-content {
        padding: 40px 16px;
        align-items: flex-start;   /* text starts nearer the top */
    }
    .hero-content h1 {
        font-size: 30px;
    }
    .hero-content p {
        font-size: 17px;
        margin-bottom: 24px;
    }
    .hero-tagline {
        margin-bottom: 22px;
    }
    .button-primary {
        font-size: 18px;
        padding: 14px 30px;
        margin-bottom: 10px;
    }

    /* Hub grid: single column, centred */
    .location-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
        gap: 18px;
    }

    .location-card {
        height: 220px;
        padding: 18px 20px;
        border-radius: 20px;
    }

    .location-label {
        font-size: 18px;
        letter-spacing: 0.14em;
    }

    .location-sub {
        font-size: 13px;
    }
}


/* ============================
   LOCAL HUB SELECTOR (ROOT)
   ============================ */

.section-locations {
    margin-top: 40px;
}

.section-locations .section-intro {
    max-width: 860px;
    margin: 0 auto 30px auto;
    text-align: center;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
}

/* Clickable card – note: anchor with class location-card */
a.location-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 22px 24px;
    height: 260px;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    color: #FFFFFF; /* base text colour */
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    background-color: #381C22; /* fallback */
    isolation: isolate;
}

/* Background image layer */
a.location-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: transform 0.35s ease-out;
    z-index: -2;
}

/* Softer dark gradient overlay for ALL devices */
a.location-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.60) 100%
    );
    z-index: -1;
}

/* Text inside the card */
.location-card .location-label {
    font-size: 20px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: #FFFFFF;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
}

.location-card .location-sub {
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.95;
    color: #FFFFFF;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
}

/* Hover effects */
a.location-card:hover::before {
    transform: scale(1.07);
}

a.location-card:hover {
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

/* Per-town background images – filenames match uploads in /public_html */
.location-haslemere::before {
    background-image: url("haslemere.webp");
}

.location-guildford::before {
    background-image: url("guildford.jpg");
}

.location-godalming::before {
    background-image: url("godalming.webp");
}

.location-farnham::before {
    background-image: url("farnham.jpg");
}

.location-petersfield::before {
    background-image: url("petersfield.webp");
}

.location-chichester::before {
    background-image: url("chichester.jpg");
}


/* ============================
   MOBILE HEADER + SCROLL FIX
   ============================ */

@media (max-width: 600px) {

    /* Kill any accidental horizontal scroll on small phones */
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Slightly tighter header padding on phones */
    header {
        padding: 20px 16px;
    }

    /* Stack logo + text nicely and centre them */
    .header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .header-left img {
        width: 120px;
        height: 120px;
    }

    /* Let the nav wrap if it needs to, and centre it */
    .header-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
    }
}
