/* ========================================
   GLOBAL ANIMATIONS & TRANSITIONS
   ======================================== */

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

a, button, .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BOX SHADOWS
   ======================================== */

/* Elevation levels */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: box-shadow 0.3s ease;
}

.shadow {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    transition: box-shadow 0.3s ease;
}

.shadow-lg {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    transition: box-shadow 0.3s ease;
}

.shadow-xl {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
    transition: box-shadow 0.3s ease;
}

/* Green-themed shadows */
.shadow-green {
    box-shadow: 0 4px 20px rgba(93, 189, 126, 0.12);
    transition: box-shadow 0.3s ease;
}

.shadow-green-lg {
    box-shadow: 0 8px 32px rgba(93, 189, 126, 0.2);
    transition: box-shadow 0.3s ease;
}

/* Hover shadow effects */
.hover-shadow:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.hover-shadow-green:hover {
    box-shadow: 0 12px 40px rgba(93, 189, 126, 0.25) !important;
}

/* ========================================
   CARD ANIMATIONS
   ======================================== */

.card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Card with lift effect */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

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

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

/* Scale on hover */
.hover-scale {
    transition: transform 0.3s ease;
}

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

/* Grow effect */
.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.1);
}

/* Zoom image effect */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.15);
}

/* Float effect */
.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-5px);
}

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

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(93, 189, 126, 0.6);
}

/* ========================================
   BUTTON ANIMATIONS
   ======================================== */

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Button ripple effect */
.btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   IMAGE ANIMATIONS
   ======================================== */

.image-card {
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.image-card img {
    transition: transform 0.5s ease, filter 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.1);
}

/* Image overlay effect */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.image-overlay:hover::before {
    opacity: 1;
}

/* ========================================
   ICON ANIMATIONS
   ======================================== */

.icon-box {
    transition: all 0.3s ease;
}

.card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

.icon-circle {
    transition: all 0.3s ease;
}

.icon-circle:hover {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 4px 16px rgba(93, 189, 126, 0.3);
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

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

.shimmer {
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Fade in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ========================================
   SECTION BACKGROUNDS
   ======================================== */

/* Remove linear gradients, use solid colors with subtle patterns */
section {
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

section.bg-light {
    background-color: #f8f9fa !important;
}

section.bg-green {
    background-color: #f0f9f4 !important;
}

section.bg-gray {
    background-color: #f5f5f5 !important;
}

/* Subtle pattern overlay (optional) */
.pattern-overlay {
    position: relative;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.03) 20px
        );
}

/* ========================================
   TEXT ANIMATIONS
   ======================================== */

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, #5dbd7e 0%, #3a9e5d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typing animation */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end);
}

/* ========================================
   BORDER ANIMATIONS
   ======================================== */

.border-animate {
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.border-animate::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #5dbd7e;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ========================================
   FORM ANIMATIONS
   ======================================== */

.form-control {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: #5dbd7e;
    box-shadow: 0 0 0 0.2rem rgba(93, 189, 126, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   NAVIGATION ANIMATIONS
   ======================================== */

nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5dbd7e;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

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

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

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   UTILITY ANIMATIONS
   ======================================== */

/* Rotate on hover */
.rotate-on-hover {
    transition: transform 0.3s ease;
}

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

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

.bounce {
    animation: bounce 1s infinite;
}

/* Shake effect */
@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;
}

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

.spin {
    animation: spin 2s linear infinite;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .hover-lift:hover,
    .hover-scale:hover,
    .card:hover {
        transform: none;
    }

    .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Use will-change for frequently animated elements */
.card,
.btn,
.hover-lift,
.hover-scale,
.image-card {
    will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
