/* ── Outer wrapper ────────────────────────────────────── */
.my-custom-widget {
    position: relative;
    font-family: 'Poppins', sans-serif;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    background-color: #f8f8f8;
}

/* ── Hero / background image area ────────────────────── */
.my-custom-widget-hero {
    min-height: 210px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: flex-start;
    padding: 24px 20px;
    position: relative;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
}

.my-custom-widget-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.18));
    pointer-events: none;
}

/* ── Title ────────────────────────────────────────────── */
.my-custom-widget h1 {
    font-size: 2.2em;
    margin: 0;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
    width: 100%;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 1;
}

/* ── Items strip ──────────────────────────────────────── */
.my-custom-widget-items {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    padding: 0 16px 20px;
    margin-top: -38px;
    position: relative;
    z-index: 10;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: transparent;
}

.my-custom-widget-items::-webkit-scrollbar {
    display: none;
}

/* ── Single item ──────────────────────────────────────── */
.my-custom-widget-item {
    flex: 0 0 auto;
    min-width: 76px;
    text-align: center;
    padding: 0 4px;
}

.my-custom-widget-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Circular icon bubble ─────────────────────────────── */
.item-icon {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    border: 3px solid rgba(255, 255, 255, 0.85);
    overflow: hidden;
    margin: 0 auto 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── Item label ───────────────────────────────────────── */
.my-custom-widget-item p {
    font-size: 0.78em;
    margin: 0;
    color: #444;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Hover lift ───────────────────────────────────────── */
.my-custom-widget-item:hover .item-icon {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .my-custom-widget {
        border-radius: 0 0 14px 14px;
        background-color: #f8f8f8;
    }

    .my-custom-widget-hero {
        display: none;
    }

    /* Full-width scrollable pill strip */
    .my-custom-widget-items {
        margin-top: 0;
        justify-content: flex-start;
        padding: 16px 12px 20px;
        gap: 6px;
    }

    /* Each mobile item is a vertical pill card */
    .my-custom-widget-item {
        flex: 0 0 auto;
        min-width: 0;
        padding: 0 4px;
        text-align: center;
    }

    .my-custom-widget-item a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        background-color: #ffffff;
        border-radius: 16px;
        padding: 10px 10px 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        min-width: 70px;
        transition: box-shadow 0.2s ease, transform 0.2s ease;
    }

    .my-custom-widget-item a:active {
        transform: scale(0.96);
    }

    /* Slightly smaller icon on mobile */
    .my-custom-widget-item .item-icon {
        width: 52px;
        height: 52px;
        margin: 0;
        box-shadow: none;
        border: 2px solid rgba(255, 255, 255, 0.7);
    }

    .my-custom-widget-item p {
        font-size: 0.72em;
        color: #333;
        font-weight: 600;
        white-space: nowrap;
    }
}
