.his-hero-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 150px   ;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    margin-bottom: 0 !important;
}

/* Ensure the hero banner sticks to the top when it's the first element */
.his-hero-banner:first-child {
    margin-top: -0 !important;
}

.his-hero-banner__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    width: 100%;
}

.his-hero-banner__overlay .nhsuk-width-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.his-hero-banner__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 40px;
}

@media (max-width: 768px) {
    .his-hero-banner__content {
       align-items: flex-start;
    }
}

.his-hero-banner__text {
    flex: 1;
}

.his-hero-banner__title {
    color: white !important;
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2;
    margin: 0;
    max-width: 500px;
}

.his-hero-banner__action {
    flex: 0 0 auto;
}

.his-hero-banner__action a {
    margin-bottom: 0;
    color: #ffffff !important;
}

.his-hero-banner__button {
    background-color: #004380 !important; 
    border-color: #004380 !important;
    color: white !important;
    font-size: 19px;
    padding: 12px 24px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #004380;
    transition: background-color 0.2s ease;
}

.his-hero-banner__button:hover,
.his-hero-banner__button:focus {
    background-color: #002a5c !important;
    border-color: #002a5c !important;
    color: white !important;
    text-decoration: underline;
}

.his-hero-banner__button .nhsuk-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .his-hero-banner {
        min-height: 250px;
    }
    
    .his-hero-banner__overlay .nhsuk-width-container {
        padding: 0 15px;
    }
    
    .his-hero-banner__content {
        flex-direction: column;
        gap: 30px;
        padding: 10px 0;
    }
    
    .his-hero-banner__title {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .his-hero-banner {
        min-height: 250px;
    }
    
    .his-hero-banner__overlay .nhsuk-width-container {
        padding: 0 10px;
    }
    
    .his-hero-banner__content {
        gap: 20px;
        padding: 30px 0;
    }
    
    .his-hero-banner__title {
        font-size: 32px;
    }
    
    .his-hero-banner__button .nhsuk-icon {
        width: 18px;
        height: 18px;
    }
}
