/*
Theme Name: WoodMart Child — MASS Construction
Theme URI: https://massconstruction.com.pk
Author: MASS Construction Services
Author URI: https://massconstruction.com.pk
Description: Child theme of WoodMart for MASS Construction Services — preview-style layout (full-width hero, service and project cards, steps, stats, FAQ) built on the WoodMart theme's own colours. Light and fast: plain CSS, no libraries, no extra plugins.
Version: 2.2.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: woodmart
Text Domain: woodmart-child-mass
Tags: construction, responsive
*/

/* ============================================================
   MASS Construction Services — Child theme v2 (fresh rebuild)
   Layout follows the approved preview; colours follow the
   WoodMart theme (primary = light blue). Gold #C9A24B is used
   only as a small brand accent (underlines, numbers, markers).
   No heavy libraries, no extra plugins, no large images.
   ============================================================ */

:root {
    --mass-gold: #C9A24B;
    --mass-ink: #0B1F3A;
    --mass-soft-bg: #F6F7F8;
    --mass-border: #E6E8EA;
}

/* ---------- Smooth anchor scrolling (footer service links) ---------- */
html {
    scroll-behavior: smooth;
}

/* Full-bleed sections use 100vw; stop any sideways scroll this can cause.
   `clip` (unlike `hidden`) does not break sticky headers. */
html,
body {
    overflow-x: clip;
}

h2[id],
.mass-sec[id] {
    scroll-margin-top: 90px;
}

/* ---------- Hide the header shop UI (WooCommerce is not a shop here) ---------- */
.whb-header .wd-header-my-account,
.whb-header .wd-header-wishlist,
.whb-header .wd-header-compare,
.whb-header .wd-header-cart,
.whb-header .wd-tools-element.wd-header-cart,
.whb-header .wd-header-mobile-nav .wd-tools-element.wd-header-cart {
    display: none !important;
}

/* ---------- WhatsApp floating button ---------- */
.mass-whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mass-whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    color: #ffffff;
}

.mass-whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* ---------- Hero 3D parallax (first picture) ---------- */
.mass-hero {
    position: relative;
    overflow: hidden;
}

.mass-hero [data-speed],
.mass-hero-bg,
.mass-hero-glow,
.mass-hero-copy,
.mass-hero-frame,
.mass-hero-chip {
    will-change: transform;
}

.mass-hero-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: -13%;
    height: 126%;
    width: 100%;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    .mass-hero [data-speed],
    .mass-hero-bg,
    .mass-hero-glow,
    .mass-hero-copy,
    .mass-hero-frame,
    .mass-hero-chip {
        transform: none !important;
    }
}

/* ---------- Full-width photo hero with overlay text ---------- */
/* The hero group is a plain Gutenberg group: figure + H1 + text +
   buttons. CSS alone turns it into the preview-style overlay hero. */
.entry-content > .mass-hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px max(20px, calc((100vw - 1222px) / 2));
    color: #ffffff;
}

.entry-content > .mass-hero > figure.wp-block-image {
    margin: 0;
}

.entry-content > .mass-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(5, 20, 35, 0.78) 0%, rgba(5, 20, 35, 0.45) 55%, rgba(5, 20, 35, 0.25) 100%);
}

.entry-content > .mass-hero > :not(figure):not(::before) {
    position: relative;
    z-index: 2;
}

.entry-content > .mass-hero .mass-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 660px;
}

.entry-content > .mass-hero h1 {
    color: #ffffff;
    font-size: 46px;
    line-height: 1.12;
    margin: 0 0 14px;
}

.entry-content > .mass-hero p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
    line-height: 1.5;
    margin: 0 0 26px;
}

.entry-content > .mass-hero .wp-block-buttons {
    gap: 12px;
}

/* ---------- Page sections (wrapped by functions.php) ---------- */
.mass-sec {
    padding: 60px 0;
}

.mass-sec--alt {
    background: var(--mass-soft-bg);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(20px, calc((100vw - 1222px) / 2));
    padding-right: max(20px, calc((100vw - 1222px) / 2));
}

