/*
Theme Name: B&M Slots
Theme URI: https://www.bmslots.com.au
Author: Itomic Digital Pty Ltd
Author URI: https://www.itomic.com.au
Description: Custom WordPress theme for B&M Slots Pty Ltd. Poultry and agricultural equipment supplier. Built with ACF, no page builder.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: bmslots
*/

/* =========================================
   CSS CUSTOM PROPERTIES
   ========================================= */
:root {
    --bm-head:     'Poppins', system-ui, sans-serif;
    --bm-body:     'Source Sans 3', system-ui, sans-serif;
    --bm-navy:     #1c3c63;
    --bm-ink:      #3c4654;
    --bm-text:     #6b7480;

    --navy:        #1c3c63;
    --navy-dark:   #15315a;
    --navy-light:  #2a5080;
    --teal:        #45a9c4;
    --teal-dark:   #3a97b1;
    --white:       #ffffff;
    --off-white:   #eef1f5;
    --warm-grey:   #eef1f5;
    --grey-light:  #e3e7ed;
    --grey-mid:    #c0c8d0;
    --grey-text:   #6b7480;
    --black:       #3c4654;

    --font-sans:   var(--bm-body);
    --font-size-base: 18px;
    --line-height: 1.65;

    --container:   1180px;
    --gutter:      32px;
    --radius:      6px;
    --radius-btn:  4px;
    --transition:  0.25s ease;

    --header-h:    110px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
    font-family: var(--bm-body);
    color: var(--bm-ink);
    background: var(--white);
    line-height: var(--line-height);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy-light); }

ul { list-style: none; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--bm-head);
    font-weight: 700;
    line-height: 1.2;
    color: var(--bm-navy);
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: 32px; font-weight: 600; }
h3 { font-size: 21px; font-weight: 600; }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; color: var(--grey-text); }
p:last-child { margin-bottom: 0; }

/* WYSIWYG content: give headings breathing room before/after body copy */
.entry-content h2 { margin-top: 2rem; margin-bottom: 1rem; }
.entry-content h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; }
.entry-content h4 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.entry-content > h2:first-child,
.entry-content > h3:first-child,
.entry-content > h4:first-child { margin-top: 0; }

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section { padding: 84px 0; }
.section--grey { background: var(--off-white); }
.section--navy { background: var(--navy); }
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4,
.section--navy p { color: var(--white); }

.section__header {
    text-align: center;
    max-width: 740px;
    margin: 0 auto 52px;
}
.section__header h2 { margin-bottom: 0; }
.section__header p { color: var(--bm-text); font-size: 18px; line-height: 1.6; margin-top: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Visually hidden — still available to screen readers and SEO */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-align: center;
}
.btn--primary {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}
.btn--primary:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    color: var(--white);
}
.btn--outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn--outline:hover {
    background: var(--navy);
    color: var(--white);
}
.btn--outline-white {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn--outline-white:hover {
    background: var(--white);
    color: var(--navy);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    height: var(--header-h);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-bottom: 2px solid var(--grey-light);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.site-logo img { height: 68px; width: auto; }
.site-logo a { display: block; }

/* Main nav */
.main-nav { display: flex; align-items: center; gap: 0.25rem; }

.main-nav > li { position: relative; }

.main-nav > li > a {
    display: block;
    color: var(--navy);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.main-nav > li > a:hover,
.main-nav > li.current-menu-item > a,
.main-nav > li.current-menu-ancestor > a {
    background: var(--navy);
    color: var(--white);
}

/* Dropdown */
.main-nav .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    min-width: 220px;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    z-index: 200;
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav .sub-menu li a {
    display: block;
    padding: 0.7rem 1.25rem;
    color: var(--navy);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition);
}
.main-nav .sub-menu li a:hover {
    background: var(--off-white);
    color: var(--navy-light);
}
.main-nav .sub-menu li:first-child a { border-radius: var(--radius) var(--radius) 0 0; }
.main-nav .sub-menu li:last-child a  { border-radius: 0 0 var(--radius) var(--radius); }

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--navy);
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    margin: 5px 0;
    transition: all var(--transition);
}

/* =========================================
   HERO BANNER / ROTATOR
   ========================================= */
