/* =====================================================================
   enhance.css - motion & polish layer for zestwings.com  (v2)
   ---------------------------------------------------------------------
   Loaded last in <head> on every page, together with js/enhance.js.
   Builds on the existing design: same layout, colours and content.
   Only transform, opacity, shadow, filter and colour are animated, so
   nothing changes size or position (no layout shift).
   Hover effects run only with a mouse/trackpad, and every animation is
   switched off for visitors who ask for reduced motion.
   ===================================================================== */

:root {
    --zw-brand: #1370c7;
    --zw-brand-dark: #0b4f91;
    --zw-brand-light: #4aa3f0;
    --zw-green: #25d366;
    --zw-ease: cubic-bezier(.22, .61, .36, 1);
    --zw-spring: cubic-bezier(.34, 1.56, .64, 1);
    --zw-shadow-sm: 0 2px 8px rgba(19, 112, 199, .22);
    --zw-shadow: 0 10px 24px rgba(19, 112, 199, .32);
    --zw-shadow-card: 0 18px 40px rgba(15, 35, 70, .18);
}

/* ---------- General ---------- */

::selection {
    background: var(--zw-brand);
    color: #fff;
}

a {
    transition: color .25s var(--zw-ease), opacity .25s var(--zw-ease);
}

/* Slim branded scrollbar (desktop browsers) */
html {
    scrollbar-color: var(--zw-brand) #eef3f9;
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #eef3f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--zw-brand-light), var(--zw-brand));
    border-radius: 10px;
    border: 2px solid #eef3f9;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--zw-brand-dark);
}

/* Clear focus ring for keyboard users only */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--zw-brand);
    outline-offset: 3px;
}

/* ---------- Scroll progress bar (element added by enhance.js) ---------- */

.zw-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 2000;
    pointer-events: none;
    background: linear-gradient(90deg, var(--zw-brand-light), var(--zw-brand), var(--zw-brand-dark));
    box-shadow: 0 0 8px rgba(19, 112, 199, .55);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* ---------- Header ---------- */

nav.navbar.bootsnav {
    transition: box-shadow .35s var(--zw-ease), background-color .35s var(--zw-ease);
}

/* Once the page is scrolled: soft shadow and frosted glass */
.zw-scrolled nav.navbar.bootsnav.navbar-fixed {
    box-shadow: 0 6px 24px rgba(15, 35, 70, .12);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .zw-scrolled nav.navbar.bootsnav.navbar-fixed {
        background-color: rgba(255, 255, 255, .88) !important;
        -webkit-backdrop-filter: saturate(160%) blur(10px);
        backdrop-filter: saturate(160%) blur(10px);
    }
}

/* Menu underline that grows from the centre */
nav.navbar.bootsnav ul.nav > li > a:not(.btn) {
    background-image: linear-gradient(90deg, var(--zw-brand-light), var(--zw-brand));
    background-repeat: no-repeat;
    background-position: 50% calc(100% - 18px);
    background-size: 0 2px;
    transition: color .25s var(--zw-ease), background-size .35s var(--zw-ease);
}

nav.navbar.bootsnav ul.nav > li.active > a:not(.btn) {
    background-size: 60% 2px;
}

/* Dropdown menus: rounded, soft shadow, items slide on hover */
nav.navbar.bootsnav ul.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(15, 35, 70, .16);
}

nav.navbar.bootsnav ul.dropdown-menu > li > a {
    transition: color .2s var(--zw-ease), transform .25s var(--zw-ease), background-color .2s var(--zw-ease);
}

nav.navbar.bootsnav ul.dropdown-menu > li > a .fa {
    transition: transform .25s var(--zw-ease);
}

.navbar-toggle {
    transition: transform .25s var(--zw-ease), opacity .25s var(--zw-ease);
}

.navbar-toggle:active {
    transform: scale(.9);
}

header .navbar-brand img.logo {
    transition: transform .4s var(--zw-spring), filter .4s var(--zw-ease);
}

/* ---------- Buttons ---------- */

.btn,
.dh-btn-def,
input[type="submit"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    /* Glossy sheen over whatever colour the button already has */
    background-image: linear-gradient(160deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .08) 100%);
    transition: transform .3s var(--zw-spring),
                box-shadow .3s var(--zw-ease),
                background-color .25s var(--zw-ease),
                border-color .25s var(--zw-ease),
                color .25s var(--zw-ease),
                filter .25s var(--zw-ease);
}

/* Light sweep across the button on hover (dropdown toggles keep their arrow) */
.btn:not(.dropdown-toggle)::after,
.dh-btn-def::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
}