.mass-sec > h2 {
    text-align: center;
    font-size: 32px;
    line-height: 1.25;
    margin: 0 0 10px;
}

.mass-sec > h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 16px auto 0;
    background: var(--mass-gold);
}

.mass-sec > h2 + p {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 34px;
    color: #555;
}

/* Intro / welcome section: left-aligned reading text */
.mass-sec--welcome-to-mass-construction-services > h2,
.mass-sec--our-history-since-1977 > h2,
.mass-sec--our-vision > h2,
.mass-sec--our-mission > h2,
.mass-sec--our-quality-commitment > h2,
.mass-sec--about-this-project > h2 {
    text-align: left;
}

.mass-sec--welcome-to-mass-construction-services > h2::after,
.mass-sec--our-history-since-1977 > h2::after,
.mass-sec--our-vision > h2::after,
.mass-sec--our-mission > h2::after,
.mass-sec--our-quality-commitment > h2::after,
.mass-sec--about-this-project > h2::after {
    margin-left: 0;
}

.mass-sec--welcome-to-mass-construction-services > h2 + p,
.mass-sec--our-history-since-1977 > h2 + p,
.mass-sec--our-vision > h2 + p,
.mass-sec--our-mission > h2 + p,
.mass-sec--our-quality-commitment > h2 + p,
.mass-sec--about-this-project > h2 + p {
    text-align: left;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ---------- Card grids (services, projects, testimonials) ---------- */
.mass-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.mass-card {
    background: #ffffff;
    border: 1px solid var(--mass-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mass-card figure.wp-block-image {
    margin: 0;
}

.mass-card figure.wp-block-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.mass-card h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 18px 20px 8px;
}

.mass-card p {
    margin: 0 20px 16px;
    color: #555;
    flex-grow: 1;
}

.mass-card .wp-block-buttons {
    margin: 0 20px 20px;
}

.mass-card .wp-block-button__link {
    font-size: 14px;
    padding: 10px 18px;
}

/* ---------- Buttons: theme primary colour ---------- */
/* Deliberately strong: both WordPress core block CSS and WoodMart set
   button backgrounds, so a plain class selector loses the cascade and
   the hero buttons rendered dark-on-dark. The !important here only
   covers button background/text colour, nothing else. */
body .entry-content .wp-block-button__link,
body .entry-content .wp-block-button .wp-element-button {
    background: var(--wd-primary-color, #8ecbde) !important;
    color: var(--mass-ink) !important;
    border-radius: 8px;
    font-weight: 600;
}

body .entry-content .wp-block-button__link:hover,
body .entry-content .wp-block-button .wp-element-button:hover {
    filter: brightness(0.94);
    color: var(--mass-ink) !important;
}

/* Hero buttons: white pills on the dark photo, always legible. */
body .entry-content > .mass-hero .wp-block-button__link {
    background: #ffffff !important;
    color: var(--mass-ink) !important;
}

/* ---------- Why Choose MASS: checklist cards ---------- */
.mass-why {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.mass-why li {
    background: #ffffff;
    border: 1px solid var(--mass-border);
    border-radius: 10px;
    padding: 16px 18px 16px 46px;
    position: relative;
    line-height: 1.55;
}

.mass-why li::before {
    content: "\2713";
    position: absolute;
    left: 16px;
    top: 15px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mass-gold);
    color: #ffffff;
    font-size: 13px;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
}

/* ---------- How We Work: 6 numbered step cards ---------- */
.mass-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    counter-reset: mass-step;
}

.mass-steps li {
    background: #ffffff;
    border: 1px solid var(--mass-border);
    border-top: 3px solid var(--wd-primary-color, #8ecbde);
    border-radius: 10px;
    padding: 22px 20px;
    line-height: 1.55;
    counter-increment: mass-step;
}

.mass-steps li::before {
    content: counter(mass-step, decimal-leading-zero);
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: var(--mass-gold);
    line-height: 1;
    margin-bottom: 10px;
}

.mass-steps li strong {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
}

/* ---------- MASS in Numbers: stat blocks ---------- */
.mass-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.mass-stats li {
    background: #ffffff;
    border: 1px solid var(--mass-border);
    border-radius: 10px;
    padding: 24px 14px;
}

.mass-stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--mass-gold);
}

.mass-stat-label {
    display: block;
    margin-top: 6px;
    color: #555;
    line-height: 1.45;
}

/* ---------- Testimonials ---------- */
.mass-grid--testi {
    grid-template-columns: repeat(3, 1fr);
}

.mass-testi {
    background: #ffffff;
    border: 1px solid var(--mass-border);
    border-left: 3px solid var(--mass-gold);
    border-radius: 10px;
    padding: 22px 20px;
    font-style: italic;
    line-height: 1.65;
    margin: 0;
}

.mass-testi::before {
    content: "\201C";
    display: block;
    font-size: 44px;
    line-height: 0.6;
    color: var(--mass-gold);
    font-style: normal;
    margin-bottom: 10px;
}

/* ---------- FAQ accordion ---------- */
.mass-faq {
    background: #ffffff;
    border: 1px solid var(--mass-border);
    border-radius: 10px;
    padding: 0 20px;
    margin-bottom: 12px;
}

.mass-faq summary {
    cursor: pointer;
    padding: 16px 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mass-faq summary::-webkit-details-marker {
    display: none;
}

.mass-faq summary h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.mass-faq summary::after {
    content: "+";
    font-size: 24px;
    line-height: 1;
    color: var(--mass-gold);
    font-weight: 700;
    flex-shrink: 0;
}

.mass-faq[open ] summary::after {
    content: "\2212";
}

.mass-faq > p {
    margin: 0 0 18px;
    color: #555;
    line-height: 1.65;
}

/* ---------- CTA band ---------- */
.mass-sec--cta {
    background: var(--wd-primary-color, #8ecbde);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(20px, calc((100vw - 1222px) / 2));
    padding-right: max(20px, calc((100vw - 1222px) / 2));
}

.mass-sec--cta > h2,
.mass-sec--cta > p {
    color: var(--mass-ink);
}

.mass-sec--cta > h2::after {
    background: #ffffff;
}

.mass-sec--cta > h2 + p {
    color: rgba(11, 31, 58, 0.85);
}

.mass-sec--cta .wp-block-buttons {
    justify-content: center;
}

.mass-sec--cta .wpcf7 {
    max-width: 640px;
    margin: 28px auto 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 26px 26px 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.mass-sec--cta .wpcf7 form p {
    text-align: left;
}

/* ---------- Services page: alternating image/text rows ---------- */
.mass-service {
    padding: 44px 0;
}

.mass-service > h2 {
    text-align: left;
    grid-column: 2;
}

.mass-service > h2::after {
    margin-left: 0;
}

.mass-service {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    align-items: start;
}

.mass-service > figure.wp-block-image {
    grid-column: 1;
    grid-row: 1 / span 6;
    margin: 0;
}

.mass-service > figure.wp-block-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.mass-service > h2,
.mass-service > p,
.mass-service > h3,
.mass-service > ul,
.mass-service > .wp-block-buttons {
    grid-column: 2;
}

.mass-service > h2 + p {
    text-align: left;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.mass-service:nth-of-type(even) > figure.wp-block-image {
    grid-column: 2;
}

.mass-service:nth-of-type(even) > h2,
.mass-service:nth-of-type(even) > p,
.mass-service:nth-of-type(even) > h3,
.mass-service:nth-of-type(even) > ul,
.mass-service:nth-of-type(even) > .wp-block-buttons {
    grid-column: 1;
}

.mass-service > h3 {
    margin-top: 18px;
}

/* ---------- Checklists (benefits, scope, details, values) ---------- */
.mass-checklist {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.mass-checklist li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.55;
}

.mass-checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--mass-gold);
    font-weight: 700;
}

/* ---------- Project pages: photo gallery ---------- */
.mass-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mass-gallery figure.wp-block-image {
    margin: 0;
}

.mass-gallery figure.wp-block-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* ---------- Lead-gen forms: tidy inputs ---------- */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    border-radius: 8px;
}

.wpcf7-form input[type="submit"] {
    background: var(--wd-primary-color, #8ecbde);
    color: var(--mass-ink);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    padding: 12px 26px;
    cursor: pointer;
}

.wpcf7-form input[type="submit"]:hover {
    filter: brightness(0.94);
}

/* ---------- Content images: keep them tidy ---------- */
.entry-content .wp-block-image img {
    border-radius: 10px;
}

.entry-content > .mass-hero .wp-block-image img {
    border-radius: 0;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 1024px) {
    .mass-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .mass-service {
        column-gap: 28px;
    }

    .mass-whatsapp-float {
        width: 54px;
        height: 54px;
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 767px) {
    .entry-content > .mass-hero {
        min-height: 480px;
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .entry-content > .mass-hero h1 {
        font-size: 32px;
    }

    .entry-content > .mass-hero p {
        font-size: 17px;
    }

    .mass-sec {
        padding: 44px 0;
    }

    .mass-sec > h2 {
        font-size: 26px;
    }

    .mass-grid,
    .mass-grid--testi,
    .mass-why,
    .mass-steps,
    .mass-gallery {
        grid-template-columns: 1fr;
    }

    .mass-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mass-service {
        grid-template-columns: 1fr;
    }

    .mass-service > figure.wp-block-image,
    .mass-service > h2,
    .mass-service > p,
    .mass-service > h3,
    .mass-service > ul,
    .mass-service > .wp-block-buttons,
    .mass-service:nth-of-type(even) > figure.wp-block-image,
    .mass-service:nth-of-type(even) > h2,
    .mass-service:nth-of-type(even) > p,
    .mass-service:nth-of-type(even) > h3,
    .mass-service:nth-of-type(even) > ul,
    .mass-service:nth-of-type(even) > .wp-block-buttons {
        grid-column: 1;
    }

    .mass-service > figure.wp-block-image {
        grid-row: auto;
        margin-bottom: 18px;
    }

    .site-header .header-logo img,
    .whb-header .wd-logo img {
        max-height: 48px;
        width: auto;
    }

    .mass-whatsapp-float {
        width: 52px;
        height: 52px;
        right: 14px;
        bottom: 14px;
    }

    .mass-whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* ============================================================
   MASS inner pages — 16 Nov 2026 (v2.1)
   Card grids, About intro/values, Contact two-column layout,
   single-project meta card + related strip.
   Scoped to the inner pages so the homepage is untouched.
   ============================================================ */

/* --- Service + project card grids --- */
.page-id-35554 .mass-grid--services,
.page-id-35555 .mass-grid--projects { margin: 6px 0 28px; }
.mass-card--service,
.mass-card--project { display: flex; flex-direction: column; text-align: left; }
.mass-card--service figure,
.mass-card--project figure { margin: 0 0 14px; background: #f4f1ea; border-radius: 10px; overflow: hidden; }
.mass-card--service figure img,
.mass-card--project figure img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.mass-card--service > h3:first-child,
.mass-card--project > h3:first-child { font-size: 1.28rem; line-height: 1.3; margin: 0 0 8px; }
.mass-card--service h3:not(:first-child) { font-size: 1.05rem; margin: 16px 0 6px; }
.mass-card--service p,
.mass-card--project p { margin-bottom: 8px; }
.mass-card--service ul,
.mass-card--project ul { margin: 0 0 6px; }
.mass-card--service .wp-block-buttons,
.mass-card--project .wp-block-buttons { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

/* --- About: intro block + values as cards --- */
.page-id-2 .mass-about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; margin: 8px 0 10px; }
.page-id-2 .mass-about-intro figure { margin: 0; }
.page-id-2 .mass-about-intro img { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: 14px; }
.page-id-2 .mass-about-intro p { margin: 0; font-size: 1.05rem; line-height: 1.65; }
.page-id-2 .mass-grid--values { margin: 8px 0 10px; }
.mass-card--value { border-top: 3px solid var(--mass-gold, #c9a227); text-align: left; }
.mass-card--value h3 { font-size: 1.12rem; margin: 0 0 6px; }
.mass-card--value h3::before { content: "\2713  "; color: var(--mass-gold, #c9a227); }
.mass-card--value p { margin: 0; }
@media (max-width: 900px) {
  .page-id-2 .mass-about-intro { grid-template-columns: 1fr; gap: 16px; }
  .page-id-2 .mass-about-intro img { max-height: 300px; }
}

/* --- Contact: two-column details + form --- */
.page-id-35556 .mass-contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; align-items: start; margin: 10px 0 28px; }
.page-id-35556 .mass-contact-details { display: grid; gap: 16px; }
.mass-contact-card { background: #fff; border: 1px solid #ece7db; border-radius: 14px; padding: 22px; text-align: center; box-shadow: 0 2px 10px rgba(15,42,68,.06); }
.mass-contact-card h3 { font-size: 1.25rem; margin: 0 0 8px; }
.mass-contact-card p { margin: 0 0 10px; }
.mass-contact-card .wp-block-buttons { justify-content: center; display: flex; flex-wrap: wrap; gap: 8px; }
.mass-contact-form { background: #fff; border: 1px solid #ece7db; border-radius: 14px; padding: 26px; box-shadow: 0 2px 10px rgba(15,42,68,.06); }
.mass-contact-form h3 { font-size: 1.4rem; margin: 0 0 6px; }
.mass-contact-form p { margin: 0 0 10px; }
.mass-contact-form .wpcf7-form-control:not(.wpcf7-submit) { width: 100%; }
.page-id-35556 .mass-sec--call-us .wp-block-buttons,
.page-id-35556 .mass-sec--whatsapp-us .wp-block-buttons,
.page-id-35556 .mass-sec--email-us .wp-block-buttons { justify-content: center; }
.page-id-35556 .mass-sec--our-location iframe { width: 100%; height: 380px; border: 0; border-radius: 14px; display: block; }
@media (max-width: 900px) {
  .page-id-35556 .mass-contact { grid-template-columns: 1fr; }
}

/* --- Single project: meta card + related strip --- */
.single-portfolio .mass-sec--project-details ul.mass-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; background: #fff; border: 1px solid #ece7db; border-radius: 14px; padding: 22px 26px; margin: 0; list-style: none; }
.single-portfolio .mass-sec--project-details ul.mass-meta li { margin: 0; }
.single-portfolio .mass-grid--related { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mass-card--related { display: flex; flex-direction: column; text-align: left; }
.mass-card--related img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.mass-card--related h3 { font-size: 1.05rem; line-height: 1.35; margin: 12px 0 4px; }
.mass-card--related h3 a { color: inherit; text-decoration: none; }
.mass-card--related .mass-demo-label { font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: #8a7a3a; margin: 0 0 10px; }
.mass-card--related p:last-child { margin: auto 0 0; padding-top: 10px; }
@media (max-width: 1020px) {
  .single-portfolio .mass-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .single-portfolio .mass-sec--project-details ul.mass-meta { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .single-portfolio .mass-grid--related { grid-template-columns: 1fr; }
}
/* --- v2.1 fixes: keep card text inside the 20px card padding --- */
.mass-card--service > h3:first-child,
.mass-card--project > h3:first-child { margin: 18px 20px 8px; }
.mass-card--service h3:not(:first-child) { margin: 16px 20px 6px; }
.mass-card--service p,
.mass-card--project p { margin: 0 20px 8px; }
.mass-card--service ul,
.mass-card--project ul { margin: 0 20px 12px; }
.mass-card--value h3 { margin: 18px 20px 6px; }
.mass-card--value p { margin: 0 20px 16px; }
.mass-card--related > a { display: block; line-height: 0; }
.mass-card--related h3 { margin: 12px 20px 4px; }
.mass-card--related .mass-demo-label { margin: 0 20px 10px; }
.mass-card--related p:last-child { margin: auto 20px 20px; }




















/* ============================================================
   Inner-page heroes — v2.2 (approved fix, 2026-11-16)
   Taller, designed banner per inner page (WoodMart colours,
   gold accent only). The homepage hero is NOT touched: every
   rule here is scoped to the four inner pages + single
   portfolio. Per-page photo + legibility overlay; the banner
   <img> WoodMart renders is hidden so the photo below shows.
   ============================================================ */

/* Taller banner, title + breadcrumb vertically centred. */
body.page-id-2 .page-title,
body.page-id-35554 .page-title,
body.page-id-35555 .page-title,
body.page-id-35556 .page-title,
body.single-portfolio .page-title {
	box-sizing: border-box;
	min-height: 560px;
	padding-top: 150px;
	padding-bottom: 80px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Hide WoodMart's default banner photo (rendered as an <img>
   inside .page-title, or inside a .wd-page-title-bg wrapper). */
body.page-id-2 .page-title img,
body.page-id-35554 .page-title img,
body.page-id-35555 .page-title img,
body.page-id-35556 .page-title img,
body.single-portfolio .page-title img,
body.page-id-2 .wd-page-title-bg,
body.page-id-35554 .wd-page-title-bg,
body.page-id-35555 .wd-page-title-bg,
body.page-id-35556 .wd-page-title-bg,
body.single-portfolio .wd-page-title-bg {
	display: none !important;
}

/* Per-page banner photo (Media Library) + dark legibility overlay. */
body.page-id-2 .page-title {
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.20) 45%, rgba(0, 0, 0, 0.50) 100%), url("https://massconstruction.com.pk/wp-content/uploads/2026/11/about-team-1.webp") !important;
}
body.page-id-35554 .page-title {
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.20) 45%, rgba(0, 0, 0, 0.50) 100%), url("https://massconstruction.com.pk/wp-content/uploads/2026/11/service-commercial-1.webp") !important;
}
body.page-id-35555 .page-title {
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.20) 45%, rgba(0, 0, 0, 0.50) 100%), url("https://massconstruction.com.pk/wp-content/uploads/2026/11/project-villa-1.webp") !important;
}
body.page-id-35556 .page-title {
	background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.20) 45%, rgba(0, 0, 0, 0.50) 100%), url("https://massconstruction.com.pk/wp-content/uploads/2026/11/hero.webp") !important;
}

/* Big banner title with a gold accent rule (WoodMart colours). */
body.page-id-2 .page-title .entry-title,
body.page-id-35554 .page-title .entry-title,
body.page-id-35555 .page-title .entry-title,
body.page-id-35556 .page-title .entry-title,
body.single-portfolio .page-title .entry-title {
	font-size: clamp(2.6rem, 5vw, 4rem);
	line-height: 1.1;
}
body.page-id-2 .page-title .entry-title::after,
body.page-id-35554 .page-title .entry-title::after,
body.page-id-35555 .page-title .entry-title::after,
body.page-id-35556 .page-title .entry-title::after,
body.single-portfolio .page-title .entry-title::after {
	content: "";
	display: block;
	width: 72px;
	height: 4px;
	margin: 20px auto 0;
	background: #C9A24B;
	border-radius: 2px;
}

/* Intro heading: the page's first content H1 is demoted to an H2
   by functions.php, so the title appears only once (in the banner). */
.mass-intro-heading {
	font-size: clamp(1.7rem, 3vw, 2.1rem);
	line-height: 1.25;
	font-weight: 700;
	color: #0B1F3A;
	margin-top: 0;
	margin-bottom: 18px;
}

/* Tablet (~768px): slightly shorter banner. */
@media (max-width: 1024px) {
	body.page-id-2 .page-title,
	body.page-id-35554 .page-title,
	body.page-id-35555 .page-title,
	body.page-id-35556 .page-title,
	body.single-portfolio .page-title {
		min-height: 480px;
		padding-top: 120px;
		padding-bottom: 70px;
	}
}

/* Mobile (~360px): shorter banner, smaller title. */
@media (max-width: 767px) {
	body.page-id-2 .page-title,
	body.page-id-35554 .page-title,
	body.page-id-35555 .page-title,
	body.page-id-35556 .page-title,
	body.single-portfolio .page-title {
		min-height: 420px;
		padding-top: 100px;
		padding-bottom: 60px;
	}
	body.page-id-2 .page-title .entry-title,
	body.page-id-35554 .page-title .entry-title,
	body.page-id-35555 .page-title .entry-title,
	body.page-id-35556 .page-title .entry-title,
	body.single-portfolio .page-title .entry-title {
		font-size: clamp(2rem, 8vw, 2.6rem);
	}
}


























/* ---------- WhatsApp floating button: smaller on phones ---------- */@media (max-width: 767px) {  .mass-whatsapp-float {    width: 48px;    height: 48px;  }  .mass-whatsapp-float svg {    width: 24px;    height: 24px;  }}

/* ---------- Hero fix (2026-11-19) ---------- */
/* The hero group (.mass-hero) is rendered inside Elementor wrappers, so it
   is no longer a direct child of .entry-content. These rules repeat the
   hero styling with a descendant selector so the overlay hero works
   whether the group is nested or not. */
.entry-content .mass-hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px max(20px, calc((100vw - 1222px) / 2));
    color: #ffffff;
}
.entry-content .mass-hero > figure.wp-block-image {
    margin: 0;
}
.entry-content .mass-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(5,20,35,0.78) 0%, rgba(5,20,35,0.45) 55%, rgba(5,20,35,0.25) 100%);
}
.entry-content .mass-hero > :not(figure):not(::before) {
    position: relative;
    z-index: 2;
}
.entry-content .mass-hero .mass-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 660px;
}
.entry-content .mass-hero h1 {
    color: #ffffff;
    font-size: 46px;
    line-height: 1.12;
    margin: 0 0 14px;
}
.entry-content .mass-hero p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
    line-height: 1.5;
    margin: 0 0 26px;
}
.entry-content .mass-hero .wp-block-buttons {
    gap: 12px;
}
/* ---------- Hero fix 2 (2026-11-19) ---------- */
/* The page renders through Elementor, so .entry-content is not an ancestor
   of the hero group. Anchor the same overlay-hero rules to <article>,
   which wraps the content in both renderings. */
article .mass-hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px max(20px, calc((100vw - 1222px) / 2));
    color: #ffffff;
}
article .mass-hero > figure.wp-block-image {
    margin: 0;
}
article .mass-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(5,20,35,0.78) 0%, rgba(5,20,35,0.45) 55%, rgba(5,20,35,0.25) 100%);
}
article .mass-hero > :not(figure):not(::before) {
    position: relative;
    z-index: 2;
}
article .mass-hero .mass-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 660px;
}
article .mass-hero h1 {
    color: #ffffff;
    font-size: 46px;
    line-height: 1.12;
    margin: 0 0 14px;
}
article .mass-hero p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
    line-height: 1.5;
    margin: 0 0 26px;
}
article .mass-hero .wp-block-buttons {
    gap: 12px;
}

