/* Premium Animations for Dollar Illustrated */

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide Up Animation */
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Slide In Animation */
@keyframes slideIn {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Glow Animation */
@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
}

/* Subtle Float Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

/* Typewriter Animation */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from { border-right-color: var(--primary-color); }
    to { border-right-color: transparent; }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Hover Lift Animation */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-icon {
    width: 50px;
    height: 50px;
    border: 3px solid var(--medium-gray);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade In Animation Classes */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.scrolled {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up.scrolled {
    opacity: 1;
    transform: translateY(0);
}

/* Delay Classes */
.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

.delay-4 {
    transition-delay: 0.8s;
}

/* Staggered Animation for Lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-item.scrolled {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }
.stagger-item:nth-child(7) { transition-delay: 0.7s; }
.stagger-item:nth-child(8) { transition-delay: 0.8s; }

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(1px);
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    animation: ripple 0.6s linear;
    transform-origin: center;
    pointer-events: none;
    z-index: 0;
}

/* Typewriter Effect */
.typewriter {
    position: relative;
    display: inline-block;
}

.typewriter .accent-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typewriter 1.5s steps(30) 1s forwards;
    border-right: 3px solid var(--primary-color);
    animation-delay: 2s;
}

.typewriter .accent-text::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--primary-color);
    animation: blink 0.7s step-end infinite;
    animation-delay: 3.5s;
}

/* Image Hover Effects */
.img-hover-zoom {
    overflow: hidden;
    border-radius: var(--border-radius);
}

.img-hover-zoom img {
    transition: transform 0.5s ease, filter 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

/* Floating Animation */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Pulse Subtle */
.pulse-subtle {
    animation: pulse 5s infinite ease-in-out;
}

/* Social Icon Animations */
.social-icon-hover {
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.social-icon-hover:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--secondary-color);
}

/* Scroll Animations */
.reveal {
    position: relative;
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-left.active, .reveal-right.active {
    transform: translateX(0);
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: #1B5E20; /* Darker green */
    transform: translateY(-3px);
}