/* Project detail page styles */

.project-detail { padding: var(--space-16) 0; background: var(--black); min-height: 100vh; }

/* Hero Section for Project Detail */
.hero { background: linear-gradient(135deg, var(--black) 0%, var(--gray-800) 100%); color: var(--white); position: relative; min-height: 70vh; padding: calc(var(--nav-height) + var(--space-8)) 0 var(--space-24); display: flex; align-items: center; box-sizing: border-box; margin-top: 0; }
.hero-grid { display: flex; flex-direction: row; gap: var(--space-8); align-items: center; width: 100%; }
.hero-image { order: 2; height: 100%; display: flex; align-items: center; justify-content: center; }
.image-container { position: relative; width: 100%; max-width: 520px; height: 500px; margin: 0 auto; overflow: hidden; border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl); }
.project-image { width: 100%; height: 100%; object-fit: contain; transition: transform var(--transition-normal); background-color: var(--gray-800); border-radius: 1rem; }
.project-image:hover { transform: scale(1.02); }
.live-badge { position: absolute; top: -0.5rem; right: -0.5rem; background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--black); padding: 0.5rem 1rem; border-radius: var(--radius-full); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 0.25rem; z-index: 1; text-decoration: none; transition: all var(--transition-normal); }
.live-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.hero-content { order: 1; }
.hero-title { font-size: 3rem; font-weight: bold; margin-bottom: 1.5rem; background: linear-gradient(135deg, #fb923c, #fbbf24); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.project-meta { display: flex; align-items: center; gap: 1rem; color: #9ca3af; margin-bottom: 1.5rem; }
.meta-item { display: flex; align-items: center; gap: 0.5rem; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tech-tag { padding: 0.25rem 0.75rem; background-color: #1f2937; color: #fb923c; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; border: 1px solid #374151; }
.hero-description { font-size: 1.125rem; color: #d1d5db; line-height: 1.7; margin-bottom: 2rem; }
.cta-button { background: linear-gradient(135deg, #fb923c, #fbbf24); color: #111827; padding: 0.75rem 2rem; border: none; border-radius: 9999px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1rem; text-decoration: none; }
.cta-button:hover { transform: scale(1.05); box-shadow: 0 10px 25px -5px rgba(251, 146, 60, 0.4); }
.cta-button.github-button { background: linear-gradient(135deg, #333, #000); color: white; }
.cta-button.github-button:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4); }

/* Content Sections */
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; margin: 6rem 0 4rem 0; }
.card { background: rgba(31, 41, 55, 0.5); backdrop-filter: blur(12px); border-radius: 1rem; padding: 2rem; border: 1px solid #374151; height: 100%; transition: border-color 0.3s ease; }
.card:hover { border-color: rgba(251, 146, 60, 0.5); }
.card-header { display: flex; align-items: center; margin-bottom: 1.5rem; }
.icon-wrapper { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; margin-right: 1rem; }
.icon-wrapper.orange { background: linear-gradient(135deg, #fb923c, #fbbf24); color: #111827; }
.icon-wrapper.red { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.icon-wrapper.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.icon-wrapper.green { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.section-title { font-size: 1.5rem; font-weight: bold; color: #fb923c; }
.card-title { font-size: 1.25rem; font-weight: bold; color: #fb923c; margin-bottom: 1.5rem; }
.card-content { color: #d1d5db; font-size: 1.125rem; line-height: 1.7; }

/* Project Details */
.details-list { display: flex; flex-direction: column; gap: 1rem; }
.detail-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #374151; }
.detail-item:last-child { border-bottom: none; }
.detail-label { color: #9ca3af; }
.detail-value { color: #d1d5db; display: flex; align-items: center; gap: 0.5rem; }

/* CSR Grid */
.csr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin: 0 0 6rem 0; }
.challenges .card-title { color: #f87171; }
.solutions .card-title { color: #60a5fa; }
.results .card-title { color: #4ade80; }
.list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.list-item { color: #d1d5db; display: flex; align-items: flex-start; gap: 0.75rem; line-height: 1.6; }
.bullet { width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-top: 0.5rem; flex-shrink: 0; }
.bullet.red { background-color: #f87171; }
.bullet.green { background-color: #4ade80; }
.green { color: #4ade80; }

/* Gallery */
.gallery-section { margin: 4rem 0 6rem; width: 100%; }
.gallery-title { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); text-align: center; margin-bottom: 3rem; color: var(--primary); position: relative; display: inline-block; width: 100%; }
.gallery-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 80px; height: 3px; background: var(--primary); border-radius: 3px; }
.gallery-container { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.gallery-image { width: 100%; max-width: 1000px; margin: 0 auto 2.5rem; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-2xl); transition: transform 0.3s ease, box-shadow 0.3s ease; background-color: var(--gray-800); aspect-ratio: 16/9; }
.gallery-image:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); }
.gallery-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; }
.gallery-btn { background-color: #374151; color: #d1d5db; border: none; padding: 0.75rem; border-radius: 9999px; cursor: pointer; transition: all 0.2s ease; }
.gallery-btn:hover { background-color: #4b5563; }
.gallery-dots { display: flex; gap: 0.5rem; }
.dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; border: none; background-color: #4b5563; cursor: pointer; transition: background-color 0.2s ease; }
.dot.active { background-color: #fb923c; }

/* Footer for project pages */
.footer { background: var(--gray-900); border-top: 1px solid rgba(255, 203, 116, 0.1); padding: var(--space-16) 0 var(--space-8); margin-top: var(--space-20); }
/* Two columns on desktop: left description, right social/contact */
.footer-content { display: grid; grid-template-columns: 2fr 1fr; align-items: center; gap: var(--space-8); margin-bottom: var(--space-8); }
.footer-section h3, .footer-section h4 { color: var(--white); margin-bottom: var(--space-4); font-weight: var(--font-weight-bold); }
.footer-section h3 { font-size: var(--font-size-2xl); }
.footer-section h4 { font-size: var(--font-size-lg); }
.footer-section p { color: var(--gray-300); line-height: var(--line-height-relaxed); margin-bottom: 0; }
/* Footer specific content spacing */
.footer-title { color: var(--white); margin-bottom: var(--space-3); }
.footer-description { color: var(--gray-300); font-size: var(--font-size-lg); line-height: var(--line-height-relaxed); margin: 0; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: var(--space-2); }
.footer-section ul li:last-child { margin-bottom: 0; }
.footer-section ul li a { color: var(--gray-300); text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.footer-section ul li a:hover { color: var(--primary); transform: translateX(5px); }
.social-links { display: flex; gap: var(--space-4); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: rgba(255, 203, 116, 0.1); color: var(--primary); border-radius: 50%; text-decoration: none; transition: all 0.3s ease; font-size: var(--font-size-lg); }
.social-links a:hover { background: var(--primary); color: var(--black); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(255, 203, 116, 0.3); }
.footer-right { text-align: right; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-3); }
.footer-bottom { border-top: 1px solid rgba(255, 203, 116, 0.1); padding-top: var(--space-6); text-align: center; }
.footer-bottom p { color: var(--gray-400); margin-bottom: 0; font-size: var(--font-size-sm); }

/* Responsive */
@media (max-width: 1024px) {
    /* Footer stacks and centers on tablet */
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: var(--space-6); }
    .footer-left { order: 1; }
    .footer-right { order: 2; text-align: center; justify-self: center; align-items: center; }
    .footer-description { margin-bottom: var(--space-4); font-size: var(--font-size-base); }
    .footer-title { margin-bottom: var(--space-3); }
    .social-links { justify-content: center; }
    /* Hero stacks with text above image like home page */
    /* Replace undefined --space-22 with a valid spacing token for reliable top offset */
    .hero { height: auto; min-height: auto; padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-12); }
    .hero-grid { flex-direction: column; gap: 2rem; }
    /* Place image FIRST on responsive */
    .hero-image { order: 1; }
    .hero-content { order: 2; text-align: center; max-width: 800px; margin: 0 auto; }
    .image-container { max-width: 440px; height: 380px; }
    /* Extra breathing room above the image block on tablet */
    .hero-image { margin-top: var(--space-4); }
    .content-grid { grid-template-columns: 1fr; }
    .csr-grid { grid-template-columns: 1fr; }
    /* Hide gallery navigation buttons on responsive */
    .gallery-btn { display: none; }
    /* Center dots when nav buttons are hidden */
    .gallery-controls { justify-content: center; }
}

@media (max-width: 768px) {
    /* Auto-height hero and larger space above image on mobile */
    .hero { height: auto; min-height: auto; padding-top: calc(var(--nav-height) + var(--space-10)); padding-bottom: var(--space-12); box-sizing: border-box; }
    .hero-title { font-size: 2rem; }
    .image-container { max-width: 360px; height: 300px; }
    /* Add more space above the image specifically on mobile */
    .hero-image { margin-top: var(--space-6); }
    .card { padding: 1.5rem; }
    .content-grid { margin: 4rem 0 3rem 0; }
    .csr-grid { margin: 0 0 4rem 0; }
    .gallery-section { margin: 0 0 4rem 0; }
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: var(--space-6); }
    .footer-right { text-align: center; }
    .social-links { justify-content: center; gap: var(--space-3); }
}

@media (max-width: 480px) {
    .container { padding: 0 0.5rem; }
    .hero-title { font-size: 1.75rem; }
    .tech-stack { justify-content: center; }
    /* Slightly more top space on very small screens */
    .hero { padding-top: calc(var(--nav-height) + var(--space-12)); }
    .image-container { height: 240px; }
    .gallery-controls { flex-direction: column; gap: 1rem; }
}

/* Desktop-only enhancements */
@media (min-width: 1025px) {
    /* Increase hero image size on desktop */
    .image-container { max-width: 800px; height: 560px; }
}

/* Additional project responsive */
@media (max-width: 1024px) {
    .project-header { grid-template-columns: 1fr; gap: var(--space-6); }
    .project-image { max-height: 400px; }
    .project-image img { height: 100%; object-fit: cover; }
    .project-info h1 { font-size: var(--font-size-3xl); }
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 768px) {
    .project-detail { padding: var(--space-12) 0; }
    .project-header { gap: var(--space-4); }
    .project-image { max-height: 300px; }
    .project-info h1 { font-size: var(--font-size-2xl); }
    .project-meta { gap: var(--space-2); }
    .detail-section { padding: var(--space-4); }
    .detail-section h2 { font-size: var(--font-size-xl); }
    .gallery-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card .project-image { height: 200px; }
}

@media (max-width: 480px) {
    .project-detail { padding: var(--space-8) 0; }
    .project-image { max-height: 250px; }
    .project-info h1 { font-size: var(--font-size-xl); }
    .project-links { top: var(--space-2); right: var(--space-2); }
    .project-links .btn { padding: var(--space-1) var(--space-3); font-size: var(--font-size-sm); }
    .tech-tag { font-size: var(--font-size-xs); padding: var(--space-1) var(--space-2); }
    .detail-section { padding: var(--space-3); }
    .project-content { padding: var(--space-4); }
}

/* Animation for project detail elements */
.detail-section, .gallery-item, .project-card { animation: fadeInUp 0.6s ease forwards; opacity: 0; }
.detail-section:nth-child(1) { animation-delay: 0.1s; }
.detail-section:nth-child(2) { animation-delay: 0.2s; }
.detail-section:nth-child(3) { animation-delay: 0.3s; }
.detail-section:nth-child(4) { animation-delay: 0.4s; }
.detail-section:nth-child(5) { animation-delay: 0.5s; }
.detail-section:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }


