/*
Theme Name: Element Four SA
Version: 1.0
Description: Custom Element Four South Africa WordPress theme.
*/







a { text-decoration: none; color: inherit; }

button, input, textarea, select { font: inherit; }





section { padding: 65px 0; }


h2 { font-size: 36px; color: var(--green); }







.btn {
    display: inline-block;
    background: var(--orange);
    color: #17261d;
    padding: 13px 23px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}





/* HEADER */

.top-bar {
    background: var(--dark);
    color: white;
    font-size: 12px;
    padding: 9px 0;
}



header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 2px 12px #00000012;
}

.header-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    color: var(--green);
    font-size: 34px;
    font-weight: bold;
    line-height: 1;
}







nav {
    display: flex;
    gap: 20px;
    font-size: 13px;
    font-weight: bold;
}



.menu-toggle { display: none; }

.delivery {
    background: var(--green);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* PAGE COVER BANNERS */

.page-banner {
    min-height: 320px;
    display: flex;
    align-items: center;
    background-color: var(--green);
    background-image:
        linear-gradient(90deg,#163d2cf5,#163d2c55),
        var(--cover,none);
    background-size: cover;
    background-position: center;
    color: white;
}

.page-banner h1 {
    font-size: clamp(36px,5vw,58px);
    margin: 15px 0;
}

.page-banner p {
    color: #e2eee3;
    max-width: 700px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--lime);
}

/* GRID LAYOUTS */

.grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.card {
    border: 1px solid var(--border);
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: .25s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px #244c3615;
}

.card-cover {
    height: 230px;
    background-color: #e8efe4;
    background-size: cover;
    background-position: center;
}





/* CATALOGUE */

.finder {
    background: white;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

.alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 25px 0;
}

.alphabet button {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    color: var(--green);
}

.alphabet button.active {
    background: var(--green);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}

.product-grid .card-cover {
    height: 190px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* FORMS */

form {
    background: white;
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 10px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
}

input, select, textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #cfdacf;
    border-radius: 5px;
    margin-bottom: 18px;
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.consent input { width: auto; }

.notice {
    background: var(--light);
    border-left: 4px solid var(--green);
    padding: 18px;
    margin-top: 20px;
}

/* FOOTER */







footer p, footer a {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.footer-links a {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
}



.copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

/* MOBILE RESPONSIVE DESIGN */

@media(max-width:1100px) {
    .header-inner { flex-wrap: wrap; padding: 15px 0; }

    .menu-toggle {
        display: block;
        background: var(--green);
        color: white;
        border: 0;
        padding: 10px 15px;
        margin-left: auto;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        order: 4;
    }

    nav.open { display: flex; }

    .grid, .product-grid, .footer-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(max-width:650px) {
    section { padding: 40px 0; }

    .top-inner { flex-direction: column; text-align: center; }

    .grid, .split, .search-row,
    .form-row, .footer-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .card-content { padding: 15px; }
    .page-banner { min-height: 260px; }
    h2 { font-size: 28px; }
}




:root {
    --green: #244c36;
    --dark: #163d2c;
    --orange: #e67d23;
    --lime: #a6cb54;
    --light: #f5f8f4;
    --border: #dce7dc;
    --muted: #65736b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: white;
    color: #26352b;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: auto;
}

section {
    padding: 70px 0;
}

h1, h2, h3 {
    line-height: 1.2;
}

h2 {
    color: var(--green);
    font-size: clamp(28px,4vw,40px);
    margin: 15px 0 20px;
}

h3 {
    color: var(--green);
}

p {
    color: var(--muted);
}

.eyebrow {
    color: var(--green);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.light {
    background: var(--light);
}

.btn {
    display: inline-block;
    padding: 13px 23px;
    background: var(--orange);
    color: #17261d;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: .2s;
}

.btn:hover {
    filter: brightness(.92);
}

.btn-green {
    background: var(--green);
    color: white;
}

/* TOP CONTACT BAR */

.top-bar {
    background: var(--dark);
    color: white;
    padding: 9px 0;
    font-size: 12px;
}

.top-inner {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

/* MAIN HEADER */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 2px 15px #00000012;
}

.header-inner {
    min-height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: inline-block;
    font-size: 34px;
    font-weight: bold;
    color: var(--green);
    line-height: 1;
    white-space: nowrap;
}

.logo span {
    color: var(--orange);
}

.logo small {
    display: block;
    color: #71982d;
    font-size: 13px;
    text-align: right;
    letter-spacing: 2px;
}

.logo img {
    width: 180px;
    height: 65px;
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    font-weight: bold;
}

nav a:hover,
nav a.active {
    color: var(--orange);
}

.menu-toggle {
    display: none;
    background: var(--green);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
}

/* ORANGE FREE DELIVERY BANNER */

.delivery {
    background: var(--orange);
    color: #ffffff;
    text-align: center;
    padding: 11px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

/* IMAGE SLIDESHOW */

.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;
    padding: 0;
    overflow: hidden;
    background: var(--dark);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* CLICKABLE AREAS ON SLIDESHOW IMAGES */

.slide-link {
    position: absolute;
    display: block;
    z-index: 2;
    border-radius: 5px;
}

.slide-link:hover {
    background: #ffffff12;
}

.slide-link:focus-visible {
    outline: 3px solid white;
}

.explore-link {
    left: 6%;
    top: 72%;
    width: 16%;
    height: 13%;
}

.quote-link {
    left: 23%;
    top: 72%;
    width: 16%;
    height: 13%;
}

/* SLIDESHOW ARROWS */

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    color: white;
    background: #163d2c70;
    border: 1px solid #ffffff60;
    padding: 12px;
    font-size: 20px;
}

.arrow:hover {
    background: var(--green);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.dots button {
    width: 12px;
    height: 12px;
    border: none;
    padding: 0;
    border-radius: 50%;
    background: #ffffff66;
}

.dots button.active {
    background: var(--lime);
}

/* COMPANY CREDENTIALS */

.trust {
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
}

.trust-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--green);
    font-size: 13px;
    font-weight: bold;
}

/* PRODUCT CATEGORY COVERS */

.section-heading {
    max-width: 750px;
    margin-bottom: 35px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 25px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: .25s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px #244c3618;
}

.card-cover {
    height: 230px;
    background-color: #e8efe4;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-top: 0;
    font-size: 21px;
}

.card-content p {
    font-size: 14px;
}

.card-content strong {
    color: var(--green);
    font-size: 13px;
}

.cover-liquid {
    background-image: url("images/liquid-chemicals.png");
}

.cover-dry {
    background-image: url("images/dry-chemicals.png");
}

.cover-glassware {
    background-image: url("images/glassware.png");
}

.cover-plasticware {
    background-image: url("images/plasticware.png");
}

.cover-ppe {
    background-image: url("images/ppe.png");
}

.cover-equipment {
    background-image: url("images/equipment.png");
}

.center-button {
    text-align: center;
    margin-top: 35px;
}

/* A-Z CATALOGUE SEARCH */

.catalogue-search {
    display: flex;
    gap: 15px;
    max-width: 850px;
    margin: 25px 0;
}

.catalogue-search input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: white;
}

.catalogue-search button {
    white-space: nowrap;
}

/* ABOUT US */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 55px;
}

.photo {
    min-height: 350px;
    background-color: #e8efe4;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

.about-photo {
    background-image: url("images/about-us.jpg");
}

.office-photo {
    background-image: url("images/office.jpg");
}

/* INDUSTRIES */

.industries {
    background: var(--green);
    color: white;
}

.industries h2 {
    color: white;
}

.industries .eyebrow {
    color: var(--lime);
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
}

.industry-grid div {
    padding: 25px 15px;
    border: 1px solid #ffffff40;
    background: #ffffff0d;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

/* TECHNICAL DOCUMENTS */

.document-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.document-card {
    padding: 35px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.document-icon {
    display: inline-block;
    padding: 18px;
    background: var(--green);
    color: white;
    border-radius: 6px;
    font-weight: bold;
}

/* LATEST NEWS */

.news-christmas {
    background-image: url("images/news-christmas.jpg");
}

.news-products {
    background-image: url("images/news-products.jpg");
}

.news-company {
    background-image: url("images/news-company.jpg");
}

/* QUOTATION BANNER */

.quote-banner {
    background: var(--green);
    color: white;
    padding: 50px 0;
}

.quote-banner h2 {
    color: white;
    margin-top: 0;
}

.quote-banner p {
    color: #e1eee1;
}

/* FOOTER */

footer {
    background: white;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 35px;
    padding: 55px 0;
}

footer h3 {
    font-size: 16px;
}

footer p {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.footer-links a {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 9px;
    overflow-wrap: anywhere;
}

.footer-links a:hover {
    color: var(--orange);
}

.copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

/* RESPONSIVE DESIGN */

@media(max-width:1100px) {

    .header-inner {
        flex-wrap: wrap;
        padding: 15px 0;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        order: 4;
    }

    nav.open {
        display: flex;
    }

    .grid,
    .industry-grid,
    .footer-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .split {
        gap: 30px;
    }
}

@media(max-width:650px) {

    section {
        padding: 45px 0;
    }

    .top-inner {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .hero {
        aspect-ratio: 3 / 1;
    }

    .arrow {
        font-size: 13px;
        padding: 5px;
    }

    .dots {
        bottom: 5px;
        gap: 5px;
    }

    .dots button {
        width: 7px;
        height: 7px;
    }

    .grid,
    .split,
    .document-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .catalogue-search {
        flex-direction: column;
    }

    .photo {
        min-height: 250px;
    }

    .header-inner > .btn {
        padding: 10px;
        font-size: 12px;
    }

    .delivery {
        font-size: 10px;
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
    }
}


/* Keep compact catalogue search separate from full enquiry forms. */
.catalogue-search { padding: 0; border: 0; border-radius: 0; background: transparent; }
.catalogue-search input { margin-bottom: 0; }


/* Product categories: four above, three below */
.ef-category-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 24px;
}

.ef-category-grid > .card {
    grid-column: span 2;
    min-width: 0;
}

.ef-category-grid > .card:nth-child(5) {
    grid-column: 2 / span 2;
}

@media (max-width: 900px) {
    .ef-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ef-category-grid > .card,
    .ef-category-grid > .card:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .ef-category-grid {
        grid-template-columns: 1fr;
    }
}
