/* Core Box Reset */


/* Parent Container Configuration */
.tab-container {
    display: flex;
    flex-wrap: wrap; /* Permits wrapping to accordion on mobile devices */
    max-width: 100%; /* Constrains layout width safely */
    margin: 0 auto;
    background: #F0F9F9;
    overflow: hidden;
}

    /* Completely Hide Radio Elements */
    .tab-container input[type="radio"] {
        display: none;
    }

/* Tab Heading Labels */
.tab-label {
    padding: 18px 24px;
    cursor: pointer; /* Intuitively signals clickability */
    background: #F0F9F9;
    color: #7367F0;
    font-weight: 600;
    border-bottom: 2px solid #7367F0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Fluid interactive feedback loop */
    text-align: center;
    flex: 1; /* Scales all tab headings identically */
    order: 1; /* Forces headers to stay aligned sequentially at the top */
}

/* Default Content Shell Setup */
.worksTab-content {
    width: 100%;
    padding: 30px;
    background: #F0F9F9;
    display: none; /* Keeps inactive blocks safely out of sight by default */
    order: 2; /* Groups content areas smoothly underneath top headers */
}


/* Active Interactions & State Management */
.tab-container input[type="radio"]:checked + .tab-label {
    background: #ffffff;
    color: #C82D8C; /* Highlight color for selected item */
    border-bottom: 2px solid #C82D8C; /* Active visual indicator rule */
}

    /* Target and Reveal Relevant Sibling Content Container */
    .tab-container input[type="radio"]:checked + .tab-label + .worksTab-content {
        display: block; /* Draws target element securely into view layout */
    }

/* Mobile Responsiveness Framework */
@media (max-width: 680px) {
    .tab-label {
        flex: none;
        width: 100%; /* Spans full axis to transition smoothly into an accordion */
        text-align: left;
        border-bottom: 1px solid #e9ecef;
    }

    /* Alters rendering flow sequentially to place content directly beneath its matching label */
    .tab-1, [for="tab-1"] {
        order: 1;
    }

    #tab-1:checked ~ .worksTab-content:nth-of-type(1) {
        order: 2;
    }

    .tab-2, [for="tab-2"] {
        order: 3;
    }

    #tab-2:checked ~ .worksTab-content:nth-of-type(2) {
        order: 4;
    }

    .tab-3, [for="tab-3"] {
        order: 5;
    }

    #tab-3:checked ~ .worksTab-content:nth-of-type(3) {
        order: 6;
    }

    .tab-container input[type="radio"]:checked + .tab-label {
        border-bottom: 1px solid transparent;
        border-left: 4px solid #7367F0; /* Vertical accent bar indicator for mobile layout */
    }
}
