/* 
 * Animations CSS for Canadian Business Magazine
 * All animations are implemented using pure CSS - no JavaScript required
 */

/* Pulse Animation for Buttons */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.hero-section .btn-primary {
    animation: pulse 2s infinite ease-in-out;
}

.hero-section .btn-primary:hover {
    animation-play-state: paused;
}

/* Gradient Animation for Hero Section */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-bg {
    background: linear-gradient(135deg, 
        rgba(255, 44, 145, 0.3) 0%, 
        rgba(28, 31, 74, 0.2) 50%, 
        rgba(177, 180, 199, 0.1) 100%);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
}

/* Floating Animation for Cards */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.advantage-card:nth-child(1) {
    animation: float 5s ease-in-out infinite;
}

.advantage-card:nth-child(2) {
    animation: float 5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.advantage-card:nth-child(3) {
    animation: float 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Typing Animation for Hero Heading */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.hero-section h1 {
    overflow: hidden;
    border-right: 0.15em solid var(--color-accent);
    white-space: nowrap;
    width: 0;
    animation: 
        typing 3.5s steps(40, end) forwards,
        blink 1s step-end infinite;
    animation-delay: 0.5s;
}

/* Fade In Animation for Sections */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section:not(.hero-section) {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.about-section { animation-delay: 0.2s; }
.advantages-section { animation-delay: 0.4s; }
.services-section { animation-delay: 0.6s; }
.testimonials-section { animation-delay: 0.8s; }
.gallery-section { animation-delay: 1s; }
.form-section { animation-delay: 1.2s; }
.contact-section { animation-delay: 1.4s; }

/* Form Input Animation */
.form-group input,
.form-group select {
    position: relative;
    z-index: 1;
}

.form-group input:focus,
.form-group select:focus {
    animation: borderPulse 1.5s infinite;
}

@keyframes borderPulse {
    0% {
        border-color: var(--color-supporting-1);
    }
    50% {
        border-color: var(--color-accent);
    }
    100% {
        border-color: var(--color-supporting-1);
    }
}

/* Testimonials Scroll Animation */
@keyframes scrollHint {
    0% {
        transform: translateX(0);
    }
    10% {
        transform: translateX(10px);
    }
    20% {
        transform: translateX(0);
    }
}

.testimonials-container::after {
    content: '→';
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 2rem;
    color: var(--color-accent);
    animation: scrollHint 3s ease infinite;
}

/* Service Card Hover Animation */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--color-supporting-1), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Scroll Down Indicator */
@keyframes scrollDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

.hero-section::after {
    content: '↓';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: white;
    animation: scrollDown 2s ease infinite;
}

/* Logo Animation */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.logo img:hover {
    animation: spin 1s ease-in-out;
}

/* Form Submit Button Animation */
@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

.form-section .btn:hover {
    animation: shake 0.5s ease-in-out;
}

/* Gallery Image Animation */
@keyframes zoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.gallery-item:hover img {
    animation: zoom 5s infinite ease-in-out;
}

/* Check Animation for Styled Checkbox */
@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 0;
    }
    30% {
        height: 0.4rem;
        width: 0;
        opacity: 1;
    }
    100% {
        height: 0.4rem;
        width: 0.75rem;
        opacity: 1;
    }
}

.styled-checkbox input[type="checkbox"]:checked + label:after {
    animation: checkmark 0.3s ease-in-out forwards;
}

/* Rotate Form Animation */
@keyframes unrotate {
    from {
        transform: rotate(-1deg);
    }
    to {
        transform: rotate(0deg);
    }
}

.order-form:hover {
    animation: unrotate 0.3s ease forwards;
} 