/* =========================================
   PORTFOLIO PAGE STYLES
   ========================================= */

/* Portfolio Hero Section */
.portfolio-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-20) 0 var(--space-16);
    overflow: hidden;
}

.portfolio-hero .hero-stats {
    display: flex;
    gap: var(--space-12);
    margin-top: var(--space-8);
}

/* Portfolio Filter Section */
.portfolio-filter-section {
    background: var(--neutral-000);
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--neutral-200);
    position: sticky;
    top: 80px;
    z-index: 40;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.filter-controls {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    border: 2px solid var(--neutral-300);
    background: transparent;
    color: var(--neutral-700);
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 198, 63, 0.3);
}

/* Section Headers Centered */
.section-header-centered {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-12);
    padding: var(--space-12) var(--space-4) 0;
}

.section-header-centered .section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(139, 198, 63, 0.1);
    border: 1px solid rgba(139, 198, 63, 0.2);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.section-header-centered .section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-4);
}

.section-header-centered .section-description {
    font-size: var(--text-lg);
    color: var(--neutral-600);
    line-height: 1.7;
}

/* Full-Width Carousel Wrapper */
.fullwidth-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: 85vh;
    min-height: 600px;
    background: var(--neutral-100);
    overflow: hidden;
    border-radius: var(--radius-lg);
}

/* Catalog wrapper - full height emphasis */
.fullwidth-carousel-wrapper.catalog-wrapper {
    height: 92vh;
    min-height: 700px;
}

.fullwidth-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.fullwidth-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullwidth-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.fullwidth-slide img,
.fullwidth-slide canvas {
    max-width: 95%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
}

/* Catalog PDF - prioritize height */
.catalog-wrapper .fullwidth-slide canvas {
    max-width: 85%;
    max-height: 95%;
    height: 90vh;
    width: auto;
}

/* Background blur for slides */
.fullwidth-slide .slide-bg-blur {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    filter: blur(40px) saturate(1.3);
    opacity: 0.6;
    z-index: 0;
    transform: scale(1.1);
}

.fullwidth-slide img,
.fullwidth-slide canvas {
    position: relative;
    z-index: 1;
}

/* Full-Width Navigation */
.fullwidth-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-6);
    z-index: 20;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
}

.fullwidth-nav .nav-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.fullwidth-nav .nav-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(139, 198, 63, 0.4);
}

.fullwidth-nav .nav-btn:hover svg {
    stroke: white;
}

.fullwidth-nav .nav-btn svg {
    stroke: var(--neutral-800);
    transition: stroke 0.3s ease;
}

/* Full-Width Indicators */
.fullwidth-indicators {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
    z-index: 20;
    padding: var(--space-3) var(--space-4);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
}

.fullwidth-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.fullwidth-indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.fullwidth-indicator.active {
    background: white;
    width: 32px;
    border-radius: var(--radius-full);
}

/* Carousel Info Overlay */
.carousel-info-overlay {
    position: absolute;
    top: var(--space-6);
    left: var(--space-6);
    z-index: 20;
}

.info-content {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.info-badge {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.info-counter {
    font-size: var(--text-2xl);
    color: white;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* Catalog Actions Bar */
.catalog-actions-bar {
    position: absolute;
    bottom: var(--space-6);
    right: var(--space-6);
    display: flex;
    gap: var(--space-3);
    z-index: 20;
}

.action-bar-btn {
    padding: var(--space-3) var(--space-6);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: var(--neutral-800);
    font-size: var(--text-base);
    white-space: nowrap;
    min-width: fit-content;
}

.action-bar-btn span {
    display: inline-block;
}

.action-bar-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.action-bar-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 198, 63, 0.4);
}

.action-bar-btn:hover svg {
    stroke: white;
}

/* Projects Grid - matches Premium Product Portfolio */
.projects-grid,
.portfolio-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.project-card {
    background: var(--neutral-000);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
}

.project-category {
    padding: var(--space-2) var(--space-4);
    background: rgba(139, 198, 63, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-content {
    padding: var(--space-6);
}

.project-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-3);
}

.project-description {
    font-size: var(--text-base);
    color: var(--neutral-600);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.project-stats {
    display: flex;
    gap: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--neutral-200);
}

.project-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.project-stat .stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.project-stat .stat-label {
    font-size: var(--text-xs);
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Portfolio Stats Section */
.portfolio-stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, #6a9730 100%);
    padding: var(--space-16) 0;
    margin: var(--space-16) 0;
}

.stats-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-4);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.stat-card .stat-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
}

.stat-card .stat-icon svg {
    stroke: white;
}

.stat-card .stat-data {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.stat-card .stat-number {
    font-size: var(--text-5xl);
    font-weight: 700;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

.stat-card .stat-number::after {
    content: '+';
    margin-left: var(--space-1);
}

.stat-card .stat-label {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Portfolio Sections Visibility */
.portfolio-gallery-section,
.portfolio-catalog-section,
.portfolio-projects-section {
    transition: all 0.5s ease;
}

.portfolio-gallery-section,
.portfolio-catalog-section {
    padding: var(--space-20) var(--container-padding);
}

.portfolio-gallery-section[data-category].hidden,
.portfolio-catalog-section[data-category].hidden,
.portfolio-projects-section[data-category].hidden {
    display: none;
}

/* Loading State */
.carousel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    height: 100%;
}

.carousel-loading .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--neutral-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.carousel-loading p {
    color: var(--neutral-600);
    font-size: var(--text-lg);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .fullwidth-carousel-wrapper {
        height: 75vh;
    }
    
    .fullwidth-nav .nav-btn {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: var(--space-16) 0 var(--space-12);
    }
    
    .portfolio-hero .hero-stats {
        flex-direction: column;
        gap: var(--space-6);
    }
    
    .filter-controls {
        gap: var(--space-2);
    }
    
    .filter-btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }
    
    .fullwidth-carousel-wrapper {
        height: 60vh;
        min-height: 400px;
    }
    
    .fullwidth-slide img,
    .fullwidth-slide canvas {
        max-width: 90%;
        max-height: 85%;
    }
    
    .fullwidth-nav {
        padding: 0 var(--space-4);
    }
    
    .fullwidth-nav .nav-btn {
        width: 48px;
        height: 48px;
    }
    
    .catalog-actions-bar {
        flex-direction: column;
        gap: var(--space-2);
        right: var(--space-3);
        top: var(--space-3);
        bottom: auto;
        left: auto;
    }
    
    .action-bar-btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .action-bar-btn span {
        display: inline-block;
    }
    
    .action-bar-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .carousel-info-overlay {
        top: var(--space-4);
        left: var(--space-4);
    }
    
    .info-content {
        padding: var(--space-3) var(--space-4);
    }
    
    .info-counter {
        font-size: var(--text-lg);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .stats-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 480px) {
    .section-header-centered .section-title {
        font-size: var(--text-2xl);
    }
    
    .fullwidth-carousel-wrapper {
        height: 50vh;
        min-height: 350px;
    }
    
    .fullwidth-carousel-wrapper.catalog-wrapper {
        height: 60vh;
        min-height: 400px;
    }
    
    .catalog-wrapper .fullwidth-slide canvas {
        max-width: 90%;
        max-height: 85%;
        height: auto;
        width: auto;
    }
    
    .fullwidth-indicators {
        bottom: var(--space-4);
        padding: var(--space-2) var(--space-3);
        gap: var(--space-1);
    }
    
    .fullwidth-indicator {
        width: 8px;
        height: 8px;
    }
    
    .fullwidth-indicator.active {
        width: 24px;
    }
}
