﻿.project-card {
  background-color: var(--card-bg);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 12px 24px -8px rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.project-description {
  font-family: "Poppins", sans-serif;
  background-color: var(--card-bg);
  color: var(--text-primary);
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
}

.project-description h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
  line-height: 1.4;
}

.project-description p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  transition: color 0.3s ease;
  line-height: 1.7;
  opacity: 0.9;
}

.project-description a {
  background: linear-gradient(135deg, var(--card-bg), var(--card-hover));
  color: var(--text-primary);
  padding: 0.6rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-color);
  text-decoration: none;
}

.project-description a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

/* ============================================
   RESPONSIVE DESIGN FOR PROJECTS
   ============================================ */

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .project-card {
    margin-bottom: 1.5rem;
  }
  
  .project-description h3 {
    font-size: 1.15rem;
  }
  
  .project-description p {
    font-size: 0.85rem;
  }
}

/* Mobile (481px - 768px) */
@media (max-width: 768px) {
  .project-card {
    margin-bottom: 1.25rem;
  }
  
  .project-card:hover {
    transform: translateY(-4px);
  }
  
  .project-description {
    padding: 1rem;
  }
  
  .project-description h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .project-description p {
    font-size: 0.825rem;
    margin-bottom: 1rem;
  }
  
  .project-description a {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
  .project-card {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .project-description {
    padding: 0.875rem;
  }
  
  .project-description h3 {
    font-size: 1rem;
    margin-bottom: 0.625rem;
  }
  
  .project-description p {
    font-size: 0.8rem;
    margin-bottom: 0.875rem;
    line-height: 1.5;
  }
  
  .project-description a {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Extra Small Mobile (< 375px) */
@media (max-width: 374px) {
  .project-description {
    padding: 0.75rem;
  }
  
  .project-description h3 {
    font-size: 0.95rem;
  }
  
  .project-description p {
    font-size: 0.75rem;
  }
  
  .project-description a {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }
}

/* Dual-image hover effect for Garasi Mokas card */
.project-card:hover .garasi-img-front {
  opacity: 0;
}

.project-card:hover .garasi-img-back {
  opacity: 1;
}

.project-card:hover .garasi-label {
  opacity: 0;
}

.garasi-label {
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ===== IMAGE LIGHTBOX ===== */
.project-card img {
  cursor: zoom-in;
}

.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.img-lightbox.open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: lightbox-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}

#lightbox-caption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  text-align: center;
  max-width: 80vw;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}
