/**
 * Styles for the Project listing (our-projects.php) and Project detail (project.php)
 * page bodies. Hand-authored (the theme has no active Tailwind build step) and
 * enqueued only on those two templates. Colours mirror the theme tokens:
 *   primary  #df6442 (orange)
 *   secondary #2a3b8c (blue)
 */

.aes-projects {
  --aes-primary: #df6442;
  --aes-ink: #1f2024;
  --aes-muted: #5f6165;
  --aes-line: #e4e4e4;
  color: var(--aes-ink);
}

/* Page bodies are wrapped in the theme's own `.container mx-auto px-4` so the
   left/right edges line up exactly with the navigation. This class only adds
   the vertical rhythm. */
.aes-section {
  padding-top: 40px;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  .aes-section {
    padding-top: 64px;
    padding-bottom: 80px;
  }
}

/* ------------------------------------------------------------------ *
 * Shared: project cards grid
 * ------------------------------------------------------------------ */
.aes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px 30px;
}

@media (min-width: 640px) {
  .aes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .aes-grid { grid-template-columns: repeat(3, 1fr); }
}

.aes-card {
  display: flex;
  flex-direction: column;
}

.aes-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 2;
  background: #f2f2f2;
}

.aes-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.aes-card__media:hover img { transform: scale(1.05); }

.aes-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  color: var(--aes-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.aes-card__title {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--aes-ink);
}

.aes-card__link {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--aes-primary);
  font-weight: 500;
  font-size: 15px;
  transition: gap .2s ease;
}

.aes-card__link:hover { gap: 12px; }
.aes-card__link svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ *
 * Listing page
 * ------------------------------------------------------------------ */
.aes-page-title {
  text-align: center;
  font-size: 34px;
  font-weight: 600;
  color: var(--aes-ink);
  margin: 0 0 40px;
}

@media (min-width: 768px) {
  .aes-page-title { font-size: 44px; }
}

.aes-filter__label {
  display: block;
  font-size: 15px;
  color: var(--aes-muted);
  margin-bottom: 14px;
}

.aes-filter__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.aes-filter__btn {
  appearance: none;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--aes-line);
  border-radius: 6px;
  padding: 12px 26px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--aes-ink);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.aes-filter__btn:hover { border-color: var(--aes-primary); }

.aes-filter__btn.is-active {
  background: #fdece3;
  border-color: var(--aes-primary);
  color: var(--aes-ink);
}

.aes-filter__rule {
  border: 0;
  border-top: 1px solid var(--aes-line);
  margin: 28px 0 48px;
}

.aes-card.is-hidden { display: none; }

/* ------------------------------------------------------------------ *
 * Detail page
 * ------------------------------------------------------------------ */
.aes-hero {
  width: 100%;
  overflow: hidden;
  margin-bottom: 40px;
}

.aes-hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .aes-hero img { height: 420px; }
}

/* Two-column body: left = title + meta, right = details, galleries & requirements. */
.aes-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .aes-layout {
    grid-template-columns: 1fr 2fr;
    gap: 56px;
    align-items: start;
  }
}

.aes-col-right {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 768px) {
  .aes-col-left {
    position: sticky;
    top: 24px;
  }
}

.aes-detail__title {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--aes-ink);
  margin: 0 0 20px;
}

@media (min-width: 768px) {
  .aes-detail__title { font-size: 34px; }
}

.aes-col-left hr {
  border: 0;
  border-top: 1px solid var(--aes-line);
  margin: 0 0 20px;
}

.aes-meta { margin: 0; }

.aes-meta__row {
  display: flex;
  gap: 24px;
  padding: 6px 0;
}

.aes-meta__row dt {
  flex: 0 0 96px;
  color: var(--aes-primary);
  font-weight: 500;
}

.aes-meta__row dd {
  margin: 0;
  color: var(--aes-ink);
  font-weight: 500;
}

.aes-detail__subhead {
  font-size: 24px;
  font-weight: 700;
  color: var(--aes-primary);
  margin: 0 0 14px;
}

.aes-detail__text {
  color: var(--aes-muted);
  font-size: 15px;
  line-height: 1.7;
}

.aes-detail__text p { margin: 0 0 16px; }
.aes-detail__text p:last-child { margin-bottom: 0; }

.aes-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.aes-gallery a { display: block; overflow: hidden; }

.aes-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .aes-gallery img { height: 190px; }
}

.aes-divider {
  border: 0;
  border-top: 1px solid var(--aes-line);
  margin: 8px 0 40px;
}

.aes-other {
  padding-bottom: 56px;
}

@media (min-width: 768px) {
  .aes-other {
    padding-bottom: 80px;
  }
}

.aes-other__title {
  font-size: 30px;
  font-weight: 500;
  color: var(--aes-ink);
  margin: 0 0 40px;
}

@media (min-width: 768px) {
  .aes-other__title { font-size: 40px; }
}