/* ============================================
   Project Details Page - Modern 3D Design
============================================ */

/* Hero Section with 3D Effect */
.project-hero {
  position: relative;
  min-height: 400px;
  background: #fff;
  overflow: visible;
  padding: 100px 0 50px;
}

.project-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

.project-category {
  display: inline-block;
  padding: 8px 20px;
  background: #667eea;
  
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
  transform: translateZ(0);
  transition: all 0.3s ease;
}

.project-category:hover {
   background: #1a1a1a;

  transform: translateY(-3px) translateZ(0);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.project-hero-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 15px;
  color: #1a1a1a;
  font-family: "Rubik", sans-serif;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.project-hero-subtitle {
  font-size: 17px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 800px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 35px;
}

.meta-card {
  background: #fff;
  padding: 25px 20px;
  border-radius: 14px;
  border: 2px solid #f0f0f0;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  transform-style: preserve-3d;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.meta-card:hover {
  transform: translateY(-8px) rotateX(5deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
  border-color: #667eea;
}

.meta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #667eea;
  border-radius: 14px 14px 0 0;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.meta-card:hover::before {
  transform: scaleX(1);
}

.meta-icon {
  font-size: 30px;
  color: #667eea;
  margin-bottom: 12px;
  display: block;
  transition: all 0.3s ease;
}

.meta-card:hover .meta-icon {
  transform: scale(1.15) rotateY(360deg);
}

.meta-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 6px;
  font-weight: 600;
}

.meta-value {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  font-family: "Rubik", sans-serif;
}

/* Project Overview Section with 3D Cards */
.project-overview {
  padding: 50px 0;
  background: #fafafa;
  position: relative;
}

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

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 10px;
  font-family: "Rubik", sans-serif;
}

.section-header p {
  font-size: 16px;
  color: #666;
}

