/* Video Project Specific Styles */

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--card-bg, #1e1e2d);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-color, #5ae4ff);
  margin: 0 0 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary, #ffffff);
}

.stat-item p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0.5rem 0 0;
  color: var(--text-secondary, #b3b3b3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Video Embed Responsive Container */
.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 2rem 0 3.5rem; /* Increased bottom margin for better spacing */
  background: #000;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-embed:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.video-embed iframe,
.video-embed object,
.video-embed embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Technical Details Section */
.tech-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.tech-category {
  background: var(--card-bg, #1e1e2d);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(90, 228, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.tech-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), #4d9eff);
}

.tech-category h3 {
  margin: 0 0 1.25rem 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent-color, #5ae4ff);
  position: relative;
  padding-bottom: 0.75rem;
}

.tech-category h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), transparent);
  border-radius: 2px;
}

.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tech-list li {
  padding: 0.75rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  font-size: 0.95rem;
  line-height: 1.5;
}

.tech-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tech-list li:hover {
  transform: translateX(5px);
}

.tech-list i {
  color: var(--accent-color, #5ae4ff);
  font-size: 1em;
  margin-top: 0.2em;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.tech-list strong {
  color: var(--text-primary, #ffffff);
  font-weight: 500;
  margin-right: 0.25rem;
}

.tech-highlights {
  background: rgba(90, 228, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
  border: 1px solid rgba(90, 228, 255, 0.1);
}

.tech-highlights h3 {
  color: var(--accent-color, #5ae4ff);
  margin-top: 0;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
}

.highlight-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.highlight-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.highlight-item i {
  font-size: 1.5rem;
  color: var(--accent-color, #5ae4ff);
  background: rgba(90, 228, 255, 0.1);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.highlight-item:hover i {
  transform: rotate(5deg) scale(1.1);
  background: rgba(90, 228, 255, 0.2);
}

.highlight-item h4 {
  margin: 0 0 0.5rem;
  color: var(--text-primary, #ffffff);
  font-size: 1.1rem;
}

.highlight-item p {
  margin: 0;
  color: var(--text-secondary, #b3b3b3);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tech-details-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .tech-category {
    padding: 1.5rem;
  }
  
  .tech-highlights {
    padding: 1.5rem;
  }
  
  .highlight-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .highlight-item i {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

/* Impact & Metrics */
.impact-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.metric-card {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.metric-card i {
  font-size: 2rem;
  color: var(--accent-color, #5ae4ff);
  margin-bottom: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

/* Desktop-only hover effects */
@media (min-width: 769px) {
  .metric-card:hover i {
    text-shadow: 0 0 10px rgba(132, 208, 247, 0.6);
    transform: scale(1.1);
  }
  
  .metric-card:hover .metric-detail {
    opacity: 0.9;
  }
}

.metric-card h3 {
  margin: 0.5rem 0;
  font-size: 1.8rem;
  color: var(--accent-color, #5ae4ff);
}

.metric-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  transition: opacity 0.3s ease;
  opacity: 0.8;
}

.cta-section {
  text-align: center;
  margin: 3rem 0;
}

.cta-section .btn {
  margin: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid-col-6 {
    grid-column: span 12;
  }
  
  .tech-category {
    margin-bottom: 1.5rem;
  }
}

/* Timeline Styles */
.timeline-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
  padding: 2rem 1.5rem;
}

.timeline {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 20px 0;
  list-style: none;
  box-sizing: border-box;
  max-width: 100%;
  overflow: visible;
  transform: translateX(0);
  /* Ensure no default list styles */
  margin-block-start: 0;
  margin-block-end: 0;
  padding-inline-start: 0;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: calc(100% + 4rem); /* Adjusted height to match new position */
  background: var(--accent-color, #5ae4ff);
  top: 2rem; /* Position to align with first bullet */
  z-index: 1;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  width: 50%;
  padding: 0 1rem 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 1px;
  overflow: visible;
  list-style: none !important;
  clear: both;
  max-width: 100%;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--delay, 0) * 1.2);
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
  padding-right: 3.5rem;
  padding-left: 0;
  clear: both;
  float: left;
  transform-origin: right center;
  width: 50%;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.timeline-item:nth-child(even) {
  left: 0;
  margin-left: 50%;
  padding-right: 15px; /* Add right padding to pull content left */
  text-align: left;
  padding-left: 3.5rem;
  clear: both;
  transform-origin: left center;
  width: 50%;
  box-sizing: border-box;
}

.timeline-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-color, #00d4ff);
  top: 50%;
  z-index: 2;
  border: 2px solid var(--card-bg, #1e1e2d);
  box-shadow: 0 0 0 1px var(--accent-color, #00d4ff), 
              0 0 15px rgba(0, 212, 255, 0.6);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-50%) scale(1);
  transform-origin: center center;
  will-change: transform, box-shadow, background;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Position dots on the right side (odd items) */
.timeline-item:nth-child(odd) .timeline-dot {
  right: -8px;
  left: auto;
}

/* Position dots on the left side (even items) */
.timeline-item:nth-child(even) .timeline-dot {
  left: -8px;
  right: auto;
}

/* Ensure no list markers */
.timeline,
.timeline-item,
.timeline-content,
.timeline-content p,
.timeline-item li,
.timeline-item ul,
.timeline-item ol {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

/* Remove any ::before pseudo-elements that might be adding bullets */
.timeline-item::before,
.timeline-item *::before,
.timeline-content::before,
.timeline-content *::before,
.timeline-item li::before {
  content: none !important;
  display: none !important;
}

/* Override any global list styles */
.timeline ul,
.timeline ol,
.timeline li {
  list-style: none !important;
  background: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Hover effect - smooth scaling with glow */
.timeline-dot:hover {
  transform: translateY(-50%) scale(1.4);
  box-shadow: 0 0 0 2px var(--accent-color, #00d4ff), 
              0 0 25px rgba(0, 212, 255, 0.8);
  background: #00e6ff;
  z-index: 3;
}

.timeline-content {
  position: relative;
  background: var(--card-bg, #1e1e2d);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color, #2a2a3a);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Section Header */
.section-header {
  margin-bottom: 2.5rem;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-intro {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-top: 1rem;
  opacity: 0.9;
}

/* Timeline Header */
.timeline-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color, #5ae4ff) 0%, #4d9eff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(90, 228, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 12px rgba(90, 228, 255, 0.3);
}

.timeline-time {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color, #5ae4ff);
  line-height: 1.3;
  background: linear-gradient(90deg, var(--accent-color, #5ae4ff), #8ac4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* Fallback for browsers that don't support text-fill-color */
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-time {
  text-shadow: 0 0 10px rgba(90, 228, 255, 0.5);
}

.timeline-content p {
  margin: 0.5rem 0 0;
  color: var(--text-secondary, #b3b3b3);
  line-height: 1.6;
}

/* Hover Effects - Enhanced with smooth transitions */
.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 0 4px rgba(90, 228, 255, 0.3);
  transform: translateY(-50%) scale(1.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .timeline-content {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(90, 228, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-header {
    padding: 0 1rem;
    margin-bottom: 2rem;
  }
  
  .section-intro {
    font-size: 1rem;
  }
  
  .timeline-container {
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding: 0 0 1rem 3.5rem;
    margin: 0 0 2rem;
    box-sizing: border-box;
  }

  .timeline-dot {
    left: 20px !important;
    right: auto !important;
    top: 24px;
    transform: translateX(-50%);
    margin: 0;
    width: 12px;
    height: 12px;
  }
  
  .timeline-content {
    padding: 1.25rem;
    max-width: 100%;
  }
  
  .timeline-header {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .timeline-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .timeline-time {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }
  
  .timeline-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-item.visible {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered animation delay */
.timeline-item.visible:nth-child(1) { animation-delay: 0.1s; }
.timeline-item.visible:nth-child(2) { animation-delay: 0.2s; }
.timeline-item.visible:nth-child(3) { animation-delay: 0.3s; }
.timeline-item.visible:nth-child(4) { animation-delay: 0.4s; }

/* Timeline item base styles are defined earlier in the file */

/* Timeline dot */
.timeline-item::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 12px;
  background-color: var(--bg-primary, #121212);
  border: 3px solid var(--accent-color, #5ae4ff);
  border-radius: 50%;
  z-index: 1;
}

/* Timeline content */
.timeline-content {
  background: var(--card-bg, #1e1e2d);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-content {
  transform: translateX(5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.timeline-time {
  font-weight: 600;
  color: var(--accent-color, #5ae4ff);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.timeline-item p {
  margin: 0.5rem 0 0;
  color: var(--text-secondary, #b3b3b3);
  line-height: 1.5;
}

/* Alternating timeline for larger screens */
@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    margin-left: -1px;
  }
  
  .timeline-item {
    width: 50%;
    padding-left: 0;
  }
  
  .timeline-item:nth-child(odd) {
    padding-right: 60px;
    text-align: right;
  }
  
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 60px;
    text-align: left;
  }
  
  .timeline-item::before {
    left: auto;
    right: -10px;
  }
  
  .timeline-item:nth-child(even)::before {
    left: -10px;
    right: auto;
  }
  
  .timeline-item:nth-child(odd) .timeline-content {
    margin-right: 0;
  }
  
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
  }
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--card-bg, #1e1e2d);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-card h3 {
  color: var(--accent-color, #5ae4ff);
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
  padding: 0 1rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.media-item {
  background: var(--card-bg, #1e1e2d);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.media-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  border-color: rgba(90, 228, 255, 0.2);
}

.media-item a {
  display: block;
  position: relative;
  overflow: hidden;
}

.media-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  aspect-ratio: 16/9;
  object-fit: cover;
}

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

.media-caption {
  padding: 1.25rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary, #ffffff);
  text-align: center;
  background: rgba(30, 30, 45, 0.8);
  border-top: 1px solid rgba(90, 228, 255, 0.1);
  backdrop-filter: blur(5px);
}

/* Responsive adjustments */
@media (min-width: 1200px) {
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1199px) and (min-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .media-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 0.5rem;
    margin: 2.5rem 0;
  }
  
  .media-item {
    max-width: 100%;
    margin: 0 auto;
    width: calc(100% - 1rem);
  }

  .media-item img {
    width: 100%;
    height: auto;
  }
}

/* Callout Boxes */
.callout {
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  border-left: 4px solid var(--accent-color, #5ae4ff);
  background: rgba(90, 228, 255, 0.05);
}

.callout.technical-details {
  border-left-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.05);
}

/* Related Projects */
.related-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.related-project-card {
  background: var(--card-bg, #1e1e2d);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.related-project-card:hover {
  transform: translateY(-5px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item::after {
    left: 21px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}
