/* ============================================
   ADVANCED UI ENHANCEMENTS & ANIMATIONS
   ============================================ */

/* ============================================
   MODERN BUTTON EFFECTS
   ============================================ */


@keyframes gradient-border {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Ripple Effect for Buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.magnetic-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */

/* 3D Card Effect */
.card-3d {
    perspective: 1000px;
    transition: all 0.3s ease;
}

.card-3d-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Floating Card Effect */
.floating-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.floating-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0;
    transition: all 0.4s ease;
}

.floating-card:hover {
    transform: translateY(-15px);
}

.floating-card:hover::after {
    opacity: 1;
    width: 90%;
}

/* ============================================
   NAVIGATION IMPROVEMENTS
   ============================================ */

/* Liquid Navigation Effect */
.nav-liquid {
    position: relative;
}

.nav-liquid::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #bc493c, #e05747);
    border-radius: 10px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-liquid:hover::before {
    transform: scaleX(1);
}

/* Morphing Navigation */
.morph-nav {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.morph-nav:hover {
    border-radius: 25px;
    background: linear-gradient(45deg, rgba(188, 73, 60, 0.1), rgba(224, 87, 71, 0.1));
}

/* ============================================
   TEXT ANIMATIONS
   ============================================ */

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: .15em solid #bc493c;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #bc493c; }
}

/* Glitch Text Effect */
.glitch {
    position: relative;
    color: #fff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #00ff00;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% {
        transform: translate(0);
    }
    1%, 13%, 16%, 48%, 51%, 98% {
        transform: translate(-2px, 1px);
    }
}

@keyframes glitch-2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% {
        transform: translate(0);
    }
    1%, 19%, 22%, 61%, 64%, 98% {
        transform: translate(2px, -1px);
    }
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Pulse Loading */
.pulse-loader {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */

/* Button Press Effect */
.press-effect:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Elastic Effect */
.elastic:hover {
    animation: elastic 0.6s ease;
}

@keyframes elastic {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Shake Effect */
.shake:hover {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ============================================
   ENHANCED BACKGROUND EFFECTS
   ============================================ */

/* Animated Gradient Background */
.gradient-bg {
    background: linear-gradient(-45deg, #bc493c, #e05747, #f7d991, #bc493c);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particle Effect Background */
.particles {
    position: relative;
    overflow: hidden;
}

.particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particles-move 20s linear infinite;
}

@keyframes particles-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -100px); }
}

/* ============================================
   ENHANCED SCROLL EFFECTS
   ============================================ */

/* Smooth Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Effect */
.parallax {
    transition: transform 0.1s ease-out;
}

/* ============================================
   ENHANCED FORM ELEMENTS
   ============================================ */

/* Floating Label Effect */
.floating-label {
    position: relative;
}

.floating-label input {
    padding: 15px 10px 5px 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.floating-label label {
    position: absolute;
    top: 15px;
    left: 10px;
    transition: all 0.3s ease;
    pointer-events: none;
    color: #999;
}

.floating-label input:focus,
.floating-label input:not(:placeholder-shown) {
    border-color: #bc493c;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 2px;
    font-size: 12px;
    color: #bc493c;
}

/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Mobile-First Hover States */
@media (hover: hover) {
    .hover-only:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .touch-friendly {
        transform: none !important;
        transition: background-color 0.3s ease;
    }
    
    .touch-friendly:active {
        background-color: rgba(188, 73, 60, 0.1);
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus Indicators */
.focus-visible {
    outline: 3px solid #bc493c;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .contrast-enhanced {
        border: 2px solid currentColor;
        background: transparent;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Transform Utils */
.scale-on-hover:hover { transform: scale(1.05); }
.rotate-on-hover:hover { transform: rotate(5deg); }
.translate-on-hover:hover { transform: translateY(-5px); }

/* Glow Effects */
.glow {
    box-shadow: 0 0 20px rgba(188, 73, 60, 0.5);
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(188, 73, 60, 0.7);
    transition: box-shadow 0.3s ease;
}