/**
 * Kimsen Hover Cards
 * A single grid cell lets both faces contribute their natural content height.
 */
.elementor-widget-kimsen-hover-card > .elementor-widget-container,
.elementor-widget-kimsen-hover-card .khc-card {
    height: 100%;
}

.khc-card {
    --khc-default-min-height: 320px;
    --khc-default-padding: 32px;
    --khc-default-title-normal: #54595f;
    --khc-default-text-normal: #54595f;
    --khc-default-title-hover: #ffffff;
    --khc-default-text-hover: #ffffff;
    --khc-default-align-normal: center;
    --khc-default-align-hover: center;
    --khc-default-button-width: 100%;
    --khc-default-button-bg: transparent;
    --khc-default-button-color: #ffffff;
    --khc-default-button-border: #ffffff;
    --khc-default-button-bg-hover: #ffffff;
    --khc-default-button-color-hover: #760d26;

    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    min-height: var(--khc-min-height, var(--khc-default-min-height));
    padding: 0;
    overflow: hidden;
    border-radius: var(--khc-radius, 14px);
    background: #ffffff;
}

.khc-card,
.khc-card * {
    box-sizing: border-box;
}

.khc-card.khc-link-box {
    color: inherit;
    text-decoration: none;
}

.khc-card.khc-link-box:focus-visible {
    outline: 2px solid #e31318;
    outline-offset: 4px;
}

.khc-card.khc-link-box .khc-button {
    pointer-events: none;
}

.khc-card .khc-backgrounds,
.khc-card .khc-bg,
.khc-card .khc-overlay,
.khc-card .khc-hover-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.khc-card .khc-backgrounds {
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
}

.khc-card .khc-bg {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.khc-card .khc-overlay-normal {
    background: #ffffff;
    opacity: 0.5;
}

.khc-card .khc-hover-layer {
    background: #ffffff;
    opacity: 0;
    transition: opacity var(--khc-duration, 450ms) ease;
}

.khc-card .khc-overlay-hover {
    background: linear-gradient(135deg, rgba(239, 101, 88, 0.82), rgba(118, 13, 38, 0.88));
}

.khc-card .khc-content,
.khc-card .khc-face {
    position: relative;
    z-index: 1;
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-width: 0;
    min-height: inherit;
    padding: var(--khc-padding, var(--khc-default-padding));
    overflow-wrap: anywhere;
}

/* White faces center a shared row height; their natural content stays top-aligned. */
.khc-card.khc-style-2 .khc-back,
.khc-card.khc-style-3 .khc-front {
    justify-content: center;
}

.khc-card .khc-light-inner {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: var(--khc-light-height, 0px);
}

.khc-card .khc-light-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-width: 0;
}

.khc-card .khc-copy {
    display: flex;
    flex-direction: column;
    gap: var(--khc-gap, 16px);
    min-width: 0;
}

.khc-card .khc-title {
    margin: 0;
    color: var(--khc-title-normal, var(--khc-default-title-normal));
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-align: var(--khc-title-align-normal, var(--khc-default-align-normal));
    transition: color var(--khc-duration, 450ms) ease;
}

.khc-card .khc-description {
    margin: 0;
    color: var(--khc-text-normal, var(--khc-default-text-normal));
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    text-align: var(--khc-text-align-normal, var(--khc-default-align-normal));
    transition: color var(--khc-duration, 450ms) ease;
}

.khc-card .khc-description > :first-child {
    margin-top: 0;
}

.khc-card .khc-description > :last-child {
    margin-bottom: 0;
}

.khc-card .khc-cta {
    display: grid;
    grid-template-rows: 1fr;
    min-width: 0;
    margin-top: var(--khc-cta-gap, 24px);
}

.khc-card .khc-cta-clip {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.khc-card .khc-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: var(--khc-button-width, var(--khc-default-button-width));
    max-width: 100%;
    min-height: 44px;
    padding: var(--khc-button-padding, 11px 22px);
    border: 1px solid var(--khc-current-button-border, var(--khc-button-border, var(--khc-default-button-border)));
    border-radius: var(--khc-button-radius, 5px);
    background: var(--khc-current-button-bg, var(--khc-button-bg, var(--khc-default-button-bg)));
    color: var(--khc-current-button-color, var(--khc-button-color, var(--khc-default-button-color)));
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease;
}

