/* =========================================================
   ESP ANIMATED IMAGE + CONTINUOUS BORDER
   NEW SYSTEM
   ========================================================= */


/* ---------------------------------------------------------
   ELEMENTOR SHORTCODE
   --------------------------------------------------------- */

.elementor-shortcode:has(> .esp-inner-row) {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
}


/* ---------------------------------------------------------
   ROW
   --------------------------------------------------------- */

.esp-inner-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;

    width: 100% !important;
    max-width: var(--esp-max-width) !important;

    padding: clamp(10px, 2vw, 25px) 0 !important;
    margin: 0 auto !important;

    gap: clamp(30px, 6vw, 100px) !important;

    box-sizing: border-box !important;
}


/* ---------------------------------------------------------
   MAIN IMAGE CONTAINER
   --------------------------------------------------------- */

.esp-inner-cell.main-container-s {

    --esp-offset: var(--base-offset, 28px);

    --esp-offset-top: 0px;
    --esp-offset-right: 0px;
    --esp-offset-bottom: 0px;
    --esp-offset-left: 0px;

    --esp-border-width: 8px;
    --esp-border-color: rgba(156, 0, 2, .75);
    --esp-bg-color: rgba(156, 0, 2, .06);

    --esp-anim-time: .9s;
    --esp-anim-delay: .4s;

    --esp-easing: cubic-bezier(.25,
            .8,
            .25,
            1);

    position: relative !important;

    flex: 0 0 clamp(300px, 28vw, 450px) !important;
    width: clamp(300px, 28vw, 450px) !important;
    max-width: clamp(300px, 28vw, 450px) !important;

    aspect-ratio: 1 / 1;

    display: block !important;

    box-sizing: border-box !important;

    isolation: isolate;

    overflow: visible !important;
}


/* ---------------------------------------------------------
   COMMON LAYERS
   --------------------------------------------------------- */

.main-container-s>.layer-back-s,
.main-container-s>.layer-middle-s,
.main-container-s>.animated-border-s {
    position: absolute !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
}

.main-container-s>.animated-border-s {
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
    z-index: 3 !important;
    overflow: visible !important;
}

.main-container-s>.layer-middle-s {
    z-index: 2 !important;
    object-fit: cover !important;
    object-position: center !important;
    opacity: 0;
    transition: opacity .9s ease .6s;
}

.main-container-s>.layer-back-s {
    z-index: 1 !important;
    background: var(--esp-bg-color, rgba(156, 0, 2, .06)) !important;
    opacity: 0;
    transition: opacity .8s ease .3s;
}

/* ---------------------------------------------------------
   FADE IN ANIMATION
   --------------------------------------------------------- */
.esp-animate-on-view.scroll-animate>.layer-middle-s,
.esp-animate-on-view.scroll-animate>.layer-back-s {
    opacity: 1 !important;
}


/* ---------------------------------------------------------
   ANIMATION TYPES (S1, S2, S3)
   --------------------------------------------------------- */

