/* Elementor Loop Grid compatibility */
.elementor-widget-nab_news_loop_card,
.elementor-widget-nab_news_loop_card > .elementor-widget-container{
    width:100%;
    min-width:0;
}

.elementor-loop-container .elementor-widget-nab_news_loop_card,
.elementor-loop-container .elementor-widget-nab_news_loop_card > .elementor-widget-container{
    height:100%;
}

.nab-news-card{
    --nab-hover-duration:.45s;
    --nab-image-hover-scale:1.018;
    --nab-body-hover-lift:0px;
    --nab-logo-hover-rotate:0deg;
    --nab-entrance-duration:700ms;
    --nab-entrance-delay:0ms;
    --nab-entrance-distance:34px;
    --nab-entrance-easing:cubic-bezier(.2,.75,.25,1);
    --nab-continuous-duration:4s;
    --nab-logo-animation-duration:3s;
    width:100%;
    max-width:726px;
    margin:0 auto;
    padding:20px 35px 46px;
    direction:rtl;
    transform-origin:center;
}

.nab-news-card,
.nab-news-card *{box-sizing:border-box}

.nab-news-card__link{
    position:relative;
    display:block;
    color:inherit;
    text-decoration:none !important;
    outline:none;
    will-change:transform,opacity;
}

.nab-news-card__media{
    position:relative;
    z-index:1;
    width:100%;
    aspect-ratio:1.64 / 1;
    overflow:hidden;
    background:#f2f2f2;
    border:4px solid #E4B861;
    border-radius:58px;
    box-shadow:0 8px 20px rgba(0,0,0,.05);
}

.nab-news-card__image,
.nab-news-card__image-placeholder{
    display:block;
    width:100% !important;
    height:100% !important;
    object-fit:cover;
    object-position:center;
}

.nab-news-card__image{
    transition:transform var(--nab-hover-duration) cubic-bezier(.2,.7,.2,1);
    will-change:transform;
}

