/* Custom Header Layout by Lokesh - responsive layout fix */
.elementor-widget-lokesh-header-banner,
.elementor-widget-lokesh-header-banner > .elementor-widget-container {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* The widget itself must remain in normal document flow so the next
   Elementor section/footer is pushed below it, never over it. */
.lokesh-header-banner-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    clear: both;
    isolation: isolate;
}

.lokesh-header-banner-layout,
.lokesh-header-banner-layout * {
    box-sizing: border-box;
}

.lokesh-header-banner-layout .lokesh-header-banner-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 1px;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f0e5;
    text-decoration: none;
    line-height: 0;
    isolation: isolate;
}

/* Desktop: left panel establishes the overall height. */
.lokesh-header-banner-layout > .lokesh-header-banner-main {
    height: auto !important;
    min-height: 0;
    aspect-ratio: 1.85 / 1;
}

/* Right column fills the height established by the main banner. */
.lokesh-header-banner-layout .lokesh-header-banner-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    align-self: stretch;
    gap: 20px;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.lokesh-header-banner-layout .lokesh-header-banner-side .lokesh-header-banner-card {
    height: 100%;
    min-height: 0;
}

.lokesh-header-banner-layout .lokesh-header-banner-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform .45s ease;
}

.lokesh-header-banner-layout .lokesh-header-banner-card:hover .lokesh-header-banner-image {
    transform: scale(1.025);
}

.lokesh-header-banner-layout .lokesh-header-banner-button {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    max-width: calc(100% - 36px);
    padding: 11px 18px;
    border: 1px solid rgba(32, 83, 28, .18);
    border-radius: 999px;
    background: #fff;
    color: #155b20;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    pointer-events: none;
}

.lokesh-header-banner-layout .lokesh-header-banner-arrow {
    font-size: 19px;
    line-height: 1;
}

/* Tablet and mobile: switch to normal-flow rows with intrinsic heights.
   No fixed/absolute heights are used for the banner panels. */
@media (max-width: 767px) {
    .lokesh-header-banner-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: start;
        gap: 14px;
        height: auto !important;
        min-height: 0 !important;
    }

    .lokesh-header-banner-layout > .lokesh-header-banner-main {
        display: block;
        width: 100%;
        height: auto !important;
        min-height: 0;
        aspect-ratio: 1.55 / 1;
    }

    .lokesh-header-banner-layout .lokesh-header-banner-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        align-self: auto;
        gap: 14px;
        width: 100%;
        height: auto !important;
        min-height: 0;
    }

    .lokesh-header-banner-layout .lokesh-header-banner-side .lokesh-header-banner-card {
        display: block;
        width: 100%;
        height: auto !important;
        min-height: 0;
        aspect-ratio: 1.25 / 1;
    }

    .lokesh-header-banner-layout .lokesh-header-banner-button {
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
        padding: 8px 12px;
        font-size: 13px;
        gap: 5px;
    }
}

/* Narrow phones: stack all three cards vertically. */
@media (max-width: 480px) {
    .lokesh-header-banner-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 12px;
    }

    .lokesh-header-banner-layout > .lokesh-header-banner-main {
        aspect-ratio: 1.3 / 1;
    }

    .lokesh-header-banner-layout .lokesh-header-banner-side {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 12px;
    }

    .lokesh-header-banner-layout .lokesh-header-banner-side .lokesh-header-banner-card {
        aspect-ratio: 1.8 / 1;
    }
}
