/* ================== GENERAL STYLES ================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  scroll-behavior: smooth;
  color: #333;
}

section {
  padding: 50px 20px;
  text-align: center;
}

h1, h2 {
  margin: 0 0 20px 0;
}

p {
  line-height: 1.6;
  color: #555;
}

/* ================== HERO SECTION ================== */
.hero {
  height: 90vh;
  background: url('images/family.jpg') center/cover no-repeat;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

.hero h1 {
  font-size: 3em;
}

.hero p {
  font-size: 1.5em;
  margin-top: 10px;
}

/* ================== FAMILY GRID ================== */
.members .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ================== CARDS ================== */
.card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  text-decoration: none;
  color: black;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card img {
  width: 150px;
  height: 150px;
  object-fit: cover; /* keep cards uniform and circular */
  border-radius: 50%;
  margin-bottom: 10px;
}

.card h3 {
  margin: 5px 0;
  font-size: 1.1em;
}

.card p {
  font-size: 0.9em;
  color: #555;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ================== POPUP MODALS ================== */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.popup:target {
  display: flex;
}

.popup-content {
  background: white;
  width: 80%;
  max-width: 900px;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  gap: 30px;
  align-items: center;
  position: relative;
  flex-wrap: wrap;
}

.popup-content img {
  width: auto;           /* proportional width */
  max-width: 300px;      /* limit width */
  max-height: 500px;     /* allow tall images without cutting neck */
  object-fit: contain;   /* show full image */
  border-radius: 10px;
}

.popup-text {
  text-align: left;
  flex: 1;
  min-width: 200px;
}

.popup-text h3 {
  margin-top: 0;
  color: #222;
}

.popup-text p {
  color: #555;
  line-height: 1.5;
}

/* CLOSE BUTTON */
.popup a {
  position: absolute;
  top: 10px;
  right: 20px;
  text-decoration: none;
  font-size: 28px;
  color: #333;
  font-weight: bold;
}

.popup a:hover {
  color: #000;
}

/* ================== RESPONSIVE ================== */
@media(max-width: 768px) {
  .popup-content {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .popup-content img {
    max-width: 80%;
    max-height: 400px;
  }

  .popup-text {
    text-align: center;
  }
}
/* ================== CHURCH CARDS ================== */
.church-card img {
  width: 250px;           /* fixed width for uniformity */
  height: 180px;          /* fixed height for all cards */
  object-fit: cover;      /* fills the card nicely */
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ================== POPUP MODAL ================== */
.popup-content img {
  width: 300px;           /* fixed width for all popups */
  height: 200px;          /* fixed height */
  object-fit: contain;    /* keeps full church visible without cutting */
  border-radius: 10px;
}
.family-gallery {
    display: flex;
    justify-content: center;
    gap: 20px; /* space between images */
    margin-top: 30px;
}

.family-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.family-gallery img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%; /* 👈 makes circle */
    cursor: pointer;
    transition: transform 0.3s;
}

.family-gallery img:hover {
    transform: scale(1.1);
}

/* Popup background */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

/* Full image */
.popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

body {
    background: linear-gradient(to right, #f8f1d4, #e6c76b, #f8f1d4);
}

