/* ============================================
   SHIVARADHANA - ANIMATIONS
   Advanced CSS Animations
   ============================================ */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

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

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

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

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

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

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

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

/* Float Delayed */
@keyframes floatDelayed {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

/* Float Slow */
@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(-8px) translateX(5px);
    }
    66% {
        transform: translateY(-12px) translateX(-5px);
    }
}

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

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(30, 31, 56, 0.25);
    }
    50% {
        box-shadow: 0 0 40px rgba(30, 31, 56, 0.5);
    }
}

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

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

/* Line Grow */
@keyframes lineGrow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

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

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

/* Base Animation Class */
.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

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

.animate-fade-in-left {
    opacity: 0;
    animation: fadeInLeft 0.8s ease forwards;
}

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

.animate-scale-in {
    opacity: 0;
    animation: scaleIn 1s ease forwards;
}

.animate-rotate-in {
    opacity: 0;
    animation: rotateIn 0.8s ease forwards;
}

/* Float Animations */
.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatDelayed 5s ease-in-out infinite;
}

.animate-float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

/* Bounce */
.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

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

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered Reveal */
.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Hover Effects */
.property-card,
.amenity-card {
    position: relative;
    overflow: hidden;
}

.property-card::before,
.amenity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(30, 31, 56, 0.08),
        transparent
    );
    transition: left 0.5s ease;
    z-index: 1;
}

.property-card:hover::before,
.amenity-card:hover::before {
    left: 100%;
}

/* Icon Hover Animation */
.amenity-icon,
.contact-icon {
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.amenity-card:hover .amenity-icon,
.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Image Hover Effects */
.gallery-item img,
.property-image img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Link Underline Animation */
.nav-links a,
.footer-links a {
    position: relative;
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.footer-links a:hover::before {
    width: 100%;
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */

/* Shimmer Effect for Loading States */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Gradient Text Animation */
.gradient-text-animated {
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--primary-light),
        var(--primary),
        var(--primary-light)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

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

/* ============================================
   PARALLAX EFFECTS (CSS Only)
   ============================================ */

.parallax-bg {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.parallax-layer {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* ============================================
   LOADING STATES
   ============================================ */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* ============================================
   MICRO INTERACTIONS
   ============================================ */

/* Form Input Focus */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 31, 56, 0.35);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(30, 31, 56, 0.1);
    }
}

/* Social Link Hover */
.social-link {
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px) rotate(5deg);
}

/* Back to Top Button */
.back-to-top {
    transition: all 0.3s ease;
}

.back-to-top:hover {
    animation: none;
    transform: translateY(-5px);
}

/* ============================================
   PARTICLES BACKGROUND
   ============================================ */

.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(30, 31, 56, 0.25);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Generate particles with different delays */
.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 16s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 13s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 15s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 17s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2.5s; animation-duration: 14s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4.5s; animation-duration: 16s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.5s; animation-duration: 13s; }
.particle:nth-child(10) { left: 95%; animation-delay: 3.5s; animation-duration: 15s; }

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

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

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

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

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

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    
    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-scale-in {
        opacity: 1;
        animation: none;
    }
}

/* ============================================
   CURSOR EFFECTS (Optional Enhancement)
   ============================================ */

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, opacity 0.1s ease;
    opacity: 0;
}

.custom-cursor.active {
    opacity: 1;
}

.custom-cursor.hover {
    transform: scale(1.5);
    background: rgba(30, 31, 56, 0.15);
}

/* ============================================
   3D TILT EFFECT SUPPORT
   ============================================ */

.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card-inner {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.tilt-card:hover .tilt-card-inner {
    transform: rotateX(5deg) rotateY(5deg);
}
