/* ============================================================
   C&S AIR PRODUCTS — PROJECTS
   Extends styles.css. Reuses the design tokens (colors, type,
   spacing, radii) defined in :root there. Shared by
   projects/index.twig (overview grid) and projects/_individual.twig
   (single project detail).

   Mobile-first: unqueried rules below are the small-screen
   (< 768px) styles. min-width media queries layer up:
     @media (min-width: 768px)  → tablet and up
     @media (min-width: 1200px) → desktop only
   ============================================================ */

/* ---------- Overview (index.twig) ---------- */
.projects-intro {
  background: var(--color-white);
  padding: 48px 0 8px;
  text-align: center;
}
.projects-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 10px;
}
.projects-intro__subtitle {
  font-size: 15px;
  color: var(--color-text-light);
}

.projects-grid-section {
  background: var(--color-white);
  padding: 32px 0 56px;
}
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column-reverse;
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.project-card:hover { box-shadow: var(--shadow-md); }
.project-card__text { padding: 20px; }
.project-card__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-teal);
  margin-bottom: 10px;
  display: inline-block;
}
.project-card__location {
  font-size: 13px;
  color: var(--color-text-light);
}
.project-card__image { aspect-ratio: 16/10; }
.project-card__image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Individual project (_individual.twig) ---------- */
.project-detail {
  background: var(--color-off-white);
  padding: 24px 0 56px;
}
.project-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 16px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 24px;
  transition: background var(--transition);
}
.project-detail__back:hover { background: var(--color-light-gray); }

.project-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.project-detail__image img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  aspect-ratio: 4/3;
}

.project-detail__info h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 18px;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.project-meta__item dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 2px;
}
.project-meta__item dd {
  font-size: 14px;
  color: var(--color-text);
}

.project-detail__body { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.project-detail__body p {
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.65;
}

.project-products-used h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 14px;
}
.project-products-used__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.project-product-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 8px 16px;
  text-align: center;
}
.project-product-tile__image {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-product-tile__image img { width: 100%; height: 100%; object-fit: contain; }
.project-product-tile__name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card { flex-direction: row; }
  .project-card__text { flex: 1; display: flex; flex-direction: column; justify-content: center; }
  .project-card__image { flex: 1; aspect-ratio: auto; }
}

@media (min-width: 900px) {
  .project-detail__grid { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
}

@media (min-width: 1200px) {
  .projects-intro { padding: 64px 0 8px; }
  .projects-grid-section { padding: 40px 0 72px; }
}
