/* 
 * Grovally Business Solutions - Custom Styles
 * Professional, clean, with subtle animations
 */

/* Smooth scrolling for the whole site */
html {
    scroll-behavior: smooth;
}

/* Custom focus styles for better accessibility */
*:focus {
    outline: 2px solid rgba(2, 132, 199, 0.5);
    /* primary-600 with opacity */
    outline-offset: 2px;
}

/* Remove focus for mouse users, keep for keyboard */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Custom animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* Animation utility classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.animate-shimmer {
    animation: shimmer 3s infinite linear;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 1000px 100%;
}

/* Custom scrollbar (optional, for webkit browsers) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
    /* gray-800 */
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    /* gray-300 */
    border-radius: 5px;
    transition: background 0.3s;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
    /* gray-600 */
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
    /* gray-400 */
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
    /* gray-500 */
}

/* Selection color */
::selection {
    background-color: rgba(2, 132, 199, 0.3);
    /* primary-600 with opacity */
    color: inherit;
}

.dark ::selection {
    background-color: rgba(2, 132, 199, 0.5);
}

/* Smooth transitions for theme switching */
body * {
    transition-property: color, background-color, border-color, fill, stroke, box-shadow, transform, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Better typography for long content */
.prose {
    max-width: 65ch;
}

/* Custom button hover effects */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hover-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
    z-index: -1;
}

.btn-hover-effect:hover::after {
    transform: translateX(100%);
}

/* Loading spinner for form submissions */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: underline;
        color: #000;
    }
}