/* PEC content update: grouped services menu, stats, inquiry form, service pillars */

/* Keep the open services menu above a fixed WhatsApp widget.
   The header used to stack at z-index 9, so a floating chat button
   painted over the dropdown and stole the click. */
#header-sticky,
#header-sticky.sticky {
    z-index: 1000000;
}

/* The dimming layer has to sit above the page and any floating
   chat button, and under the panel. It follows .offcanvas__info in
   the DOM, so an equal z-index paints it across the menu and every
   tap (Home, services expander, contact, social) hits the overlay. */
.offcanvas__overlay.overlay-open {
    z-index: 1000001;
}

.offcanvas__info,
.mean-container .mean-bar,
.mean-container .mean-nav {
    z-index: 1000002;
}

/* translateX(0) is still a transform. iOS Safari does not deliver
   taps to controls inside a fixed, overflow-scrolling element that
   has one. none is the same open position, and the slide still runs. */
.offcanvas__info.info-open {
    -webkit-transform: none;
    transform: none;
}

.services-menu {
    min-width: 340px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000003;
}

.services-menu a {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.header-main .main-menu ul li .submenu li.menu-group-label > span,
.mean-container .mean-nav ul li.menu-group-label > span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    color: #8a6a12 !important;
    background: #f6f1e4;
    cursor: default;
    padding: 10px 25px;
    border-bottom: 1px solid #eeeeee;
}

/* Keep the hero copy in normal flow and the image collage in its own column. */
.home-hero {
    padding: 72px 0 96px;
    background-image: linear-gradient(90deg, rgba(242, 244, 247, 0.92), rgba(242, 244, 247, 0.85)), url("../../hero/pec-engineering-light-bg-left-logo.png");
    background-position: center;
    background-size: cover;
}

.home-hero[dir="rtl"] {
    direction: rtl;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
}

.home-hero .hero-content {
    min-width: 0;
    text-align: start;
}

.home-hero h1 {
    margin: 0 0 24px;
    font-size: clamp(36px, 3.5vw, 56px);
    line-height: 1.2;
    text-wrap: balance;
}

.home-hero[dir="rtl"] h1 {
    font-size: clamp(32px, 3.1vw, 50px);
    line-height: 1.55;
}

.home-hero .hero-lead {
    margin: 0;
    max-width: 100%;
    font-size: 18px;
    line-height: 1.9;
    text-align: start;
}

.home-hero-actions {
    margin-top: 12px;
}

.home-hero-media {
    position: relative;
    min-width: 0;
    padding-bottom: 28px;
    padding-inline-start: 24px;
}

.home-hero-main {
    display: block;
    width: 100%;
    height: clamp(440px, 39vw, 560px);
    object-fit: cover;
    border-radius: 12px;
}

.home-hero-inset {
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 43%;
    border: 7px solid #f2f4f7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(25, 39, 27, 0.12);
}

.home-hero-inset img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.home-hero .client-items {
    position: absolute;
    bottom: 48px;
    inset-inline-end: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 52%;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(25, 39, 27, 0.1);
}

.home-hero .client-items > img {
    width: clamp(60px, 6vw, 92px);
    height: auto;
}

.home-hero .client-content {
    text-align: center;
}

.home-hero .client-content h3 {
    font-size: 24px;
    line-height: 1.4;
    white-space: nowrap;
}

.home-hero .client-content p {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 991px) {
    .home-hero {
        padding: 48px 0 64px;
    }

    .home-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .home-hero .hero-content,
    .home-hero-media {
        width: 100%;
        max-width: 640px;
        margin-inline: auto;
    }

    .home-hero-main {
        height: 480px;
    }
}

@media (max-width: 575px) {
    .home-hero {
        padding: 32px 0 48px;
    }

    .home-hero h1,
    .home-hero[dir="rtl"] h1 {
        font-size: 30px;
        margin-bottom: 20px;
    }

    .home-hero .hero-lead {
        font-size: 16px;
    }

    .home-hero-media {
        padding-inline-start: 12px;
        padding-bottom: 20px;
    }

    .home-hero-main {
        height: 380px;
    }

    .home-hero-inset {
        border-width: 5px;
    }

    .home-hero .client-items {
        bottom: 36px;
        inset-inline-end: 12px;
        gap: 8px;
        padding: 10px;
    }

    .home-hero .client-content h3 {
        font-size: 20px;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 48px;
}

.stat-item {
    background: #fff;
    border-radius: 8px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.stat-item h3 {
    margin-bottom: 6px;
    font-size: 32px;
}

.stat-item p {
    margin: 0;
}

.major-projects-copy p,
.about-content p,
.service-pillar p {
    line-height: 1.9;
}

.why-pec-title,
.partners-title {
    margin-top: 28px;
    margin-bottom: 10px;
}

.service-pillars {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.service-pillar {
    background: #fff;
    border-radius: 8px;
    padding: 20px 22px;
    border-inline-start: 4px solid var(--theme, #c6a15b);
}

.service-pillar h4 {
    margin-bottom: 8px;
}

.service-pillar p {
    margin: 0;
}

.contact-form-items .form-clt label,
.file-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-form-items .req {
    color: #b42318;
}

.contact-form-items .opt {
    font-weight: 400;
    color: #667085;
}

.contact-form-items .plain-select,
.contact-form-items select.plain-select {
    width: 100%;
    border: 1px solid var(--border, #e6e6e6);
    background: #fff;
    min-height: 58px;
    padding: 12px 16px;
    border-radius: 5px;
    color: inherit;
}

.contact-form-items input[type="file"] {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border, #e6e6e6);
    border-radius: 5px;
    padding: 14px;
}

.contact-form-items .file-help {
    display: block;
    margin-top: 8px;
}

.brand-section .section-title {
    margin-bottom: 24px;
}

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

@media (max-width: 575px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
