/* Professional Construction & Maintenance CSS for CrestPoint AE */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&family=Bai+Jamjuree:wght@300;400;500;600;700&display=swap');

:root {
    --cp-primary: #0A2433;
    --cp-secondary: #FF6B00;
    --cp-accent: #1A3E54;
    --cp-dark: #051620;
    --cp-light: #F4F7F9;
    --cp-white: #FFFFFF;
    --cp-gray: #7E8C96;
    --cp-shadow: 0 30px 60px -12px rgba(10, 36, 51, 0.18);
    --cp-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
    font-family: 'Bai Jamjuree', sans-serif;
    background-color: var(--cp-light);
    color: var(--cp-primary);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    /* Positive spacing for better legibility */
    font-weight: 900;
    line-height: 1.2;
    /* Increased for breathing room */
}

/* SECTION TRANSITIONS */
.diagonal-bottom {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
}

.diagonal-top {
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0% 100%);
}

/* HERO SECTION - REBUILT */
.cp-hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    background: var(--cp-dark);
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: -100px;
}

/* .cp-service-icon i {
    font-family: inherit;
    font-weight: 900;
    line-height: 1;
} */

.cp-hero-media {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    z-index: 1;
}

.cp-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.cp-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--cp-dark) 0%, var(--cp-dark) 15%, transparent 100%);
}

.cp-hero-content {
    position: relative;
    z-index: 5;
    max-width: 750px;
    padding: 0 40px;
}

.cp-hero-tag {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
}

.cp-hero-tag span {
    width: 50px;
    height: 5px;
    background: var(--cp-secondary);
}

.cp-hero-tag h6 {
    color: var(--cp-secondary);
    margin: 0;
    letter-spacing: 5px;
    font-size: 16px;
}

.cp-hero h1 {
    font-size: clamp(40px, 8vw, 100px);
    line-height: 1.1;
    color: var(--cp-white);
    margin-bottom: 30px;
    word-break: keep-all;
}

.cp-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 22px;
    margin-bottom: 50px;
    border-left: 4px solid var(--cp-secondary);
    padding-left: 25px;
    max-width: 600px;
}

/* BUTTONS UPGRADE */
.cp-btn {
    padding: 22px 45px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
    transition: var(--cp-transition);
    border: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.cp-btn-primary {
    background: var(--cp-secondary);
    color: var(--cp-white);
}

.cp-btn-primary:hover {
    background: var(--cp-white);
    color: var(--cp-primary);
    transform: translateY(-5px);
}

.cp-btn-outline {
    background: transparent;
    color: var(--cp-white);
    border: 3px solid var(--cp-white);
}

.cp-btn-outline:hover {
    background: var(--cp-white);
    color: var(--cp-primary);
}

/* STATS - STRUCTURAL OVERLAY */
.cp-stats-section {
    position: relative;
    z-index: 10;
}

.cp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--cp-white);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.1);
}

.cp-stat-box {
    padding: 50px 0px;
    text-align: center;
    border-right: 1px solid #f0f4f8;
    transition: var(--cp-transition);
}

.cp-stat-box:hover {
    background: var(--cp-light);
}

.cp-stat-box:last-child {
    border: none;
}

.cp-stat-box h4 {
    font-size: 60px;
    color: var(--cp-primary);
    margin-bottom: 10px;
    line-height: 0.8;
}

