.mega-acc-container {
    display: flex;
    width: 100%;
    height: var(--mega-height, 650px);
    gap: 8px;
    background: #0a0a0a;
    padding: 8px;
    border-radius: 20px;
    overflow: hidden;
}

.mega-item {
    flex: 1;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: flex var(--mega-speed, 0.4s) cubic-bezier(0.25, 1, 0.5, 1);
}

.mega-item.active {
    flex: var(--mega-active-flex, 10);
}

.mega-bg-color {
    position: absolute;
    inset: 0;
    background: var(--tab-color, #333);
    opacity: 0.9;
}

.mega-bg-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    mix-blend-mode: overlay;
    transition: opacity calc(var(--mega-speed, 0.4s) * 2) ease;
}

.mega-item.active .mega-bg-photo {
    opacity: 0.3;
}

.mega-spine {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(0,0,0,0.7);
    transition: all calc(var(--mega-speed, 0.4s) * 0.9) ease;
}

.spine-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 700;
    font-size: 13px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mega-item.active .mega-spine {
    opacity: 0;
    pointer-events: none;
}

.mega-content {
    position: absolute;
    inset: 0;
    padding: 35px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 55%, transparent 100%);
    color: white;
    opacity: 0;
    transform: translateY(40px);
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all calc(var(--mega-speed, 0.4s) * 1) ease calc(var(--mega-speed, 0.4s) * 0.25);
}

.mega-item.active .mega-content {
    opacity: 1;
    transform: translateY(0);
}

.mega-extra-photo {
    width: 100%;
    max-height: 210px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
    opacity: 0;
    flex-shrink: 0;
}

.mega-item.active .mega-extra-photo {
    opacity: 1;
}

.mega-content h2 {
    font-size: 30px;
    margin: 0 0 10px;
    font-weight: 700;
}

.mega-content .mega-text {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255,255,255,0.9);
    margin: 0 0 20px;
}

.mega-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: rgba(255,255,255,0.15);
    border: 2px solid white;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    width: fit-content;
}

.mega-btn:hover {
    background: white;
    color: #000;
}

.mega-btn svg {
    width: 14px;
    height: 14px;
}

/* --- Новые стили для внутренней компоновки --- */
.mega-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.mega-img-wrapper {
    flex: 1;
    position: relative;
    max-width: 50%;
}

.mega-slide-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: block;
}

.mega-small-icon {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.mega-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mega-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mega-text {
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.6;
}

.mega-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.mega-btn {
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.mega-btn-1 {
    background: #fff;
    color: #000;
    border: 2px solid #fff;
}
.mega-btn-1:hover {
    background: transparent;
    color: #fff;
}

.mega-btn-2 {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}
.mega-btn-2:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

@media (max-width: 1024px) {
    .mega-acc-container {
        flex-wrap: wrap;
        height: auto;
    }
    .mega-item {
        flex: 1 1 45%;
        min-height: 300px;
        margin-bottom: 8px;
    }
    .mega-item.active {
        flex: 1 1 100%;
    }
    .spine-title {
        writing-mode: horizontal-tb;
        transform: none;
    }
    .mega-content {
        flex-direction: column;
    }
    .mega-img-wrapper, .mega-text-wrapper {
        max-width: 100%;
        width: 100%;
    }
    .mega-img-wrapper {
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .mega-item {
        flex: 1 1 100%;
        min-height: 250px;
    }
    .mega-item.active {
        min-height: 450px;
    }
}