/**
 * Image Accordion – Base Styles
 * Elementor Addon By Shahriar
 */

/* ── Container ── */
.eabs-img-accordion {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

/* ── Row of items (single row group) ── */
.eabs-img-accordion__row {
    display: flex;
    gap: 10px;
    width: 100%;
    min-height: 400px;
}

/* ── Single Accordion Item ── */
.eabs-img-accordion__item {
    position: relative;
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active item gets more flex-grow */
.eabs-img-accordion__item.eabs-active {
    flex: 5 1 0%;
}

/* ── Background Image Layer ── */
.eabs-img-accordion__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
    z-index: 1;
}

.eabs-img-accordion__item:hover .eabs-img-accordion__bg {
    transform: scale(1.05);
}

/* ── Dark Overlay ── */
.eabs-img-accordion__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 2;
    transition: background 0.5s ease;
}

/* ── Collapsed Title (vertical text, bottom-to-top) ── */
.eabs-img-accordion__collapsed-title {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    z-index: 3;
    opacity: 1;
    transition: opacity 0.3s ease 0.1s;
    text-decoration: none;
    pointer-events: none;
    height: auto;
    max-height: calc(100% - 40px);
    overflow: hidden;
}

.eabs-img-accordion__item.eabs-active .eabs-img-accordion__collapsed-title {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* ── Expanded Content (title + description) ── */
.eabs-img-accordion__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.eabs-img-accordion__item.eabs-active .eabs-img-accordion__content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
    pointer-events: auto;
}

/* ── Title in expanded state ── */
.eabs-img-accordion__title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.eabs-img-accordion__title a {
    color: inherit;
    text-decoration: none;
}

.eabs-img-accordion__title a:hover {
    text-decoration: underline;
}

/* ── Description ── */
.eabs-img-accordion__desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}
