/* ==========================================================================
   OUR GOVERNMENT & NGO PARTNERS - 4-COLUMN INTERACTIVE 3D GRID
   Employment Express Design System
   ========================================================================== */

.gov-partners-grid-section {
  padding: 5.5rem 1.5rem 6rem;
  background: radial-gradient(circle at 50% 15%, #ffffff 0%, #f8fafc 60%, #edf2f7 100%);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  scroll-margin-top: 100px;
}

/* Background Subtle Mesh Grid Aura */
.gov-partners-grid-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.8;
}

.gov-grid-header {
  max-width: 820px;
  margin: 0 auto 3.25rem;
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gov-grid-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono-font, 'IBM Plex Mono', monospace);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-color, #222e40);
  background: #ffffff;
  border: 1px solid rgba(34, 46, 64, 0.14);
  padding: 6px 14px;
  border-radius: var(--border-radius-pill, 9999px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.gov-grid-badge i {
  color: #ea580c;
  font-size: 0.82rem;
}

.gov-grid-title {
  font-family: var(--heading-font, 'Inter Tight', 'Poppins', sans-serif) !important;
  font-size: clamp(2rem, 3.8vw, 2.75rem) !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.85rem 0;
}

.gov-grid-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: #64748b;
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto;
}

/* 4-Column Grid Container */
.gov-grid-container {
  max-width: 1260px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.gov-partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  /* perspective removed */
}

/* Partner Card Styling */
.gov-partner-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  /* transform-style removed */
  will-change: box-shadow;
  overflow: hidden;
  cursor: default;
  box-sizing: border-box;
  min-height: 195px;
}

/* Shimmer Beam at Top of Card */
.gov-partner-card .gov-card-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 46, 64, 0.1), transparent);
  transition: all 0.4s ease;
  opacity: 0.5;
}

.gov-partner-card:hover .gov-card-shimmer {
  height: 3px;
  background: linear-gradient(90deg, transparent, #222e40, var(--secondary-color, #3b82f6), transparent);
  opacity: 1;
}

/* Dynamic Radial Mouse Spotlight */
.gov-partner-card .gov-card-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 180px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(34, 46, 64, 0.06), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.gov-partner-card:hover .gov-card-spotlight {
  opacity: 1;
}

/* Card Header (Tag + Verified Dot) */
.gov-card-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gov-card-badge {
  font-family: var(--mono-font, 'IBM Plex Mono', monospace);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #222e40;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: var(--border-radius-pill, 9999px);
  transition: all 0.25s ease;
}

.gov-partner-card:hover .gov-card-badge {
  background: #222e40;
  color: #ffffff;
  border-color: #222e40;
}

.gov-card-status {
  font-size: 0.82rem;
  color: #10b981;
  display: flex;
  align-items: center;
  opacity: 0.85;
}

/* Logo Frame */
.gov-card-logo-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 74px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  margin-bottom: 14px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.3s ease,
              border-color 0.3s ease;
  box-sizing: border-box;
}

.gov-partner-card:hover .gov-card-logo-wrap {
  background: #ffffff;
  border-color: rgba(34, 46, 64, 0.15);
  transform: none;
}

.gov-card-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.03));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.gov-partner-card:hover .gov-card-logo {
  transform: none;
}

/* Card Body Typography */
.gov-card-body {
  position: relative;
  z-index: 2;
  text-align: left;
  flex: 1;
}

.gov-card-name {
  font-family: var(--heading-font, 'Inter Tight', 'Poppins', sans-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 5px 0;
  word-break: break-word;
  transition: color 0.25s ease;
}

.gov-partner-card:hover .gov-card-name {
  color: var(--accent-color, #222e40);
}

.gov-card-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #64748b;
  margin: 0;
  font-weight: 400;
}

/* Stable Hover State (No Floating/Elevation) */
.gov-partner-card:hover {
  border-color: rgba(34, 46, 64, 0.24);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  transform: none !important;
}

/* Scroll Entrance Stagger Animations */
@keyframes govCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gov-partners-grid.is-visible .gov-partner-card {
  animation: govCardEntrance 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--grid-i, 0) * 35ms);
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .gov-partners-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .gov-partners-grid-section {
    padding: 3.5rem 1rem 4rem;
  }
  .gov-grid-header {
    margin-bottom: 2rem;
  }
  .gov-partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .gov-partner-card {
    padding: 14px 14px 14px;
    min-height: 165px;
    border-radius: 12px;
  }
  .gov-card-logo-wrap {
    height: 60px;
    margin-bottom: 10px;
  }
  .gov-card-name {
    font-size: 0.88rem;
  }
  .gov-card-desc {
    font-size: 0.72rem;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  .gov-partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gov-partner-card {
    padding: 12px 10px 10px;
  }
  .gov-card-badge {
    font-size: 0.58rem;
    padding: 2px 6px;
  }
  .gov-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