.btn:active,
.dh-btn-def:active,
input[type="submit"]:active,
button[type="submit"]:active {
    transform: translateY(0) scale(.96);
    box-shadow: var(--zw-shadow-sm);
    transition-duration: .1s;
}

/* Click ripple (span added by enhance.js) */
.zw-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    transform: scale(0);
    pointer-events: none;
    animation: zw-ripple .6s var(--zw-ease) forwards;
}

@keyframes zw-ripple {
    to { transform: scale(2.6); opacity: 0; }
}

/* ---------- Hero ---------- */

@keyframes zw-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

#hero-slider .owl-item.active img,
#mainslider2 .owl-item.active img,
img[src*="zw_aboutus"] {
    animation: zw-float 5s ease-in-out infinite;
}

/* Carousel dots */
.owl-theme .owl-dots .owl-dot span {
    transition: transform .3s var(--zw-spring), background-color .3s var(--zw-ease), box-shadow .3s var(--zw-ease);
}

.owl-theme .owl-dots .owl-dot.active span {
    transform: scale(1.35);
    box-shadow: 0 0 0 3px rgba(19, 112, 199, .18);
}

/* ---------- Section titles ---------- */

/* The three blue dots under each title gently wave */
@keyframes zw-wave {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-4px); }
}

.section-title .divider .fa-circle {
    display: inline-block;
    animation: zw-wave 2.4s ease-in-out infinite;
}

.section-title .divider .fa-circle:nth-child(2) { animation-delay: .15s; }
.section-title .divider .fa-circle:nth-child(3) { animation-delay: .3s; }

/* ---------- Cards ---------- */

/* Industry Solutions cards (their image already zooms in on hover).
   div.* beats the page's own .image-container rule that loads later. */
div.image-container {
    position: relative;
    transition: transform .45s var(--zw-spring), box-shadow .45s var(--zw-ease), filter .45s var(--zw-ease);
}

/* Light sweep across the card image */
div.image-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: -90%;
    width: 60%;
    height: 100%;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .35) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    pointer-events: none;
}

/* Service cards (keeps the existing blue border + glow on hover) */
.blog-img {
    transition: transform .4s var(--zw-spring), box-shadow .35s var(--zw-ease), border .35s var(--zw-ease), filter .35s var(--zw-ease);
}

.blog-text .posted_on {
    transition: color .25s var(--zw-ease), letter-spacing .25s var(--zw-ease);
}

/* Client logos */
.client-item img,
.test-images img {
    transition: transform .4s var(--zw-spring), filter .35s var(--zw-ease);
}

/* Contact blocks: icons, and a floating white card on hover */
.contact-content {
    border-radius: 4px;
    transition: box-shadow .35s var(--zw-ease), background-color .35s var(--zw-ease), transform .35s var(--zw-ease);
}

.contact-content .fa,
.contact-content .mail-icon {
    display: inline-block;
    transition: transform .35s var(--zw-spring), color .3s var(--zw-ease);
}

/* About-page style lists (dot icons before each expertise line) */
.fa-dot-circle-o {
    transition: transform .35s var(--zw-spring), color .3s var(--zw-ease);
}

/* ---------- Forms ---------- */

.form-control {
    border-radius: 6px;
    transition: border-color .25s var(--zw-ease), box-shadow .25s var(--zw-ease), background-color .25s var(--zw-ease);
}

.form-control:hover {
    border-color: #a9c7e6;
}

.form-control:focus {
    border-color: var(--zw-brand);
    background-color: #fbfdff;
    box-shadow: 0 0 0 4px rgba(19, 112, 199, .14);
}

.form-control::placeholder {
    transition: opacity .25s var(--zw-ease), transform .25s var(--zw-ease);
}

.form-control:focus::placeholder {
    opacity: .45;
    transform: translateX(4px);
}

/* ---------- Footer ---------- */

/* Small gradient accent under each footer heading */
.footer .inner h3 {
    position: relative;
}

/* Footer headings are centred, so the accent sits centred below them */
.footer .inner h3::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 34px;
    height: 2px;
    margin-left: -17px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--zw-brand-light), var(--zw-brand));
    transition: transform .4s var(--zw-ease);
}

/* Underline that grows from the left (link colours stay as designed) */
.linecolr,
.footer a {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .3s var(--zw-ease), color .25s var(--zw-ease), opacity .25s var(--zw-ease);
}

/* ---------- Floating buttons ---------- */

