/* ========================================
   EMKA ÇELIK KAPI - ANIMATIONS
   ======================================== */

/* ----------------------------------------
   Animation Keyframes
   ---------------------------------------- */

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

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

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Slide Up */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Gold Glow */
@keyframes goldGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(201, 169, 89, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(201, 169, 89, 0.5);
    }
}

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

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

/* Count Up - used with JS */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------
   Animation Classes
   ---------------------------------------- */

/* Base animation setup for scroll triggers */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* Fade In */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-on-scroll.fade-in {
    transform: none;
}

.animate-on-scroll.fade-in.animated {
    animation: fadeIn 0.8s ease forwards;
}

/* Fade In Up */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-on-scroll.fade-in-up {
    transform: translateY(30px);
}

.animate-on-scroll.fade-in-up.animated {
    transform: translateY(0);
}

/* Fade In Down */
.animate-fade-in-down {
    animation: fadeInDown 0.8s ease forwards;
}

.animate-on-scroll.fade-in-down {
    transform: translateY(-30px);
}

.animate-on-scroll.fade-in-down.animated {
    transform: translateY(0);
}

/* Fade In Left */
.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-on-scroll.fade-in-left {
    transform: translateX(-30px);
}

.animate-on-scroll.fade-in-left.animated {
    transform: translateX(0);
}

/* Fade In Right */
.animate-fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-on-scroll.fade-in-right {
    transform: translateX(30px);
}

.animate-on-scroll.fade-in-right.animated {
    transform: translateX(0);
}

/* Scale In */
.animate-scale-in {
    animation: scaleIn 0.8s ease forwards;
}

.animate-on-scroll.scale-in {
    transform: scale(0.9);
}

.animate-on-scroll.scale-in.animated {
    transform: scale(1);
}

/* ----------------------------------------
   Button Shimmer Effect
   ---------------------------------------- */
.btn--shimmer {
    position: relative;
    overflow: hidden;
}

.btn--shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* ----------------------------------------
   Gold Glow Effect
   ---------------------------------------- */
.glow-gold {
    animation: goldGlow 2s ease-in-out infinite;
}

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

/* ----------------------------------------
   Staggered Animations
   ---------------------------------------- */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }

/* ----------------------------------------
   Hover Effects
   ---------------------------------------- */

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

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Card Glow */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(201, 169, 89, 0.3);
}

/* Border Reveal */
.hover-border-reveal {
    position: relative;
}

.hover-border-reveal::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--color-gold);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover-border-reveal:hover::before {
    opacity: 1;
}

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

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

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

/* ----------------------------------------
   Loading States
   ---------------------------------------- */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid transparent;
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-secondary) 25%,
        var(--color-tertiary) 50%,
        var(--color-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ----------------------------------------
   Scroll Progress Indicator
   ---------------------------------------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ----------------------------------------
   Page Transitions
   ---------------------------------------- */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-transition-exit {
    opacity: 1;
}

.page-transition-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ----------------------------------------
   Counter Animation (for stats)
   ---------------------------------------- */
.counter-animated {
    animation: countUp 0.8s ease forwards;
}

/* ----------------------------------------
   Lightbox Animations
   ---------------------------------------- */
.lightbox {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox__content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox:not([hidden]) .lightbox__content {
    transform: scale(1);
}

/* ----------------------------------------
   Accordion Animations (FAQ)
   ---------------------------------------- */
.faq__answer {
    animation: fadeInDown 0.3s ease forwards;
}

/* ----------------------------------------
   Testimonial Slider Animations
   ---------------------------------------- */
.testimonials__track {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------
   Mobile Menu Animation
   ---------------------------------------- */
.mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu__list {
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.mobile-menu.active .mobile-menu__list {
    transform: translateY(0);
}

.mobile-menu__link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

.mobile-menu.active .mobile-menu__link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-menu__link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu__link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-menu__link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-menu__link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-menu__link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu__link:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu.active .mobile-menu__link:nth-child(7) { transition-delay: 0.4s; }

/* ----------------------------------------
   Reduced Motion
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
