/* 
==========================================================================
CSS STYLES
Adapted from the template to match the Kapiti Piling & Earthworks brand.
==========================================================================
*/

/* --- Theme Color Variables (Branding from Kapiti Piling) --- */
:root {
    --color-primary: #bb2435; /* Primary red from Kapiti Piling */
    --color-accent: #343a40;  /* Dark grey for accents */
    --color-black: #ffffff; /* Changed to white for main background */
    --color-dark: #f8f9fa; /* Changed to light grey for section backgrounds */
    --color-dark-grey: #e9ecef; /* Changed to another light grey */
    --color-light-grey: #f0f2f5;
    --color-white: #080808; /* Changed to black for main text */
    --color-text-muted: #6c757d; /* Standard muted grey text */
    --border-color: rgba(0, 0, 0, 0.1); /* Light black border */
}

/* --- Global Styles & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Lenis Smooth Scroll specific styles */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.menu-open, html.lightbox-open { overflow: hidden; } /* Prevents scrolling when mobile menu is open */

html {
    font-size: calc(0.75rem + 0.25vw);
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--color-white);
    background-color: var(--color-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection { background: var(--color-primary); color: white; }
::-moz-selection { background: var(--color-primary); color: white; }

/* --- Layout & Containers --- */
.padding-global { padding: 0 2rem; }
.container-large { max-width: 1400px; margin: 0 auto; }
.container-medium { max-width: 1200px; margin: 0 auto; }
.max-width-small { max-width: 700px; }
.max-width-large { max-width: 900px; }
.align-center { margin-left: auto; margin-right: auto; }

.section { padding: 8rem 0; }
.section-header { text-align: center; margin-bottom: 5rem; }
.tagline { color: var(--color-accent); font-family: 'Oswald', sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; }
.tagline_dot { width: 10px; height: 10px; background-color: var(--color-primary); border-radius: 50%; }
.section-header h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-family: 'Oswald', sans-serif; font-weight: 700; text-transform: uppercase; color: var(--color-white);}
.section-header p { font-size: 1.25rem; color: var(--color-text-muted); margin-top: 1.5rem; }

/* --- Typography --- */
h1, h2, h3, h4 { line-height: 1.2; font-family: 'Oswald', sans-serif; text-transform: uppercase; color: var(--color-white);}
h1 { font-size: clamp(3.5rem, 7vw, 5rem); font-weight: 700; color: white; }
h2 { font-size: clamp(2.8rem, 5.5vw, 4rem); font-weight: 700; }
h3 { font-size: 1.75rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }
p { color: var(--color-text-muted); }
a { color: var(--color-accent); text-decoration: none; transition: color 0.3s; cursor: pointer; }
a:hover { color: var(--color-white); }
button, .dropdown-toggle, .tabs_link { cursor: pointer; }

/* --- Buttons --- */
.button-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.button {
    padding: 1rem 2.25rem;
    border-radius: 4px; /* Squared off to match original brand */
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: 2px solid transparent;
}
.button.is-primary { background-color: var(--color-primary); color: white; }
.button.is-primary:hover { background-color: #a11f2d; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(187, 36, 53, 0.2); }
.button.is-secondary { background-color: transparent; color: var(--color-white); border-color: var(--color-accent); }
.button.is-secondary:hover { background-color: var(--color-accent); color: var(--color-black); transform: translateY(-3px); }

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    will-change: transform;
    --padding-start: 1.5rem;
    --padding-end: 0.625rem; /* 10px */
    padding-block: var(--padding-start);
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.3s ease;
}
.nav_container { display: flex; justify-content: space-between; align-items: center; }
.nav_logo-link { flex-shrink: 0; z-index: 1001; }
.nav_logo { height: 3.75rem; /* 60px */ transition: transform 0.3s ease; }
.nav_logo-link:hover .nav_logo { transform: scale(1.05); }
.nav_menu { display: flex; align-items: center; gap: 2.5rem; }
.nav_link-list { display: flex; align-items: center; list-style: none; gap: 2.25rem; }
.nav_link a, .dropdown-toggle { font-family: 'Oswald', sans-serif; color: var(--color-white); text-decoration: none; font-weight: 500; text-transform: uppercase; font-size: 1rem; letter-spacing: 1px; position: relative; padding-bottom: 5px; }
.nav_link a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--color-primary); transition: width 0.3s ease; }
.nav_link a:hover::after, .nav_link a.active::after { width: 100%; }
.nav_link:hover a, .nav_link a.active { color: var(--color-primary); }
.nav_menu-button { display: none; color: var(--color-white); z-index: 1001; }
.nav_menu-mobile { display: none; }

