/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* ================================
   PAGE
================================ */
.gateway-page {
  min-height: 100vh;
  padding: 3rem 1.5rem;
  background: #EBE1D8;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ================================
   HEADER
================================ */
.gateway-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
  animation: fadeDown 0.9s ease forwards;
}

.gateway-header h1 {
  font-size: clamp(2.1rem, 6vw, 3rem);
  font-weight: 800;
  color: #215E56;
}

.gateway-header p {
  margin-top: 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ================================
   CARDS WRAPPER
================================ */
.gateway-cards {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .gateway-cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================================
   CARD BASE
================================ */
.gateway-card {
  position: relative;
  min-height: 300px;
  padding: 2.5rem;
  border-radius: 16px;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  overflow: hidden;

  transform: translateY(20px);
  opacity: 0;
  animation: fadeUp 1s ease forwards;
}

.gateway-card:nth-child(2) {
  animation-delay: 0.15s;
}

/* ================================
   BACKGROUNDS
================================ */
.gateway-card.ngo {
  background: url("../images/gateway/ngo.jpg") center/cover no-repeat;
}

.gateway-card.kingdom {
  background: url("../images/gateway/kingdom.jpg") center/cover no-repeat;
}

/* ================================
   OVERLAY
================================ */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  transition: background 0.4s ease;
}

/* ================================
   CONTENT
================================ */
.card-content {
  position: relative;
  z-index: 2;
  max-width: 420px;
}

.card-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
}

.card-content p {
  margin-top: 0.8rem;
  line-height: 1.6;
}

/* ================================
   CTA BUTTON
================================ */
.gateway-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.8rem;
  background: #F4C4B6;
  color: #215E56;
  font-weight: 700;
  border-radius: 999px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.gateway-btn.kingdom {
  background: #E15544;
  color: #ffffff;
}

/* ================================
   HOVER (DESKTOP ONLY)
================================ */
@media (hover: hover) {
  .gateway-card:hover {
    transform: translateY(-6px) scale(1.01);
  }

  .gateway-card:hover .card-overlay {
    background: rgba(0,0,0,0.38);
  }

  .gateway-card:hover .gateway-btn {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  }
}

/* ================================
   MOBILE FIX (CRITICAL)
================================ */
@media (max-width: 768px) {

  body {
    overflow-y: auto; /* allow safe scroll */
  }

  .gateway-page {
    justify-content: flex-start;
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .gateway-header {
    margin-bottom: 2.5rem;
  }

  .gateway-card {
    min-height: 360px; /* prevent image cropping */
  }
}

/* ================================
   KEYFRAMES
================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
