/* ============================================
   ULTRA MODERN PROJECT DETAIL PAGE
   Premium Design with Glassmorphism & Animations
   ============================================ */

/* Container - Ensure it's available */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-light: #a0aec0;
}

/* ============================================
   HERO SECTION
   ============================================ */

.project-detail-modern {
    min-height: 100vh;
    background: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    position: relative;
}

.project-hero-modern {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 87, 108, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-backdrop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Breadcrumb */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
}

.breadcrumb-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
}

.breadcrumb-current {
    color: #fff;
    font-weight: 500;
}

/* Hero Content */
.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: #fff;
}

.project-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
}

/* Action Buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-hero:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Technologies */
.tech-stack {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tech-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.tech-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Image */
.hero-image {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.6s ease;
}

.image-frame:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.main-project-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.image-frame:hover .image-glow {
    opacity: 1;
}

/* ============================================
   CONTENT SECTION
   ============================================ */

.project-content-section {
    position: relative;
    padding: 6rem 0;
    background: linear-gradient(180deg, #24243e 0%, #0f0c29 100%);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

/* Content Cards */
.content-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.card-badge {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-link:hover {
    gap: 0.6rem;
    color: #764ba2;
}

.card-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-description {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* ============================================
   MASONRY GALLERY
   ============================================ */

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.masonry-item {
    break-inside: avoid;
}

.gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.gallery-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.overlay-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.gallery-card:hover .overlay-icon {
    transform: scale(1);
}

.overlay-text {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================
   VIDEO & PREVIEW
   ============================================ */

.video-wrapper,
.preview-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe,
.preview-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.preview-wrapper {
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: #f8f9fa;
}

/* Loading Animation */
.preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10;
    transition: opacity 0.3s ease;
}

.preview-loading p {
    color: white;
    font-size: 1rem;
    margin-top: 1rem;
    font-weight: 500;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fullscreen Mode */
.preview-wrapper.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    z-index: 10000;
    border-radius: 0 !important;
}

.preview-wrapper.fullscreen-mode iframe {
    border-radius: 0 !important;
}

.preview-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.preview-wrapper:hover .preview-overlay {
    opacity: 1;
    pointer-events: all;
}

.preview-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.preview-open-btn:hover {
    transform: scale(1.05);
    background: #000;
}

/* ============================================
   SIDEBAR
   ============================================ */

.content-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Meta List */
.meta-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.meta-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.meta-item.featured {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.meta-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.meta-item.featured .meta-icon {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
}

.meta-content {
    flex: 1;
}

.meta-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.meta-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Action List */
.action-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-item:hover {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.action-item svg {
    flex-shrink: 0;
}

/* Share Buttons */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.share-btn {
    width: 100%;
    aspect-ratio: 1;
    background: #f8f9fa;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.share-btn:hover {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
}

.lightbox-counter {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr 320px;
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        position: static;
    }
    
    .masonry-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .project-hero-modern {
        padding: 6rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-hero {
        width: 100%;
        justify-content: center;
    }
    
    .masonry-gallery {
        grid-template-columns: 1fr;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 576px) {
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .breadcrumb-nav {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
    
    .tech-stack {
        flex-direction: column;
        align-items: flex-start;
    }
}
