/* ==========================================================================
   Commercial Projects section - commercial-roofing.html
   Combines the documented case studies and the project photo gallery on the
   navy .service-wrap-layout4 background. Every rule is scoped to .cp-section.
   ========================================================================== */

/* ---------- Section header ---------- */
.cp-section .cp-header {
    position: relative;
    text-align: center;
}

    /* Soft glow behind the title - same idea as the case-study page heroes */
    .cp-section .cp-header::before {
        content: "";
        position: absolute;
        top: -140px;
        left: 50%;
        width: 1000px;
        max-width: 160%;
        height: 560px;
        transform: translateX(-50%);
        background: radial-gradient(ellipse at center, rgba(46, 124, 196, 0.34) 0%, rgba(46, 124, 196, 0.12) 40%, rgba(8, 44, 75, 0) 70%);
        pointer-events: none;
        z-index: -1;
    }

/* Eyebrow pill */
.cp-section .cp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 7px 16px;
    border: 1px solid rgba(238, 33, 43, 0.5);
    border-radius: 999px;
    background-color: rgba(238, 33, 43, 0.12);
    color: #ff6b72;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

    .cp-section .cp-eyebrow::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background-color: #ee212b;
        box-shadow: 0 0 0 4px rgba(238, 33, 43, 0.22);
    }

/* Two-tone title: main line bold white, location line lighter */
.cp-section .cp-title {
    margin: 0 auto 18px;
    max-width: 900px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

    .cp-section .cp-title span {
        display: block;
        margin-top: 12px;
        color: #a9c6e2;
        font-size: 0.56em;
        font-weight: 400;
        letter-spacing: 0.01em;
    }

.cp-section .cp-lead {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
    line-height: 1.65;
}

/* Jump links */
.cp-section .cp-jump {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

    .cp-section .cp-jump a {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 12px 24px;
        border-radius: 999px;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.2;
        transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    }

        .cp-section .cp-jump a:hover {
            transform: translateY(-2px);
        }

    .cp-section .cp-jump .cp-jump-primary {
        border: 1px solid #ee212b;
        background-color: #ee212b;
        color: #ffffff;
        box-shadow: 0 8px 20px rgba(238, 33, 43, 0.3);
    }

        .cp-section .cp-jump .cp-jump-primary:hover {
            border-color: #d11a23;
            background-color: #d11a23;
            color: #ffffff;
        }

    .cp-section .cp-jump .cp-jump-secondary {
        border: 1px solid rgba(255, 255, 255, 0.35);
        background-color: rgba(255, 255, 255, 0.04);
        color: #ffffff;
    }

        .cp-section .cp-jump .cp-jump-secondary:hover {
            border-color: #ffffff;
            background-color: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }

    .cp-section .cp-jump .cp-jump-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
        height: 24px;
        padding: 0 7px;
        border-radius: 999px;
        background-color: #ffffff;
        color: #ee212b;
        font-size: 13px;
        font-weight: 700;
    }

/* Frosted stat tiles */
.cp-section .cp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    max-width: 1140px;
    margin: 50px auto 0;
    padding: 0;
    list-style: none;
}

    .cp-section .cp-stats li {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 24px 18px 22px;
        border: 1px solid rgba(255, 255, 255, 0.13);
        border-radius: 10px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }

.cp-section .cp-stat-value {
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

    .cp-section .cp-stat-value::after {
        content: "";
        display: block;
        width: 28px;
        height: 3px;
        margin: 12px auto 12px;
        border-radius: 2px;
        background-color: #ee212b;
    }

.cp-section .cp-stat-title {
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.cp-section .cp-stat-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Group headers (Case Studies / Project Gallery) ---------- */
.cp-section .cp-group {
    margin-top: 70px;
}

.cp-section .cp-group-head {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

    .cp-section .cp-group-head h3 {
        margin: 0 0 8px;
        color: #ffffff;
        font-size: 28px;
        line-height: 1.25;
        font-weight: 700;
    }

        .cp-section .cp-group-head h3::before {
            content: "";
            display: block;
            width: 48px;
            height: 4px;
            margin-bottom: 14px;
            border-radius: 2px;
            background-color: #ee212b;
        }

    .cp-section .cp-group-head p {
        margin: 0;
        color: rgba(255, 255, 255, 0.72);
        font-size: 16px;
        line-height: 1.6;
    }

/* ---------- Case study cards ---------- */
.cp-section .cp-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 6px;
    background-color: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .cp-section .cp-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
    }

.cp-section .cp-card-img {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: #0d3a63;
}

    .cp-section .cp-card-img img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 1.2s cubic-bezier(0.2, 0.96, 0.34, 1);
    }

.cp-section .cp-card:hover .cp-card-img img {
    transform: scale(1.06);
}

.cp-section .cp-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 10px;
    border-radius: 3px;
    background-color: #ee212b;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.cp-section .cp-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 22px 22px 20px;
}

