/* ============================================================
   Expanding Cards Block v1.3
   Author: Monark Digital — https://www.monarkdigital.com
   ============================================================ */

.ecb-container {
    --ecb-accent:      #1a2744;
    --ecb-card-bg:     #ffffff;
    --ecb-title-color: #1a2744;
    --ecb-title-size:  22px;
    --ecb-desc-color:  #555555;
    --ecb-desc-size:   14px;
    --ecb-radius:      20px;
    --ecb-height:      560px;
    --ecb-transition:  0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Cards Row ── */
.ecb-cards-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    height: var(--ecb-height);
    align-items: stretch;
}

/* ── Single Card — NO shadow ── */
.ecb-card {
    position: relative;
    border-radius: var(--ecb-radius);
    background: var(--ecb-card-bg);
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 72px;
    transition: flex var(--ecb-transition);
}

.ecb-card--active {
    flex: 1 1 0;
    cursor: default;
}

.ecb-card:not(.ecb-card--active):hover {
    flex: 0 0 90px;
}

/* ── Image (left half, desktop) ── */
.ecb-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ecb-transition);
}

.ecb-card--active .ecb-card__image {
    opacity: 1;
    pointer-events: auto;
}

.ecb-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
	border-radius: var(--ecb-radius);
}

/* ── Content (right half) ── */
.ecb-card__content {
    position: absolute;
    top: 0;
    right: 0;
    width: 58%;
    height: 100%;
    padding: 32px 32px 32px 28px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(12px);
    pointer-events: none;
    transition: opacity 0.35s ease 0.15s, transform 0.35s ease 0.15s;
}

.ecb-card__content--no-image {
    width: 100%;
    left: 0;
    right: 0;
}

.ecb-card--active .ecb-card__content {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* ── SVG Icon ── */
.ecb-card__icon {
    align-self: flex-start;
    margin-bottom: auto;
    flex-shrink: 0;
}

.ecb-card__icon img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
	
}

/* ── Body ── */
.ecb-card__body {
    margin-top: auto;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ecb-card__title {
    font-size: var(--ecb-title-size);
    font-weight: 700;
    color: var(--ecb-title-color);
    margin: 0;
    line-height: 1.25;
}

.ecb-card__description {
    font-size: var(--ecb-desc-size);
    line-height: 1.7;
    color: var(--ecb-desc-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Button ── */
.ecb-card__btn {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
}

.ecb-card__btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* ── Collapsed Vertical Label ── */
.ecb-card__collapsed-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 20px 12px;
    box-sizing: border-box;
    font-size: 18px;
    font-weight: 600;
    color: var(--ecb-accent);
    letter-spacing: 0.04em;
    text-align: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.ecb-card--active .ecb-card__collapsed-label {
    opacity: 0;
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 768px) {
	
	.ecb-card__title {
    font-size: 18px;
}
	
	.ecb-card__description {
    -webkit-line-clamp: 4;
}

    .ecb-cards-container {
        flex-direction: column;
        height: auto !important;
    }

    .ecb-card {
        flex: 0 0 56px !important;
        height: 56px;
        width: 100%;
        overflow: hidden;
    }

    .ecb-card--active {
        flex: 0 0 440px !important;
        height: 440px;
    }

    /* Image: hidden on collapsed, visible on active only */
    .ecb-card__image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 45%;
        opacity: 0 !important;
        pointer-events: none;
        transition: opacity var(--ecb-transition);
    }

    .ecb-card--active .ecb-card__image {
        opacity: 1 !important;
        pointer-events: auto;
    }

    .ecb-card__content {
        top: 45%;
        left: 0;
        right: 0;
        width: 100%;
        height: 55%;
        padding: 16px 20px;
    }

    .ecb-card__content--no-image {
        top: 0;
        height: 100%;
    }

    .ecb-card__collapsed-label {
        writing-mode: horizontal-tb;
        transform: none;
        justify-content: flex-start;
        padding-left: 20px;
        font-size: 14px;
    }
}
