/* ============================================
   Chelik Studio - Animations & Effects
   Smooth and Professional Animations
   ============================================ */

/* ============================================
   Keyframe Animations
   ============================================ */

/* 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);
    }
}

/* Slide In Up */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide In Down */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Float */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Mobile Slider Animation */
@keyframes mobileSlider {
    0%, 25% { 
        transform: translateX(0); 
    }
    33%, 58% { 
        transform: translateX(-100%); 
    }
    66%, 91% { 
        transform: translateX(-200%); 
    }
    100% { 
        transform: translateX(0); 
    }
}

/* Image Pan Effect */
@keyframes panImage {
    from { 
        transform: scale(1) translateX(0); 
    }
    to { 
        transform: scale(1.1) translateX(-20px); 
    }
}

/* Loading Spinner */
@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Typewriter Effect */
@keyframes typing {
    from { 
        width: 0; 
    }
    to { 
        width: 100%; 
    }
}

/* Blink Cursor */
@keyframes blink {
    0%, 100% { 
        border-color: transparent; 
    }
    50% { 
        border-color: #c8b6a4; 
    }
}

/* Wobble */
@keyframes wobble {
    0% { transform: translateX(0%); }
    15% { transform: translateX(-25%) rotate(-5deg); }
    30% { transform: translateX(20%) rotate(3deg); }
    45% { transform: translateX(-15%) rotate(-3deg); }
    60% { transform: translateX(10%) rotate(2deg); }
    75% { transform: translateX(-5%) rotate(-1deg); }
    100% { transform: translateX(0%); }
}

/* Shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ============================================
   Scroll-based Animations
   ============================================ */

/* Fade In on Scroll */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide Left on Scroll */
.slide-left-scroll {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-left-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide Right on Scroll */
.slide-right-scroll {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-right-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Hover Effects
   ============================================ */

/* Hover Lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Hover Scale */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Hover Glow */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(200, 182, 164, 0.5);
}

/* Hover Overlay */
.hover-overlay {
    position: relative;
    overflow: hidden;
}

.hover-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(200, 182, 164, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover-overlay:hover::after {
    opacity: 1;
}

/* Hover Zoom Image */
.hover-zoom img {
    transition: transform 0.5s ease;
}

.hover-zoom:hover img {
    transform: scale(1.1);
}

/* ============================================
   Loading Animations
   ============================================ */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c8b6a4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   Entrance Animations for Sections
   ============================================ */

/* Hero Section */
.hero-animate {
    animation: fadeInDown 1s ease-out;
}

/* Section Title Animation */
.section-title {
    animation: fadeInUp 0.8s ease-out;
}

/* Service Items Stagger Animation */
.service-slider-item:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s both; }
.service-slider-item:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.2s both; }
.service-slider-item:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.3s both; }
.service-slider-item:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.4s both; }

/* Feature Items Stagger Animation */
.feature-item:nth-child(1) { animation: fadeInUp 0.5s ease-out 0.1s both; }
.feature-item:nth-child(2) { animation: fadeInUp 0.5s ease-out 0.2s both; }
.feature-item:nth-child(3) { animation: fadeInUp 0.5s ease-out 0.3s both; }
.feature-item:nth-child(4) { animation: fadeInUp 0.5s ease-out 0.4s both; }
.feature-item:nth-child(5) { animation: fadeInUp 0.5s ease-out 0.5s both; }
.feature-item:nth-child(6) { animation: fadeInUp 0.5s ease-out 0.6s both; }

/* Blog Posts Animation */
.blog-post-card:nth-child(1) { animation: fadeInUp 0.5s ease-out 0.1s both; }
.blog-post-card:nth-child(2) { animation: fadeInUp 0.5s ease-out 0.2s both; }
.blog-post-card:nth-child(3) { animation: fadeInUp 0.5s ease-out 0.3s both; }
.blog-post-card:nth-child(4) { animation: fadeInUp 0.5s ease-out 0.4s both; }
.blog-post-card:nth-child(5) { animation: fadeInUp 0.5s ease-out 0.5s both; }

/* ============================================
   Transition Utilities
   ============================================ */

/* Smooth Transitions */
.transition-fast {
    transition: all 0.2s ease;
}

.transition-normal {
    transition: all 0.3s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.transition-very-slow {
    transition: all 0.8s ease;
}

/* ============================================
   Special Effects
   ============================================ */

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #c8b6a4, #776f69);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Floating Animation for Widget */
.floating-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulsing Call to Action */
.pulse-animation {
    animation: pulse 2s infinite;
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .slider-wrapper {
        transition: none !important;
    }
    
    .floating-animation {
        animation: none !important;
    }
    
    .pulse-animation {
        animation: none !important;
    }
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c8b6a4;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #776f69;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #c8b6a4 #f1f1f1;
}

/* ============================================
   Selection Style
   ============================================ */
::selection {
    background: #c8b6a4;
    color: #ffffff;
}

::-moz-selection {
    background: #c8b6a4;
    color: #ffffff;
}