/* 
   Zilixads - Animations Stylesheet
   Subtle animations and transitions for modern, sleek website
*/

/* Pulse Animation for Hero Circles */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.pulse-circle {
    animation: pulse 4s infinite ease-in-out;
}

.delay-1 {
    animation-delay: 1s;
}

.delay-2 {
    animation-delay: 2s;
}

/* Line Animation for Hero SVG */
@keyframes drawLine {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

.line-animation {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 8s infinite ease-in-out;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Staggered Fade In for Multiple Elements */
.stagger-fade-in > * {
    opacity: 0;
}

.stagger-fade-in > *:nth-child(1) {
    animation: fadeIn 0.5s ease-out 0.1s forwards;
}

.stagger-fade-in > *:nth-child(2) {
    animation: fadeIn 0.5s ease-out 0.2s forwards;
}

.stagger-fade-in > *:nth-child(3) {
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

.stagger-fade-in > *:nth-child(4) {
    animation: fadeIn 0.5s ease-out 0.4s forwards;
}

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

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

.slide-in-left {
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    opacity: 0;
    animation: slideInRight 0.8s ease-out forwards;
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Counter Animation */
@keyframes countUp {
    from {
        content: "0";
    }
    to {
        content: attr(data-target);
    }
}

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

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

.shimmer-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    pointer-events: none;
}

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

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

/* Scroll Animations (to be activated via JavaScript) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Progress Bar Animation */
@keyframes progressBar {
    from {
        width: 0;
    }
    to {
        width: var(--progress-width, 100%);
    }
}

.progress-bar {
    position: relative;
    height: 6px;
    background-color: rgba(251, 222, 63, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    animation: progressBar 1.5s ease-out forwards;
}

/* Typing Animation */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

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

.typing-animation {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--primary-color);
    width: 0;
    animation: 
        typing 3.5s steps(40, end) forwards,
        blink 1s step-end infinite;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 10s linear infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Glow Effect */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(251, 222, 63, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 222, 63, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(251, 222, 63, 0.5);
    }
}

.glow-effect {
    animation: glow 2s infinite;
}

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

.gradient-animation {
    background: linear-gradient(270deg, var(--primary-color), var(--primary-light), var(--primary-dark));
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Simple Centered Dollar Sign */
.dollar-sign-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 23rem;
    color: var(--primary-color);
    font-weight: 300;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    animation: revealDollarSign 0.5s ease-out 0.1s forwards;
}

.dollar-sign-char {
    transform-style: preserve-3d;
    animation: rotate3d 8s infinite linear;
}

@keyframes rotate3d {
    0% {
        transform: rotateY(0deg) rotateX(10deg);
    }
    50% {
        transform: rotateY(360deg) rotateX(10deg);
    }
    100% {
        transform: rotateY(0deg) rotateX(10deg);
    }
}

/* FOUC Prevention for Dollar Sign */
@keyframes revealDollarSign {
    0% {
        opacity: 0;
        visibility: hidden;
    }
    100% {
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile Responsive Dollar Sign */
/* At 1024px and below, scale down to approximately 60% */
@media (max-width: 1024px) {
    .dollar-sign-center {
        font-size: 14rem; /* ~60% of 23rem */
    }
}

/* At 768px and below, scale down to approximately 45% */
@media (max-width: 768px) {
    .dollar-sign-center {
        font-size: 10rem; /* ~45% of 23rem */
    }
}

/* At 576px and below, scale down to approximately 35% */
@media (max-width: 576px) {
    .dollar-sign-center {
        font-size: 8rem; /* ~35% of 23rem */
    }
}

/* At 480px and below, scale down to approximately 30% */
@media (max-width: 480px) {
    .dollar-sign-center {
        font-size: 7rem; /* ~30% of 23rem */
    }
}

/* Underline Hover Animation */
.footer-link-hover {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    color: var(--text-color-light);
    transition: color 0.3s ease;
}

.footer-link-hover::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-link-hover:hover {
    color: var(--primary-color);
}

.footer-link-hover:hover::after {
    width: 100%;
}
