/* ===========================
   PORTFOLIO BRIGHT & LIGHTBOX CSS
   Builder Bee Projects - Perfect Portfolio Showcase
   =========================== */

/* Portfolio Section - Bright & Clear Images */
.portfolio {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    position: relative;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

/* Portfolio Items - Bright & Clear */
.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    cursor: pointer;
    transform: translateY(0);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Portfolio Images - Full Brightness, No Cropping */
.portfolio-item img {
    width: 100%;
    height: auto;
    min-height: 250px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
    /* Remove any filters or overlays */
    filter: none !important;
    opacity: 1 !important;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Portfolio Info - Clean & Visible */
.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.portfolio-info h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.portfolio-info p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* Click Indicator */
.portfolio-item::before {
    content: "🔍 Click to enlarge";
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a202c;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.portfolio-item:hover::before {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   LIGHTBOX MODAL SYSTEM
   =========================== */

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Container */
.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-container {
    transform: scale(1);
}

/* Lightbox Image */
.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

/* Lightbox Info */
.lightbox-info {
    padding: 20px;
    background: #fff;
    color: #1a202c;
}

.lightbox-info h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a202c;
}

.lightbox-info p {
    font-size: 1rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1a202c;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: #fff;
    transform: scale(1.1);
}

/* Navigation Arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1a202c;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ===========================
   MOBILE RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .portfolio-item {
        margin: 0 10px;
    }
    
    .portfolio-item::before {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    .lightbox-container {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .lightbox-info {
        padding: 15px;
    }
    
    .lightbox-info h4 {
        font-size: 1.3rem;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .portfolio-item {
        margin: 0 5px;
    }
    
    .portfolio-info {
        padding: 20px 15px 15px;
    }
    
    .portfolio-info h4 {
        font-size: 1.2rem;
    }
    
    .portfolio-info p {
        font-size: 0.9rem;
    }
    
    .lightbox-info {
        padding: 12px;
    }
    
    .lightbox-info h4 {
        font-size: 1.1rem;
    }
    
    .lightbox-info p {
        font-size: 0.9rem;
    }
}

/* ===========================
   ACCESSIBILITY ENHANCEMENTS
   =========================== */

/* Focus States */
.portfolio-item:focus {
    outline: 3px solid #f6ad55;
    outline-offset: 2px;
}

.lightbox-close:focus,
.lightbox-nav:focus {
    outline: 3px solid #f6ad55;
    outline-offset: 2px;
}

/* Screen Reader Support */
.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;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .portfolio-info {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .lightbox-close,
    .lightbox-nav {
        background: #fff;
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .portfolio-item,
    .portfolio-item img,
    .lightbox-overlay,
    .lightbox-container {
        transition: none;
    }
    
    .portfolio-item:hover {
        transform: none;
    }
    
    .portfolio-item:hover img {
        transform: none;
    }
}

