/* ════════════════════════════════════════════════════════
   Tiger Baron Impex — performance.css
   Additive only: zero layout changes, zero style overrides
   ════════════════════════════════════════════════════════ */

/* ── 1. LAYOUT-SHIFT PREVENTION ───────────────────────── */
img { max-width: 100%; height: auto; }

/* Reserve height for team-card portraits */
.team-card__image img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    display: block;
}

/* ── 2. PRELOADER ─────────────────────────────────────── */
.preloader__image {
    animation: tbi-pulse 1.2s ease-in-out infinite;
}
@keyframes tbi-pulse {
    0%, 100% { transform: scale(1);    opacity: 1;    }
    50%       { transform: scale(1.08); opacity: 0.7;  }
}

/* ── 3. SCROLL-REVEAL BASE (applied by JS) ────────────── */
.tbi-will-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.72s cubic-bezier(.22,.61,.36,1),
                transform 0.72s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
.tbi-will-reveal.tbi-from-left  { transform: translateX(-40px); }
.tbi-will-reveal.tbi-from-right { transform: translateX( 40px); }
.tbi-will-reveal.tbi-from-scale { transform: scale(0.93); }
.tbi-will-reveal.tbi-is-visible {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto;
}

/* Stagger delay helpers */
.tbi-stagger .tbi-will-reveal:nth-child(1)  { transition-delay: 0.00s; }
.tbi-stagger .tbi-will-reveal:nth-child(2)  { transition-delay: 0.09s; }
.tbi-stagger .tbi-will-reveal:nth-child(3)  { transition-delay: 0.18s; }
.tbi-stagger .tbi-will-reveal:nth-child(4)  { transition-delay: 0.27s; }
.tbi-stagger .tbi-will-reveal:nth-child(5)  { transition-delay: 0.36s; }
.tbi-stagger .tbi-will-reveal:nth-child(6)  { transition-delay: 0.45s; }
.tbi-stagger .tbi-will-reveal:nth-child(n+7){ transition-delay: 0.50s; }

/* ── 4. LAZY-IMAGE SHIMMER ───────────────────────────── */
.tbi-img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: tbi-shimmer 1.4s infinite;
    display: block;
}
@keyframes tbi-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
img.tbi-loaded {
    animation: tbi-fadeIn 0.55s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes tbi-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

img[data-tbi-src],
img[data-src] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: tbi-shimmer 1.4s infinite;
    opacity: 0.92;
    transition: opacity 0.35s ease;
}

.gallery-item img[data-tbi-src],
.projects-one__single img[data-tbi-src],
.service-one__box img[data-tbi-src] {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.gallery .gallery-item-inner,
.projects-one__single,
.service-one__box {
    background: #f3f4f2;
}

.gallery .gallery-item-inner img,
.projects-one__single > img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    display: block;
}

.gallery .gallery-item.tbi-gallery-deferred {
    display: none;
}

.gallery .gallery-item.show {
    animation: tbi-galleryIn 0.58s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes tbi-galleryIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-details__images img[data-tbi-src],
.about-one__image img[data-tbi-src],
.about-three__image img[data-tbi-src] {
    min-height: 220px;
}

/* ── 5. SCROLL PROGRESS BAR ─────────────────────────── */
#tbi-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #f6a623, #d4860f);
    z-index: 99998;
    pointer-events: none;
    transition: width 0.08s linear;
}

/* ── 6. BACK-TO-TOP ──────────────────────────────────── */
.scroll-to-top {
    opacity: 0 !important;
    transform: translateY(16px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    pointer-events: none !important;
}
.scroll-to-top.tbi-show {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}
.scroll-to-top:hover {
    transform: translateY(-4px) !important;
}

/* ── 7. BUTTON HOVER ENHANCEMENT ────────────────────── */
.thm-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(.22,.61,.36,1),
                box-shadow 0.22s ease !important;
}
.thm-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.18);
    transform: translateX(-120%) skewX(-20deg);
    transition: transform 0.4s cubic-bezier(.22,.61,.36,1);
    pointer-events: none;
}
.thm-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.thm-btn:hover::after {
    transform: translateX(120%) skewX(-20deg);
}
.thm-btn:active { transform: translateY(-1px); }

.main-slider .swiper-slide .thm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 168px;
    min-height: 54px;
    padding: 15px 32px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 6px;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.main-slider .swiper-slide .thm-btn:hover {
    box-shadow: 0 16px 36px rgba(0,0,0,.24);
}

/* ── 8. PROJECT CARD HOVER ───────────────────────────── */
/*  NOTE: NO ::before pseudo-element — that was breaking images  */
.projects-one__single {
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1),
                box-shadow 0.35s ease;
}

.project-one__home-one .swiper-container {
    overflow: hidden;
}

.project-one__home-one .swiper-wrapper {
    align-items: stretch;
}

.project-one__home-one .swiper-slide {
    height: auto;
    opacity: 1 !important;
    transform: none !important;
}

.project-one__home-one .projects-one__single {
    height: 100%;
    min-height: 260px;
    background: #f3f4f2;
    opacity: 1 !important;
    transform: none !important;
}

.project-one__home-one .tbi-will-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition-delay: 0ms !important;
}

.project-one__home-one .projects-one__single > img {
    min-height: 260px;
}

