/* ================================================================
   Drofa Card Widget v2.1 — card.css
   ================================================================ */

/* ── CSS custom properties ────────────────────────────────────── */
.drofa-card {
    --dc-zoom:     1.08;
    --dc-duration: 400ms;
}

/* ── Base ─────────────────────────────────────────────────────── */
.drofa-card {
    position: relative;
    display: block;
    width: 100%;
    height: 480px;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
}
a.drofa-card {
    text-decoration: none!important;
}
/* ── Layer 1: Background ──────────────────────────────────────── */
.drofa-card__bg {
    position: absolute;
    inset: -2px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: scale(1);
    transition: transform var(--dc-duration) cubic-bezier(.25, .46, .45, .94);
    will-change: transform;
}

/* ── Layer 2: Static overlay (always visible) ─────────────────── */
.drofa-card__static-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    pointer-events: none;
    z-index: 1;
}

/* ── Layer 3: Hover overlay ───────────────────────────────────── */
.drofa-card__hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.22);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity var(--dc-duration) ease;
}

/* ── Layer 4: Inner content ───────────────────────────────────── */
.drofa-card__inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;     /* everything flows from top */
    height: 100%;
    padding: 24px 28px 28px;
    box-sizing: border-box;
    pointer-events: none;
}

/* ── Top row: label (left) + arrow (right) — ALWAYS VISIBLE ───── */
.drofa-card__top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;             /* gap between label and title */
}

/* ── Label — always visible ───────────────────────────────────── */
.drofa-card__label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.3;
    color: #1a1a1a;
    flex: 1;
    padding-right: 12px;
}

/* ── Arrow — appears on hover, top-right ──────────────────────── */
.drofa-card__arrow {
    font-size: 28px;
    line-height: 1;
    color: #1a1a1a;
    flex-shrink: 0;
    opacity: 0;
    transform: translate(-5px, 5px);
    transition:
        opacity   var(--dc-duration) ease,
        transform var(--dc-duration) cubic-bezier(.25, .46, .45, .94);
    will-change: opacity, transform;
}

/* ── Title — appears on hover, directly below label ──────────── */
.drofa-card__title {
    display: block;
    margin: 0;
    font-size: clamp(18px, 2.4vw, 32px);
    font-weight: 500;
    line-height: 1.2;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    opacity: 0;
    transition:
        opacity   var(--dc-duration) ease,
        transform var(--dc-duration) cubic-bezier(.25, .46, .45, .94);
    will-change: opacity, transform;
}

/* entrance direction variants */
.drofa-card[data-from="bottom"] .drofa-card__title { transform: translateY(16px); }
.drofa-card[data-from="top"]    .drofa-card__title { transform: translateY(-16px); }
.drofa-card[data-from="left"]   .drofa-card__title { transform: translateX(-16px); }
.drofa-card[data-from="right"]  .drofa-card__title { transform: translateX(16px); }
.drofa-card[data-from="fade"]   .drofa-card__title { transform: none; }

/* ── Drop-zone slot — always visible ─────────────────────────── */
.drofa-card__slot {
    display: block;
    position: relative;
    pointer-events: auto;
    z-index: 3;
}

.drofa-card__slot .elementor-widget-wrap,
.drofa-card__slot .elementor-widget {
    margin-bottom: 0;
}

/* ================================================================
   HOVER / FOCUS STATE
   ================================================================ */

.drofa-card:hover .drofa-card__bg,
.drofa-card:focus-visible .drofa-card__bg {
    transform: scale(var(--dc-zoom));
}

.drofa-card:hover .drofa-card__hover-overlay,
.drofa-card:focus-visible .drofa-card__hover-overlay {
    opacity: 1;
}

.drofa-card:hover .drofa-card__title,
.drofa-card:focus-visible .drofa-card__title {
    opacity: 1;
    transform: none;
}

.drofa-card:hover .drofa-card__arrow,
.drofa-card:focus-visible .drofa-card__arrow {
    opacity: 1;
    transform: none;
}

/* ================================================================
   TOUCH DEVICES
   ================================================================ */
@media (hover: none) {
    .drofa-card__title,
    .drofa-card__arrow {
        opacity: 1 !important;
        transform: none !important;
    }
    .drofa-card__hover-overlay {
        opacity: 1;
    }
}

/* ================================================================
   ELEMENTOR EDITOR
   ================================================================ */
.elementor-editor-active .drofa-card__title,
.elementor-editor-active .drofa-card__arrow {
    opacity: 0.45;
    transform: none !important;
}

.elementor-editor-active .drofa-card__slot,
.elementor-editor-active .drofa-card__inner {
    pointer-events: auto;
}