/* --- Header / Hero Section --- */
.header { height: 100vh; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; color: white; }
.header_bg-wrap { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -2; }
.header_bg-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(3, 3, 3, 0.6); z-index: -1; }
.header_bg { width: 100%; height: 100%; object-fit: cover; }
.header_content { position: relative; text-align: center; }
.header_content .max-width-large { max-width: 675px; } /* MODIFICATION: Reduced hero box container size */
.hero-box {
    background: rgba(19, 26, 27, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.25rem;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.header_content h1 { color: #fdfdfd; }
.header_content p { font-size: 1.5rem; line-height: 1.8; margin: 1.5rem auto 2.5rem; color: #fdfdfd; opacity: 0.9; }

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--color-black);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--color-primary);
}
.service-card .icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}
.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-white);
}

/* --- About & Why Choose Us Section --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about-image img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.why-choose-us-list { list-style: none; padding: 0; margin-top: 2.5rem; }
.why-choose-us-list li { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; }
.why-choose-us-list i { flex-shrink: 0; color: var(--color-primary); font-size: 1.5rem; margin-top: 5px; }
.why-choose-us-list h4 { font-size: 1.2rem; margin-bottom: 0.25rem; text-transform: none; font-family: 'Roboto', sans-serif;}
.why-choose-us-list p { font-size: 1rem; margin-bottom: 0; }

/* --- Projects Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}
.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    display: block;
    text-decoration: none;
}
.gallery-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease, filter 0.4s ease;
    border: 1px solid var(--border-color);
}
.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.4);
}
.gallery-item .title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.gallery-item:hover .title-overlay {
    opacity: 1;
    transform: translateY(0);
}
.gallery-item .title-overlay h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

/* --- Promotions Banner --- */
.promo-banner { background: linear-gradient(135deg, var(--color-primary) 0%, #a12a21 100%); border-radius: 1.5rem; padding: 5rem 3rem; text-align: center; }
.promo-banner h3 { font-size: 2.5rem; color: #fdfdfd; }
.promo-banner p { font-size: 1.2rem; max-width: 600px; margin: 1.5rem auto 0; color: #fdfdfd; opacity: 0.9;}

/* --- Testimonials Section --- */
#testimonials { background: var(--color-dark); }
.swiper-slide { height: auto; }
.testimonial-card { background: var(--color-black); border-left: 5px solid var(--color-primary); border-radius: 0 8px 8px 0; padding: 2.5rem; height: 100%; display: flex; flex-direction: column; }
.testimonial-text { font-size: 1.1rem; font-style: italic; margin-bottom: 2rem; flex-grow: 1; color: var(--color-text-muted);}
.testimonial-author { margin-top: auto; display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--color-dark), var(--color-primary)); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: bold; color: white; flex-shrink: 0;}
.author-info h4 { color: var(--color-accent); margin: 0; text-transform:uppercase; font-family: 'Oswald', sans-serif; }
.author-info p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }
.swiper-pagination { position: relative; margin-top: 3rem; bottom: 0; }
.swiper-pagination-bullet { background: var(--color-text-muted); }
.swiper-pagination-bullet-active { background: var(--color-primary); }

/* --- Service Area Section --- */
.location-card { background: var(--color-dark-grey); border: 1px solid var(--border-color); border-radius: 1rem; padding: 2rem; }
.location-card h4 { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.location-card h4 i { color: var(--color-primary); }
.location-card p { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; font-size: 0.9rem; }
.location-card p i { color: var(--color-text-muted); width: 16px; text-align: center; }

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
    background: var(--color-black);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 4rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.contact-wrapper .section-header { margin-bottom: 3rem; text-align: left; }
.contact-wrapper .section-header h2::after { margin: 10px 0 0; }
.form_input, .form_select, .form_textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: #fff;
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}
.form_input:focus, .form_select:focus, .form_textarea:focus { outline: none; border-color: var(--color-primary); background: #fff; box-shadow: 0 0 0 4px rgba(187, 36, 53, 0.2); }
.form-group { margin-bottom: 1.5rem; }
.map-container { width: 100%; height: 100%; min-height: 400px; }
.map-container iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }

/* --- Footer --- */
.footer { background-color: #1d1d1d; padding-top: 6rem; color: var(--color-text-muted);}
.footer p, .footer a { color: var(--color-text-muted); }
.footer a:hover { color: #ffffff; }
.footer_component { border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 4rem; }
.footer_top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4rem; align-items: start; }
.footer_logo-link { display: block; margin-bottom: 1.5rem; }
.footer_logo { height: 3.75rem; }
.footer_link-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem;}
.footer_link { position: relative; }
.footer_link-border { position: absolute; bottom: -3px; left: 0; width: 100%; height: 1px; background-color: var(--color-primary); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.footer_link:hover .footer_link-border { transform: scaleX(1); }
.footer h4 { margin-bottom: 1.5rem; color: #ffffff; font-size: 1.2rem;}
.footer_contact-info li { margin-bottom: 10px; display: flex; align-items: center; }
.footer_contact-info i { color: var(--color-primary); margin-right: 10px; width: 20px; }
.footer_bottom { padding: 2rem 0; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.footer-powered-by { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.footer-powered-by a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.footer-powered-by p { margin: 0; padding: 0; font-size: 0.9rem;}
.footer-powered-by img { height: 1rem; object-fit: contain; filter: invert(1) brightness(0.6) grayscale(1); opacity: 0.8;}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .nav_menu { display: none; }
    .nav_menu-button { display: block; cursor: pointer; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-image { order: -1; margin-bottom: 3rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .map-container { order: 1; }

    /* Mobile Navigation Menu */
    .nav_menu-mobile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }
    .nav_menu-mobile.is-open { transform: translateX(0); }
    .nav_menu-mobile .nav_link-list { flex-direction: column; gap: 2rem; text-align: center; }
    .nav_menu-mobile .nav_link a, .nav_menu-mobile .dropdown-toggle { font-size: 1.5rem; color: var(--color-white); }
    .nav_menu-mobile .nav_menu-close-button { position: absolute; top: 2rem; right: 2rem; font-size: 1.5rem; color: var(--color-white); cursor: pointer; }
}
@media (max-width: 767px) {
    .padding-global { padding: 0 1rem; }
    .section { padding: 5rem 0; }
    
    /* === EDITED: Mobile Hero Styles === */
    .header_bg-wrap {
        background: url('images/b2.jpg') no-repeat center center/cover;
    }
    .header_bg {
        display: none; /* Hide the desktop img tag on mobile */
    }
    .hero-box { 
        padding: 1rem;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
    }
    .header_content h1 {
        font-size: clamp(2.8rem, 10vw, 3.5rem); /* Smaller font size for mobile */
        text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.9); /* Black glow for readability */
    }
    .header_content p {
        font-size: 1.2rem; /* Slightly smaller font size for mobile */
        text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.9); /* Black glow for readability */
    }
    /* === END EDIT === */

    .contact-wrapper { padding: 2rem 1.5rem; }
    .footer_top { grid-template-columns: 1fr; text-align: center; }
    .footer_link-list { align-items: center;}
    .footer_bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .nav_menu-mobile .nav_menu-close-button { right: 1rem; }
    .footer-powered-by { flex-direction: column; gap: 0.5rem;}
}