<div style="background-color: #E6F5FF; ">
    <div class="career-wrapper">
        @php
        $title = $program->job_title;
        $degree = 'BHM DEGREE'; // or extract dynamically
        $title = str_replace($degree, "<span class='highlighted-degree'>$degree</span>", strtoupper($title));
    @endphp
    <h2 class="career-title">{!! $title !!}</h2>

        <div class="career-grid">
            @foreach ($program->job_contain as $career)
                    <div class="career-item">
                        <img src="{{ asset('storage/'.$career['image']) }}" alt="Career Option">
                        <div class="job-name">
                            <span class="dot"></span>
                            {{ $career['name'] }}
                        </div>
                    </div>
            @endforeach
        </div>
    </div>
</div>

<style>
    .career-wrapper {
        padding: 60px 5%;
        max-width: 1200px;
        margin: 0 auto;
    }

    .career-title {
        font-size: 2rem;
        font-weight: bold;
        text-transform: uppercase;
        color: #114B7A; /* dark blue */
        letter-spacing: 2px;
        text-align: center;
        margin: 0;
        padding: 30px 0 20px 0;
        background: transparent;
    }

    .career-title .highlighted-degree {
        color: #0084D6; /* bright blue */
    }

    .career-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        row-gap: 40px;
    }

    .career-item {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .career-item img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

    .job-name {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-size: 18px;
        font-weight: 500;
        color: #333;
    }

    .dot {
        width: 20px;
        height: 20px;
        background-color: #1a4789;
        border-radius: 50%;
    }

    /* Enhanced responsive styles */
    @media (max-width: 1200px) {
        .career-wrapper {
            padding: 50px 4%;
            max-width: 1000px;
        }
        .career-title {
            font-size: 1.8rem;
            padding: 25px 0 18px 0;
        }
        .career-grid {
            gap: 25px;
            row-gap: 35px;
        }
        .career-item {
            gap: 13px;
        }
        .career-item img {
            height: 170px;
        }
        .job-name {
            font-size: 17px;
            gap: 9px;
        }
        .dot {
            width: 18px;
            height: 18px;
        }
    }

    @media (max-width: 992px) {
        .career-wrapper {
            padding: 45px 3%;
            max-width: 900px;
        }
        .career-title {
            font-size: 1.7rem;
            padding: 22px 0 16px 0;
        }
        .career-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            row-gap: 30px;
        }
        .career-item {
            gap: 12px;
        }
        .career-item img {
            height: 160px;
        }
        .job-name {
            font-size: 16px;
            gap: 8px;
        }
        .dot {
            width: 17px;
            height: 17px;
        }
    }

    @media (max-width: 768px) {
        .career-wrapper {
            padding: 40px 2%;
        }
        .career-title {
            font-size: 1.6rem;
            padding: 20px 0 15px 0;
        }
        .career-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 18px;
            row-gap: 25px;
        }
        .career-item {
            gap: 11px;
        }
        .career-item img {
            height: 150px;
        }
        .job-name {
            font-size: 15px;
            gap: 7px;
        }
        .dot {
            width: 16px;
            height: 16px;
        }
    }

    @media (max-width: 600px) {
        .career-wrapper {
            padding: 35px 2%;
        }
        .career-title {
            font-size: 1.5rem;
            padding: 18px 0 12px 0;
        }
        .career-grid {
            gap: 15px;
            row-gap: 22px;
        }
        .career-item {
            gap: 10px;
        }
        .career-item img {
            height: 140px;
        }
        .job-name {
            font-size: 14px;
            gap: 6px;
        }
        .dot {
            width: 15px;
            height: 15px;
        }
    }

    @media (max-width: 576px) {
        .career-wrapper {
            padding: 30px 2%;
        }
        .career-title {
            font-size: 1.4rem;
            padding: 15px 0 10px 0;
        }
        .career-grid {
            gap: 12px;
            row-gap: 20px;
        }
        .career-item {
            gap: 9px;
        }
        .career-item img {
            height: 130px;
        }
        .job-name {
            font-size: 13px;
            gap: 5px;
        }
        .dot {
            width: 14px;
            height: 14px;
        }
    }

    @media (max-width: 480px) {
        .career-wrapper {
            padding: 25px 1%;
        }
        .career-title {
            font-size: 1.3rem;
            padding: 12px 0 8px 0;
        }
        .career-grid {
            gap: 10px;
            row-gap: 18px;
        }
        .career-item {
            gap: 8px;
        }
        .career-item img {
            height: 120px;
        }
        .job-name {
            font-size: 12px;
            gap: 4px;
        }
        .dot {
            width: 13px;
            height: 13px;
        }
    }

    @media (max-width: 400px) {
        .career-wrapper {
            padding: 20px 1%;
        }
        .career-title {
            font-size: 1.2rem;
            padding: 10px 0 6px 0;
        }
        .career-grid {
            gap: 8px;
            row-gap: 15px;
        }
        .career-item {
            gap: 7px;
        }
        .career-item img {
            height: 110px;
        }
        .job-name {
            font-size: 11px;
            gap: 3px;
        }
        .dot {
            width: 12px;
            height: 12px;
        }
    }

    @media (max-width: 360px) {
        .career-wrapper {
            padding: 15px 1%;
        }
        .career-title {
            font-size: 1.1rem;
            padding: 8px 0 5px 0;
        }
        .career-grid {
            gap: 6px;
            row-gap: 12px;
        }
        .career-item {
            gap: 6px;
        }
        .career-item img {
            height: 100px;
        }
        .job-name {
            font-size: 10px;
            gap: 2px;
        }
        .dot {
            width: 11px;
            height: 11px;
        }
    }
</style>
