/* ===================================
   UZPHARMCONSULTING - Visual Effects
   Parallax, Animations, Hover Effects
   =================================== */

/* Scroll Animations - Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Animation Classes */
[data-animate] {
    opacity: 0;
}

[data-animate].animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}

[data-animate="fade-up"].animated {
    animation-name: fadeInUp;
}

[data-animate="fade-down"].animated {
    animation-name: fadeInDown;
}

[data-animate="fade-left"].animated {
    animation-name: fadeInLeft;
}

[data-animate="fade-right"].animated {
    animation-name: fadeInRight;
}

[data-animate="scale-in"].animated {
    animation-name: scaleIn;
}

/* Parallax Effect */
.parallax-section {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Enhanced Hover Effects */
.direction-card {
    position: relative;
    overflow: hidden;
}

.direction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.05), transparent);
    transition: left 0.5s ease;
}

.direction-card:hover::before {
    left: 100%;
}

.direction-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #1E3A8A, #10B981);
    transition: width 0.4s ease;
}

.direction-card:hover::after {
    width: 100%;
}

/* Floating Animation for CTA */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.cta-content {
    animation: float 4s ease-in-out infinite;
}

/* Pulse Animation for Buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(30, 58, 138, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 58, 138, 0);
    }
}

.btn-primary {
    position: relative;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
    z-index: -1;
}

/* Why Item Enhanced Animation */
.why-item {
    position: relative;
    transition: all 0.4s ease;
}

.why-item:hover {
    transform: translateX(10px);
    box-shadow: -5px 0 15px rgba(30, 58, 138, 0.15);
}

.why-number {
    position: relative;
    display: inline-block;
}

.why-number::after {
    content: attr(data-number);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.1;
    font-size: 4rem;
    z-index: -1;
    transition: all 0.3s ease;
}

.why-item:hover .why-number::after {
    transform: scale(1.2);
    opacity: 0.05;
}

/* Content Block Slide In */
.content-block {
    transition: all 0.6s ease;
}

.content-block.slide-in-left {
    transform: translateX(-50px);
    opacity: 0;
}

.content-block.slide-in-right {
    transform: translateX(50px);
    opacity: 0;
}

.content-block.visible {
    transform: translateX(0);
    opacity: 1;
}

/* Floating Contact Buttons Animation */
@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.float-btn {
    animation: bounceIn 0.6s ease;
}

.float-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.float-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.float-btn:nth-child(3) {
    animation-delay: 0.3s;
}

/* Ripple Effect on Click */
.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%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Gradient Border Animation */
@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.direction-card.active {
    background: linear-gradient(
        90deg,
        rgba(30, 58, 138, 0.05),
        rgba(16, 185, 129, 0.05),
        rgba(30, 58, 138, 0.05)
    );
    background-size: 200% 200%;
    animation: borderRotate 3s ease infinite;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #1E3A8A, #10B981);
    z-index: 1001;
    transition: width 0.1s linear;
}

/* Hero Title Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.hero-title.typing {
    overflow: hidden;
    border-right: 2px solid white;
    white-space: nowrap;
    animation: typing 3s steps(40) 0.5s both, blink 0.75s step-end infinite;
}

/* Section Reveal Animation */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Image Zoom on Hover */
.registration-section,
.certification-section,
.pharmacovigilance-section {
    background-size: 110%;
    transition: background-size 0.8s ease;
}

.registration-section:hover,
.certification-section:hover,
.pharmacovigilance-section:hover {
    background-size: 115%;
}

/* Card Tilt Effect */
.direction-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.direction-card:hover {
    transform: translateY(-4px) rotateX(2deg) rotateY(2deg);
}

/* Underline Animation */
.block-title {
    position: relative;
    display: inline-block;
}

.block-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFFFFF, rgba(255, 255, 255, 0.5));
    transition: width 0.6s ease;
}

.content-block.visible .block-title::after {
    width: 100%;
}

/* Number Counter Animation */
.why-number {
    position: relative;
    transition: all 0.3s ease;
}

.why-item:hover .why-number {
    transform: scale(1.1) rotate(5deg);
    color: #10B981;
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.section-title {
    position: relative;
}

.section-title.gradient-text {
    background: linear-gradient(90deg, #1E3A8A, #10B981, #1E3A8A);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Blur Fade In */
@keyframes blurFadeIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.hero-content {
    animation: blurFadeIn 1.2s ease-out;
}

/* Stagger Animation for Lists */
.block-list li {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.content-block.visible .block-list li {
    opacity: 1;
    transform: translateX(0);
}

.content-block.visible .block-list li:nth-child(1) { transition-delay: 0.1s; }
.content-block.visible .block-list li:nth-child(2) { transition-delay: 0.2s; }
.content-block.visible .block-list li:nth-child(3) { transition-delay: 0.3s; }
.content-block.visible .block-list li:nth-child(4) { transition-delay: 0.4s; }

/* Mouse Follow Effect for Hero */
.hero {
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent);
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.hero:hover::before {
    opacity: 1;
}

/* Box Shadow Glow on Hover */
.btn:hover {
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

/* Smooth Transitions */
* {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Disable Parallax on Mobile */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
    }
    
    .registration-section:hover,
    .certification-section:hover,
    .pharmacovigilance-section:hover {
        background-size: 110%;
    }
}