/* ===== ADVANCED ANIMATIONS CSS ===== */
/* Additional animations for PT Indo OceanCrew Services */

/* ===== PARTNER LOGO ANIMATIONS ===== */

.partners-section {
    position: relative;
    overflow: hidden;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.partner-logo {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 150px;
}

.partner-logo::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 168, 232, 0.1),
            transparent);
    transition: left 0.6s ease;
}

.partner-logo:hover::before {
    left: 100%;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.partner-logo:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-xl);
    border: 2px solid rgba(0, 168, 232, 0.2);
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Floating Animation for Partner Logos */
.partner-logo:nth-child(1) {
    animation: floatSlow 6s ease-in-out infinite;
}

.partner-logo:nth-child(2) {
    animation: floatSlow 7s ease-in-out infinite 0.5s;
}

.partner-logo:nth-child(3) {
    animation: floatSlow 6.5s ease-in-out infinite 1s;
}

.partner-logo:nth-child(4) {
    animation: floatSlow 7.5s ease-in-out infinite 1.5s;
}

.partner-logo:nth-child(5) {
    animation: floatSlow 6.8s ease-in-out infinite 2s;
}

.partner-logo:nth-child(6) {
    animation: floatSlow 7.2s ease-in-out infinite 2.5s;
}

.partner-logo:nth-child(7) {
    animation: floatSlow 6.3s ease-in-out infinite 3s;
}

.partner-logo:nth-child(8) {
    animation: floatSlow 7.8s ease-in-out infinite 3.5s;
}

/* ===== ENHANCED SERVICE HIGHLIGHTS ===== */

.services-grid .service-highlight-card:nth-child(1) {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.services-grid .service-highlight-card:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.services-grid .service-highlight-card:nth-child(3) {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Service Icon Hover 3D Effect */
.service-highlight-card .service-icon {
    transform-style: preserve-3d;
}

.service-highlight-card:hover .service-icon {
    animation: tiltRotate 0.6s ease-in-out;
}

@keyframes tiltRotate {
    0% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    }

    50% {
        transform: perspective(1000px) rotateX(10deg) rotateY(10deg) scale(1.1);
    }

    100% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    }
}

/* ===== TESTIMONIALS ANIMATIONS ===== */

.service-card-large:nth-child(1) {
    animation: fadeInLeft 0.8s ease-out 0.2s both;
}

.service-card-large:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.service-card-large:nth-child(3) {
    animation: fadeInRight 0.8s ease-out 0.6s both;
}

/* Quote Icon Bounce */
.service-card-large .fa-quote-left {
    animation: bounce 2s ease-in-out infinite;
}

/* Star Rating Sparkle */
.service-card-large div[style*="★"] {
    display: inline-block;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* ===== PARALLAX EFFECTS ===== */

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===== MAGNETIC BUTTON EFFECT ===== */

.btn-magnetic {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-magnetic::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-magnetic:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* ===== RIPPLE CLICK EFFECT ===== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ===== NUMBER COUNTER ANIMATION ===== */

.counting {
    animation: numberPulse 0.3s ease-in-out;
}

@keyframes numberPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: var(--secondary);
    }
}

/* ===== SECTION REVEAL ANIMATIONS ===== */

.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PROGRESS BAR ANIMATIONS ===== */

.progress-bar {
    position: relative;
    height: 10px;
    background: rgba(0, 168, 232, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s linear infinite;
}

/* ===== HOVER GLOW EFFECTS ===== */

.glow-on-hover {
    position: relative;
    transition: all 0.3s ease;
}

.glow-on-hover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-on-hover:hover::before {
    opacity: 1;
    animation: glowRotate 2s linear infinite;
}

@keyframes glowRotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

/* ===== CARD FLIP ANIMATION ===== */

.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* ===== SCROLL TRIGGERED STAGGER ===== */

.stagger-animation>*:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-animation>*:nth-child(6) {
    transition-delay: 0.6s;
}

/* ===== SKELETON LOADER ===== */

.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== TEXT TYPEWRITER EFFECT ===== */

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--secondary);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ===== IMAGE ZOOM ON HOVER ===== */

.image-zoom {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.image-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-zoom:hover img {
    transform: scale(1.2);
}

/* ===== DIAGONAL SLIDE IN ===== */

@keyframes diagonalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50px, -50px);
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

.diagonal-slide {
    animation: diagonalSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 768px) {
    .partner-logo {
        height: 100px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}