/* Portfolio Page Specific Styles */

/* Page Header */
.page-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-align: center;
}

.page-header-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: white;
}

/* Portfolio Filters */
.portfolio-filters {
    padding: 3rem 0;
    background-color: var(--bg-light);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background-color: white;
    color: var(--text-secondary);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Portfolio Gallery */
.portfolio-gallery {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 1;
    transform: scale(1);
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.gallery-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.7) 70%,
        rgba(0, 0, 0, 0.9) 100%
    );
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-info h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.gallery-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.gallery-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.gallery-meta span {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-type {
    background-color: var(--primary-color) !important;
}

.project-duration {
    background-color: var(--secondary-color) !important;
}

.gallery-btn {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.gallery-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background-color: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 2fr 1fr;
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background-color: var(--primary-color);
}

.lightbox-image {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.lightbox-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lightbox-info h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.lightbox-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.lightbox-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lightbox-meta span {
    background-color: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    left: 1rem;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: all;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

/* Animation for gallery items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease-out;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* Loading state */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .page-header-content h1 {
        font-size: 2.5rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-image {
        height: 250px;
    }
    
    .gallery-overlay {
        padding: 1.5rem;
    }
    
    .lightbox-content {
        grid-template-columns: 1fr;
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-image {
        height: 300px;
    }
    
    .lightbox-info {
        padding: 1.5rem;
    }
    
    .lightbox-nav {
        left: 0.5rem;
        right: 0.5rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .page-header-content h1 {
        font-size: 2rem;
    }
    
    .page-header-content p {
        font-size: 1rem;
    }
    
    .portfolio-filters {
        padding: 2rem 0;
    }
    
    .portfolio-gallery {
        padding: 3rem 0;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 1rem;
    }
    
    .gallery-info h3 {
        font-size: 1.125rem;
    }
    
    .gallery-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lightbox-image {
        height: 250px;
    }
    
    .lightbox-info {
        padding: 1rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .gallery-overlay {
        background: linear-gradient(
            to bottom,
            transparent 0%,
            transparent 30%,
            rgba(0, 0, 0, 0.9) 60%,
            rgba(0, 0, 0, 1) 100%
        );
    }
    
    .filter-btn {
        border-width: 3px;
    }
    
    .lightbox {
        background-color: rgba(0, 0, 0, 0.95);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-item {
        animation: none;
    }
    
    .gallery-item:hover {
        transform: none;
    }
    
    .gallery-item:hover .gallery-image img {
        transform: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* Print styles */
@media print {
    .portfolio-filters,
    .lightbox,
    .sticky-quote-bar {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .gallery-overlay {
        position: static;
        opacity: 1;
        background: white;
        color: var(--text-primary);
        padding: 1rem;
    }
    
    .gallery-info h3 {
        color: var(--text-primary);
    }
    
    .gallery-info p {
        color: var(--text-secondary);
    }
    
    .gallery-btn {
        display: none;
    }
}