.khc-card .khc-button:hover,
.khc-card .khc-button:focus-visible {
    background: var(--khc-button-bg-hover, var(--khc-default-button-bg-hover));
    color: var(--khc-button-color-hover, var(--khc-default-button-color-hover));
    text-decoration: none;
}

.khc-card .khc-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -5px;
}

/* Style 1: top-aligned copy stays in place while the CTA fades in. */
.khc-card.khc-style-1 .khc-content {
    text-align: center;
}

.khc-card.khc-style-1 .khc-cta {
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease;
}

.khc-card.khc-style-1 .khc-cta-clip {
    overflow: visible;
}

/* Style 2: both faces remain in flow, so longer content expands the card. */
.khc-card.khc-style-2 {
    --khc-default-title-normal: #ffffff;
    --khc-default-text-normal: #ffffff;
    --khc-default-title-hover: #54595f;
    --khc-default-text-hover: #54595f;
    --khc-default-align-hover: left;
    --khc-default-button-width: auto;
    --khc-default-button-bg: #e31318;
    --khc-default-button-color: #ffffff;
    --khc-default-button-border: #e31318;
    --khc-default-button-bg-hover: #b20c10;
    --khc-default-button-color-hover: #ffffff;
}

.khc-card.khc-style-2 .khc-overlay-normal {
    background: #000000;
    opacity: 0.75;
}

.khc-card.khc-style-2 .khc-overlay-hover {
    background: #ffffff;
}

.khc-card:is(.khc-style-2, .khc-style-3) .khc-face {
    transition: opacity var(--khc-duration, 450ms) ease;
}

.khc-card:is(.khc-style-2, .khc-style-3) .khc-front {
    gap: var(--khc-gap, 16px);
    text-align: center;
    opacity: 1;
    pointer-events: none;
}

.khc-card:is(.khc-style-2, .khc-style-3) .khc-back {
    z-index: 2;
    text-align: left;
    opacity: 0;
    pointer-events: none;
}

.khc-card:is(.khc-style-2, .khc-style-3) .khc-back .khc-title {
    color: var(--khc-title-hover, var(--khc-default-title-hover));
    text-align: var(--khc-title-align-hover, var(--khc-default-align-hover));
}

.khc-card:is(.khc-style-2, .khc-style-3) .khc-back .khc-description {
    color: var(--khc-text-hover, var(--khc-default-text-hover));
    text-align: var(--khc-text-align-hover, var(--khc-default-align-hover));
}

/* Style 3 mirrors Style 2: light copy + CTA first, then dark badge + copy. */
.khc-card.khc-style-3 {
    --khc-style3-active: 0;
    --khc-default-align-normal: left;
    --khc-default-button-width: auto;
    --khc-default-button-bg: #e31318;
    --khc-default-button-color: #ffffff;
    --khc-default-button-border: #e31318;
    --khc-default-button-bg-hover: #b20c10;
    --khc-default-button-color-hover: #ffffff;
}

.khc-card.khc-style-3 .khc-overlay-normal {
    background: #ffffff;
    opacity: 1;
}

.khc-card.khc-style-3 .khc-overlay-hover {
    background: #000000;
    opacity: 0.75;
}

.khc-card.khc-style-3 .khc-hover-layer {
    opacity: var(--khc-style3-active);
}

.khc-card.khc-style-3 .khc-front {
    gap: 0;
    text-align: left;
    opacity: calc(1 - var(--khc-style3-active));
}

.khc-card.khc-style-3 .khc-back {
    gap: var(--khc-gap, 16px);
    text-align: center;
    opacity: var(--khc-style3-active);
    pointer-events: none;
}

.khc-card.khc-style-3 .khc-cta {
    text-align: var(--khc-button-align, left);
}

/* Preserve the Normal button hit area so hovering/focusing it never removes it. */
.khc-card.khc-style-3.khc-link-button .khc-button {
    pointer-events: auto;
}

