/**
 * Camera Categories Section Styles
 * Version: 1.1.0
 * Beautiful modern design with glassmorphism effects
 */

/* Main Section Styling */
.camera-categories-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 0.95) 0%,
        rgba(26, 26, 53, 0.9) 50%,
        rgba(15, 15, 35, 0.95) 100%
    );
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Background Elements */
.categories-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.categories-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 40% 40%, rgba(72, 219, 251, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.03) 0%, transparent 50%);
}

/* Container */
.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.categories-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.categories-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
    letter-spacing: -0.5px;
}

.categories-subtitle {
    font-size: 1.3rem;
    color: #cbd5e0;
    margin-bottom: 30px;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

.header-accent-line {
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb);
    margin: 0 auto;
    border-radius: 2px;
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

/* Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    will-change: transform;
    transform: translateZ(0);
    max-width: 1200px;
    margin: 0 auto;
}

/* Slideshow mode - disable grid when slideshow is active */
.camera-categories-section.camera-slideshow-enabled .categories-grid,
.camera-categories-section.camera-slideshow-enabled .camera-category-grid {
    display: flex;
    grid-template-columns: none;
}

/* Card Styling */
.category-card {
    position: relative;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.4);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: visible;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-height: 360px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    contain: layout style paint;
    will-change: transform;
    z-index: 1;
    pointer-events: auto;
}

/* Disable hover effects when in slideshow inactive state */
.camera-categories-section.camera-slideshow-enabled .category-card.camera-card-inactive:hover {
    transform: scale(0.95) !important;
    border-color: rgba(71, 85, 105, 0.4) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    z-index: 1 !important;
}

.category-card:hover {
    transform: translateY(-12px) scale(1.01);
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 8px 30px rgba(255, 107, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10;
}

/* In slideshow mode, ensure cards don't overlap controls */
.camera-categories-section.camera-slideshow-enabled .category-card:hover {
    z-index: 100 !important;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

/* Decorative Pattern Overlay for Each Card - DISABLED */
.category-card::after {
    content: none;
}

.category-card:hover::after {
    content: none;
}

/* Unique category patterns - DISABLED */
.category-card[data-category="compact"]::after,
.category-card[data-category="mirrorless"]::after,
.category-card[data-category="dslr"]::after,
.category-card[data-category="fullframe"]::after,
.category-card[data-category="aps-c"]::after,
.category-card[data-category="vlogging"]::after,
.category-card[data-category="aerial"]::after,
.category-card[data-category="360"]::after {
    content: none;
}

/* Featured Card */
.category-card.featured-category {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(30, 64, 175, 0.25) 100%);
    border-color: rgba(79, 70, 229, 0.5);
}

.category-card.featured-category:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.35) 0%, rgba(30, 64, 175, 0.35) 100%);
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.6);
}

/* Category Count Badge */
.category-count {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    pointer-events: none;
}

.category-card:hover .category-count {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5) 0%, rgba(139, 92, 246, 0.5) 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Card Content */
.category-card-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    pointer-events: none;
}

.category-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 4;
}

/* Add decorative line under header */
.category-card-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.6) 0%, transparent 100%);
    border-radius: 2px;
    pointer-events: none;
}

.category-icon {
    font-size: 2.5rem;
    z-index: 5;
    position: relative;
    transition: transform 0.3s ease;
    color: #48dbfb;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    padding: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 15px rgba(72, 219, 251, 0.4));
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: #f1f5f9;
    transition: color 0.3s ease;
    line-height: 1.3;
    z-index: 5;
    pointer-events: none;
}

.category-card:hover .category-title {
    color: #feca57;
    text-shadow: 0 0 20px rgba(254, 202, 87, 0.5);
}

.category-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 15px;
    flex-grow: 1;
    z-index: 3;
    pointer-events: none;
}

/* Key Specs Section */
.category-specs {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(99, 102, 241, 0.5);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    z-index: 3;
    pointer-events: none;
}

.category-specs-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.category-specs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spec-item {
    padding: 4px 8px;
    background: rgba(72, 219, 251, 0.1);
    color: #48dbfb;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(72, 219, 251, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-card:hover .spec-item {
    background: rgba(72, 219, 251, 0.2);
    border-color: rgba(72, 219, 251, 0.4);
    transform: translateY(-1px);
}

/* CTA */
.category-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    margin-top: auto;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 4;
    pointer-events: none;
}

.category-card:hover .category-cta {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(72, 219, 251, 0.3);
}

.cta-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

.cta-arrow {
    font-size: 0.9rem;
    color: #48dbfb;
    transition: transform 0.3s ease;
}

.category-card:hover .cta-arrow {
    transform: translateX(5px);
}

/* Remove the particleFloat animation */
/* @keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translateY(-20px) scale(1.05);
        opacity: 0.8;
    }
} */

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8), 0 0 30px rgba(254, 202, 87, 0.4);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .categories-title {
        font-size: 2.8rem;
    }
    
    .categories-subtitle {
        font-size: 1.1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .camera-categories-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .categories-title {
        font-size: 2.4rem;
    }
    
    .category-card {
        padding: 24px;
        min-height: 420px;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .category-cta {
        padding: 14px 20px;
    }
    
    .cta-text {
        font-size: 0.85rem;
    }
}