.project-one__home-one .swiper-slide-active .projects-one__single,
.project-one__home-one .swiper-slide-next .projects-one__single {
    animation: tbi-productSlideIn 0.62s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes tbi-productSlideIn {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.projects-one__single:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 44px rgba(0,0,0,.17);
}
.projects-one__single img {
    transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
    width: 100%;
    display: block;
}
.projects-one__single:hover img {
    transform: scale(1.05);
}
.projects-one__button {
    transition: transform 0.2s ease;
}
.projects-one__single:hover .projects-one__button {
    transform: translateX(4px);
}

/* ── 9. TEAM CARD HOVER ──────────────────────────────── */
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(0,0,0,.13);
}

/* ── 10. HERO SLIDER ANIMATIONS ─────────────────────── */
.main-slider .swiper-slide {
    will-change: opacity;
}

.main-slider .swiper-slide .image-layer {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0) scale(1.025) !important;
    transition: opacity 950ms cubic-bezier(.4,0,.2,1) !important;
    will-change: opacity;
}

.main-slider .swiper-slide .image-layer[data-tbi-bg] {
    background-color: #17241f;
}

.swiper-slide-active .image-layer {
    animation: none !important;
    transform: translateZ(0) scale(1.025) !important;
}

.main-slider .swiper-container-fade .swiper-slide {
    transition-property: opacity !important;
    transition-timing-function: cubic-bezier(.4,0,.2,1) !important;
}

/* Staggered slide text entrance */
.swiper-slide-active .tagline {
    animation: tbi-up 0.65s 0.15s cubic-bezier(.22,.61,.36,1) both;
}
.swiper-slide-active h2 {
    animation: tbi-up 0.65s 0.30s cubic-bezier(.22,.61,.36,1) both;
}
.swiper-slide-active p {
    animation: tbi-up 0.65s 0.44s cubic-bezier(.22,.61,.36,1) both;
}
.swiper-slide-active .thm-btn {
    animation: tbi-up 0.65s 0.58s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes tbi-up {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── 11. NAVIGATION DROPDOWN ANIMATION ──────────────── */
.main-menu__list .dropdown ul {
    transform-origin: top center;
    transform: translateY(8px) scaleY(0.95);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.22s cubic-bezier(.22,.61,.36,1),
                opacity 0.22s ease,
                visibility 0.22s ease;
}
.main-menu__list .dropdown:hover > ul {
    transform: translateY(0) scaleY(1);
    opacity: 1;
    visibility: visible;
}

/* ── 12. ABOUT IMAGE FLOAT ────────────────────────────  */
.about-three__image {
    animation: tbi-float 5s ease-in-out infinite;
}
@keyframes tbi-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

/* ── 13. SOCIAL ICON HOVER ───────────────────────────── */
.footer__social a,
.mobile-nav__social a {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(.22,.61,.36,1), color 0.2s ease;
}
.footer__social a:hover,
.mobile-nav__social a:hover {
    transform: translateY(-5px) scale(1.15);
}

/* ── 14. FOOTER LINKS ────────────────────────────────── */
.footer-widget__links a,
.footer-widget__contact a {
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-widget__links a:hover,
.footer-widget__contact a:hover {
    padding-left: 5px;
}

/* ── 15. PAGE HEADER BREADCRUMB ──────────────────────── */
.page-header h2 {
    animation: tbi-up 0.6s 0.1s ease both;
}
.thm-breadcrumb li {
    animation: tbi-up 0.5s ease both;
}
.thm-breadcrumb li:nth-child(1) { animation-delay: 0.15s; }
.thm-breadcrumb li:nth-child(2) { animation-delay: 0.25s; }
.thm-breadcrumb li:nth-child(3) { animation-delay: 0.32s; }

/* ── 16. INPUT FOCUS ─────────────────────────────────── */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    transform: translateY(-1px);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

/* ── 17. GALLERY FILTER BUTTONS ──────────────────────── */
.gallery-filter .filter-item {
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    cursor: pointer;
}
.gallery-filter .filter-item:hover,
.gallery-filter .filter-item.active {
    transform: translateY(-2px);
}

/* ── 18. HERO NAVIGATION REFINEMENT ───────────────────── */
.main-slider__nav {
    max-width: none;
    padding: 0 32px;
    pointer-events: none;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.main-slider__nav .swiper-button-next,
.main-slider__nav .swiper-button-prev {
    width: 54px;
    height: 54px;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,.72);
    background: rgba(0,0,0,.24);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    opacity: 0.82;
    pointer-events: auto;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.main-slider__nav .swiper-button-next:hover,
.main-slider__nav .swiper-button-prev:hover {
    background: var(--thm-primary);
    border-color: var(--thm-primary);
    opacity: 1;
    transform: translateY(-1px);
}

.service-one__box,
.about-one__box,
.projects-one__single,
.team-card,
.footer-widget {
    transform-origin: center bottom;
}

/* ── 19. INSTANT NAVIGATION (no page transition delay) ── */
/* The tbi-enhance.js uses instant swap, not fade, on nav clicks */

/* ── 20. REDUCED MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .tbi-will-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .about-three__image {
        animation: none !important;
    }
}

/* ── 21. MOBILE ──────────────────────────────────────── */
@media (max-width: 767px) {
    .about-three__image { animation: none; }
    .swiper-slide-active .image-layer { animation: none; }
    .tbi-will-reveal { transition-duration: 0.4s !important; }
    .thm-btn:hover { transform: none; }
    .main-slider .swiper-slide .thm-btn {
        min-width: 154px;
        min-height: 50px;
        padding: 13px 24px;
        font-size: 15px;
    }
    .main-slider__nav {
        display: flex;
        padding: 0 14px;
    }
    .main-slider__nav .swiper-button-next,
    .main-slider__nav .swiper-button-prev {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
}