.khc-card .khc-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    flex: 0 0 auto;
    width: calc(var(--khc-icon-size, 32px) + 32px);
    height: calc(var(--khc-icon-size, 32px) + 32px);
    max-width: 100%;
    border-radius: var(--khc-badge-radius, var(--khc-icon-radius, 8px));
    background: var(--khc-badge-bg, var(--khc-icon-bg, #ffffff));
    color: var(--khc-icon-color, #e31318);
    font-size: var(--khc-icon-size, 32px);
    line-height: 1;
}

.khc-card .khc-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.khc-card .khc-icon img {
    display: block;
    width: var(--khc-icon-size, 32px);
    height: var(--khc-icon-size, 32px);
    object-fit: contain;
}

/* A keyboard-focused button opens the same face as mouse hover. */
.khc-card:not(.khc-style-3):not(.khc-preview-normal):is(:hover, :focus-within, .khc-preview-hover) .khc-hover-layer {
    opacity: 1;
}

.khc-card.khc-style-1:not(.khc-preview-normal):is(:hover, :focus-within, .khc-preview-hover) .khc-title {
    color: var(--khc-title-hover, var(--khc-default-title-hover));
    text-align: var(--khc-title-align-hover, var(--khc-default-align-hover));
}

.khc-card.khc-style-1:not(.khc-preview-normal):is(:hover, :focus-within, .khc-preview-hover) .khc-description {
    color: var(--khc-text-hover, var(--khc-default-text-hover));
    text-align: var(--khc-text-align-hover, var(--khc-default-align-hover));
}

.khc-card.khc-style-1:not(.khc-preview-normal):is(:hover, :focus-within, .khc-preview-hover) .khc-cta {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 40ms;
}

.khc-card.khc-style-2:not(.khc-preview-normal):is(:hover, :focus-within, .khc-preview-hover) .khc-front {
    opacity: 0;
}

.khc-card.khc-style-2:not(.khc-preview-normal):is(:hover, :focus-within, .khc-preview-hover) .khc-back {
    opacity: 1;
    pointer-events: auto;
}

.khc-card.khc-style-3.khc-preview-hover:not(.khc-preview-normal) {
    --khc-style3-active: 1;
}

@media (hover: hover) and (pointer: fine) {
    .khc-card.khc-style-3:not(.khc-preview-normal):is(
        .khc-link-box:is(:hover, :focus-within),
        .khc-link-button:hover:not(:has(.khc-button:hover)):not(:focus-within)
    ) {
        --khc-style3-active: 1;
    }
}

/* Restore the real button immediately when its hit area or keyboard focus is reached. */
.khc-card.khc-style-3.khc-link-button:not(.khc-preview-hover):is(:has(.khc-button:hover), :focus-within) :is(.khc-front, .khc-back, .khc-hover-layer) {
    transition-duration: 0s;
}

/* Touch devices see the action immediately; no simulated double-tap hover. */
@media (hover: none), (pointer: coarse) {
    .khc-card:not(.khc-style-3):not(.khc-preview-normal) .khc-hover-layer {
        opacity: 1;
    }

    .khc-card.khc-style-1:not(.khc-preview-normal) .khc-title {
        color: var(--khc-title-hover, var(--khc-default-title-hover));
        text-align: var(--khc-title-align-hover, var(--khc-default-align-hover));
    }

    .khc-card.khc-style-1:not(.khc-preview-normal) .khc-description {
        color: var(--khc-text-hover, var(--khc-default-text-hover));
        text-align: var(--khc-text-align-hover, var(--khc-default-align-hover));
    }

    .khc-card.khc-style-1:not(.khc-preview-normal) .khc-cta {
        opacity: 1;
        pointer-events: auto;
    }

    .khc-card.khc-style-2:not(.khc-preview-normal) .khc-front {
        opacity: 0;
    }

    .khc-card.khc-style-2:not(.khc-preview-normal) .khc-back {
        opacity: 1;
        pointer-events: auto;
    }

    .khc-card.khc-style-3:not(.khc-preview-hover) {
        --khc-style3-active: 0;
    }
}

@media (max-width: 767px) {
    .khc-card {
        --khc-default-min-height: 300px;
        --khc-default-padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .khc-card .khc-hover-layer,
    .khc-card .khc-title,
    .khc-card .khc-description,
    .khc-card .khc-button,
    .khc-card.khc-style-1 .khc-cta,
    .khc-card:is(.khc-style-2, .khc-style-3) .khc-face {
        transition: none;
        transition-delay: 0s;
    }
}
