/* Robotical Learning Progression Styles */
.rlp-wrapper {
    width: 100%;
    max-width: 1140px; /* Adjust as needed */
    margin: 40px auto;
    padding: 40px;
    font-family: sans-serif; /* Recommended to inherit from theme */
    background-color: #fff; /* White background for the whole component */
    box-sizing: border-box;
}

/* Tabs at the top */
.rlp-tabs {
    display: flex;
    justify-content: space-around;
    align-items: flex-end; /* Align items to the bottom to fix text alignment */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 150px; /* Adjust based on your background image */
    margin-bottom: 50px;
}

.rlp-tab-item-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column; /* Stack image and title vertically */
    align-items: center;
    justify-content: flex-end; /* Align content to the bottom of the wrapper */
    gap: 15px; /* Space between image and title */
}

.rlp-tab-item {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

.rlp-tab-item:hover,
.rlp-tab-item.active {
    opacity: 1;
}

.rlp-tab-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

.rlp-tab-title {
    font-weight: bold;
    text-transform: uppercase;
    color: #555;
    font-size: 1rem;
    text-align: center;
    transition: color 0.3s ease;
}

/* Highlight the title of the active tab */
.rlp-tab-item.active + .rlp-tab-title {
    color: #000;
}


/* Content Panels */
.rlp-content-panels {
    position: relative;
}

.rlp-content-panel {
    display: none; /* Hidden by default */
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.rlp-content-panel.active {
    display: grid; /* Shown when active */
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.rlp-content-text h2 {
    font-size: 2.5rem;
    font-weight: 700; /* Updated to bold */
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.rlp-content-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

.rlp-button {
    display: inline-block;
    background-color: #fdd100; /* Yellow from screenshot */
    color: #333;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.rlp-button:hover {
    background-color: #e6be00;
}

.rlp-button span {
    margin-left: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.rlp-button:hover span {
    transform: translateX(5px);
}

.rlp-content-image {
    position: relative;
}

.rlp-content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    /* box-shadow removed */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rlp-wrapper {
        padding: 20px;
    }
    
    .rlp-content-panel {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .rlp-content-text {
        order: 2;
        text-align: center;
    }

    .rlp-content-image {
        order: 1;
    }
    
    .rlp-content-text h2 {
        font-size: 2rem;
    }

    .rlp-tabs {
        min-height: 100px;
        margin-bottom: 30px;
        flex-wrap: wrap; /* Allow tabs to wrap on small screens */
    }

    .rlp-tab-item-wrapper {
        flex-basis: 50%; /* Two tabs per row on mobile */
        margin-bottom: 20px;
    }
}