/* =============================================
   BrightGrid Technologies - Custom Styles
   Professional Enhancement Stylesheet
   ============================================= */

/* Logo Styling - Transparent Background */
img[alt="Brightgrid Technologies Logo"] {
    object-fit: contain;
    display: block;
}



/* Hero Grid Pattern */
.hero-grid {
    background-image: 
        linear-gradient(rgba(30, 58, 138, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 58, 138, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridSlide 30s linear infinite;
}

@keyframes gridSlide {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

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

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e3a8a 0%, #10b981 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #10b981 0%, #1e3a8a 100%);
}

/* Navigation Active Link Animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a 0%, #10b981 100%);
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Enhanced Button Hover Effects */
.btn-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Card Hover Effects */
.card-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-lift:hover {
    transform: translateY(-8px);
}

/* Pulse Animation for Icons */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.pulse-icon {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

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

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

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

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Product Card Image Zoom */
.product-image-wrapper {
    overflow: hidden;
    position: relative;
}

.product-image-wrapper img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-animated {
    animation: countUp 0.8s ease-out;
}

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

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

/* Border Gradient Animation */
@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.border-gradient {
    background: linear-gradient(90deg, #1e3a8a, #10b981, #1e3a8a);
    background-size: 200% 100%;
    animation: borderRotate 3s linear infinite;
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.text-reveal {
    animation: textReveal 0.8s ease-out;
}

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

.icon-rotate:hover {
    transform: rotate(360deg);
}

/* Badge Shine Effect */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.badge-shine {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 100%;
    animation: shine 3s infinite;
}

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

#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

/* Section Divider Wave */
.wave-divider {
    position: relative;
    background: #ffffff;
}

.wave-divider::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%230f172a'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
    background-size: cover;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: #0f172a;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Performance Optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    image-rendering: -webkit-optimize-contrast;
}

/* Focus Visible Styles */
*:focus-visible {
    outline: 3px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .text-slate-600 {
        color: #000000;
    }
    
    .border-slate-100 {
        border-color: #000000;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Custom dark mode styles can be added here */
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(30, 58, 138, 0.1);
    border-top: 4px solid #1e3a8a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loader */
.skeleton-box {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Utility Classes */
.backdrop-blur-heavy {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.shadow-glow-blue {
    box-shadow: 0 0 20px rgba(30, 58, 138, 0.3);
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Enhanced Focus States for Accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #10b981;
    outline-offset: 2px;
}

/* Custom Selection Color */
::selection {
    background-color: #10b981;
    color: white;
}

::-moz-selection {
    background-color: #10b981;
    color: white;
}

/* Scroll Margin for Anchor Links */
:target {
    scroll-margin-top: 80px;
}

/* Enhanced Image Loading */
img {
    transition: opacity 0.3s ease;
}

img.loading {
    opacity: 0.5;
}

img.loaded {
    opacity: 1;
}

/* Grid Overlay for Development (Remove in Production) */
.dev-grid {
    display: none;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .desktop-hidden {
        display: none !important;
    }
}