/* Shared border properties */
.main-container-s>.animated-border-s::before,
.main-container-s>.animated-border-s::after {
    content: '';
    position: absolute !important;
    background: var(--esp-border-color, #E02B20) !important;
    z-index: 5 !important;
}

/* TYPE S1 (Image Bottom-Right, BG Top-Left, Border Right/Bottom) */
.esp-anim-type-s1>.layer-back-s {
    top: 0 !important;
    left: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s1>.layer-middle-s {
    bottom: 0 !important;
    right: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s1>.animated-border-s::before {
    /* Right border */
    top: 0 !important;
    right: var(--esp-offset) !important;
    width: var(--esp-border-width) !important;
    height: 0;
}

.esp-anim-type-s1>.animated-border-s::after {
    /* Bottom border */
    bottom: var(--esp-offset) !important;
    right: var(--esp-offset) !important;
    height: var(--esp-border-width) !important;
    width: 0;
}

.esp-anim-type-s1.scroll-animate>.animated-border-s::before {
    animation-name: draw-down-s1;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: var(--esp-anim-delay) !important;
}

.esp-anim-type-s1.scroll-animate>.animated-border-s::after {
    animation-name: draw-left-s1;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: calc(var(--esp-anim-delay) + var(--esp-anim-time) - 0.2s) !important;
}

/* TYPE S1-REV (Image Bottom-Left, BG Top-Right, Border Left/Bottom) */
.esp-anim-type-s1-rev>.layer-back-s {
    top: 0 !important;
    right: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s1-rev>.layer-middle-s {
    bottom: 0 !important;
    left: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s1-rev>.animated-border-s::before {
    /* Left border */
    top: 0 !important;
    left: var(--esp-offset) !important;
    width: var(--esp-border-width) !important;
    height: 0;
}

.esp-anim-type-s1-rev>.animated-border-s::after {
    /* Bottom border */
    bottom: var(--esp-offset) !important;
    left: var(--esp-offset) !important;
    height: var(--esp-border-width) !important;
    width: 0;
}

.esp-anim-type-s1-rev.scroll-animate>.animated-border-s::before {
    animation-name: draw-down-s1;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: var(--esp-anim-delay) !important;
}

.esp-anim-type-s1-rev.scroll-animate>.animated-border-s::after {
    animation-name: draw-right-s1;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: calc(var(--esp-anim-delay) + var(--esp-anim-time) - 0.2s) !important;
}

/* TYPE S2 (Image Right, BG Left Rectangle, Border Right/Bottom) */
.esp-anim-type-s2>.layer-back-s {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: calc(100% - 2 * var(--esp-offset)) !important;
    height: 100% !important;
}

.esp-anim-type-s2>.layer-middle-s {
    top: var(--esp-offset) !important;
    bottom: var(--esp-offset) !important;
    right: var(--esp-offset) !important;
    width: calc(100% - 2 * var(--esp-offset)) !important;
    height: calc(100% - 2 * var(--esp-offset)) !important;
}

.esp-anim-type-s2>.animated-border-s::before {
    /* Right border of BG */
    top: 0 !important;
    right: calc(2 * var(--esp-offset)) !important;
    width: var(--esp-border-width) !important;
    height: 0;
}

.esp-anim-type-s2>.animated-border-s::after {
    /* Bottom border of BG */
    bottom: 0 !important;
    right: calc(2 * var(--esp-offset)) !important;
    height: var(--esp-border-width) !important;
    width: 0;
}

.esp-anim-type-s2.scroll-animate>.animated-border-s::before {
    animation-name: draw-down-s2;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: var(--esp-anim-delay) !important;
}

.esp-anim-type-s2.scroll-animate>.animated-border-s::after {
    animation-name: draw-left-s2;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: calc(var(--esp-anim-delay) + var(--esp-anim-time) - 0.2s) !important;
}

/* TYPE S2-REV (Image Left, BG Right Rectangle, Border Left/Bottom) */
.esp-anim-type-s2-rev>.layer-back-s {
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    width: calc(100% - 2 * var(--esp-offset)) !important;
    height: 100% !important;
}

.esp-anim-type-s2-rev>.layer-middle-s {
    top: var(--esp-offset) !important;
    bottom: var(--esp-offset) !important;
    left: var(--esp-offset) !important;
    width: calc(100% - 2 * var(--esp-offset)) !important;
    height: calc(100% - 2 * var(--esp-offset)) !important;
}

.esp-anim-type-s2-rev>.animated-border-s::before {
    /* Left border of BG */
    top: 0 !important;
    left: calc(2 * var(--esp-offset)) !important;
    width: var(--esp-border-width) !important;
    height: 0;
}

.esp-anim-type-s2-rev>.animated-border-s::after {
    /* Bottom border of BG */
    bottom: 0 !important;
    left: calc(2 * var(--esp-offset)) !important;
    height: var(--esp-border-width) !important;
    width: 0;
}

.esp-anim-type-s2-rev.scroll-animate>.animated-border-s::before {
    animation-name: draw-down-s2;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: var(--esp-anim-delay) !important;
}

.esp-anim-type-s2-rev.scroll-animate>.animated-border-s::after {
    animation-name: draw-right-s2;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: calc(var(--esp-anim-delay) + var(--esp-anim-time) - 0.2s) !important;
}

/* TYPE S3 (Contact Us - Image Top-Right, BG Bottom-Left, Border Top/Right, Top slides from left) */
.esp-anim-type-s3>.layer-middle-s {
    top: 0 !important;
    right: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s3>.layer-back-s {
    bottom: 0 !important;
    left: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s3>.animated-border-s {
    overflow: visible !important;
}

.esp-anim-type-s3>.animated-border-s::before {
    /* Top border (offscreen left) */
    top: var(--esp-offset) !important;
    left: -100vw;
    width: calc(100% + 100vw - var(--esp-offset)) !important;
    height: var(--esp-border-width) !important;
    transform: translateX(-100%);
}

.esp-anim-type-s3>.animated-border-s::after {
    /* Right border */
    top: var(--esp-offset) !important;
    right: var(--esp-offset) !important;
    width: var(--esp-border-width) !important;
    height: 0;
}

.esp-anim-type-s3.scroll-animate>.animated-border-s::before {
    animation-name: slide-in-top-s3;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: var(--esp-anim-delay) !important;
}

.esp-anim-type-s3.scroll-animate>.animated-border-s::after {
    animation-name: draw-down-s3;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: calc(var(--esp-anim-delay) + var(--esp-anim-time) - 0.2s) !important;
}

/* TYPE S3-REV (Image Top-Left, BG Bottom-Right, Border Top/Left, Top slides from right) */
.esp-anim-type-s3-rev>.layer-middle-s {
    top: 0 !important;
    left: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s3-rev>.layer-back-s {
    bottom: 0 !important;
    right: 0 !important;
    width: calc(100% - var(--esp-offset)) !important;
    height: calc(100% - var(--esp-offset)) !important;
}

.esp-anim-type-s3-rev>.animated-border-s::before {
    /* Top border (offscreen right) */
    top: var(--esp-offset) !important;
    right: -100vw;
    width: calc(100% + 100vw - var(--esp-offset)) !important;
    height: var(--esp-border-width) !important;
    transform: translateX(100%);
}

.esp-anim-type-s3-rev>.animated-border-s::after {
    /* Left border */
    top: var(--esp-offset) !important;
    left: var(--esp-offset) !important;
    width: var(--esp-border-width) !important;
    height: 0;
}

.esp-anim-type-s3-rev.scroll-animate>.animated-border-s::before {
    animation-name: slide-in-top-s3-rev;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: var(--esp-anim-delay) !important;
}

.esp-anim-type-s3-rev.scroll-animate>.animated-border-s::after {
    animation-name: draw-down-s3;
    animation-duration: var(--esp-anim-time);
    animation-timing-function: var(--esp-easing, ease);
    animation-fill-mode: forwards;
    animation-delay: calc(var(--esp-anim-delay) + var(--esp-anim-time) - 0.2s) !important;
}

/* ---------------------------------------------------------
   KEYFRAMES
   --------------------------------------------------------- */
@keyframes draw-left-s1 {
    to {
        width: calc(100% - var(--esp-offset));
    }
}

@keyframes draw-right-s1 {
    to {
        width: calc(100% - var(--esp-offset));
    }
}

@keyframes draw-down-s1 {
    to {
        height: calc(100% - var(--esp-offset));
    }
}

@keyframes draw-down-s2 {
    to {
        height: 100%;
    }
}

@keyframes draw-left-s2 {
    to {
        width: calc(100% - 2 * var(--esp-offset));
    }
}

@keyframes draw-right-s2 {
    to {
        width: calc(100% - 2 * var(--esp-offset));
    }
}

@keyframes slide-in-top-s3 {
    to {
        transform: translateX(0);
    }
}

@keyframes slide-in-top-s3-rev {
    to {
        transform: translateX(0);
    }
}

@keyframes draw-down-s3 {
    to {
        height: calc(100% - var(--esp-offset));
    }
}


/* ---------------------------------------------------------
   TEXT
   --------------------------------------------------------- */

.esp-inner-cell.text-container-s {
    flex: 1 !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    box-sizing: border-box !important;
}

/* ---------------------------------------------------------
   RESPONSIVE DESIGN (TABLET & MOBILE)
   --------------------------------------------------------- */

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .esp-inner-row {
        gap: clamp(20px, 4vw, 50px) !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        padding-left: 3vw !important;
        padding-right: 3vw !important;
    }

    .esp-inner-row.esp-row-reverse {
        flex-direction: row-reverse !important;
    }

    .esp-inner-cell.main-container-s {
        --esp-offset: calc(var(--base-offset, 28px) * 0.75);
        flex: 0 0 clamp(250px, 40vw, 350px) !important;
        width: clamp(250px, 40vw, 350px) !important;
        max-width: clamp(250px, 40vw, 350px) !important;
    }

    .esp-inner-cell.text-container-s {
        flex: 1 !important;
        max-width: 100% !important;
    }
}

/* Mobile (Up to 767px) */
@media (max-width: 767px) {
    .esp-inner-row {
        flex-direction: column !important;
        gap: 40px !important;
        padding: clamp(20px, 5vw, 40px) 15px !important;
    }

    .esp-inner-cell.main-container-s {
        --esp-offset: calc(var(--base-offset, 28px) * 0.5);
        flex: 0 0 calc(100vw - 30px) !important;
        width: calc(100vw - 30px) !important;
        max-width: calc(100vw - 30px) !important;
    }

    .esp-inner-cell.text-container-s {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        text-align: center;
    }
}


.child-container {

    opacity: 0;

    transform:
        translateY(50px);

    transition:
        opacity .8s ease,
        transform .8s ease;

    z-index: 3;
}


.esp-animate-on-view.scroll-animate .child-container:nth-child(1) {

    opacity: 1;

    transform:
        translateY(0);

    transition-delay: .4s;
}


.esp-animate-on-view.scroll-animate .child-container:nth-child(2) {

    opacity: 1;

    transform:
        translateY(0);

    transition-delay: .6s;
}


.esp-animate-on-view.scroll-animate .child-container:nth-child(3) {

    opacity: 1;

    transform:
        translateY(0);

    transition-delay: .8s;
}

/* ---------------------------------------------------------
   RESPONSIVE GRID & ICON BUTTONS (SEC 03)
   --------------------------------------------------------- */

.responsive-grid {
    flex: 0 0 clamp(350px, 45vw, 650px) !important;
    width: clamp(350px, 45vw, 650px) !important;
    max-width: clamp(350px, 45vw, 650px) !important;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    align-content: center;
    width: 100%;
}

@media (max-width: 767px) {
    .responsive-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 10px;
    }
}

.custom-icon-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    background: var(--esp-bg-color, rgba(156, 0, 2, 0.03));
    border: 1px solid rgba(156, 0, 2, 0.1);
    border-radius: 10px;
    text-decoration: none !important;
    color: var(--ast-global-color-0, #333) !important;
    transition: all 0.2s ease-out;
    height: 100%;
    box-sizing: border-box;
}

@media (min-width: 1025px) {
    .custom-icon-button:hover {
        background: rgba(156, 0, 2, 0.08);
        box-shadow: 0 4px 10px rgba(156, 0, 2, 0.1);
        border-color: rgba(156, 0, 2, 0.3);
    }
}

.custom-icon-button svg {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    fill: var(--ast-global-color-0, #9C0002);
    margin-bottom: 0;
    margin-right: 12px;
    transition: fill 0.2s ease-out;
}

.custom-icon-button span {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.25;
    text-transform: capitalize;
    word-break: break-word;
}

@media (max-width: 1024px) {
    .responsive-grid {
        flex: 0 0 clamp(320px, 45vw, 480px) !important;
        width: clamp(320px, 45vw, 480px) !important;
        max-width: clamp(320px, 45vw, 480px) !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .custom-icon-button {
        padding: 8px 6px;
        white-space: normal;
    }

    .custom-icon-button svg {
        flex: 0 0 28px;
        width: 28px;
        height: 28px;
        margin-right: 5px;
    }

    .custom-icon-button span {
        font-size: 1rem;
        line-height: 1.1;
    }
}

@media (max-width: 767px) {
    .elementor-shortcode:has(> .esp-inner-row) {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .esp-inner-cell.main-container-s {
        --esp-offset: 20px;
        flex: 0 0 95vw !important;
        width: 95vw !important;
        max-width: 95vw !important;
    }

    .responsive-grid {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .custom-icon-button {
        padding: 12px 15px;
        flex-direction: row !important;
        justify-content: flex-start;
        text-align: left;
        gap: 8px;
    }

    .custom-icon-button svg {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        margin-right: 15px !important;
        margin-bottom: 0 !important;
    }

    .custom-icon-button span {
        font-size: 1.15rem;
        text-align: left !important;
        width: auto;
    }
}

/* More attractive staggered entry animation for grid items */
.responsive-grid .child-container {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(1) {
    transition-delay: 0.8s;
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(2) {
    transition-delay: 1.0s;
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(3) {
    transition-delay: 1.2s;
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(4) {
    transition-delay: 1.4s;
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(5) {
    transition-delay: 1.6s;
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(6) {
    transition-delay: 1.8s;
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(7) {
    transition-delay: 2.0s;
}

.esp-animate-on-view.scroll-animate.responsive-grid .child-container:nth-child(8) {
    transition-delay: 2.2s;
}


/* ---------------------------------------------------------
   HEADING
   --------------------------------------------------------- */

.shortcode-ph {

    font-family:
        var(--font-heading-tech2,
            'Rajdhani',
            sans-serif);

    font-weight: 700;

    font-size:
        clamp(1.5rem,
            3vw,
            2.5rem);

    text-transform: uppercase;

    color:
        var(--ast-global-color-0,
            #9C0002);

    margin:
        0 0 5px 0;
}


/* ---------------------------------------------------------
   TEXT
   --------------------------------------------------------- */

.shortcode-pt {

    font-family:
        'Noto Serif',
        serif;

    font-size:
        clamp(1rem,
            1.3vw,
            1.2rem);

    color:
        var(--color-black,
            #333);

    line-height: 1.6;

    text-align: justify;
    text-justify: inter-word;
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}



/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 767px) {

    .esp-inner-row {

        width: 100% !important;

        max-width: 100% !important;

        padding:
            0 2vw !important;

        gap:
            30px !important;
    }


    .esp-inner-row .main-container-s {

        width: 100% !important;

        max-width: 100% !important;
    }


    .esp-inner-row .text-container-s {

        width: 100% !important;

        max-width: 100% !important;

        padding:
            20px 0 !important;
    }
}


/* ---------------------------------------------------------
   SMALL MOBILE
   --------------------------------------------------------- */

@media (max-width: 480px) {

    .esp-inner-row {

        padding:
            0 2vw !important;

        gap:
            20px !important;
    }


    .esp-inner-row .main-container-s {

        margin:
            10px auto 30px auto !important;
    }
}


/* ---------------------------------------------------------
   REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .main-container-s,
    .main-container-s * {

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;
    }
}