/* Gallery Page Styles - Using Portfolio Header */
.page-header.portfolio-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Floating Orbs Design Elements */
.page-header.portfolio-header::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    border-radius: 50%;
    animation: floatOrb 8s ease-in-out infinite;
    pointer-events: none;
}

.page-header.portfolio-header::after {
    content: '';
    position: absolute;
    top: 60%;
    right: 15%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    border-radius: 50%;
    animation: floatOrb 6s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes floatOrb {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) scale(1); 
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-20px) translateX(10px) scale(1.1); 
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-10px) translateX(-5px) scale(0.9); 
        opacity: 0.4;
    }
    75% { 
        transform: translateY(-15px) translateX(8px) scale(1.05); 
        opacity: 0.7;
    }
}

.page-header.portfolio-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.page-header.portfolio-header p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    font-weight: 300;
    letter-spacing: 0.01em;
}

.gallery-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category Tabs - Light & Professional */
.gallery-categories {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 1rem 2.5rem;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.category-tab:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f1f5f9;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.category-tab:hover::before {
    left: 100%;
}

.category-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

/* Main Gallery - Using Portfolio Structure */
.portfolio-main {
    padding: 0 0 80px;
}

.portfolio-section {
    margin-bottom: 80px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    position: relative;
}

/* Subtle Background Pattern for Gallery */
.portfolio-grid::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
    background-size: 100% 100%, 100% 100%;
    z-index: -1;
    pointer-events: none;
}

.gallery-item {
    background: var(--background-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.gallery-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.gallery-image-container {
    height: 250px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    -webkit-image-smoothing: high-quality !important;
    -moz-image-smoothing: high-quality !important;
    image-rendering: high-quality !important;
    /* Smooth scaling */
    transform-origin: center center;
    backface-visibility: hidden;
    /* Ensure proper display */
    display: block;
    max-width: 100%;
    max-height: 100%;
}



.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.view-full-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-full-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scale(1.1);
}

.gallery-info {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.gallery-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.gallery-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.gallery-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gallery-tags span {
    background: var(--background-light);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
}

.close-lightbox {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 0;
}

.close-lightbox:hover {
    color: white;
}

#lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Maximum quality for lightbox */
    image-rendering: auto !important;
    -webkit-image-smoothing: high-quality !important;
    -moz-image-smoothing: high-quality !important;
    image-rendering: high-quality !important;
}

.lightbox-caption {
    margin-top: 1rem;
    color: white;
}

.lightbox-caption h3 {
    font-size: 1.5rem;
    margin: 0;
}

/* Footer */
.gallery-footer {
    background: var(--background-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}





/* Responsive Design */
@media (max-width: 768px) {
    .page-header.portfolio-header h1 {
        font-size: 2.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .category-tab {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header.portfolio-header h1 {
        font-size: 2rem;
    }
    
    .page-header.portfolio-header p {
        font-size: 1.1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
