/* ============================================================================
   Millisave — Dynamic Enhancements (motion layer)
   ----------------------------------------------------------------------------
   Adds tasteful animation & micro-interactions on top of the EXISTING design.
   Does NOT change colors, fonts, or layout. Fully removable: delete this file +
   dynamic-enhancements.js and their two <link>/<script> tags.
   Brand accent reused: #03A1AA (teal).
   ============================================================================ */

/* Respect users who prefer reduced motion — disable everything below. */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; }
    * { scroll-behavior: auto !important; }
}

/* ---------- 1. Scroll-reveal (class is added by JS, so no-JS = visible) ---- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1),
                transform .7s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
.reveal.in-view {
    opacity: 1;
    transform: none;
}
/* Gentle stagger for grouped items (cards in a row) */
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* ---------- 2. Hover micro-interactions ---------------------------------- */
/* Cards lift softly */
.card,
.card-style-01,
.info-style-01 .info-wrapper,
.media.info-wrapper {
    transition: transform .35s ease, box-shadow .35s ease;
}
.card:hover,
.card-style-01:hover,
.info-style-01 .info-wrapper:hover,
.media.info-wrapper:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 59, 89, .12);
}

/* Buttons: subtle press + animated sheen */
.btn-style1,
.butn {
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .25s ease;
}
.btn-style1:hover,
.butn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(3, 161, 170, .28);
}
.btn-style1:active,
.butn:active { transform: translateY(0); }
.btn-style1::after,
.butn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
    pointer-events: none;
}
.btn-style1:hover::after,
.butn:hover::after { left: 130%; }

/* Nav links: animated underline grow */
.header-style1 .navbar-nav > li > a {
    position: relative;
}
.header-style1 .navbar-nav > li > a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #03A1AA;
    transition: width .3s ease;
}
.header-style1 .navbar-nav > li > a:hover::before { width: 100%; }

/* Social / round icons gently pop */
.social-icons li a,
.social-icons2 li a {
    transition: transform .25s ease;
}
.social-icons li a:hover,
.social-icons2 li a:hover { transform: translateY(-3px) scale(1.08); }

/* Feature icons on hover of their card */
.info-style-01 .info-wrapper img,
.card img.feature-icon {
    transition: transform .4s ease;
}
.info-style-01 .info-wrapper:hover img { transform: scale(1.1) rotate(-3deg); }

/* ---------- 3. Header shadow once scrolled -------------------------------- */
.header-style1.is-scrolled .navbar-default {
    box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
    transition: box-shadow .3s ease;
}

/* ---------- 4. Back-to-top floating button ------------------------------- */
#backToTop {
    position: fixed;
    right: 22px;
    bottom: 26px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: #03A1AA;
    color: #fff;
    font-size: 18px;
    line-height: 46px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.9);
    transition: opacity .3s ease, transform .3s ease, background .25s ease;
    box-shadow: 0 8px 22px rgba(0, 59, 89, .25);
    z-index: 1040;
}
#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
#backToTop:hover { background: #003B59; }
#backToTop:focus-visible { outline: 3px solid rgba(3,161,170,.5); outline-offset: 2px; }

/* Thin scroll-progress bar at the very top */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #03A1AA, #003B59);
    z-index: 2000;
    transition: width .1s linear;
}
