﻿/* =========================================================
   BangTech home page: mission + card tiles  (v4)
   ========================================================= */

.CardTile {
  margin: 0 auto;
  max-width: 1200px;
}

/* Mission statement */
.CardTile article {
  margin: 0 auto 2rem;
  max-width: 1000px;
}

.CardTile h1 {
  color: #1f9fcf;
  font-size: clamp(2rem, 5vw + 0.5rem, 3rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.CardTile article p {
  border-left: 3px solid var(--accent, #13b1e7);
  padding-left: 1rem;
  font-size: 1.05rem;
  color: var(--text-muted, #5f6b7a);
  margin: 0;
}

/* --- Card grid --- */
.CardList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.CardList li {
  background-color: #fff;
  border-radius: 12px;
  border: 1px solid var(--border, #e1e6ea);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.CardList li:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* Image and title share the first row: title sits over the photo */
.CardList h3,
.CardList img {
  grid-row: 1 / 2;
  grid-column: 1;
}

.CardList img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

.CardList h3 {
  align-self: end;
  margin: 0;
  padding: 2rem 1rem 0.75rem;
  color: #fff;
  font-size: 1.3rem;
  text-align: left;
  background: linear-gradient(to top, rgba(24, 34, 62, 0.85), rgba(24, 34, 62, 0));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.CardList p {
  padding: 1rem 1.25rem 0;
  margin: 0;
}

.CardTile .CardList a {
  margin: 1rem 1.25rem 1.25rem;
  min-height: 44px; /* touch target */
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background-color: var(--accent, #13b1e7);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  transition: background-color 0.2s ease;
}

.CardTile .CardList a:hover,
.CardTile .CardList a:focus-visible {
  background-color: var(--primary, #212f54);
  color: #fff;
}

/* --- Feature cards (photo tiles, e.g. Greenhouse index) --- */
ul.feature-card {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.25rem;
}

ul.feature-card li {
  margin: 0;
}

ul.feature-card a.feature-card-block {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 240px;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--primary, #212f54);
  background-size: cover;
  background-position: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

ul.feature-card a.feature-card-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

ul.feature-card .feature-card-content {
  width: 100%;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(to top, rgba(24, 34, 62, 0.9), rgba(24, 34, 62, 0));
}

ul.feature-card .feature-card-content h3 {
  color: #fff;
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

ul.feature-card .feature-card-content p {
  margin: 0;
}

ul.feature-card .Explorerbutton {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--accent, #13b1e7);
  font-size: 0.9rem;
  font-weight: 700;
}

/* --- Larger screens --- */
@media screen and (min-width: 700px) {
  .CardTile article {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }

  .CardTile h1 {
    flex: 0 0 auto;
    margin: 0;
  }

  .CardTile article p {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .CardList li:hover,
  ul.feature-card a.feature-card-block:hover {
    transform: none;
  }
}
