/* Advanced 3D Animations and Effects */

/* AOS (Animate On Scroll) Custom Animations */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(100px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(-100px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.6);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

[data-aos="flip-left"] {
    transform: perspective(2500px) rotateY(-100deg);
}

[data-aos="flip-left"].aos-animate {
    transform: perspective(2500px) rotateY(0);
}

/* Hero Section 3D Animations */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    top: 50%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #1e40af, #2563eb);
    bottom: 10%;
    left: 20%;
    animation-delay: 10s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    top: 30%;
    right: 30%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, 50px) rotate(90deg);
    }
    50% {
        transform: translate(0, 100px) rotate(180deg);
    }
    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

/* Hero Content Wrapper */
.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.hero-image {
    position: relative;
    overflow: visible;
    z-index: 2;
}

/* Phone Mockup 3D */
.phone-mockup {
    position: relative;
    perspective: 1500px;
    animation: floatPhone 6s ease-in-out infinite;
    margin-top: 100px;
    overflow: visible;
    z-index: 2;
}

.phone-frame {
    position: relative;
    width: 300px;
    height: 600px;
    background: linear-gradient(135deg, #ff6b35, #ff8c5a);
    border-radius: 40px;
    padding: 8px;
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.5),
        0 0 0 1px #ff6b35,
        0 0 20px rgba(255, 107, 53, 0.5);
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover .phone-frame {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    border: 2px solid #1e293b;
}

.phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #0f172a;
    border-radius: 0 0 20px 20px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

@keyframes floatPhone {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Floating Cards */
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    color: #0f172a;
    animation: floatCard 4s ease-in-out infinite;
    z-index: 10;
    white-space: nowrap;
}

.floating-card i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.card-1 {
    top: 25%;
    right: -15%;
    animation-delay: 0s;
}

.card-2 {
    top: 45%;
    right: -18%;
    animation-delay: 2s;
}

.card-3 {
    top: 65%;
    right: -15%;
    animation-delay: 4s;
}

.card-4 {
    top: 5%;
    right: -18%;
    animation-delay: 1s;
}

.card-5 {
    top: 85%;
    right: -18%;
    animation-delay: 3s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* 3D Button Effects */
.btn-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    transform: translateZ(-10px);
    filter: brightness(0.8);
    transition: all 0.3s ease;
}

.btn-3d:hover {
    transform: translateY(-5px) translateZ(10px);
}

.btn-3d:hover::before {
    transform: translateZ(-15px);
}

.btn-3d:active {
    transform: translateY(-2px) translateZ(5px);
}

/* Scroll Indicator Mouse */
.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
    animation: mouseMove 2s infinite;
}

.wheel {
    width: 4px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheelMove 2s infinite;
}

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

@keyframes wheelMove {
    0% {
        opacity: 1;
        top: 10px;
    }
    100% {
        opacity: 0;
        top: 30px;
    }
}

/* Advanced Scroll Down Indicator */
.scroll-down-indicator {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-down-indicator:hover {
    transform: translateY(5px);
}

.scroll-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeInOut 2s ease-in-out infinite;
}

.scroll-arrow-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 3px solid #3b82f6;
    border-bottom: 3px solid #3b82f6;
    transform: rotate(45deg);
    animation: scrollArrow 2s ease-in-out infinite;
    opacity: 0;
}

.scroll-arrow:nth-child(1) {
    animation-delay: 0s;
}

.scroll-arrow:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-arrow:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scrollArrow {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-10px, -10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(10px, 10px);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* 3D Image Wrapper */
.image-3d-wrapper {
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.image-3d-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.image-3d-wrapper:hover img {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
}

.image-overlay-shape {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Gym Card 3D Effects */
.gym-card {
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.gym-card:hover {
    transform: translateY(-15px) rotateX(5deg);
}

.gym-image {
    position: relative;
    overflow: hidden;
}

.gym-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gym-card:hover .gym-image img {
    transform: scale(1.1);
}

.gym-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gym-overlay i {
    font-size: 3rem;
    color: #3b82f6;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.gym-card:hover .gym-overlay {
    opacity: 1;
}

.gym-card:hover .gym-overlay i {
    transform: scale(1);
}

/* Trainer Card - Static with Blue Border */
.trainer-card {
    transition: box-shadow 0.3s ease;
}

.trainer-card:hover {
    box-shadow: var(--shadow-md);
}

.trainer-image {
    position: relative;
    overflow: visible;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
}

.trainer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #3b82f6;
    transition: transform 0.3s ease;
}

.trainer-card:hover .trainer-image img {
    transform: scale(1.05);
}

.trainer-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.6);
    border: 3px solid var(--white);
}

/* Stats Icon Animation */
.stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.stat-icon i {
    /* Icon stays still - no animation */
}

/* Feature Card Hover Effect */
.feature-card {
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.feature-card:hover {
    transform: translateY(-15px) rotateX(10deg);
}

.feature-icon {
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* Testimonial Card 3D */
.testimonial-card {
    transform-style: preserve-3d;
    transition: all 0.5s ease;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 100px;
    color: rgba(59, 130, 246, 0.1);
    font-family: Georgia, serif;
    z-index: 0;
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Title Highlight Animation */
.title-highlight {
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

/* Responsive Adjustments */
@media (max-width: 968px) {
    .hero-content-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .hero-image {
        display: none;
    }

    /* Mobile Phone Mockup Animation */
    .hero-mobile-mockup {
        animation: floatPhone 6s ease-in-out infinite;
    }

    .mobile-phone-frame {
        transform: rotateY(0deg) rotateX(0deg);
        transition: transform 0.5s ease;
    }

    .hero-mobile-mockup:hover .mobile-phone-frame {
        transform: scale(1.05);
    }

    .phone-frame {
        width: 250px;
        height: 500px;
        max-width: 100%;
    }

    .floating-card {
        display: none;
    }

    .shape {
        width: 200px !important;
        height: 200px !important;
    }

    /* Scroll Down Indicator Mobile */
    .scroll-down-indicator {
        margin-top: 2rem;
        width: 100%;
        max-width: 100%;
    }

    .scroll-arrow {
        width: 25px;
        height: 25px;
        border-width: 2px;
    }

    /* Gym Card Mobile */
    .gym-card {
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .gym-overlay {
        opacity: 0;
    }

    /* Trainer Card Mobile */
    .trainer-image {
        width: 120px;
        height: 120px;
    }

    .trainer-badge {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-width: 2px;
    }

    /* Feature Icon Mobile */
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    /* Stat Icon Mobile */
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    /* Hero Mobile Small */
    .hero-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Shapes Mobile */
    .shape {
        width: 150px !important;
        height: 150px !important;
    }

    /* Trainer Mobile Small */
    .trainer-image {
        width: 100px;
        height: 100px;
    }

    .trainer-badge {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* Feature Mobile Small */
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Stat Mobile Small */
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    /* Scroll Arrows Mobile */
    .scroll-arrow {
        width: 20px;
        height: 20px;
    }

    .scroll-text {
        font-size: 0.75rem;
    }

    /* 3D Button Mobile */
    .btn-3d {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Gym Image Mobile */
    .gym-image {
        height: 200px;
    }

    /* Testimonial Mobile */
    .testimonial-avatar {
        width: 45px;
        height: 45px;
    }

    .testimonial-text {
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .trainer-image {
        width: 90px;
        height: 90px;
    }

    .trainer-badge {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
}
