/* Custom Animations and Styles */

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

.pulse-animation {
    animation: pulse 2s infinite;
}

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

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.float-animation-delay {
    animation: float 3s ease-in-out 1s infinite;
}

/* Tool Card Hover */
.tool-card {
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-10px);
}

/* Category Box Hover */
.category-box {
    transition: all 0.3s ease;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Filter Button Active State */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #eab308 !important;
    color: #1f2937 !important;
}

/* FAQ Accordion */
.faq-btn i {
    transition: transform 0.3s ease;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content:not(.hidden) {
    max-height: 500px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section Background Pattern */
.hero-pattern {
    background-image: 
        linear-gradient(to right, rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

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

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.card-shine:hover::before {
    left: 100%;
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
}

/* Mobile Menu Slide */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

/* Button 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.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 200px;
    height: 200px;
}

/* Star Rating */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

/* Badge Pulse */
@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(234, 179, 8, 0);
    }
}

.badge-pulse {
    animation: badgePulse 2s infinite;
}

/* Grid Fade In */
.grid-fade-in > * {
    animation: fadeIn 0.6s ease-out backwards;
}

.grid-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.grid-fade-in > *:nth-child(2) { animation-delay: 0.2s; }
.grid-fade-in > *:nth-child(3) { animation-delay: 0.3s; }
.grid-fade-in > *:nth-child(4) { animation-delay: 0.4s; }
.grid-fade-in > *:nth-child(5) { animation-delay: 0.5s; }
.grid-fade-in > *:nth-child(6) { animation-delay: 0.6s; }

/* No Select */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .tool-card:hover {
        transform: none;
    }
    
    .category-box:hover {
        transform: scale(1.02);
    }
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1e3a8a;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}