/* Why section — qalam-primary.html.
   Depends on shared page tokens (--white, --line, --radius-lg, --shadow)
   and the shared .sec-head component (static/css/qalam-primary.css). */

.why {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.wcard {
  position: relative;
  min-height: 360px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-end;
  transition: all 0.3s;
  overflow: hidden;
}
.wcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.wcard-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.wcard-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14, 3, 5, 0.95) 0%,
    rgba(14, 3, 5, 0.65) 30%,
    rgba(14, 3, 5, 0.15) 62%,
    transparent 100%
  );
  z-index: 1;
}
.wcard-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s;
  display: block;
}
.wcard:hover .wcard-img img {
  transform: scale(1.06);
}
.wcard-body {
  position: relative;
  z-index: 2;
  padding: 24px 24px 26px;
}
.wcard-body h3 {
  margin-bottom: 10px;
  color: var(--white);
}
.wcard-body p {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 900px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .wcard-body {
    padding: 18px 18px 22px;
  }
  .wcard-body h3 {
    font-size: 1.05rem;
  }
}
