/**
 * Lens Categories Navigation
 * Enhanced navigation styling for lens categories
 * Version: 1.0.0
 * CSP-Safe: No inline styles, external resources validated
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    --lens-nav-bg: linear-gradient(135deg, #1a1a2e 0%, #3e1a3e 50%, #1a1a2e 100%);
    --lens-nav-card-bg: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.03));
    --lens-nav-border: rgba(139, 92, 246, 0.15);
    --lens-nav-border-hover: rgba(139, 92, 246, 0.4);
    --lens-nav-primary: #8b5cf6;
    --lens-nav-secondary: #9333ea;
    --lens-nav-accent: rgba(139, 92, 246, 0.12);
    --lens-nav-text: #ffffff;
    --lens-nav-text-secondary: rgba(255, 255, 255, 0.8);
    --lens-nav-text-muted: rgba(255, 255, 255, 0.75);
    --lens-nav-shadow: 0 10px 40px rgba(139, 92, 246, 0.1);
    --lens-nav-shadow-hover: 0 20px 60px rgba(139, 92, 246, 0.2);
    --lens-nav-transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --lens-nav-card-min-height: 420px;
    --lens-nav-border-radius: 24px;
    --lens-nav-border-radius-sm: 18px;
    --lens-nav-icon-size: 2.2rem;
}

/* Fallback for browsers without custom property support */
@supports not (--css: variables) {
    .lens-navigation-section {
        background: linear-gradient(135deg, #1a1a2e 0%, #3e1a3e 50%, #1a1a2e 100%);
    }
}

/* ============================================
   LENS CATEGORIES NAVIGATION
   ============================================ */

.lens-navigation-section {
    position: relative;
    padding: 100px 0;
    background: var(--lens-nav-bg);
    overflow: hidden;
    contain: layout style;
}

/* SECURITY: Override any injected inline styles */
.lens-navigation-section[style*="background"] {
    animation: none !important;
}

.lens-nav-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.lens-nav-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: particleFloat 35s infinite linear;
    opacity: 0.7;
    will-change: transform;
}

.lens-nav-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 70%, rgba(147, 51, 234, 0.08) 0%, transparent 50%);
    animation: gradientShift 25s infinite ease-in-out;
}

/* ============================================
   NAVIGATION HEADER
   ============================================ */

.lens-nav-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

.nav-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--lens-nav-accent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 50px;
    padding: 12px 28px;
    margin-bottom: 30px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    box-shadow: var(--lens-nav-shadow);
    transition: all 0.3s ease;
}

.nav-category-badge:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 15px 50px rgba(139, 92, 246, 0.25);
    border-color: var(--lens-nav-border-hover);
}

.nav-badge-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
    pointer-events: none;
}

.lens-nav-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lens-nav-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--lens-nav-text-secondary);
    font-style: italic;
    margin-bottom: 30px;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.nav-accent-line {
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, var(--lens-nav-primary), var(--lens-nav-secondary));
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* ============================================
   NAVIGATION GRID
   ============================================ */

.lens-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

/* ============================================
   NAVIGATION CARDS
   ============================================ */

.lens-nav-card {
    background: var(--lens-nav-card-bg);
    border: 1px solid var(--lens-nav-border);
    border-radius: var(--lens-nav-border-radius);
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all var(--lens-nav-transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow: var(--lens-nav-shadow);
    min-height: var(--lens-nav-card-min-height);
    display: flex;
    flex-direction: column;
    backface-visibility: hidden;
}

.lens-nav-card:hover {
    transform: translate3d(0, -8px, 0) scale(1.02);
    border-color: var(--lens-nav-border-hover);
    box-shadow: var(--lens-nav-shadow-hover);
    text-decoration: none;
    color: inherit;
}

.lens-nav-card:focus-visible {
    outline: 2px solid var(--lens-nav-primary);
    outline-offset: 2px;
}

/* Specialized hover effects for each lens type */
.prime-nav:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
}

.zoom-nav:hover {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.25);
}

.macro-nav:hover {
    border-color: rgba(17, 153, 142, 0.5);
    box-shadow: 0 20px 60px rgba(17, 153, 142, 0.25);
}

.telephoto-nav:hover {
    border-color: rgba(255, 140, 0, 0.5);
    box-shadow: 0 20px 60px rgba(255, 140, 0, 0.25);
}

.wide-nav:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.25);
}

.specialty-nav:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.25);
}

.nav-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s ease;
}

.lens-nav-card:hover .nav-card-glow {
    opacity: 1;
}

/* Enhanced Image Container */
.nav-image-container {
    height: 120px;
    margin-bottom: 25px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    background: rgba(139, 92, 246, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.lens-nav-card:hover .nav-image-container {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.1);
}

.nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.08);
    border: 2px solid var(--lens-nav-border);
    transition: all 0.3s ease;
}

.lens-nav-card:hover .nav-icon-wrapper {
    transform: scale(1.05);
    border-color: var(--lens-nav-border-hover);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
}

