/* =========================================================
   Hover Expand Cards — style.css
   ========================================================= */

.hec-wrapper {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* ── Each Card ── */
.hec-card {
    position: relative;
    background: var(--card-bg, #0d7a7a);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    outline: none;

    /* collapsed: narrow strip */
    flex: 0 0 72px;
    min-height: 460px;

    transition:
        flex 0.55s cubic-bezier(0.77, 0, 0.175, 1),
        box-shadow 0.4s ease;
}

.hec-card:focus,
.hec-card.hec-active {
    flex: 1 1 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* ── Decorative background overlay ── */
.hec-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='400' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='200' cy='200' r='180' fill='rgba(255,255,255,0.04)'/%3E%3Ccircle cx='200' cy='200' r='120' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") center / cover no-repeat;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}
.hec-card.hec-active::before {
    opacity: 1;
}

/* ── Side Label (shown when collapsed) ── */
.hec-side-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s ease 0.1s;
}

.hec-side-label span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: rgba(255,255,255,0.92);
    font-size: 1.25rem;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hec-card:focus .hec-side-label,
.hec-card.hec-active .hec-side-label {
    opacity: 0;
    pointer-events: none;
}

/* ── Expanded Content ── */
.hec-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    text-align: center;
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.35s ease 0.2s,
        transform 0.4s ease 0.2s;
    pointer-events: none;
}

.hec-card:focus .hec-content,
.hec-card.hec-active .hec-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Icon Circle ── */
.hec-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    flex-shrink: 0;
    transition: background 0.3s;
}
.hec-card.hec-active .hec-icon-wrap {
    background: rgba(255,255,255,0.26);
}

.hec-icon-wrap svg,
.hec-icon-wrap i {
    color: white;
    fill: white;
    font-size: 2rem;
    width: 48px;
    height: 48px;
}

/* ── Title ── */
.hec-title {
    color: #fff;
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.35;
}

/* ── Description ── */
.hec-desc {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 32px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
}

/* ── Button ── */
.hec-btn {
    display: inline-block;
    padding: 12px 32px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition:
        background 0.25s,
        border-color 0.25s,
        color 0.25s,
        transform 0.2s;
}
.hec-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
    transform: translateX(4px);
    color: #fff;
    text-decoration: none;
}

/* ==========================================================
   RESPONSIVE — tablet
   ========================================================== */
@media (max-width: 900px) {
    .hec-wrapper {
        gap: 12px;
        padding: 28px 16px;
    }
    .hec-card {
        flex: 0 0 58px;
        min-height: 380px;
    }
}

/* ==========================================================
   RESPONSIVE — mobile  (stack vertically)
   ========================================================== */
@media (max-width: 600px) {
    .hec-wrapper {
        flex-direction: column;
        gap: 12px;
        padding: 20px 16px;
    }

    /* All cards: horizontal strip (collapsed) */
    .hec-card {
        flex: 0 0 64px !important;
        min-height: 64px;
        border-radius: 12px;
        transition:
            flex 0.55s cubic-bezier(0.77, 0, 0.175, 1),
            box-shadow 0.4s ease;
    }

    /* Active card expands to full height */
    .hec-card:focus,
    .hec-card.hec-active {
        flex: 0 0 360px !important;
    }

    /* Side label: horizontal on mobile */
    .hec-side-label span {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 1.1rem;
    }

    .hec-content {
        padding: 28px 24px;
    }

    .hec-icon-wrap {
        width: 70px;
        height: 70px;
        margin-bottom: 18px;
    }

    .hec-title {
        font-size: 1.15rem;
    }

    .hec-desc {
        font-size: 0.88rem;
        margin-bottom: 20px;
    }
}
