/* Project Detail Container */
.project-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    color: #333;
}

/* Project Header */
.project-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 20px;
    color: #fff;
}

.project-type {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: #ff5722;
    color: #fff;
    border-radius: 25px;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 3rem;
    margin: 1rem 0;
    background: linear-gradient(45deg, #fff, #ff5722);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.project-category a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-category a:hover {
    color: #ff5722;
}

/* Project Preview Section */
.project-preview {
    margin-bottom: 3rem;
}

.website-preview {
    position: relative;
    margin-bottom: 2rem;
}

.browser-frame {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.browser-header {
    background: #f5f5f5;
    padding: 0.8rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

.browser-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.browser-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-buttons span:nth-child(1) { background: #ff5f57; }
.browser-buttons span:nth-child(2) { background: #ffbd2e; }
.browser-buttons span:nth-child(3) { background: #28c940; }

.browser-address {
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    flex-grow: 1;
    font-size: 0.9rem;
    color: #666;
}

.browser-content {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.browser-content img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visit-website {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #ff5722;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.visit-website:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.3);
}

/* Featured Image (for non-website projects) */
.featured-image {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 2rem;
}

.featured-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    background: #f9f9f9;
}

/* Project Details */
.project-details {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.project-description img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

.project-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: #24292e;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.github-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(36, 41, 46, 0.3);
}

/* Gallery Section */
.project-gallery {
    margin-bottom: 3rem;
}

.project-gallery h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-thumb {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-thumb:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

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

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

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
}

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

.thumb-overlay i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.thumb-overlay span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Full-Screen Carousel */
.carousel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.carousel-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.carousel-close:hover {
    background: #ff5722;
    border-color: #ff5722;
    transform: rotate(90deg);
}

.carousel-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

.carousel-prev {
    left: 2rem;
}

.carousel-next {
    right: 2rem;
}

.carousel-container {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    display: flex;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.carousel-caption {
    margin-top: 1.5rem;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    border-radius: 25px;
    max-width: 80%;
}

.carousel-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1.1rem;
    z-index: 10002;
}

/* Video Section */
.project-video {
    margin-bottom: 3rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Animations */
@keyframes titleGlow {
    from {
        filter: drop-shadow(0 0 2px rgba(255, 87, 34, 0.3));
    }
    to {
        filter: drop-shadow(0 0 10px rgba(255, 87, 34, 0.6));
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-detail-container {
        padding: 1rem;
    }

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

    .gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .gallery-thumb {
        height: 220px;
    }

    .featured-image img {
        max-height: 400px;
    }

    .project-links {
        flex-direction: column;
    }

    .browser-header {
        padding: 0.5rem;
    }

    .browser-buttons span {
        width: 8px;
        height: 8px;
    }

    .browser-address {
        font-size: 0.8rem;
    }

    .carousel-close {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .carousel-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .carousel-prev {
        left: 1rem;
    }

    .carousel-next {
        right: 1rem;
    }

    .carousel-slide img {
        max-height: 70vh;
    }
}