/* ---------- Hero image fill on small screens (2026-11-19) ---------- */
/* The hero figure is absolutely positioned; on narrow screens the wide
   photo only covers a band at the top because the image keeps its
   natural height. Make the image fill its figure (object-fit: cover)
   so the photo covers the whole hero on phones too. Desktop is
   untouched (this rule only applies up to 767px). */
@media (max-width: 767px) {
    .mass-hero-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
/* ---------- Hero image fill on small screens, stronger selector (2026-11-19) ---------- */
/* The earlier .mass-hero-bg img rule is overridden by a theme rule that
   forces images to height:auto. Anchor to <article> and use !important
   on the height so the photo really fills the figure on phones. */
@media (max-width: 767px) {
    article .mass-hero figure.mass-hero-bg img {
        width: 100%;
        height: 100% !important;
        object-fit: cover;
    }
}

/* ---------- Hero figure stretch on small screens (2026-11-19) ---------- */
/* Percentage heights cannot resolve here: the hero's height is
   content-driven (min-height, not a definite height), so the figure's
   height:126% falls back to auto and the image keeps its natural height
   (a band at the top on phones). Stretch the figure to the hero
   (top:0; bottom:0; height:auto) so its height is definite and the
   image's height:100% can resolve and cover the hero. */
@media (max-width: 767px) {
    article .mass-hero figure.mass-hero-bg {
        top: 0;
        bottom: 0;
        height: auto;
    }
}