/* ==========================================================================
   Projects Gallery Grid Component (Dedicated to /projects)
   Zero external dependencies, 100% brand typography
   ========================================================================== */

.pgg-projects-section {
  background: #ffffff;
  padding: 90px 0 110px;
  font-family: var(--bs-font-1, "DM Sans", sans-serif);
}

.pgg-container {
  width: 90%;
  max-width: 1440px;
  margin: 0 auto;
}

/* Header */
.pgg-header {
  margin-bottom: 50px;
}

.pgg-subtitle {
  color: var(--bs-clr-pr-1, #0779a8);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  position: relative;
  padding-left: 48px;
  display: inline-block;
  margin-bottom: 14px;
}

.pgg-subtitle::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--bs-clr-pr-1, #0779a8);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.pgg-heading {
  font-family: var(--bs-font-2, "Space Grotesk", sans-serif);
  font-size: 58px;
  line-height: 1.12;
  color: #060606;
  margin: 0 0 18px 0;
  font-weight: 800;
}

.pgg-heading span {
  display: block;
  font-weight: 300;
  color: #060606;
}

.pgg-description {
  max-width: 580px;
  color: #4b5563;
  line-height: 1.8;
  font-size: 17px;
  margin: 0;
}

/* Grid Layout */
.pgg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}

/* Project Card */
.pgg-card {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  outline: none;
}

.pgg-card:hover {
  transform: translateY(-8px);
}

.pgg-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image Container */
.pgg-image {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 4 / 3;
  background: #f1f3f5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.pgg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.pgg-card:hover .pgg-image img {
  transform: scale(1.07);
}

/* Number Badge */
.pgg-number {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bs-font-2, "Space Grotesk", sans-serif);
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Card Content */
.pgg-content {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pgg-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pgg-category {
  color: var(--bs-clr-pr-1, #0779a8);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pgg-duration {
  background: #0d1117;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(85, 171, 225, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.pgg-duration i {
  color: #55ABE1;
  font-size: 11px;
}

.pgg-card:hover .pgg-duration {
  border-color: #55ABE1;
  background: #000000;
  box-shadow: 0 3px 10px rgba(85, 171, 225, 0.25);
}

.pgg-title {
  font-family: var(--bs-font-2, "Space Grotesk", sans-serif);
  color: #060606;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 14px 0;
  font-weight: 700;
  transition: color 0.3s ease;
}

.pgg-card:hover .pgg-title {
  color: var(--bs-clr-pr-1, #0779a8);
}

.pgg-location {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 14px;
  margin-top: auto;
  color: #4b5563;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pgg-location i {
  color: #55ABE1;
  font-size: 14px;
}

/* Progressive Load More Action */
.pgg-actions {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.pgg-loadmore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 36px;
  border-radius: 50px;
  background: var(--bs-clr-pr-1, #0779a8);
  color: #ffffff !important;
  font-family: var(--bs-font-2, "Space Grotesk", sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 2px solid var(--bs-clr-pr-1, #0779a8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 6px 20px rgba(7, 121, 168, 0.25);
  user-select: none;
}

.pgg-loadmore-btn:hover {
  background: #055f84;
  border-color: #055f84;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(7, 121, 168, 0.35);
}

.pgg-loadmore-btn:focus-visible {
  outline: 3px solid rgba(7, 121, 168, 0.45);
  outline-offset: 3px;
}

.pgg-loadmore-btn.pgg-disabled,
.pgg-loadmore-btn:disabled {
  background: #f1f3f5 !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: default !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.pgg-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: pggSpin 0.65s linear infinite;
}

.pgg-loading .pgg-spinner {
  display: inline-block;
}

.pgg-loading .pgg-btn-icon {
  display: none;
}

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

.pgg-status-text {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* Hidden state for progressive reveal */
.pgg-card.pgg-hidden {
  display: none !important;
}

.pgg-card.pgg-revealing {
  animation: pggFadeSlideIn 0.55s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes pggFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Media Queries */
@media (max-width: 1199px) {
  .pgg-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 20px;
  }
  .pgg-heading {
    font-size: 48px;
  }
}

@media (max-width: 991px) {
  .pgg-projects-section {
    padding: 70px 0 90px;
  }
  .pgg-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 18px;
  }
  .pgg-heading {
    font-size: 40px;
  }
}

@media (max-width: 575px) {
  .pgg-projects-section {
    padding: 50px 0 70px;
  }
  .pgg-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .pgg-heading {
    font-size: 32px;
  }
  .pgg-subtitle {
    font-size: 13px;
    padding-left: 40px;
  }
  .pgg-subtitle::before {
    width: 28px;
  }
  .pgg-description {
    font-size: 15px;
  }
  .pgg-actions {
    margin-top: 40px;
  }
  .pgg-loadmore-btn {
    width: 100%;
    max-width: 320px;
  }
}