.cp-stat-box p {
    color: var(--cp-gray);
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

/* SERVICES - INDUSTRIAL STYLE */
.cp-section {
    padding: 160px 0;
    position: relative;
}

.cp-section-head {
    margin-bottom: 90px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.cp-section-title h6 {
    color: var(--cp-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.cp-section-title h2 {
    font-size: clamp(32px, 5vw, 64px);
    color: var(--cp-primary);
    line-height: 1.2;
    margin: 0;
}

.cp-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.cp-service-card {
    background: var(--cp-white);
    padding: 80px 50px;
    position: relative;
    transition: var(--cp-transition);
    border-top: 2px solid #edf2f7;
}

.cp-service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 6px;
    background: var(--cp-secondary);
    transition: var(--cp-transition);
}

.cp-service-card:hover {
    transform: translateY(-20px);
    box-shadow: var(--cp-shadow);
}

.cp-service-card:hover::after {
    width: 100%;
}

.cp-service-icon {
    width: 80px;
    height: 80px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--cp-primary);
    margin-bottom: 40px;
    transition: var(--cp-transition);
}

.cp-service-card:hover .cp-service-icon {
    background: var(--cp-secondary);
    color: var(--cp-white);
}

.cp-service-card h3 {
    font-size: clamp(22px, 3vw, 32px);
    margin-bottom: 25px;
    line-height: 1.3;
}

.cp-service-card p {
    color: var(--cp-gray);
    margin: 0;
    line-height: 1.8;
}

/* ABOUT SECTION UPGRADE */
.cp-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
    overflow: hidden;
}

.cp-about-media {
    position: relative;
}

.cp-about-image-stack {
    position: relative;
    padding-bottom: 100px;
}

.cp-about-img-main {
    width: 85%;
    border-radius: 0;
    box-shadow: 40px 40px 0 var(--cp-primary);
}

.cp-about-img-sub {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    border: 15px solid var(--cp-white);
}

.experience-shield {
    position: absolute;
    top: 40px;
    right: 40px;
    background: var(--cp-secondary);
    color: white;
    padding: 40px;
    text-align: center;
    box-shadow: var(--cp-shadow);
}

.experience-shield h3 {
    font-size: 48px;
    margin-bottom: 0;
}

.experience-shield span {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 800;
}

/* BLUEPRINT SECTION */
.cp-dark-section {
    background: var(--cp-dark);
    color: var(--cp-white);
}

.cp-blueprint-overlay {
    background-image: url('https://image_holder_url/blueprint.png');
    /* Pattern handled in blade */
    background-size: cover;
    opacity: 0.1;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* PROJECT MASONRY */
.cp-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cp-project-card {
    position: relative;
    height: 600px;
    overflow: hidden;
    cursor: pointer;
}

.cp-project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cp-project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px;
    background: linear-gradient(0deg, var(--cp-dark) 0%, transparent 100%);
    color: var(--cp-white);
    transform: translateY(40px);
    opacity: 0;
    transition: var(--cp-transition);
}

.cp-project-card:hover img {
    transform: scale(1.15);
}

.cp-project-card:hover .cp-project-info {
    transform: translateY(0);
    opacity: 1;
}

.cp-project-meta {
    color: var(--cp-secondary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 12px;
    margin-bottom: 15px;
    display: block;
}

.cp-project-info h3 {
    /* font-size: 36px; */
    margin: 0;
}

@media (max-width: 1400px) {
    .cp-section-title h2 {
        font-size: 56px;
    }
}

@media (max-width: 1200px) {
    .cp-section {
        padding: 120px 0;
    }

    .cp-about-grid {
        gap: 50px;
    }

    .cp-section-title h2 {
        font-size: 48px;
    }

    .cp-service-card {
        padding: 60px 30px;
    }
}

@media (max-width: 991px) {
    .cp-hero {
        min-height: 450px;
        height: auto;
        padding: 100px 0 120px;
        margin-bottom: 0;
    }

    .cp-hero-media {
        width: 100%;
        top: 0;
        right: 0;
    }

    .cp-hero-media::after {
        background: rgba(5, 22, 32, 0.6);
    }

    .cp-hero-content {
        padding: 0 15px;
        text-align: center;
        max-width: 100%;
    }

    .cp-hero-tag {
        justify-content: center;
    }

    .cp-hero p {
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        border-left: none;
    }

    .cp-stats-section {
        margin-top: -100px;
    }

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

    .cp-stat-box {
        padding: 50px 20px;
    }

    .cp-about-grid {
        grid-template-columns: 1fr;
        gap: 80px;
    }

    .cp-about-content {
        text-align: center;
    }

    .cp-about-content .cp-section-title {
        margin-bottom: 30px !important;
    }

    .cp-projects-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cp-section {
        padding: 100px 0;
    }
}

@media (max-width: 767px) {
    .cp-hero h1 {
        font-size: clamp(40px, 12vw, 80px);
    }

    .cp-hero p {
        font-size: 18px;
    }

    .cp-hero-btns {
        flex-direction: column;
        gap: 15px;
        display: flex;
        align-items: center;
    }

    .cp-hero-btns .cp-btn {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
    }

    .cp-stats-grid {
        grid-template-columns: 1fr;
    }

    .cp-stat-box {
        border-right: none;
        border-bottom: 1px solid #f0f4f8;
    }

    .cp-stat-box:last-child {
        border-bottom: none;
    }

    .cp-projects-grid {
        grid-template-columns: 1fr;
    }

    .cp-section-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .cp-section-title h2 {
        font-size: clamp(28px, 6vw, 42px);
        line-height: 1.3;
        margin-bottom: 20px;
    }

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

    .cp-service-card h3 {
        font-size: 24px;
    }

    .cp-about-img-main {
        width: 100%;
        box-shadow: 20px 20px 0 var(--cp-primary);
    }

    .cp-about-img-sub {
        display: none;
        /* Hide sub image on very small screens to keep focus */
    }

    .experience-shield {
        padding: 20px;
        top: 20px;
        right: 20px;
    }

    .experience-shield h3 {
        font-size: 32px;
    }

    .cp-project-card {
        height: 400px;
    }

    .cp-project-info {
        padding: 30px;
    }

    .cp-project-info h3 {
        /* font-size: 24px; */
    }

    .cp-section {
        padding: 80px 0;
    }

    .diagonal-top {
        clip-path: polygon(0 5%, 100% 0, 100% 100%, 0% 100%);
    }

    .cp-contact-form-box {
        padding: 40px 20px !important;
        margin-bottom: 0 !important;
    }

    .diagonal-bottom {
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0% 100%);
    }
}

/* Base Utility for Flex Stacking */
@media (max-width: 767px) {
    .cp-flex-stack {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .cp-flex-stack .cp-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .cp-section-title h2 {
        font-size: 32px;
    }

    .cp-hero h1 {
        font-size: 38px;
    }
}