/* ========================================
    PORTFOLIO PAGE STYLES
======================================== */

/* Page Header */
.portfolio-page-header {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
}

.portfolio-page-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.portfolio-page-bg img {
    width: 100%;
    height: 140%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
}

.portfolio-page-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
    z-index: 2;
}


.portfolio-page-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #ffffff;
    padding: 20px;
}

.portfolio-page-content h1 {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 0px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.portfolio-page-content p {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.9;
}

/* Gallery Section */
.portfolio-gallery-section {
    padding: 80px 0;
    background: var(--light);
}



.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: var(--gray);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 137, 196, 0);
    transition: background 0.3s ease;
}

.gallery-item:hover::after {
    background: rgba(30, 137, 196, 0.2);
}

/* Video Items */
.video-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: var(--gray);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(30, 137, 196, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: background 0.3s ease;
}

.video-thumbnail:hover .video-play-icon {
    background: var(--primary);
}

.video-player {
    width: 100%;
    height: 100%;
    display: none;
}

/* Back Button */
.portfolio-back-section {
    padding: 40px 0 80px;
    background: var(--light);
}


.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--gray);
    color: var(--light);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--primary);
    color: var(--light);
}

.back-button i {
    font-size: 14px;
}

/* Lightbox for Gallery */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.dark-mode .lightbox {
    background: rgba(0, 0, 0, 0.95);
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 40px;
    cursor: pointer;
    z-index: 4001;
}

body.dark-mode .lightbox-close {
    color: var(--light);
}


.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4001;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: var(--dark);
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    pointer-events: auto;
}

body.dark-mode .lightbox-nav {
    background: rgba(255, 255, 255, 0.2);
    color: var(--light);
}

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

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-page-header {
        height: 40vh;
        min-height: 300px;
    }
    
    .portfolio-page-content h1 {
        font-size: 40px;
    }
    
    .portfolio-page-content p {
        font-size: 18px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

/* ========================================
    DARK MODE OVERRIDE - ONLY BACKGROUND COLORS
    This removes ALL dark mode styling from style.css
======================================== */

/* Remove dark mode background changes - keep everything light */
body.dark-mode {
    background-color: #fff !important;
    color: #222 !important;
}

body.dark-mode .mobile-menu {
    background: #fff !important;
}

body.dark-mode .portfolio-gallery-section {
    background: #1a1a1a !important;
}

body.dark-mode .portfolio-back-section {
    background: #fff !important;
}

body.dark-mode .gallery-item {
    background: #ddd;
}

body.dark-mode .back-button {
    background: #777;
    color: #fff !important;
}

body.dark-mode .back-button:hover {
    background: #1e89c4;
}

body.dark-mode .video-item {
    background: #ddd;
}

body.dark-mode .theme-toggle {
    background: #1e89c4 !important;
    color: #fff !important;
}

body.dark-mode .lightbox {
    background: rgba(0,0,0,0.95);
}

body.dark-mode .lightbox-close {
    color: #ffffff;
}

body.dark-mode .lightbox-close:hover {
    color: #1e89c4;
}

body.dark-mode .lightbox-nav {
    background: rgba(255, 255, 255, 0.2);
    color: var(--light);
}