.nav-icon {
    font-size: var(--lens-nav-icon-size);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
    transition: all 0.3s ease;
    pointer-events: none;
}

.lens-nav-card:hover .nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.5));
}

.nav-icon-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.lens-nav-card:hover .nav-icon-backdrop {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.nav-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(147, 51, 234, 0.03));
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 18px;
}

.lens-nav-card:hover .nav-card-overlay {
    opacity: 1;
}

/* Enhanced Card Content */
.nav-card-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.lens-nav-card:hover .nav-card-title {
    color: #e0e7ff;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.nav-card-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.lens-nav-card:hover .nav-card-description {
    color: rgba(255, 255, 255, 0.95);
}

/* Enhanced Card Specs */
.nav-card-specs {
    margin-bottom: 20px;
    flex: 1;
}

.nav-spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-spec-item:last-child {
    border-bottom: none;
}

.nav-spec-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
    padding-left: 5px;
}

.nav-spec-icon {
    font-size: 1rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.nav-spec-item:hover .nav-spec-icon {
    opacity: 1;
    transform: scale(1.1);
}

.nav-spec-text {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-spec-item:hover .nav-spec-text {
    color: rgba(255, 255, 255, 0.95);
}

/* Enhanced Feature Tags */
.nav-card-features {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.nav-feature-tag {
    background: rgba(139, 92, 246, 0.2);
    color: rgba(139, 92, 246, 1);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.nav-feature-tag:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

/* Enhanced CTA Section */
.nav-card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    margin-top: auto;
    transition: all 0.3s ease;
}

.lens-nav-card:hover .nav-card-cta {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.nav-cta-text {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.lens-nav-card:hover .nav-cta-text {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
}

.nav-cta-arrow {
    font-size: 1.2rem;
    color: rgba(139, 92, 246, 0.8);
    transition: all 0.3s ease;
    transform: translateX(0);
}

.lens-nav-card:hover .nav-cta-arrow {
    color: #8b5cf6;
    transform: translateX(8px);
}

/* Enhanced Floating Elements */
.lens-nav-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-nav-element {
    position: absolute;
    font-size: 1.8rem;
    opacity: 0.1;
    animation: floatNavElement 20s infinite ease-in-out;
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
    transition: all 0.3s ease;
}

.floating-nav-1 { 
    top: 12%; 
    left: 8%; 
    animation-delay: 0s; 
    font-size: 2rem;
}
.floating-nav-2 { 
    top: 25%; 
    right: 15%; 
    animation-delay: 3s; 
    font-size: 1.6rem;
}
.floating-nav-3 { 
    top: 45%; 
    left: 5%; 
    animation-delay: 6s; 
    font-size: 2.2rem;
}
.floating-nav-4 { 
    top: 65%; 
    right: 8%; 
    animation-delay: 9s; 
    font-size: 1.8rem;
}
.floating-nav-5 { 
    bottom: 30%; 
    left: 12%; 
    animation-delay: 12s; 
    font-size: 2rem;
}
.floating-nav-6 { 
    bottom: 15%; 
    right: 18%; 
    animation-delay: 15s; 
    font-size: 1.7rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes particleFloat {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100px, -100px, 0); }
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes floatNavElement {
    0%, 100% { 
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
        opacity: 0.08;
    }
    50% { 
        transform: translate3d(0, -30px, 0) rotate(7deg) scale(1.05);
        opacity: 0.18;
    }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .lens-nav-card,
    .nav-category-badge,
    .nav-icon,
    .floating-nav-element,
    .lens-nav-particles {
        transition: none;
        animation: none;
    }
    
    .lens-nav-card:hover {
        transform: none;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .lens-nav-card {
        border: 2px solid currentColor;
    }
    
    .lens-nav-card:focus-visible {
        outline-width: 3px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --lens-nav-bg: linear-gradient(135deg, #0a0a1e 0%, #2e0a2e 50%, #0a0a1e 100%);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .lens-navigation-section {
        padding: 80px 0;
    }
    
    .lens-nav-header {
        margin-bottom: 60px;
    }
    
    .lens-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .lens-navigation-section {
        padding: 70px 0;
    }
    
    .lens-nav-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 20px;
        padding: 0 15px;
    }
    
    .lens-nav-card {
        min-height: 380px;
        padding: 25px;
    }
    
    .floating-nav-1, .floating-nav-3, .floating-nav-5 {
        display: none;
    }
}

@media (max-width: 576px) {
    .lens-navigation-section {
        padding: 60px 0;
    }
    
    .lens-nav-card {
        min-height: 350px;
        padding: 20px;
    }
    
    .lens-nav-floating-elements {
        display: none;
    }
    
    .lens-nav-particles {
        opacity: 0.4;
        animation-duration: 45s;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .lens-navigation-section {
        background: #ffffff !important;
    }
    
    .lens-nav-background,
    .lens-nav-floating-elements {
        display: none !important;
    }
    
    .lens-nav-card {
        border: 1px solid #cccccc;
        box-shadow: none;
        page-break-inside: avoid;
    }
}
