/* --- Capabilities Interactive Split-Screen Layout --- */

.capabilities-main {
    background-color: var(--bg-dark); /* Extends dark background seamlessly to footer */
}

.split-layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* --- Left Side: Text Area --- */
.split-left {
    flex: 1;
    background: var(--bg-dark);
    color: #fff;
    padding: 8rem 4rem 6rem; /* Top padding clears the absolute navigation */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.left-content-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 4rem;
    color: var(--text-light);
}

.cap-item {
    margin-bottom: 1.5rem;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    border-left: 2px solid transparent;
    padding-left: 1.5rem;
}

.cap-item:hover, 
.cap-item.active {
    opacity: 1;
    border-left-color: var(--brand-purple);
}

.cap-num {
    color: var(--brand-purple);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    display: inline-block;
    margin-right: 0.5rem;
}

.cap-item h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
    margin-bottom: 1rem;
    display: block;
}

/* Accordion Text Expansion */
.cap-text {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}

.cap-item.active .cap-text {
    grid-template-rows: 1fr;
}

.cap-text p {
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.7;
    color: #d0d0d0;
    margin: 0;
}

/* --- Right Side: Sticky Image Panel --- */
.split-right {
    flex: 1;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background-color: #1a1a1a;
}

.right-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease, transform 6s ease-out;
    transform: scale(1.05); /* Creates a subtle zoom-out effect when active */
}

.right-bg.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* --- Global: Hide Mobile Images on Desktop --- */
.mobile-cap-img {
    display: none;
}

/* --- Heading Dash & Accent Styles --- */
.title-dash {
    display: inline-block;
    width: 80px;
    height: 4px;
    background-color: var(--brand-purple);
    margin-bottom: 0.2em;
    margin-right: 20px;
    vertical-align: middle;
}

.title-accent {
    color: var(--brand-purple);
}

/* Responsive adjustment for the dash */
@media (max-width: 768px) {
    .title-dash {
        width: 50px;
        margin-bottom: 0.3em;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .split-layout {
        flex-direction: column;
    }
    
    .split-right {
        display: none; /* Hides desktop image panel entirely */
    }

    .split-left {
        padding: 7rem 2rem 4rem;
    }

    .cap-item {
        opacity: 1; /* Keep all items fully visible on mobile */
        border-left-color: rgba(255, 255, 255, 0.1);
        padding-bottom: 1rem; /* Adds a bit of breathing room at the bottom */
    }
    
    .cap-item.active {
        border-left-color: var(--brand-purple);
    }

    .cap-item h2 {
        font-size: 1.8rem;
    }

    /* --- Show Mobile Images --- */
    .mobile-cap-img {
        display: block;
        width: 100%;
        height: 220px;
        object-fit: cover; /* Ensures the image fills the space without stretching */
        border-radius: 4px;
        margin: 1.5rem 0; /* Creates perfect spacing between the kicker and the description text */
    }
}