/* ============================================
   NEW GLAS 2026 - Projects Portfolio
   Clean minimal design with Pinterest gallery
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --ng-primary: #0088cc;
  --ng-primary-dark: #0A7EA3;
  --ng-primary-light: #00BCD4;
  --ng-dark: #1a252f;
  --ng-white: #ffffff;
  --ng-border: #dce5ec;
  --ng-text: #34495e;
  --ng-text-light: #5c7080;
}

/* ============================================
   ARCHIVE PAGE - All Projects
   ============================================ */

.ng-projects-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 60px 40px;
}

.ng-projects-header {
  text-align: center;
  margin-bottom: 60px;
}

.ng-projects-title {
  font-family: 'Sora', sans-serif;
  font-size: 56px;
  font-weight: 800;
  color: var(--ng-dark);
  margin: 0 0 20px 0;
  line-height: 1.1;
  letter-spacing: -2px;
}

.ng-projects-subtitle {
  font-size: 20px;
  color: var(--ng-text-light);
  margin: 0;
  line-height: 1.5;
}

/* Years Navigation */
.ng-years-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.ng-year-link {
  padding: 12px 28px;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ng-text);
  background: var(--ng-white);
  border: 2px solid var(--ng-border);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ng-year-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--ng-primary-light), var(--ng-primary));
  transition: left 0.4s ease;
  z-index: 0;
}

.ng-year-link:hover,
.ng-year-link.active {
  color: var(--ng-white);
  border-color: var(--ng-primary);
}

.ng-year-link:hover::before,
.ng-year-link.active::before {
  left: 0;
}

.ng-year-link span {
  position: relative;
  z-index: 1;
}

/* Projects Grid */
.ng-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 32px;
}

.ng-project-card {
  background: var(--ng-white);
  border: 1px solid var(--ng-border);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.ng-project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ng-primary-light), var(--ng-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.ng-project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 136, 204, 0.15);
  border-color: var(--ng-primary-light);
}

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

.ng-project-thumbnail {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f5f5;
}

.ng-project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.ng-project-card:hover .ng-project-thumbnail img {
  transform: scale(1.08);
}

.ng-project-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(26, 37, 47, 0.7) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ng-project-card:hover .ng-project-thumbnail-overlay {
  opacity: 1;
}

.ng-project-content {
  padding: 28px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.ng-project-year-badge {
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ng-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.ng-project-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ng-dark);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.ng-project-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.ng-project-card-title a:hover {
  color: var(--ng-primary);
}

.ng-project-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ng-text-light);
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.ng-project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ng-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.ng-project-link:hover {
  gap: 12px;
  color: var(--ng-primary-dark);
}

/* ============================================
   PAGINATION
   ============================================ */

.ng-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.ng-pagination .page-numbers {
  min-width: 48px;
  height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ng-text);
  background: var(--ng-white);
  border: 2px solid var(--ng-border);
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.ng-pagination a.page-numbers:hover {
  color: var(--ng-white);
  border-color: var(--ng-primary);
  background: linear-gradient(90deg, var(--ng-primary-light), var(--ng-primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 136, 204, 0.2);
}

.ng-pagination .page-numbers.current {
  color: var(--ng-white);
  background: linear-gradient(90deg, var(--ng-primary-light), var(--ng-primary));
  border-color: var(--ng-primary);
  cursor: default;
}

.ng-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

.ng-pagination .page-numbers.prev,
.ng-pagination .page-numbers.next {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   SINGLE PROJECT PAGE
   ============================================ */

.ng-single-project {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

.ng-single-project-header {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--ng-border);
}

.ng-single-project-year {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ng-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.ng-single-project-title {
  font-family: 'Sora', sans-serif;
  font-size: 52px;
  font-weight: 800;
  color: var(--ng-dark);
  margin: 0 0 20px 0;
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.ng-single-project-description {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ng-text);
  max-width: 800px;
  margin: 0 auto;
}

/* Pinterest/Masonry Gallery */
.ng-masonry-gallery {
  column-count: 3;
  column-gap: 24px;
  margin-bottom: 60px;
}

.ng-masonry-item {
  break-inside: avoid;
  margin-bottom: 24px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--ng-white);
  border: 1px solid var(--ng-border);
  transition: all 0.3s ease;
}

.ng-masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 136, 204, 0.12);
  border-color: var(--ng-primary-light);
}

.ng-masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

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

.ng-masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 188, 212, 0.85) 0%,
    rgba(0, 136, 204, 0.9) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ng-masonry-item:hover .ng-masonry-overlay {
  opacity: 1;
}

.ng-masonry-zoom-icon {
  width: 48px;
  height: 48px;
  border: 2px solid var(--ng-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ng-masonry-zoom-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--ng-white);
}

/* Lightbox */
.ng-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 37, 47, 0.95);
  z-index: 99999;
  padding: 40px;
  backdrop-filter: blur(8px);
}

.ng-lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ng-lightbox-fade 0.3s ease;
}

@keyframes ng-lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ng-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100001;
}

.ng-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.ng-lightbox-close::before,
.ng-lightbox-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 2px;
  background: var(--ng-white);
  transform: translate(-50%, -50%) rotate(45deg);
}

.ng-lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ng-lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  animation: ng-lightbox-zoom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ng-lightbox-zoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ng-lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ng-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ng-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ng-lightbox-prev {
  left: -80px;
}

.ng-lightbox-next {
  right: -80px;
}

.ng-lightbox-nav svg {
  width: 24px;
  height: 24px;
  fill: var(--ng-white);
}

/* Contact Form Section */
.ng-project-contact {
  max-width: 800px;
  margin: 80px auto 0;
  padding: 50px;
  background: linear-gradient(135deg, #f8fbfd 0%, #ffffff 100%);
  border: 1px solid var(--ng-border);
  text-align: center;
}

.ng-project-contact-title {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ng-dark);
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.ng-project-contact-text {
  font-size: 16px;
  color: var(--ng-text-light);
  margin: 0 0 32px 0;
  line-height: 1.6;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
  .ng-masonry-gallery {
    column-count: 2;
  }

  .ng-projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .ng-projects-wrapper,
  .ng-single-project {
    padding: 40px 20px;
  }

  .ng-projects-title {
    font-size: 38px;
    letter-spacing: -1px;
  }

  .ng-single-project-title {
    font-size: 36px;
    letter-spacing: -1px;
  }

  .ng-masonry-gallery {
    column-count: 1;
    column-gap: 0;
  }

  .ng-projects-grid {
    grid-template-columns: 1fr;
  }

  .ng-years-nav {
    gap: 8px;
  }

  .ng-year-link {
    padding: 10px 20px;
    font-size: 14px;
  }

  .ng-lightbox {
    padding: 20px;
  }

  .ng-lightbox-prev {
    left: 10px;
  }

  .ng-lightbox-next {
    right: 10px;
  }

  .ng-pagination {
    gap: 6px;
    margin-top: 40px;
  }

  .ng-pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .ng-project-contact {
    padding: 35px 24px;
  }
}

@media (max-width: 480px) {
  .ng-projects-title {
    font-size: 32px;
  }

  .ng-single-project-title {
    font-size: 28px;
  }

  .ng-lightbox-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