.hero-banner {
    position: relative;
    height: calc((100vh - var(--header-h)) * 0.75);
    min-height: 375px;
    max-height: 585px;
    overflow: hidden;
    background: var(--navy-dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.is-active { opacity: 1; }

.hero-slide__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.hero-slide__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,33,68,0.45) 0%, rgba(0,33,68,0.15) 100%);
}

.hero-slide__content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
}
.hero-slide__content .container {}

.hero-slide__inner { max-width: 620px; }
.hero-slide__label {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}
.hero-slide__title {
    color: var(--white);
    margin-bottom: 1.25rem;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
}
.hero-slide__text {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.hero-slide__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero dots */
.hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 2;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    padding: 0;
}
.hero-dot.is-active { background: var(--white); }

/* =========================================
   EQUIPMENT RANGE CARDS (homepage)
   ========================================= */
.industry-cards { padding: 84px 0; }

.eqr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.eqr-card {
    background: #fff;
    border: 1px solid var(--grey-light);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(21,49,90,.04), 0 8px 24px rgba(21,49,90,.06);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
    text-decoration: none;
    color: inherit;
}
.eqr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(21,49,90,.06), 0 16px 36px rgba(21,49,90,.13);
    color: inherit;
}
.eqr-pic { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.eqr-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eqr-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(21,49,90,.78) 0%, rgba(21,49,90,.10) 55%, rgba(21,49,90,0) 100%);
}
.eqr-num {
    position: absolute; top: 12px; left: 14px;
    color: #fff; font-family: var(--bm-head); font-weight: 600; font-size: 12px;
    letter-spacing: .04em; opacity: .85;
}
.eqr-cat {
    position: absolute; bottom: 13px; left: 16px;
    color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .16em;
}
.eqr-body {
    padding: 20px 18px;
    display: flex; flex-direction: column; gap: 9px; flex: 1;
}
.eqr-body h3 { font-size: 21px; font-weight: 600; color: var(--bm-navy); margin: 0; }
.eqr-desc { color: var(--bm-text); font-size: 14px; line-height: 1.5; flex: 1; margin: 0; }
.eqr-link {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--bm-navy); font-weight: 700; font-size: 13px; letter-spacing: .01em;
}
.eqr-link .ar { transition: transform .18s ease; }
.eqr-card:hover .eqr-link .ar { transform: translateX(4px); }
.eqr-accent {
    height: 3px; background: var(--teal);
    transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.eqr-card:hover .eqr-accent { transform: scaleX(1); }

@media (max-width: 900px) { .eqr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .eqr-grid { grid-template-columns: 1fr; } }

/* =========================================
   FEATURE STRIP (homepage stats/values)
   ========================================= */
.feature-strip {
    background: var(--warm-grey);
    padding: 84px 0;
    border-top: 1px solid var(--grey-light);
    border-bottom: 1px solid var(--grey-light);
}
.feature-strip .grid-4 { align-items: center; }
.feature-item { text-align: center; padding: 1rem; }
.feature-item__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}
.feature-item__value {
    font-family: var(--bm-head);
    font-size: 2rem;
    font-weight: 700;
    color: var(--bm-navy);
    display: block;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.feature-item__label {
    color: var(--grey-text);
    font-size: 0.875rem;
    font-weight: 600;
}

/* =========================================
   ABOUT INTRO
   ========================================= */
.about-intro .grid-2 { align-items: center; gap: 4rem; }
.about-intro__img { border-radius: var(--radius); overflow: hidden; }
.about-intro__img img { width: 100%; height: 400px; object-fit: cover; }
.about-intro__content h2 { margin-bottom: 1.25rem; }
.about-intro__content p { margin-bottom: 1rem; }

/* =========================================
   PROJECTS GRID
   ========================================= */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.project-card {
    border-radius: 6px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--grey-light);
    box-shadow: 0 1px 2px rgba(21,49,90,.04), 0 8px 24px rgba(21,49,90,.06);
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    box-shadow: 0 2px 4px rgba(21,49,90,.06), 0 16px 36px rgba(21,49,90,.13);
    transform: translateY(-4px);
}
.project-card__image { aspect-ratio: 16/10; overflow: hidden; }
.project-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-card__image img { transform: scale(1.04); }
.project-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-card__category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy-light);
    margin-bottom: 0.5rem;
}
.project-card__title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.project-card__title a { color: var(--navy); }
.project-card__title a:hover { color: var(--navy-light); }
.project-card__meta {
    font-size: 0.8rem;
    color: var(--grey-mid);
    margin-bottom: 0.75rem;
}
.project-card__excerpt { font-size: 0.9rem; flex: 1; }
.project-card__footer { padding: 0 1.5rem 1.5rem; }
.project-card__footer a { font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.project-card__footer a:hover { color: var(--navy-light); }

/* Single project */
.project-single__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}
.project-single__gallery img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
}
.project-single__video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}
.project-single__video-grid .video-embed {
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
}
.project-single__video-grid .video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.project-meta-box {
    background: var(--off-white);
    border-left: 4px solid var(--navy);
    padding: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 2rem;
}
.project-meta-box dt { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); }
.project-meta-box dd { color: var(--grey-text); margin-bottom: 0.75rem; }
.project-meta-box dd:last-child { margin-bottom: 0; }

