/* =========================================================
   Hover Card Widget — Tekcom
   Image fills the card; bottom bar shows title.
   On hover: bar background transitions to configured colour.
   ========================================================= */

/* ── Elementor widget wrapper: carries the height ────────── */
.elementor-widget-tekcom_hover_card {
    height: 380px;  /* fallback when no Elementor height control is set */
}

/* ── Card wrapper ────────────────────────────────────────── */
.hc-card {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
}

/* ── Background image via ::before so it can be scaled ──── */
.hc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* inherit the background-image set inline on the card */
    background-image: inherit;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    z-index: 0;
}

.hc-card--scale:hover::before {
    transform: scale(1.05);
}

/* ── Overlay on top of image, below bar ─────────────────── */
.hc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

/* ── Bottom bar ─────────────────────────────────────────── */
.hc-card__bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: stretch;   /* children stretch to full bar height */
    justify-content: space-between;
    gap: 0;
    padding: 0 20px;        /* vertical padding moved to title/arrow-wrap */
    background-color: rgba(0, 0, 0, 0.55);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
    z-index: 2;
}

.hc-card:hover .hc-card__bar {
    background-color: #4a7c2f;
}

/* ── Title ──────────────────────────────────────────────── */
.hc-card__title {
    flex: 1;
    display: flex;
    align-items: center;    /* vertically centre text within the stretched bar */
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 16px 0;        /* vertical padding lives here now */
}

/* ── Arrow: outer wrap (holds the divider line) ─────────── */
.hc-card__arrow-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;    /* centre icon inside the full-height wrap */
    align-self: stretch;    /* stretch to full bar height so divider touches edges */

    /* Vertical divider — always full bar height */
    border-left: 1.5px solid rgba(255, 255, 255, 0.6);
    padding-left: 16px;
    margin-left: 12px;

    /* Hidden by default — slides in on hover */
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hc-card:hover .hc-card__arrow-wrap {
    opacity: 1;
    transform: translateX(0);
}

/* ── Arrow: icon (SVG wrapper) ──────────────────────────── */
.hc-card__arrow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    width: 36px;
    height: 36px;
}

.hc-card__arrow-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Circle border around the icon */
.hc-card__arrow-icon--circle {
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

/* ── Frosted glass bar ───────────────────────────────────── */
.hc-card__bar--glass {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease, background-color 0.3s ease;
}

/* ── Accessibility ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .hc-card::before,
    .hc-card__bar,
    .hc-card__arrow-wrap {
        transition: none !important;
    }
}