.nab-news-card__image-placeholder{
    background:linear-gradient(135deg,#ececec,#fafafa);
}

.nab-news-card__body{
    position:relative;
    z-index:2;
    width:91%;
    min-height:191px;
    margin:-59px auto 0;
    padding:64px 28px 17px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    background:#fff;
    border:6px solid #00692B;
    border-radius:48px;
    transition:transform var(--nab-hover-duration) ease,background-color var(--nab-hover-duration) ease,box-shadow var(--nab-hover-duration) ease,border-color var(--nab-hover-duration) ease;
    will-change:transform;
}

.nab-news-card__badge{
    position:absolute;
    top:-39px;
    left:50%;
    width:85px;
    height:85px;
    transform:translateX(-50%);
    display:flex;
    align-items:center;
    justify-content:center;
    background:#00692B;
    border:3px solid #E4B861;
    border-radius:50%;
    box-shadow:none;
    overflow:hidden;
    isolation:isolate;
    transition:transform var(--nab-hover-duration) ease,box-shadow var(--nab-hover-duration) ease,background-color var(--nab-hover-duration) ease;
    transform-origin:center;
    will-change:transform;
}

.nab-news-card__badge img{
    display:block;
    width:43px;
    max-width:95%;
    max-height:95%;
    height:auto;
    object-fit:contain;
    object-position:center;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
}

.nab-news-card__title{
    width:100%;
    margin:0;
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#404040;
    font-family:inherit;
    font-size:18px;
    font-weight:800;
    line-height:1.65;
    text-align:center;
    text-wrap:balance;
    transition:color var(--nab-hover-duration) ease;
}

/* Prevent theme/Loop Item heading rules from changing the widget typography. */
.nab-news-card h2.nab-news-card__title,
.nab-news-card h3.nab-news-card__title,
.nab-news-card h4.nab-news-card__title,
.nab-news-card div.nab-news-card__title,
.nab-news-card span.nab-news-card__title{
    margin-block-start:0;
    margin-block-end:0;
    padding:0;
    text-transform:none;
}

/* Theme-safe typography baseline. Runtime rules generated by the widget override these with !important. */
.elementor-loop-container .nab-news-card .nab-news-card__title,
.elementor-loop-container .nab-news-card .nab-news-card__date-text{
    font-variant:normal;
    font-feature-settings:normal;
    -webkit-font-smoothing:antialiased;
}

.nab-news-card__title.nab-clamp-lines{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:var(--nab-title-lines);
    overflow:hidden;
}

.nab-news-card__date{
    min-width:282px;
    max-width:92%;
    min-height:50px;
    margin-top:8px;
    padding:5px 17px 5px 14px;
    display:inline-flex;
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:center;
    gap:10px;
    white-space:nowrap;
    direction:rtl;
    color:#E4B861;
    background:#fff;
    border:2px solid #E4B861;
    border-radius:18px;
}

.nab-news-card__calendar{
    flex:0 0 auto;
    width:28px;
    height:28px;
    object-fit:contain;
}

.nab-news-card__date-text{
    display:block;
    flex:0 0 auto;
    min-width:0;
    white-space:nowrap !important;
    font-family:inherit;
    font-size:16px;
    font-weight:500;
    line-height:1.2;
}

/* Equal-height mode: JS sets a row-specific min-height on the link.
   The body then consumes the remaining space, keeping bottoms aligned. */
.nab-news-card.nab-equal-height .nab-news-card__link{
    display:flex;
    flex-direction:column;
    width:100%;
}

.nab-news-card.nab-equal-height .nab-news-card__media{
    flex:0 0 auto;
}

.nab-news-card.nab-equal-height .nab-news-card__body{
    flex:1 1 auto;
    height:100%;
}

/* Keep every date capsule on the same visual baseline at the bottom of equal-height cards. */
.nab-news-card.nab-date-bottom .nab-news-card__date{
    margin-top:auto !important;
    flex:0 0 auto;
}

.nab-news-card.nab-date-bottom .nab-news-card__title{
    flex:0 0 auto;
}

.nab-news-card__link:hover .nab-news-card__image{
    transform:scale(var(--nab-image-hover-scale));
}

.nab-news-card__link:hover .nab-news-card__body{
    transform:translateY(calc(var(--nab-body-hover-lift) * -1));
}

.nab-news-card__link:hover .nab-news-card__badge{
    transform:translateX(-50%) rotate(var(--nab-logo-hover-rotate));
}

.nab-news-card__link:focus-visible{
    border-radius:40px;
    box-shadow:0 0 0 3px rgba(0,105,43,.22);
}

/* Repeatable scroll entrance. JS only enables the hidden state after initialization. */
.nab-news-card.nab-anim-enabled .nab-news-card__link{
    opacity:0;
    transition:opacity var(--nab-entrance-duration) var(--nab-entrance-easing) var(--nab-entrance-delay),
               transform var(--nab-entrance-duration) var(--nab-entrance-easing) var(--nab-entrance-delay);
}

.nab-news-card.nab-anim-enabled[data-nab-entrance="fade-up"] .nab-news-card__link{transform:translate3d(0,var(--nab-entrance-distance),0)}
.nab-news-card.nab-anim-enabled[data-nab-entrance="fade-down"] .nab-news-card__link{transform:translate3d(0,calc(var(--nab-entrance-distance) * -1),0)}
.nab-news-card.nab-anim-enabled[data-nab-entrance="fade-left"] .nab-news-card__link{transform:translate3d(var(--nab-entrance-distance),0,0)}
.nab-news-card.nab-anim-enabled[data-nab-entrance="fade-right"] .nab-news-card__link{transform:translate3d(calc(var(--nab-entrance-distance) * -1),0,0)}
.nab-news-card.nab-anim-enabled[data-nab-entrance="zoom-in"] .nab-news-card__link{transform:scale(.92)}
.nab-news-card.nab-anim-enabled[data-nab-entrance="zoom-out"] .nab-news-card__link{transform:scale(1.08)}
.nab-news-card.nab-anim-enabled[data-nab-entrance="flip"] .nab-news-card__link{transform:perspective(900px) rotateX(12deg) scale(.97);transform-origin:center bottom}

.nab-news-card.nab-anim-enabled.nab-is-visible .nab-news-card__link{
    opacity:1;
    transform:none;
}

/* Infinite subtle animations */
.nab-continuous-float{animation:nabCardFloat var(--nab-continuous-duration) ease-in-out infinite}
.nab-continuous-pulse{animation:nabCardPulse var(--nab-continuous-duration) ease-in-out infinite}
.nab-continuous-breathe{animation:nabCardBreathe var(--nab-continuous-duration) ease-in-out infinite}
.nab-continuous-sway{animation:nabCardSway var(--nab-continuous-duration) ease-in-out infinite}

@keyframes nabCardFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes nabCardPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.018)}}
@keyframes nabCardBreathe{0%,100%{filter:brightness(1)}50%{filter:brightness(1.025)}}
@keyframes nabCardSway{0%,100%{transform:translateX(0)}50%{transform:translateX(5px)}}

/* Logo infinite animations: animation goes on inner image to preserve badge positioning */
.nab-logo-pulse .nab-news-card__badge img{animation:nabLogoPulse var(--nab-logo-animation-duration) ease-in-out infinite}
.nab-logo-float .nab-news-card__badge img{animation:nabLogoFloat var(--nab-logo-animation-duration) ease-in-out infinite}
.nab-logo-rotate .nab-news-card__badge img{animation:nabLogoRotate var(--nab-logo-animation-duration) linear infinite}
.nab-logo-swing .nab-news-card__badge img{animation:nabLogoSwing var(--nab-logo-animation-duration) ease-in-out infinite;transform-origin:center}

@keyframes nabLogoPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
@keyframes nabLogoFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes nabLogoRotate{to{transform:rotate(360deg)}}
@keyframes nabLogoSwing{0%,100%{transform:rotate(0)}25%{transform:rotate(7deg)}75%{transform:rotate(-7deg)}}

@media (prefers-reduced-motion:reduce){
    .nab-respect-reduced-motion,
    .nab-respect-reduced-motion *,
    .nab-respect-reduced-motion *::before,
    .nab-respect-reduced-motion *::after{
        animation:none !important;
        transition-duration:.01ms !important;
        transition-delay:0ms !important;
        scroll-behavior:auto !important;
    }
    .nab-respect-reduced-motion.nab-anim-enabled .nab-news-card__link{
        opacity:1 !important;
        transform:none !important;
    }
}
