.features-boxed {
    padding-top: 50px;
    background-color: #fff;
    margin-top: 15px;
}

.features-boxed h2 {
    margin-bottom: 100px;
    color: #0a3148;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.feature-box {
    position: relative;
    padding: 120px 80px 70px 80px;
    border-radius: 30px;
    background-color: #3a3a3a;
    color: #f4f4f4;
    text-align: center;
    margin-top: 35px;
    /* overflow: hidden; -- Removed to allow child image to overflow */
}

/* Ensure content stays on top */
.feature-box > * {
    position: relative;
    z-index: 3;
}

/* Grayscale background image layer */
.feature-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    z-index: 1;
    border-radius: 30px; /* Match parent border-radius */
}

/* Dark overlay layer */
.feature-box::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); /* Opacity set to 80% */
    z-index: 2;
    border-radius: 30px; /* Match parent border-radius */
}

/* Assign the specific images to each box */
.features-grid .feature-box:nth-child(1)::before {
    background-image: var(--bg-feature-box-2);
}

.features-grid .feature-box:nth-child(2)::before {
    background-image: var(--bg-feature-box-1);
}

.feature-box picture {
    position: absolute;
    top: -75px;
    left: 50%;
    width: 150px;
    height: 150px;
    border: 4px solid #f7f7f7;
    border-radius: 50%;
    object-fit: cover;
    transform: translateX(-50%);
    overflow: hidden; /* To ensure the inner image respects the border-radius */
}

.feature-box picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-box h3 {
    margin-bottom: 15px;
    color: #fabd49;
}

.feature-box p {
    margin-top: 15px;
    margin-bottom: 40px;
}

.feature-box .btn-outline {
    border-color: #f4f4f4;
    color: #f4f4f4;
}

.feature-box .btn-outline:hover {
    border-color: #f4f4f4;
    color: #333;
}