/* =========================================================
   Projects page — approved grid layout, brand navy/gold
   ========================================================= */

.page-projects {
  background: #fafaf8;
}

.page-projects .projects-toolbar,
.page-projects .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-projects .toolbar-count {
  font-size: 13.5px;
  color: var(--text-muted);
}

.page-projects .toolbar-count strong {
  color: var(--primary);
  font-family: var(--font-mono), monospace;
}

.page-projects .project-grid-full,
.page-projects .project-grid,
.project-grid-full {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.page-projects .project-card,
.project-grid-full .project-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line, #e4e3df);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  height: auto;
}

.page-projects .project-card:hover,
.project-grid-full .project-card:hover {
  box-shadow: 0 14px 28px -18px rgba(14, 42, 107, 0.28);
  transform: translateY(-3px);
  border-color: var(--line, #e4e3df);
}

.page-projects .project-image,
.project-grid-full .project-image {
  position: relative;
  aspect-ratio: 4 / 3;
  height: auto !important;
  min-height: 0;
  overflow: hidden;
  background: #eef0f4;
}

.page-projects .project-image img,
.project-grid-full .project-image img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.page-projects .project-placeholder,
.project-grid-full .project-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--accent);
  font-size: 42px;
}

.page-projects .project-placeholder::after,
.project-grid-full .project-placeholder::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(245, 166, 35, 0.35);
  border-radius: 3px;
}

.page-projects .project-overlay,
.project-grid-full .project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 42, 107, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  padding: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.page-projects .project-card:hover .project-overlay,
.project-grid-full .project-card:hover .project-overlay {
  opacity: 1;
  background: rgba(8, 26, 71, 0.55);
}

.page-projects .project-info,
.project-grid-full .project-info {
  padding: 18px 20px 20px;
}

.page-projects .project-info h3,
.project-grid-full .project-info h3 {
  font-family: var(--font-display), 'Oswald', sans-serif;
  font-size: 16.5px;
  margin: 0 0 8px;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--primary);
  font-weight: 700;
}

.page-projects .project-loc,
.project-grid-full .project-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--accent-dark);
  font-family: var(--font-mono), monospace;
  font-weight: 600;
  margin: 0 0 10px;
}

.page-projects .project-loc i,
.project-grid-full .project-loc i {
  color: var(--accent-dark);
  margin: 0;
}

.page-projects .project-desc,
.project-grid-full .project-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-projects .pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  justify-content: center;
}

.page-projects .pagination a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #e4e3df);
  border-radius: 4px;
  font-family: var(--font-mono), monospace;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  background: #fff;
  text-decoration: none;
}

.page-projects .pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-projects .pagination a.current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--accent);
}

.projects-cta {
  padding-top: 0;
}

.projects-cta .cta-panel {
  text-align: center;
  display: block;
  padding: 44px 46px;
}

.projects-cta .cta-panel p {
  margin: 0 0 26px;
}

.projects-cta .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .page-projects .project-grid-full,
  .page-projects .project-grid,
  .project-grid-full {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .page-projects .project-grid-full,
  .page-projects .project-grid,
  .project-grid-full {
    grid-template-columns: 1fr;
  }
}