@keyframes zw-pop-in {
    0%   { transform: translateY(24px) scale(.6); opacity: 0; }
    70%  { transform: translateY(-4px) scale(1.05); opacity: 1; }
    100% { transform: none; opacity: 1; }
}

.floating-btn-xs {
    animation: zw-pop-in .7s var(--zw-ease) .6s both;
    transition: transform .3s var(--zw-spring), filter .3s var(--zw-ease);
}

.scrollToTop {
    transition: transform .3s var(--zw-spring), box-shadow .3s var(--zw-ease), opacity .3s var(--zw-ease);
}

/* Soft attention pulse on the WhatsApp chat buttons */
@keyframes zw-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

div[style*="z-index: 1000"] > img[src$="whatsapp-icon.png"],
.floating-btn-xs img[src*="whatsapp"] {
    border-radius: 50%;
    animation: zw-pulse 2.4s ease-out infinite;
    transition: transform .3s var(--zw-spring);
}

/* ---------- Modals ---------- */

.modal.fade .modal-dialog {
    transform: translateY(-24px) scale(.96);
    transition: transform .35s var(--zw-spring), opacity .3s var(--zw-ease);
}

.modal.in .modal-dialog {
    transform: none;
}

.modal-content {
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(15, 35, 70, .28);
}

.modal-backdrop.in {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/* ---------- Scroll reveal (classes added by enhance.js) ---------- */

.zw-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .75s var(--zw-ease), transform .75s var(--zw-ease);
    transition-delay: var(--zw-delay, 0s);
}

.zw-reveal.zw-in {
    opacity: 1;
    transform: none;
}

/* ---------- Hover effects (mouse / trackpad only) ---------- */

@media (hover: hover) and (pointer: fine) {

    .btn:hover,
    .dh-btn-def:hover,
    input[type="submit"]:hover,
    button[type="submit"]:hover {
        transform: translateY(-3px);
        box-shadow: var(--zw-shadow);
        filter: brightness(1.06);
    }

    .btn:not(.dropdown-toggle):hover::after,
    .dh-btn-def:hover::after {
        left: 130%;
        transition: left .7s var(--zw-ease);
    }

    nav.navbar.bootsnav ul.nav > li > a:not(.btn):hover,
    nav.navbar.bootsnav ul.nav > li.on > a:not(.btn) {
        background-size: 60% 2px;
    }

    nav.navbar.bootsnav ul.dropdown-menu > li > a:hover {
        transform: translateX(5px);
    }

    nav.navbar.bootsnav ul.dropdown-menu > li > a:hover .fa {
        transform: translateX(3px);
    }

    header .navbar-brand:hover img.logo {
        transform: scale(1.04);
    }

    div.image-container:hover {
        transform: translateY(-8px);
        box-shadow: 0 0 0 2px rgba(19, 112, 199, .55), var(--zw-shadow-card);
    }

    div.image-container:hover::after {
        left: 140%;
        transition: left .9s var(--zw-ease);
    }

    .blog-img:hover {
        transform: translateY(-6px);
        filter: saturate(1.1);
    }

    .blog-item:hover .posted_on {
        color: var(--zw-brand);
        letter-spacing: .2px;
    }

    .client-item:hover img,
    .test-images:hover img {
        transform: scale(1.08);
    }

    /* Spread shadow paints a white card around the block without moving it */
    .contact-content:hover {
        background-color: #fff;
        box-shadow: 0 0 0 14px #fff, 0 18px 36px 14px rgba(15, 35, 70, .12);
    }

    .contact-content:hover .fa,
    .contact-content:hover .mail-icon {
        transform: scale(1.18) rotate(-6deg);
        color: var(--zw-brand);
    }

    li:hover > .fa-dot-circle-o,
    p:hover > .fa-dot-circle-o,
    div:hover > .fa-dot-circle-o {
        transform: scale(1.25);
        color: var(--zw-brand);
    }

    .footer .inner:hover h3::after {
        transform: scaleX(1.8);
    }

    .linecolr:hover,
    .footer a:hover {
        background-size: 100% 1px;
    }

    .floating-btn-xs:hover {
        transform: translateY(-4px) scale(1.1);
        filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .25));
    }

    .scrollToTop:hover {
        transform: translateY(-4px);
        box-shadow: var(--zw-shadow);
    }

    div[style*="z-index: 1000"]:hover > img[src$="whatsapp-icon.png"],
    .floating-btn-xs:hover img[src*="whatsapp"] {
        transform: scale(1.08);
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .zw-reveal {
        opacity: 1;
        transform: none;
    }
}