/* =========================================
   SUPPLIERS / PARTNERS
   ========================================= */
.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 40px;
}
.supplier-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 78px;
    padding: 1.25rem;
    border: 1px solid var(--grey-light);
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 1px 2px rgba(21,49,90,.04), 0 8px 24px rgba(21,49,90,.06);
    transition: box-shadow var(--transition);
}
.supplier-logo:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.supplier-logo img { max-height: 60px; width: auto; object-fit: contain; filter: grayscale(1); transition: filter var(--transition); }
.supplier-logo:hover img { filter: grayscale(0); }

/* =========================================
   STAFF GRID
   ========================================= */
.staff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

.staff-card { text-align: center; }
.staff-card__photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.25rem;
    border: 4px solid var(--grey-light);
}
.staff-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-card__name { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.staff-card__role { font-size: 0.875rem; color: var(--navy-light); font-weight: 600; margin-bottom: 0.5rem; }
.staff-card__email a { font-size: 0.8rem; color: var(--grey-text); }
.staff-card__email a:hover { color: var(--navy); }

/* =========================================
   PRODUCTS
   ========================================= */
.products-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.products-nav__btn {
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--grey-light);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition);
}
.products-nav__btn:hover,
.products-nav__btn.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.product-card {
    background: var(--white);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.product-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.product-card__image { aspect-ratio: 4/3; overflow: hidden; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 1.25rem; }
.product-card__cat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy-light);
    margin-bottom: 0.4rem;
}
.product-card__title { font-size: 1rem; margin-bottom: 0.5rem; }
.product-card__excerpt { font-size: 0.875rem; }

/* =========================================
   VIDEO EMBED
   ========================================= */
.video-embed {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--navy-dark);
    border-radius: var(--radius);
    overflow: hidden;
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =========================================
   CONTACT
   ========================================= */
.contact-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: start; }
.contact-info h3 { margin-bottom: 1rem; }
.contact-info p { margin-bottom: 0.5rem; }
.contact-info address { font-style: normal; }
.contact-info a { color: var(--navy); font-weight: 500; }

/* Gravity Forms overrides */
.gform_wrapper .gform_heading { display: none; }
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--grey-mid);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--black);
    background: var(--white);
    transition: border-color var(--transition);
}
.gform_wrapper input:focus,
.gform_wrapper textarea:focus {
    outline: none;
    border-color: var(--navy);
}
.gform_wrapper textarea { resize: vertical; min-height: 140px; }
.gform_wrapper .gfield_label { font-weight: 600; font-size: 0.875rem; color: var(--navy); margin-bottom: 0.4rem; display: block; }
.gform_wrapper .gfield { margin-bottom: 0.875rem; }
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper [type="submit"] {
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 0.85rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}
.gform_wrapper [type="submit"]:hover { background: var(--navy-light); }

