/* =========================================================
   ThemeForge Pro Photo Studio — Animations
   ========================================================= */

/* Page entrance */
@keyframes tfpsFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}
.site-main { animation: tfpsFadeInUp 600ms var(--tfps-ease) both; }

/* Stagger */
[data-animate="stagger"] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--tfps-ease), transform 700ms var(--tfps-ease);
    transition-delay: calc(var(--i, 0) * 90ms);
}
[data-animate="stagger"].is-visible { opacity: 1; transform: none; }

[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms var(--tfps-ease), transform 700ms var(--tfps-ease);
}
[data-animate="fade-up"].is-visible { opacity: 1; transform: none; }

/* Image mask */
.image-mask { position: relative; overflow: hidden; }
.image-mask::after {
    content: "";
    position: absolute; inset: 0;
    background: var(--tfps-gradient-btn);
    transform-origin: right;
    transition: transform 900ms var(--tfps-ease);
}
.image-mask.is-visible::after { transform: scaleX(0); }

/* Zoom hover */
.zoom-hover img { transition: transform 700ms var(--tfps-ease); }
.zoom-hover:hover img { transform: scale(1.06); }

/* Lightbox */
.tfps-lightbox {
    position: fixed; inset: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms var(--tfps-ease);
}
.tfps-lightbox.is-open { opacity: 1; pointer-events: auto; }
.tfps-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
    transform: scale(0.96);
    transition: transform 350ms var(--tfps-ease);
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.4);
}
.tfps-lightbox.is-open img { transform: scale(1); }
.tfps-lightbox__close,
.tfps-lightbox__prev,
.tfps-lightbox__next {
    position: absolute;
    background: var(--tfps-gradient-btn);
    border: 0;
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.5);
    transition: transform 250ms var(--tfps-ease);
}
.tfps-lightbox__close:hover,
.tfps-lightbox__prev:hover,
.tfps-lightbox__next:hover { transform: scale(1.1); }
.tfps-lightbox__close { top: 1.5rem; right: 1.5rem; }
.tfps-lightbox__prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.tfps-lightbox__next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* Success pulse */
@keyframes successPulse {
    0%   { transform: scale(0.9); opacity: 0.4; }
    50%  { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.tfps-booking-success.is-animating { animation: successPulse 1.6s var(--tfps-ease); }

/* Error shake */
@keyframes tfpsShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
.tfps-status--error:not([hidden]) { animation: tfpsShake 300ms var(--tfps-ease); }

/* Floating WhatsApp */
.tfps-whatsapp-float {
    position: fixed;
    right: 1.5rem;
    bottom: 5rem;
    z-index: 9998;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
    transition: transform 0.3s var(--tfps-ease);
    text-decoration: none;
}
.tfps-whatsapp-float:hover { transform: translateY(-4px) scale(1.08); color: #fff; }
.tfps-whatsapp-float svg { width: 30px; height: 30px; }

/* Cookie consent */
.tfps-consent {
    position: fixed;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 9997;
    background: rgba(20, 20, 28, 0.98);
    color: #fff;
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    max-width: 900px;
    margin-inline: auto;
    animation: tfpsFadeInUp 500ms var(--tfps-ease) both;
}
.tfps-consent__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}
.tfps-consent__text { margin: 0; font-size: 0.9rem; flex: 1 1 400px; line-height: 1.6; }
.tfps-consent__text a { color: var(--tfps-color-1); text-decoration: underline; }
.tfps-consent__actions { display: flex; gap: 0.5rem; }
.tfps-consent[hidden] { display: none !important; }

/* Skeleton */
.skeleton {
    display: block;
    background: linear-gradient(90deg, #14141c 0%, #1a1a25 50%, #14141c 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
    min-height: 1em;
}
@keyframes skeletonShimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* Mobile menu stagger */
.mobile-menu__list li {
    opacity: 0;
    transform: translateY(10px);
}
.mobile-menu.is-open .mobile-menu__list li {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s var(--tfps-ease), transform 0.4s var(--tfps-ease);
    transition-delay: calc(var(--i, 0) * 50ms + 50ms);
}

/* Sticky mobile book */
@media (max-width: 768px) {
    .tfps-mobile-book {
        position: fixed;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        z-index: 9996;
        display: flex;
        gap: 0.5rem;
        background: rgba(20, 20, 28, 0.95);
        border: 1px solid rgba(168, 85, 247, 0.4);
        border-radius: 16px;
        padding: 0.6rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(20px);
    }
    .tfps-mobile-book .btn { flex: 1; padding: 0.7rem 1rem; font-size: 0.85rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    [data-animate] { opacity: 1 !important; transform: none !important; }
    .hero__media { animation: none !important; }
}