:root {
    --swfs-navy: #051236;
    --swfs-text-muted: #c3cada;
    --swfs-white: #ffffff;
}

/* 1. Main Wrapper - Now Boxed and Centered */
.mission-overview-block {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 25px auto 0 auto;
    /* Centered with top margin */
    max-width: 100%;
    width: 100%;
    color: var(--swfs-white);
    background-color: var(--swfs-navy);
    border-radius: 12px;
    /* Optional, adding slight rounded corners to look good boxed */
}

/* 2. Background Image & Smooth Gradient Fade */
.mo-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--swfs-navy);
}


.mo-image,
.mo-image .field,
.mo-image .field__item,
.mo-image .media {
    width: 100%;
    height: 100%;
}

.mo-image img {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: auto !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: right center !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Fades the left edge of the image smoothly into the background */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 35%);
    mask-image: linear-gradient(to right, transparent 0%, black 35%);
}

/* Updated gradient to reveal MORE of the image on the right */
.mo-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Pushed the transparent part further left so you can see the ship better */
    background: linear-gradient(to right,
            var(--swfs-navy) 0%,
            var(--swfs-navy) 35%,
            /* Stays solid dark blue behind the text */
            rgba(5, 18, 54, 0.7) 50%,
            /* Starts fading out */
            transparent 85%);
    z-index: 1;
    /* Ensures gradient stays on top of the image */
}

/* 3. Content Layout */
.mo-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 4rem 60px !important;
    box-sizing: border-box;
}

.mo-text-column {
    max-width: 52%;
}

/* 4. Top Badge Styling */
.mo-badge-wrapper {
    margin-bottom: 1.5rem;
}

.mo-badge-wrapper .badge-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.8rem;
}

.mo-badge-wrapper .badge-icon img {
    width: 14px;
    height: auto;
    margin: 0;
}

/* 5. Main Title & Description */
.mo-title .field {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 0;
    margin-bottom: 1.2rem;
}

.mo-description .field {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--swfs-text-muted);
    margin-bottom: 3rem;
    max-width: 92%;
}

/* 6. Nested Objectives (The two features) */
.mo-objectives-row .field--name-field-objectives {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    margin-top: 15px;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.mo-objective-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    max-width: 300px;
}

/* Circular icon with border */
.objective-icon {
    flex-shrink: 0;
}

.objective-icon .field {
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.objective-icon .field img {
    width: 22px;
    height: auto;
}

/* Vertical line between icon and text */
.objective-text {
    position: relative;
    padding-left: 1.2rem;
    margin-left: 1.2rem;
}

.objective-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 70%;
    background-color: rgba(255, 255, 255, 0.25);
}

.objective-text .field {
    font-size: 0.85rem;
    color: var(--swfs-text-muted);
    line-height: 1.5;
}

/* 7. Bottom Buttons */
.mo-buttons {
    display: flex;
    gap: 1rem;
}

.mo-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary a {
    background-color: var(--swfs-white);
    color: var(--swfs-navy);
}

/* Adds the arrow to the primary button */
.btn-primary a::after {
    margin-left: 6px;
    font-size: 1.1rem;
}

.mission-overview-block .btn-primary a:hover,
.mission-overview-block .btn-primary a:focus-visible {
    background-color: #e6ebf4;
    color: var(--swfs-navy);
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.btn-secondary a {
    background-color: transparent;
    color: var(--swfs-white);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.mission-overview-block .btn-secondary a:hover,
.mission-overview-block .btn-secondary a:focus-visible {
    background-color: var(--swfs-white);
    color: var(--swfs-navy);
    border-color: var(--swfs-white);
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
    .mo-gradient-overlay {
        background: linear-gradient(to right, var(--swfs-navy) 65%, rgba(5, 18, 54, 0.85) 85%, transparent 100%);
    }

    .mo-text-column {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .mo-text-column {
        max-width: 100%;
    }
    
    .mo-title .field {
        font-size: 24px !important;
    }
    
    .mo-description .field {
        font-size: 15.2px !important;
    }

    .mo-objectives-row .field--name-field-objectives {
        flex-direction: column !important;
        gap: 2rem;
    }

    /* Fix image scaling and visibility on mobile */
    .mo-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }
    
    .mo-gradient-overlay {
        /* Semi-transparent navy overlay so text remains readable but image shows through */
        background: linear-gradient(to bottom, var(--swfs-navy) 0%, rgba(5, 18, 54, 0.8) 60%, rgba(5, 18, 54, 0.7) 100%);
    }
}

@media (max-width: 575px) {
    .mo-content {
        padding: 3rem 15px !important;
    }

    .mo-objective-item {
        flex-direction: column !important;
        align-items: flex-start;
        gap: 1rem;
        max-width: 100%;
    }

    .objective-text {
        padding-left: 0;
        margin-left: 0;
    }

    .objective-text::before {
        display: none;
    }

    .mo-buttons {
        flex-direction: column;
        width: 100%;
    }

    .mo-buttons a {
        width: 100%;
    }
}