.modular-container {
    display: flex;
    width: 100%;
    font-family: Arial, sans-serif;
    min-height: 450px;
}

.modular-container.right {
    flex-direction: row-reverse;
}

/* MENU */

.modular-list {
    width: 30%;
    background: rgba(10,15,25,.9);
    backdrop-filter: blur(12px);
    padding: 12px;
}

.modular-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,.1);
    color: #fff;
}

.modular-item {
    padding: 14px;
    cursor: pointer;
    color: #bbb;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: .3s;
}

.modular-item.active,
.modular-item:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

/* DISPLAY */

.modular-display {
    width: 70%;
    position: relative;
    overflow: hidden;
}

/* BACKGROUND */

.modular-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform .3s ease;
}

/* FADE */

.modular-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,.6));
}

/* CONTENT */

.modular-content-wrapper {
    position: relative;
    z-index: 2;
    padding: 40px;
}

/* Panels use natural height */

.modular-content {
    display: none;
    animation: slideIn .4s ease;
}

.modular-content.active {
    display: block;
}

/* Scrollable text */

.content-text {
    color: var(--textColor);
    font-size: var(--textSize);
    line-height: 1.6;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 10px;
    transition: max-height .4s ease;
}

.modular-content.expanded .content-text {
    max-height: 1000px;
}

/* Button */

.expand-btn {
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,.15);
    color: #fff;
}

@keyframes slideIn {
    from {opacity:0; transform:translateX(15px);}
    to {opacity:1; transform:none;}
}

/* MOBILE */

@media (max-width:768px) {
    .modular-container {
        flex-direction: column;
    }

    .modular-list,
    .modular-display {
        width: 100%;
    }
}
