/* Portfolio Detail Page Styles */

.portfolio-detail {
    min-height: 100vh;
    padding-top: 40px;
}

/* Back Button */
.back-button-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
}

.back-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.back-button i {
    font-size: 0.9rem;
}

/* Project Hero Section - Two Column Layout */
.project-hero {
    padding: 40px 0 80px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 60px;
    align-items: center;
}

/* Left Column - Text Content */
.hero-left {
    flex: 1;
}

.project-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(157, 78, 173, 0.2);
    border: 1px solid rgba(157, 78, 173, 0.4);
    border-radius: 50px;
    color: #b57ee0;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-description {
    margin-bottom: 30px;
}

.project-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.project-description p:last-child {
    margin-bottom: 0;
}

.live-site-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #6d28d9;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.2);
}

.live-site-button:hover {
    background: #5b21b6;
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(109, 40, 217, 0.3);
}

/* Mobile Button Container (Hidden by default) */
.live-site-button-mobile-container {
    display: none;
}

/* Mobile Cover Image (Hidden by default) */
.mobile-cover-image {
    display: none;
}

/* Stacked Gallery (Hidden on larger screens) */
.stacked-gallery {
    display: none;
}

/* Gallery Title (Hidden on Desktop) */
.gallery-title-mobile {
    display: none;
}

/* Right Column - Hero Image */
.hero-right {
    flex: 1;
}

.hero-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: block;
    transition: all 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    pointer-events: none;
}

.white-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    opacity: 1;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.gallery-badge {
    padding: 12px 24px;
    background: transparent;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.7;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.hero-image-wrapper:hover .white-overlay {
    opacity: 0;
}

.hero-image-wrapper:hover .gallery-badge {
    opacity: 1;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.section-heading {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 30px;
}

/* Project Features */
.project-features {
    padding: 60px 0;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.features-container .section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.feature-card {
    background: rgba(10, 10, 30, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(157, 78, 173, 0.4);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #9d4ead 0%, #b57ee0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

/* Other Work Section */
.other-work-section {
    padding: 60px 0;
}

.other-work-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.other-work-container .section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.portfolio-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.portfolio-preview-box {
    background: rgba(10, 10, 30, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.portfolio-preview-box:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.preview-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

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

.preview-info {
    padding: 20px;
}

.preview-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.preview-tags {
    font-size: 0.85rem;
    color: #b57ee0;
    line-height: 1.4;
}

/* Project CTA */
.project-cta {
    padding: 60px 0 80px;
    text-align: center;
}

.cta-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-heading {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 25px;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #6d28d9;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.2);
}

.cta-button:hover {
    background: #5b21b6;
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(109, 40, 217, 0.3);
}

.back-button-bottom {
    display: inline-block;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

.back-button-bottom:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.9);
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        gap: 40px;
    }

    .project-title {
        font-size: 2rem;
    }

    .project-description p {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-heading {
        font-size: 1.6rem;
    }

    .stacked-gallery {
        display: block;
    }

    .stacked-gallery-container {
        display: none;
    }

    .gallery-title-mobile {
        display: block;
        margin-top: 60px;
        margin-bottom: 30px;
        font-size: 1.8rem;
        font-weight: 600;
        color: white;
        text-align: center;
    }
}

@media screen and (max-width: 470px) {
    .live-site-button {
        display: flex;
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .project-title {
        font-size: 1.6rem;
    }

    .back-button-container,
    .hero-container,
    .features-container,
    .other-work-container,
    .cta-container {
        padding: 0 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    z-index: 10001;
    max-width: 1000px;
    max-height: 75vh;
    width: 90%;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    animation: scaleIn 0.3s ease;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
}

.lightbox-counter {
    text-align: center;
    color: white;
    font-size: 1rem;
    margin-top: 20px;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10002;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-arrow:hover {
    background: linear-gradient(135deg, #9d4ead 0%, #b57ee0 100%);
    border-color: transparent;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lightbox Mobile Styles */
@media screen and (max-width: 768px) {
    .lightbox-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .lightbox-content {
        width: 95%;
        max-height: 70vh;
    }
}

/* Small Mobile - Stacked Gallery (0-520px) */
@media screen and (max-width: 520px) {
    /* Show stacked gallery */
    .stacked-gallery {
        display: block;
        padding: 40px 20px;
    }

    /* CRITICAL: Gallery container must remain visible on mobile
       Using !important to ensure this rule always takes precedence
       over the 768px hiding rule, regardless of cascade order changes */
    .stacked-gallery-container {
        display: flex !important;
        flex-direction: column;
        gap: 25px;
        max-width: 100%;
    }

    .stacked-gallery-image {
        width: 100%;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    /* Hide hero button, show mobile button */
    .hero-left .live-site-button {
        display: none !important;
    }

    .live-site-button-mobile-container {
        display: flex;
        justify-content: center;
        padding: 20px 20px 40px 20px;
        margin-bottom: 200px;
    }

    .live-site-button-mobile {
        display: inline-flex;
        width: auto;
        padding: 16px 45px;
    }

    /* Show mobile cover image */
    .mobile-cover-image {
        display: block;
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    /* Hide lightbox triggers */
    .image-overlay,
    .gallery-badge {
        display: none !important;
    }

    /* Disable lightbox modal */
    .lightbox {
        display: none !important;
    }

    /* Hide hero image at mobile to prevent duplicate display
       Gallery images (box1-4.png) in separate section remain visible */
    .hero-right {
        display: none;
    }

    /* Reduce hero section bottom padding when hero image is hidden
       Gallery title's 60px top margin provides sufficient spacing */
    .project-hero {
        padding-bottom: 0;
    }
}