.cp-section .cp-card-body .cp-card-meta {
    margin-bottom: 8px;
    color: #6b7785;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cp-section .cp-card-body h4 {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}

    .cp-section .cp-card-body h4 a {
        color: #082c4b;
        transition: color 0.3s ease;
    }

        .cp-section .cp-card-body h4 a:hover {
            color: #ee212b;
        }

.cp-section .cp-card-body p {
    margin-bottom: 16px;
    color: #555555;
    font-size: 15px;
    line-height: 1.65;
}

.cp-section .cp-card-link {
    margin-top: auto;
    color: #ee212b;
    font-weight: 700;
}

    .cp-section .cp-card-link:hover {
        color: #082c4b;
    }

/* "View all" tile - fills the eighth slot and stands apart from the case cards */
.cp-section .cp-card-all {
    justify-content: center;
    padding: 34px 26px;
    background-color: #ee212b;
    color: #ffffff;
    text-decoration: none;
}

    .cp-section .cp-card-all:hover {
        color: #ffffff;
        text-decoration: none;
    }

    .cp-section .cp-card-all .cp-all-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        margin-bottom: 22px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.18);
        font-size: 22px;
        transition: transform 0.3s ease;
    }

    .cp-section .cp-card-all:hover .cp-all-icon {
        transform: translateX(6px);
    }

    .cp-section .cp-card-all strong {
        display: block;
        margin-bottom: 12px;
        font-size: 24px;
        line-height: 1.3;
    }

    .cp-section .cp-card-all span {
        color: rgba(255, 255, 255, 0.88);
        font-size: 15px;
        line-height: 1.6;
    }

/* ---------- Project gallery tiles ---------- */
.cp-section .cp-tile {
    position: relative;
    margin: 0 0 30px;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4 / 3;
    background-color: #0d3a63;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

    .cp-section .cp-tile img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 1.2s cubic-bezier(0.2, 0.96, 0.34, 1);
    }

    .cp-section .cp-tile:hover img {
        transform: scale(1.06);
    }

    .cp-section .cp-tile figcaption {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 48px 18px 16px;
        background: linear-gradient(to top, rgba(5, 22, 38, 0.92) 0%, rgba(5, 22, 38, 0.55) 55%, rgba(5, 22, 38, 0) 100%);
        color: #ffffff;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.3;
    }

/* ---------- Laptop and tablet: 2x2 stat tiles (4-across only fits the longest headline, "100+ Five-Star", from 1200px) ---------- */
@media only screen and (max-width: 1199px) {
    .cp-section .cp-stats {
        max-width: 760px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Tablet ---------- */
@media only screen and (max-width: 991px) {
    .cp-section .cp-title {
        font-size: 38px;
    }
}

/* ---------- Small screens ---------- */
@media only screen and (max-width: 767px) {
    .cp-section .cp-title {
        font-size: 30px;
    }

    .cp-section .cp-lead {
        font-size: 17px;
    }

    .cp-section .cp-stats {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-top: 36px;
    }

        .cp-section .cp-stats li {
            padding: 20px 18px 18px;
        }

    .cp-section .cp-stat-value {
        font-size: 30px;
    }

    .cp-section .cp-stat-title {
        font-size: 15px;
    }

    .cp-section .cp-stat-label {
        font-size: 13px;
    }

    .cp-section .cp-group {
        margin-top: 50px;
    }

    .cp-section .cp-group-head h3 {
        font-size: 24px;
    }
}
