<div class="faculty-hero-img-outline">
    <div class="faculty-hero-box" style="background-image: url('{{ asset('storage/' . $facility->image) }}'); background-size: cover; background-position: center;">
        <div class="faculty-hero-card faculty-hero-card-right">
            <div class="faculty-hero-card-bar"></div>
            <div class="faculty-hero-card-text">
                {{ $facility->text }}
            </div>
        </div>
    </div>
</div>
<style>
    .faculty-hero-img-outline {
        margin-top: 200px;
        position: relative;
        width: 90%;
        aspect-ratio: 16/9;
        background:#1E8DD2;
}

.faculty-hero-box {
    z-index: 2;
    bottom: 50px;
    width: 90%;
    aspect-ratio: 16/9;
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.faculty-hero-card.faculty-hero-card-right {
    background: #fff;
    margin: 40px 40px 0 0; /* margin at right */
    border-radius: 0 0 0 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    position: relative;
    z-index: 2;
    min-width: 340px;
    max-width: 500px;
    padding: 32px 32px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.faculty-hero-card-bar {
    height: 7px;
    width: 120px;
    background: #F3881B;
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    border-radius: 0 0 8px 0;
}

.faculty-hero-card-text {
    margin-top: 24px;
    color: #444;
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: left;
    letter-spacing: 0.5px;
}

.faculty-hero-bottom-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 40px;
    background: #0a4c76;
    z-index: 0;
}

 /* Enhanced responsive styles */
 @media (max-width: 1200px) {
        .faculty-hero-img-outline {
            margin-top: 180px;
            width: 92%;
        }
        .faculty-hero-box {
            width: 92%;
            bottom: 45px;
        }
        .faculty-hero-card.faculty-hero-card-right {
            margin: 35px 35px 0 0;
            min-width: 320px;
            max-width: 450px;
            padding: 28px 28px 28px 28px;
        }
        .faculty-hero-card-text {
            margin-top: 20px;
            font-size: 1rem;
            line-height: 1.6;
        }
        .faculty-hero-card-bar {
            height: 6px;
            width: 110px;
        }
    }

    @media (max-width: 992px) {
        .faculty-hero-img-outline {
            margin-top: 150px;
            width: 95%;
        }
        .faculty-hero-box {
            width: 95%;
            bottom: 40px;
            justify-content: center;
        }
        .faculty-hero-card.faculty-hero-card-right {
            margin: 30px 0 0 0;
            min-width: 300px;
            max-width: 400px;
            padding: 24px 24px 24px 24px;
        }
        .faculty-hero-card-text {
            margin-top: 18px;
            font-size: 0.95rem;
            line-height: 1.6;
            text-align: center;
        }
        .faculty-hero-card-bar {
            height: 6px;
            width: 100px;
        }
    }

    @media (max-width: 768px) {
        .faculty-hero-img-outline {
            margin-top: 120px;
            width: 98%;
        }
        .faculty-hero-box {
            width: 98%;
            bottom: 35px;
        }
        .faculty-hero-card.faculty-hero-card-right {
            margin: 25px 0 0 0;
            min-width: 280px;
            max-width: 350px;
            padding: 20px 20px 20px 20px;
        }
        .faculty-hero-card-text {
            margin-top: 16px;
            font-size: 0.9rem;
            line-height: 1.5;
        }
        .faculty-hero-card-bar {
            height: 5px;
            width: 90px;
        }
        .faculty-hero-bottom-bar {
            height: 35px;
        }
    }

    @media (max-width: 600px) {
        .faculty-hero-img-outline {
            margin-top: 100px;
            width: 100%;
        }
        .faculty-hero-box {
            width: 100%;
            bottom: 30px;
        }
        .faculty-hero-card.faculty-hero-card-right {
            margin: 20px 0 0 0;
            min-width: 260px;
            max-width: 320px;
            padding: 18px 18px 18px 18px;
        }
        .faculty-hero-card-text {
            margin-top: 14px;
            font-size: 0.85rem;
            line-height: 1.4;
        }
        .faculty-hero-card-bar {
            height: 4px;
            width: 80px;
        }
        .faculty-hero-bottom-bar {
            height: 30px;
        }
    }

    @media (max-width: 480px) {
        .faculty-hero-img-outline {
            margin-top: 80px;
        }
        .faculty-hero-box {
            bottom: 25px;
        }
        .faculty-hero-card.faculty-hero-card-right {
            margin: 15px 0 0 0;
            min-width: 240px;
            max-width: 290px;
            padding: 16px 16px 16px 16px;
        }
        .faculty-hero-card-text {
            margin-top: 12px;
            font-size: 0.8rem;
            line-height: 1.3;
        }
        .faculty-hero-card-bar {
            height: 4px;
            width: 70px;
        }
        .faculty-hero-bottom-bar {
            height: 25px;
        }
    }

    @media (max-width: 360px) {
        .faculty-hero-img-outline {
            margin-top: 60px;
        }
        .faculty-hero-box {
            bottom: 20px;
        }
        .faculty-hero-card.faculty-hero-card-right {
            margin: 12px 0 0 0;
            min-width: 220px;
            max-width: 260px;
            padding: 14px 14px 14px 14px;
        }
        .faculty-hero-card-text {
            margin-top: 10px;
            font-size: 0.75rem;
            line-height: 1.2;
        }
        .faculty-hero-card-bar {
            height: 3px;
            width: 60px;
        }
        .faculty-hero-bottom-bar {
            height: 20px;
        }
    }

    /* Ensure proper aspect ratio on smaller screens */
    @media (max-width: 768px) {
        .faculty-hero-img-outline,
        .faculty-hero-box {
            aspect-ratio: 16/10;
        }
    }

    @media (max-width: 480px) {
        .faculty-hero-img-outline,
        .faculty-hero-box {
            aspect-ratio: 4/3;
        }
    }
</style>