/* Project Page Specific Styles */

/* Project Hero Section */
.project-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    padding-top: 90px; /* Increased from 70px to prevent title hiding */
}

.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.3) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
    animation: textureMove 40s linear infinite;
}

.project-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.project-hero-text {
    color: white;
    animation: fadeInUp 1s ease-out;
}

.project-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.project-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-weight: 400;
}

.project-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.project-category,
.project-duration,
.project-team {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 30px;
}

.project-hero-visual {
    position: relative;
    height: 500px;
    display: block !important;
    min-height: 500px;
}

.project-hero-image {
    position: relative;
    width: 100%;
    height: 100%;
    border: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    display: block;
    min-width: 100%;
    min-height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    max-width: 100%;
    min-width: 100%;
    min-height: 100%;
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 5;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-hero-image:hover .hero-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    z-index: 10;
    border-radius: 0 0 20px 20px;
}

.tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-stack .tech-tag {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Project Sections */
.project-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0c0c0c 100%);
    position: relative;
    overflow: hidden;
}

.project-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 25s ease-in-out infinite;
}

.project-section:nth-child(even) {
    background: linear-gradient(135deg, #1a1a1a 0%, #0c0c0c 50%, #1a1a1a 100%);
}

.project-section:nth-child(even)::before {
    animation: backgroundShift 30s ease-in-out infinite reverse;
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.project-content.text-center {
    grid-template-columns: 1fr;
    text-align: center;
}

.project-text.full-width {
    max-width: 800px;
    margin: 0 auto;
}

.project-image-centered {
    margin-top: 40px;
    text-align: center;
}

.project-image-centered img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-image-centered:hover img {
    transform: translateY(-10px);
}

.project-pdf-viewer-centered {
    margin-top: 40px;
    text-align: center;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
}

.project-pdf-viewer-centered:hover {
    transform: translateY(-10px);
}

.project-pdf-viewer-centered .pdf-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
}

/* Multiple Images Grid Layout */
.project-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.project-images-grid-centered {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 40px;
    text-align: center;
}

.project-image-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
}

.project-image-item:hover {
    transform: translateY(-10px);
}

.project-image-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-image-item:hover img {
    transform: scale(1.05);
}

.project-section.reverse .project-content {
    direction: rtl;
}

.project-section.reverse .project-content > * {
    direction: ltr;
}

.project-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 4s ease infinite;
}

.project-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.project-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-pdf-viewer {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
}

.pdf-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
}

.expand-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.expand-pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
}

.expand-pdf-btn i {
    font-size: 0.8rem;
}

.project-pdf-viewer:hover {
    transform: translateY(-10px);
}

.pdf-placeholder {
    width: 100%;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.pdf-placeholder:hover {
    border-color: rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateY(-5px);
}

.pdf-placeholder h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.pdf-placeholder p {
    color: #666;
    font-size: 1rem;
    text-align: center;
}

.project-image:hover {
    transform: translateY(-10px);
}

.section-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.section-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 20px;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.section-img-placeholder:hover {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(26, 26, 26, 0.9);
    transform: translateY(-5px);
}

.hero-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.project-image:hover .section-img {
    transform: scale(1.05);
}

/* Project Stats */
.project-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Architecture Components */
.architecture-components {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* Fix for Technical Architecture image visibility */
.technical-architecture img,
.technical-architecture .section-img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.component {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.component h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.component p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Process Steps */
.process-steps {
    margin-top: 30px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateX(10px);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(12, 12, 12, 0.95) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step:hover .step-number {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    transform: scale(1.1);
}

.step-content h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.step-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    transition: color 0.3s ease;
}

.step:hover .step-content h4 {
    color: #ffffff;
}

.step:hover .step-content p {
    color: #e0e0e0;
}

/* Features List */
.features-list {
    margin-top: 30px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateX(10px);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(12, 12, 12, 0.95) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.feature:hover .feature-icon {
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.7);
    transform: scale(1.1);
}

.feature-content h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.feature-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    transition: color 0.3s ease;
}

.feature:hover .feature-content h4 {
    color: #ffffff;
}

.feature:hover .feature-content p {
    color: #e0e0e0;
}

/* Impact Metrics */
.impact-metrics {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.metric {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: transform 0.3s ease;
}

.metric:hover {
    transform: translateY(-5px);
}

.metric-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.metric h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.metric p {
    color: gray;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Tech Categories */
.tech-categories {
    margin-top: 30px;
}

.tech-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.tech-category h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.tech-category .tech-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-category .tech-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.tech-category .tech-tag:hover {
    transform: translateY(-2px);
}

/* Enhancements List */
.enhancements-list {
    margin-top: 30px;
}

.enhancement {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease;
}

.enhancement:hover {
    transform: translateX(10px);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.enhancement h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.enhancement p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Project Navigation */
.project-navigation {
    padding: 60px 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0c0c0c 50%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.project-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 40% 60%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 35s ease-in-out infinite;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.nav-buttons .btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-buttons .btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 200%;
    color: white;
    animation: gradientMove 3s ease infinite;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-buttons .btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
}

.nav-buttons .btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.nav-buttons .btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Disable only problematic infinite animations on mobile */
    .project-hero::before,
    .project-section::before {
        animation: none !important;
    }
    
    /* Disable background attachment fixed on mobile */
    .project-hero {
        background-attachment: scroll !important;
        padding-top: 120px; /* Increased padding for mobile to prevent title hiding */
        min-height: calc(100vh - 50px); /* Adjust height for mobile */
    }
    
    /* Disable texture animations */
    .project-hero::before,
    .project-section::before {
        animation: none !important;
    }
    
    .project-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .project-images-grid,
    .project-images-grid-centered {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .project-image-item img {
        height: 250px;
    }
    
    .project-title {
        font-size: 2.5rem;
    }
    
    .project-subtitle {
        font-size: 1.2rem;
    }
    
    .project-meta {
        justify-content: center;
    }
    
    .project-hero-visual {
        height: 400px;
        min-height: 400px;
        display: block !important;
    }
    
    .project-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .project-section.reverse .project-content {
        direction: ltr;
    }
    
    .project-text h2 {
        font-size: 2rem;
    }
    
    .project-stats {
        grid-template-columns: 1fr;
    }
    
    .architecture-components {
        grid-template-columns: 1fr;
    }
    
    .impact-metrics {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .project-hero {
        padding-top: 140px; /* Even more padding for very small screens */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }
    
    .project-title {
        font-size: 2rem;
        line-height: 1.1; /* Tighter line height for mobile */
    }
    
    .project-subtitle {
        font-size: 1.1rem;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px; /* Reduce gap on mobile */
    }
    
    .project-hero-content {
        padding: 0 15px; /* Reduce horizontal padding on very small screens */
    }
    
    .project-text h2 {
        font-size: 1.8rem;
    }
    
    .section-img {
        height: 250px;
    }
    
    /* Prevent horizontal overflow on all project elements */
    .project-section,
    .project-content,
    .container {
        overflow-x: hidden;
    }
    
    /* Ensure proper text wrapping */
    .project-description,
    .project-text p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
