/* Mesline - Custom CSS */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Text Selection */
::selection {
    background-color: #3b82f6;
    color: white;
}

::-moz-selection {
    background-color: #3b82f6;
    color: white;
}

/* Focus Styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Link Underline Effect */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Page Fade In */
body {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hero Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Hover Effects */
.hover\:-translate-y-1:hover {
    transform: translateY(-4px);
}

/* Card Hover Shadow */
.bg-dark-800:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Button Ripple Effect */
button, a.bg-blue-600 {
    position: relative;
    overflow: hidden;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Spin Animation for Icons */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

/* Mobile Menu Animation */
#mobileMenu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobileMenu.hidden {
    max-height: 0;
    opacity: 0;
}

/* Form Validation */
input:invalid:focus,
textarea:invalid:focus {
    border-color: #ef4444;
}

input:valid:focus,
textarea:valid:focus {
    border-color: #22c55e;
}

/* Footer Link Hover */
footer a:hover {
    padding-left: 4px;
}

footer a {
    transition: all 0.2s ease;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
}

/* Print Styles */
@media print {
    nav, footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .text-gray-400, .text-gray-500 {
        color: #d1d5db !important;
    }
    
    .border-dark-600, .border-dark-700 {
        border-color: #4b5563 !important;
    }
}

/* Spinner */
.spinner {
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

/* Glass Effect */
.glass {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Gradient Border */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Icon Transitions */
i.fa, i.fas, i.fab {
    transition: transform 0.3s ease;
}

/* Stats Counter Animation */
@keyframes countUp {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.stat-number {
    animation: countUp 0.5s ease-out;
}

/* Skip to Content (Accessibility) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}