.overview-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.overview-text {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

.overview-text p {
  margin-bottom: 15px;
}

.overview-highlight {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  border-left: 4px solid #667eea;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateZ(0);
  transition: all 0.3s ease;
  margin-top: 15px;
}

.overview-highlight:hover {
  transform: translateX(8px) translateZ(0);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.stat-box {
  background: #fff;
  padding: 25px 20px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.stat-box:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: #667eea;
  margin-bottom: 8px;
  font-family: "Rubik", sans-serif;
}

.stat-label {
  font-size: 13px;
  color: #666;
  font-weight: 600;
}

/* Project Video Playlist */
.project-video-section {
  padding: 72px 0;
  background: #fff;
}

.project-video-container {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0 40px;
}

.project-video-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
}

.project-video-frame {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.project-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

.project-video-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.project-video-empty i {
  display: block;
  margin-bottom: 14px;
  color: #ef4444;
  font-size: 42px;
}

.has-missing-video .project-video-empty {
  display: flex;
}

.project-video-playlist {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.project-video-playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.project-video-playlist-header h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.project-video-count {
  flex: 0 0 auto;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
}

.project-video-current {
  min-height: 24px;
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.project-video-list {
  display: grid;
  gap: 10px;
}

.project-video-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 10px;
  color: #1f2937;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.project-video-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: #ef4444;
  border-radius: 10px;
  font-size: 14px;
}

.project-video-item span {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-video-item:hover,
.project-video-item:focus,
.project-video-item.is-active {
  border-color: rgba(79, 70, 229, 0.42);
  outline: 0;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
  transform: translateY(-2px);
}

/* Screenshots Gallery with 3D Effect */
.gallery-section {
  padding: 50px 0;
  background: #fff;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 10px;
  font-family: "Rubik", sans-serif;
}

.section-title p {
  font-size: 16px;
  color: #666;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 9/16;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.gallery-item:hover {
  transform: translateY(-12px) rotateY(4deg) rotateX(4deg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: #667eea;
  border-radius: 16px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.5s ease;
}

.gallery-item img[src*="img/projects/"] {
  object-fit: contain;
  background: #f8f9fa;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(102, 126, 234, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}

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

.gallery-overlay i {
  font-size: 48px;
  color: #fff;
  animation: zoomPulse 1.5s ease-in-out infinite;
}

@keyframes zoomPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Features Section with 3D Cards */
.features-section {
  padding: 50px 0;
  background: #fafafa;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.feature-card {
  background: #fff;
  padding: 30px 25px;
  border-radius: 16px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform-style: preserve-3d;
  perspective: 1000px;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #667eea;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.feature-card:hover {
  transform: translateY(-10px) rotateX(8deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::after {
  opacity: 0.03;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: #667eea;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all 0.4s ease;
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  z-index: 1;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotateY(360deg);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

.feature-icon i {
  font-size: 28px;
  color: #fff;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1a1a1a;
  font-family: "Rubik", sans-serif;
  position: relative;
  z-index: 1;
}

.feature-description {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* Back Button with 3D Effect */
.back-to-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 25px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  transform: translateZ(0);
  position: relative;
  z-index: 10;
}

.back-to-portfolio:hover {
  background: #667eea;
  color: #fff;
  transform: translateX(-5px) translateZ(0);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* CTA Section with 3D Effect */
.cta-section {
  padding: 50px 0;
  background: #fff;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 45px 40px;
  background: #667eea;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3);
  transform: translateZ(0);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.cta-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cta-container:hover {
  transform: translateY(-8px) translateZ(0);
  box-shadow: 0 25px 70px rgba(102, 126, 234, 0.4);
}

.cta-container h3 {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  font-family: "Rubik", sans-serif;
  position: relative;
  z-index: 1;
}

.cta-container p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 35px;
  background: #fff;
  color: #667eea;
  border-radius: 25px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
  transform: translateZ(0);
}

.cta-btn:hover {
  transform: translateY(-4px) scale(1.03) translateZ(0);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  color: #667eea;
}

/* Responsive Design */
@media (max-width: 992px) {
  .project-hero-title {
    font-size: 38px;
  }
  
  .overview-content {
    grid-template-columns: 1fr;
  }

  .project-video-shell {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .project-hero {
    padding: 90px 0 40px;
  }
  
  .project-hero-content {
    padding: 0 20px;
  }
  
  .project-hero-title {
    font-size: 30px;
  }
  
  .project-hero-subtitle {
    font-size: 15px;
  }
  
  .project-meta {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .section-header h2,
  .section-title h2 {
    font-size: 28px;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  
  .overview-container {
    padding: 0 20px;
  }

  .project-video-section {
    padding: 50px 0;
  }

  .project-video-container {
    padding: 0 20px;
  }

  .project-video-frame {
    min-height: 220px;
    border-radius: 14px;
  }

  .project-video-frame iframe {
    min-height: 240px;
  }

  .project-video-playlist {
    padding: 14px;
  }
  
  .cta-container {
    padding: 35px 25px;
  }
  
  .cta-container h3 {
    font-size: 24px;
  }
}

/* ============================================
   Project Feature Showcase
============================================ */
.gallery-section {
  background: #fff;
  padding: 90px 0;
}

.gallery-section > .container {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.gallery-section .section-title {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

.feature-showcase {
  width: min(96vw, 1600px);
  max-width: none;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  gap: 56px;
}

.feature-row {
  display: grid;
  gap: 44px;
  align-items: center;
}

.feature-row-split {
  grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
}

.feature-row-split.image-left {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.feature-row-split.image-left .feature-copy {
  order: 2;
}

.feature-row-split.image-left .feature-media {
  order: 1;
}

.feature-row-center {
  width: min(86vw, 1320px);
  max-width: none;
  margin: 0 auto;
  justify-items: center;
}

.feature-row-center .feature-media {
  width: 100%;
  margin: 0 auto;
}

.feature-row-pair {
  width: min(96vw, 1600px);
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
}

.feature-copy {
  position: relative;
  z-index: 2;
}

.feature-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: #667eea;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.feature-copy h3 {
  margin: 0 0 14px;
  color: #151515;
  font-family: "Rubik", sans-serif;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.08;
}

.feature-copy h4 {
  margin: 0 0 16px;
  color: #303030;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
}

.feature-copy p {
  margin: 0;
  color: #555;
  font-size: 16px;
  line-height: 1.8;
}

.feature-media,
.feature-pair-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f7f8fc;
  border: 1px solid #eceef6;
  box-shadow: 0 16px 38px rgba(20, 27, 48, 0.08);
}

.feature-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-media img,
.feature-pair-card img,
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 860px;
  object-fit: contain;
  object-position: center;
  background: #f7f8fc;
  transform: none !important;
  transition: none !important;
}

.feature-row-split .feature-media img {
  max-height: 840px;
}

.feature-row-center .feature-media img {
  max-height: 900px;
}

.feature-pair-card img {
  max-height: 700px;
}

.feature-pair-caption {
  padding: 18px 20px 20px;
  background: #fff;
}

.feature-pair-caption h4 {
  margin: 0 0 8px;
  color: #181818;
  font-size: 19px;
  font-weight: 800;
}

.feature-pair-caption p {
  margin: 0;
  color: #5c5c5c;
  font-size: 14px;
  line-height: 1.65;
}

.gallery-grid {
  display: block;
  max-width: none;
  padding: 0;
}

.gallery-item,
.gallery-item:hover {
  cursor: default;
  aspect-ratio: auto;
  transform: none;
  transition: none;
  box-shadow: none;
  perspective: none;
}

.gallery-item::before,
.gallery-overlay,
.gallery-item:hover::before,
.gallery-item:hover .gallery-overlay {
  display: none;
}

@media (min-width: 1400px) {
  .feature-showcase {
    width: min(97vw, 1760px);
    gap: 70px;
  }

  .feature-row {
    gap: 56px;
  }

  .feature-row-center {
    width: min(90vw, 1480px);
  }

  .feature-row-pair {
    width: min(97vw, 1760px);
  }

  .feature-row-split .feature-media img {
    max-height: 960px;
  }

  .feature-row-center .feature-media img {
    max-height: 1040px;
  }

  .feature-pair-card img {
    max-height: 820px;
  }
}

@media (max-width: 992px) {
  .feature-row-split,
  .feature-row-split.image-left,
  .feature-row-pair {
    grid-template-columns: 1fr;
  }

  .feature-row-pair {
    width: 100%;
  }

  .feature-row-split.image-left .feature-copy,
  .feature-row-split.image-left .feature-media {
    order: initial;
  }

  .feature-showcase {
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 50px 0;
  }

  .feature-showcase {
    padding: 0 16px;
    gap: 24px;
  }

  .feature-row-split,
  .feature-row-split.image-left {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #f7f8fc;
    border: 1px solid #eceef6;
    box-shadow: 0 14px 34px rgba(20, 27, 48, 0.08);
  }

  .feature-row-split .feature-copy,
  .feature-row-split.image-left .feature-copy {
    width: 100%;
    padding: 24px 20px 18px;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.94) 72%, rgba(255, 255, 255, 0.78) 100%);
    order: 1;
  }

  .feature-row-split .feature-media,
  .feature-row-split.image-left .feature-media {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    order: 2;
  }

  .feature-copy h3 {
    font-size: 30px;
  }

  .feature-copy h4 {
    font-size: 16px;
  }

  .feature-copy p {
    font-size: 14px;
    line-height: 1.7;
  }

  .feature-row-split .feature-media img,
  .feature-pair-card img {
    max-height: none;
  }

  .feature-media,
  .feature-pair-card {
    border-radius: 14px;
  }

  .feature-pair-caption {
    padding: 16px;
  }
}