/* Tighten field padding */
.gform_wrapper .gfield_description { font-size: 0.8rem; color: var(--grey-text); margin-top: 0.25rem; }
.gform_wrapper .ginput_container { margin-top: 0.25rem; }
.gform_wrapper .gform_body { margin-bottom: 1rem; }
.gform_wrapper .gform_fields { gap: 0 !important; }
.gform_wrapper .gfield { margin-bottom: 0.75rem !important; padding: 0 !important; }
.gform_wrapper li.gfield { margin-top: 0 !important; }

/* Replace (Required) text with asterisk */
.gform_wrapper .gfield_required { display: none; }
.gform_wrapper .gfield.gfield_contains_required .gfield_label::after {
    content: ' *';
    color: var(--navy);
    font-weight: 700;
}

/* Hide character counter */
.gform_wrapper .charleft { font-size: 0.75rem; color: var(--grey-text); margin-top: 0.25rem; }
.gform_validation_message,
.validation_message { color: #c0392b; font-size: 0.8rem; margin-top: 0.3rem; }
.gform_confirmation_message {
    background: #e8f5e9;
    border: 1px solid #81c784;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    color: #2e7d32;
    font-weight: 600;
}

/* =========================================
   PAGE HERO (inner pages)
   ========================================= */
.page-hero {
    background: var(--navy);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.page-hero h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-hero p  { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 560px; }

/* Optional per-page banner image: range-right, duotoned into brand navy.
   Uses greyscale + screen blend so the image "emerges" from the navy bg. */
.page-hero .container { position: relative; z-index: 2; }
.page-hero__img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 55%;
    max-width: 780px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.page-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%) contrast(1.15) brightness(0.95);
    mix-blend-mode: screen;
    opacity: 0.6;
}
/* Fade the left edge of the image into the solid navy so title text stays crisp */
.page-hero__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--navy) 0%, rgba(0,33,68,0) 45%);
    pointer-events: none;
}
/* Hide the decorative circle when a banner image is present */
.page-hero:has(.page-hero__img)::after { display: none; }

@media (max-width: 900px) {
    .page-hero__img { width: 70%; }
    .page-hero__img img { opacity: 0.35; }
    .page-hero__img::after { background: linear-gradient(90deg, var(--navy) 0%, rgba(0,33,68,0.4) 60%); }
}
@media (max-width: 640px) {
    .page-hero__img { display: none; }
}
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { color: rgba(255,255,255,0.4); }
.breadcrumb .current { color: rgba(255,255,255,0.9); }

/* =========================================
   CTA STRIP
   ========================================= */
.cta-strip {
    background: var(--navy-dark);
    padding: 84px 0;
    text-align: center;
}
.cta-strip h2 { color: var(--white); font-size: 32px; font-weight: 600; margin-bottom: 0; }
.cta-strip p  { color: #bcc8d8; margin-top: 14px; margin-bottom: 0; font-size: 16px; }
.cta-strip .btn { margin: 30px 7px 0; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--white);
    color: var(--grey-text);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--grey-light);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--grey-light);
    margin-bottom: 2rem;
}
.footer-brand__logo { margin-bottom: 1rem; }
.footer-brand__logo img { height: 44px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; }
.footer-col h4 { color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: var(--grey-text); font-size: 0.875rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--navy); }
.footer-col p { font-size: 0.875rem; }
.footer-col a { color: var(--grey-text); }
.footer-col a:hover { color: var(--navy); }
.footer-social { margin-top: 1rem; }
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 4px;
    color: var(--grey-text); transition: color var(--transition), background var(--transition);
}
.footer-social a:hover { color: var(--bm-navy); background: var(--off-white); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--grey-text);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* =========================================
   RESOURCES
   ========================================= */
.resource-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--white);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius);
    transition: box-shadow var(--transition);
}
.resource-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.resource-card__icon {
    width: 48px;
    height: 48px;
    background: var(--navy);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
    font-size: 1.25rem;
}
.resource-card__title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.2rem; }
.resource-card__meta { font-size: 0.8rem; color: var(--grey-text); margin: 0; }

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}
.pagination a, .pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1.5px solid var(--grey-light);
    color: var(--navy);
    transition: all var(--transition);
}
.pagination a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination .current { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .staff-grid { grid-template-columns: repeat(3, 1fr); }
    .suppliers-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 900px) {
    .grid-3, .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .contact-layout { grid-template-columns: 1fr; }
    .about-intro .grid-2 { grid-template-columns: 1fr; }
    .project-single__gallery { grid-template-columns: repeat(2, 1fr); }
    .project-single__video-grid { grid-template-columns: 1fr; }
    .suppliers-grid { grid-template-columns: repeat(3, 1fr); }
    .staff-grid { grid-template-columns: repeat(2, 1fr); }

    /* Mobile nav */
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 0 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .main-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .main-nav > li > a {
        padding: 0.85rem 1.5rem;
        border-radius: 0;
        font-size: 1rem;
        color: var(--white);
    }
    .main-nav > li > a:hover,
    .main-nav > li.current-menu-item > a,
    .main-nav > li.current-menu-ancestor > a {
        background: rgba(255,255,255,0.12);
        color: var(--white);
    }
    .main-nav .sub-menu {
        position: static;
        background: rgba(0,0,0,0.2);
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        min-width: 0;
        border-radius: 0;
    }
    .main-nav .sub-menu li a {
        color: rgba(255,255,255,0.75);
        padding: 0.65rem 2.5rem;
    }
    .main-nav .sub-menu li a:hover { background: rgba(255,255,255,0.08); color: var(--white); }
}

@media (max-width: 640px) {
    :root { --gutter: 1.25rem; }
    .section { padding: 48px 0; }
    .grid-2, .grid-3, .projects-grid, .grid-4 { grid-template-columns: 1fr; }
    .hero-banner { max-height: 450px; }
    .hero-slide__inner { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .suppliers-grid { grid-template-columns: repeat(2, 1fr); }
    .staff-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; text-align: center; }
    .project-single__gallery { grid-template-columns: 1fr; }
    .feature-strip .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================
   CATEGORY TILE — COLOURED FALLBACK
   ========================================= */
.cat-tile { position: relative; overflow: hidden; }

.cat-tile__bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-tile__watermark {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

/* Slight lift on hover for coloured tiles */
.cat-tile:hover .cat-tile__bg {
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

/* =========================================
   PRODUCT CATEGORY PAGE — LAYOUT WITH SIDEBAR
   ========================================= */
.cat-page-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
}
.cat-page-main {
    min-width: 0;
}

/* Sidebar navigation */
.product-nav {
    background: var(--white);
    border: 1px solid var(--grey-light);
    border-radius: var(--radius);
    padding: 0.5rem 0 0.75rem;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
}
.product-nav__title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--grey-text);
    padding: 0.5rem 1.25rem 0.75rem;
    margin: 0;
    border-bottom: 1px solid var(--grey-light);
    font-weight: 700;
}
.product-nav__list,
.product-nav__sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.product-nav__item {
    border-bottom: 1px solid var(--grey-light);
}
.product-nav__item:last-child {
    border-bottom: none;
}
.product-nav__row {
    display: flex;
    align-items: stretch;
}
.product-nav__link {
    flex: 1;
    padding: 0.75rem 1.25rem;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}
.product-nav__link:hover {
    background: var(--off-white);
}
.product-nav__link.is-current {
    background: var(--off-white);
    border-left-color: var(--teal);
}
.product-nav__toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 1rem;
    color: var(--grey-text);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}
.product-nav__toggle:hover {
    color: var(--navy);
}
.product-nav__item.is-expanded .product-nav__toggle {
    transform: rotate(180deg);
}
.product-nav__sublist {
    display: none;
    background: var(--off-white);
    padding-bottom: 0.5rem;
}
.product-nav__item.is-expanded .product-nav__sublist {
    display: block;
}
.product-nav__sublink {
    display: block;
    padding: 0.5rem 1.25rem 0.5rem 2.25rem;
    color: var(--grey-text);
    font-size: 0.85rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}
.product-nav__sublink:hover {
    color: var(--navy);
}
.product-nav__sublink.is-current {
    color: var(--navy);
    font-weight: 600;
    background: var(--white);
    border-left-color: var(--teal);
}

/* Mobile: stack sidebar above content */
@media (max-width: 900px) {
    .cat-page-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .product-nav {
        position: static;
    }
}
