/* SEO-Optimized Styles for DIPSHADE */

/* Reading Time Indicator */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-top: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.reading-time i {
    font-size: 0.75rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: #64748b;
}

.breadcrumb a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #94a3b8;
    margin: 0 0.25rem;
}

/* SEO-Friendly Skip Links */
.skip-links {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 4px;
}

.skip-links:focus {
    top: 6px;
}

/* Structured Data Indicators (Development Only) */
.seo-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    z-index: 1000;
    display: none;
}

.seo-indicator.show {
    display: block;
}

/* Performance Optimization Classes */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Critical CSS for above-the-fold content */
.hero-critical {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Preload spinner for better UX */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-title {
        color: #ffffff;
        text-shadow: 2px 2px 4px #000000;
    }
    
    .btn-primary {
        background: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
    }
}

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

/* Print styles for better SEO */
@media print {
    .navbar,
    .footer,
    .cta,
    .demo {
        display: none;
    }
    
    .hero-title {
        color: #000;
        font-size: 2rem;
    }
    
    .features-grid {
        display: block;
    }
    
    .feature-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .reading-time {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }
    
    .seo-indicator {
        bottom: 10px;
        right: 10px;
        font-size: 0.625rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .reading-time {
        background: rgba(99, 102, 241, 0.2);
        border-color: rgba(99, 102, 241, 0.3);
    }
    
    .breadcrumb {
        color: #94a3b8;
    }
    
    .breadcrumb a {
        color: #818cf8;
    }
    
    .breadcrumb a:hover {
        color: #a5b4fc;
    }
}

/* Performance optimization for animations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU acceleration for smooth animations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Content optimization classes */
.content-section {
    scroll-margin-top: 80px; /* For anchor links with fixed header */
}

.highlight-keyword {
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: 0 88%;
    padding: 0 0.1em;
}

/* Schema.org microdata styling */
[itemscope] {
    position: relative;
}

/* Social sharing optimization */
.social-share {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.social-share-btn:hover {
    transform: translateY(-1px);
}

.social-share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.social-share-btn.facebook {
    background: #4267b2;
    color: white;
}

.social-share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.social-share-btn.whatsapp {
    background: #25d366;
    color: white;
}

/* Loading states for better UX */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Error states */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}