/* ========================================
   Animation Styles
   ======================================== */

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

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

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

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

/* ========================================
   Animation Classes
   ======================================== */

/* Fade In Classes */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

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

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

/* Slide In Classes */
.slide-in-left {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out forwards;
}

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

/* Scale Classes */
.scale-in {
    opacity: 0;
    animation: scaleIn 0.6s ease-out forwards;
}

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

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

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

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

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

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Loading Animations */
.loading {
    animation: rotate 1s linear infinite;
}

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

/* ========================================
   Scroll Reveal Animations
   ======================================== */

/* Elements hidden until scrolled into view */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   Stagger Delays for Multiple Elements
   ======================================== */

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }
.fade-in-up:nth-child(5) { animation-delay: 0.5s; }
.fade-in-up:nth-child(6) { animation-delay: 0.6s; }
.fade-in-up:nth-child(7) { animation-delay: 0.7s; }
.fade-in-up:nth-child(8) { animation-delay: 0.8s; }
.fade-in-up:nth-child(9) { animation-delay: 0.9s; }
.fade-in-up:nth-child(10) { animation-delay: 1s; }
.fade-in-up:nth-child(11) { animation-delay: 1.1s; }
.fade-in-up:nth-child(12) { animation-delay: 1.2s; }

/* ========================================
   Transition Utilities
   ======================================== */

.transition-fast {
    transition: all 0.2s ease;
}

.transition-medium {
    transition: all 0.4s ease;
}

.transition-slow {
    transition: all 0.8s ease;
}

/* ========================================
   Special Effects
   ======================================== */

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

.animated-gradient {
    background: linear-gradient(270deg, #D4AF37, #FFD700, #D4AF37);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: textReveal 1s ease-out forwards;
}

/* Glowing Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5),
                    0 0 10px rgba(212, 175, 55, 0.3),
                    0 0 15px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.8),
                    0 0 20px rgba(212, 175, 55, 0.6),
                    0 0 30px rgba(212, 175, 55, 0.4);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

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

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

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent-gold);
    white-space: nowrap;
    animation: typewriter 4s steps(40) 1s forwards,
               blinkCursor 0.75s step-end infinite;
}

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

/* Smooth Transitions for Dynamic Content */
.content-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.content-fade-out {
    animation: fadeIn 0.5s ease-out reverse;
}

/* Button Press Animation */
@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.button-press:active {
    animation: buttonPress 0.2s ease;
}

/* Shake Animation (for errors) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease;
}

/* Success Checkmark Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark {
    stroke-dasharray: 100;
    animation: checkmark 0.6s ease-out forwards;
}

/* Skeleton Loading Animation */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
        var(--secondary-dark) 0px,
        rgba(212, 175, 55, 0.1) 40px,
        var(--secondary-dark) 80px);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Counter Animation (for numbers) */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: countUp 1s ease-out;
}

/* Image Zoom on Hover */
.zoom-on-hover {
    overflow: hidden;
}

.zoom-on-hover img {
    transition: transform 0.8s ease;
}

.zoom-on-hover:hover img {
    transform: scale(1.1);
}

/* Underline Expand Animation */
@keyframes underlineExpand {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.underline-expand {
    position: relative;
}

.underline-expand::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

.underline-expand:hover::after {
    width: 100%;
}
