/* ============================================================
   BATCH 3: Buttons + Cards + Micro-Interactions
   ============================================================ */

/* ============================================================
   1. CTA BUTTONS — Hover glow/shine, press feedback
   ============================================================ */

.btn-primary,
.btn-outline-primary {
    position: relative;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.28s ease,
                border-color 0.28s ease;
}

/* Shine sweep on hover */
.btn-primary::after,
.btn-outline-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.btn-primary:hover::after,
.btn-outline-primary:hover::after {
    left: 125%;
}

/* Glow on hover */
.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.35),
                0 2px 8px rgba(6, 182, 212, 0.18);
    transform: translateY(-1px);
}

.btn-outline-primary:hover {
    box-shadow: 0 4px 18px rgba(6, 182, 212, 0.25),
                0 2px 6px rgba(6, 182, 212, 0.12);
    transform: translateY(-1px);
}

/* Press/tap feedback */
.btn-primary:active,
.btn-outline-primary:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.18);
    transition-duration: 0.08s;
}

/* Back-to-top button specific */
.back-to-top.btn-primary:hover {
    box-shadow: 0 8px 28px rgba(6, 182, 212, 0.4);
}

/* ============================================================
   2. SERVICE VIDEO CARDS (What We Do) — Hover lift + shadow
   ============================================================ */

.service-item {
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 12px !important;
    will-change: transform;
}

.service-item:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 18px 40px rgba(14, 116, 144, 0.15),
                0 6px 14px rgba(0, 0, 0, 0.08) !important;
}

/* Video play-on-hover is handled by JS (main.js already has this) */
/* Enhance the visual feedback when video is playing */
.service-item:hover video {
    filter: brightness(1.04) contrast(1.02);
}

/* ============================================================
   3. COMING SOON CARDS — 3D tilt-on-hover + depth
   ============================================================ */

.case-item {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform-style: preserve-3d;
    perspective: 800px;
    will-change: transform;
}

.case-item:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-1deg) !important;
    box-shadow: 0 24px 48px rgba(14, 116, 144, 0.18),
                0 8px 16px rgba(0, 0, 0, 0.10) !important;
}

/* Overlay text lift on hover */
.case-item:hover .case-overlay h3 {
    transform: translateZ(20px);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.case-overlay h3 {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                text-shadow 0.35s ease !important;
}

/* ============================================================
   4. PARTNER LOGOS — Grayscale → color + lift on hover
   ============================================================ */

#Our-Partners .team-item {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease !important;
}

#Our-Partners .team-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(14, 116, 144, 0.12) !important;
}

#Our-Partners .team-item img {
    filter: grayscale(0.35) contrast(1.05) opacity(0.8) !important;
    transition: filter 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#Our-Partners .team-item:hover img {
    filter: grayscale(0) contrast(1) opacity(1) !important;
    transform: scale(1.03);
}

/* ============================================================
   5. STAT BOXES (Track Record) — Hover border glow
   ============================================================ */

.feature .d-flex.rounded.p-3 {
    transition: background 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    border-radius: 12px !important;
}

.feature .d-flex.rounded.p-3:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.4),
                0 8px 24px rgba(6, 182, 212, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Counter number glow on hover */
.feature .d-flex.rounded.p-3:hover .expertise-box-headers1 {
    text-shadow: 0 0 18px rgba(6, 182, 212, 0.5);
}

/* ============================================================
   6. NAV LINKS — Underline slide-in on hover
   ============================================================ */

/* Desktop nav link underline — bulldozed, will rebuild clean */

/* Mobile nav link hover */
@media (max-width: 919px) {
    .nav-links li a {
        transition: padding-left 0.25s ease, color 0.25s ease !important;
    }

    .nav-links li a:hover {
        padding-left: 8px;
        color: #0e7490 !important;
    }
}

/* ============================================================
   7. FORM INPUTS (Contact) — Focus ring glow
   ============================================================ */

#Contact-us .form-control {
    transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.28s ease,
                transform 0.2s ease;
    border: 2px solid transparent;
}

#Contact-us .form-control:hover {
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.08);
}

#Contact-us .form-control:focus {
    border-color: rgba(6, 182, 212, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15),
                0 4px 12px rgba(6, 182, 212, 0.10) !important;
    outline: none !important;
    transform: translateY(-1px);
}

/* Submit button emphasis */
#Contact-us input[type="submit"] {
    background: linear-gradient(135deg, #0e7490, #06b6d4) !important;
    color: white !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.28s ease,
                filter 0.28s ease;
}

#Contact-us input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
    filter: brightness(1.08);
}

#Contact-us input[type="submit"]:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.2);
}

/* ============================================================
   8. BACK-TO-TOP BUTTON — Pulse on idle (position-safe)
   ============================================================ */

.back-to-top {
    position: fixed !important;
    right: 45px !important;
    bottom: 45px !important;
    left: auto !important;
    top: auto !important;
    z-index: 99 !important;
    transition: box-shadow 0.3s ease,
                opacity 0.3s ease;
    animation: backToTopPulse 2.5s ease-in-out infinite;
}

.back-to-top:hover {
    animation: none;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

.back-to-top:active {
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2);
}

@keyframes backToTopPulse {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(6, 182, 212, 0.2);
    }
    50% {
        box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
    }
}

/* ============================================================
   9. SECTION PILLS / LABELS — Subtle hover
   ============================================================ */

.btn.btn-sm.border.rounded-pill {
    transition: background 0.25s ease,
                color 0.25s ease,
                box-shadow 0.25s ease,
                transform 0.25s ease;
}

.btn.btn-sm.border.rounded-pill:hover {
    background: rgba(14, 116, 144, 0.08);
    box-shadow: 0 2px 8px rgba(14, 116, 144, 0.12);
    transform: translateY(-1px);
}

/* ============================================================
   10. GLOBAL LINK HOVER TREATMENT
   ============================================================ */

.footer .copyright a {
    transition: color 0.25s ease, border-color 0.25s ease;
}

.footer .copyright a:hover {
    color: #06b6d4 !important;
    border-color: #06b6d4 !important;
}

/* ============================================================
   11. SMOOTH SCROLL — JS handles nav offset positioning
   ============================================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================================
   12. REDUCED MOTION — Respect user preferences
   ============================================================ */

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

    .back-to-top {
        animation: none;
    }
}