/* EC-UI-V90 - External events only */
#ecExternalEvents {
    direction: rtl;
}

#ecExternalEvents #ecExternalTitle {
    text-align: right;
    font-size: clamp(20px, 2.4vw, 27px);
    font-weight: 800;
    line-height: 1.7;
    margin: 0 0 18px;
    color: #173951;
}

#ecExternalEvents .ec-hub-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 12px;
    align-items: center;
    margin: 16px 0;
}

#ecExternalEvents .ec-hub-toolbar input,
#ecExternalEvents .ec-hub-toolbar select {
    width: 100%;
    min-width: 0;
    height: 46px;
    border: 1px solid #d3e2eb;
    border-radius: 11px;
    background: #fff;
    color: #24445b;
    padding: 0 13px;
    font-size: 14px;
    box-sizing: border-box;
}

#ecExternalEvents .ec-hub-toolbar input:focus,
#ecExternalEvents .ec-hub-toolbar select:focus {
    outline: 2px solid #0a98a5;
    outline-offset: 2px;
}

#ecExternalGrid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

#ecExternalGrid .ec-hub-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    background: #fff;
    border: 1px solid #dce8ef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(20, 55, 75, .045);
    transition: box-shadow .2s ease, transform .2s ease;
}

#ecExternalGrid .ec-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(20, 55, 75, .10);
}

#ecExternalGrid .ec-hub-image,
#ecExternalGrid .ec-hub-image-empty {
    display: block;
    width: 100%;
    height: 145px !important;
    object-fit: cover;
    flex-shrink: 0;
}

#ecExternalGrid .ec-hub-image-empty {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f3f8, #dceff0);
    font-size: 14px !important;
    font-weight: 700;
    color: #467588 !important;
}

#ecExternalGrid .ec-hub-image-empty::after {
    content: none !important;
    display: none !important;
}

#ecExternalGrid .ec-hub-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 15px !important;
    min-width: 0;
}

#ecExternalGrid .ec-hub-tag {
    align-self: flex-start;
    padding: 4px 10px;
    background: #eaf6f8;
    border-radius: 999px;
    color: #087f91;
    font-size: 12px;
    font-weight: 700;
}

#ecExternalGrid .ec-hub-card h3 {
    font-size: 16px;
    font-weight: 800;
    color: #1b3850;
    line-height: 1.9;
    margin: 3px 0 5px;
    overflow-wrap: anywhere;
}

#ecExternalGrid .ec-hub-meta {
    color: #60788a;
    font-size: 12px;
    line-height: 1.8;
    margin: 0 !important;
    overflow-wrap: anywhere;
}

#ecExternalGrid .ec-hub-action {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 43px;
    box-sizing: border-box;
    margin-top: auto !important;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(105deg, #0084b5, #009b91) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    text-align: center;
}

#ecExternalGrid .ec-hub-action:hover,
#ecExternalGrid .ec-hub-action:focus {
    background: #006d86 !important;
    color: #fff !important;
}

#ecExternalGrid .ec-hub-action:focus-visible {
    outline: 3px solid #eeaa66;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    #ecExternalGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    #ecExternalGrid {
        grid-template-columns: minmax(0, 1fr);
    }

    #ecExternalEvents .ec-hub-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    #ecExternalGrid .ec-hub-card:hover {
        transform: none;
    }
}