/* === General Typography === */
.blog-grid h4 {
  min-height: 36px;
}

p {
  font-size: 14px;
  line-height: 20px;
  text-align: justify;
}

/* === Team Grid Layout === */
ul.responsive-team {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start; /* ✅ align items from the left */
  padding: 0;
  margin: 0 -10px; /* ✅ balances spacing */
  list-style: none;
}

.responsive-team .blog-inter {
  flex: 0 1 calc(25% - 20px); /* ✅ exactly 4 per row with even spacing */
  margin: 10px; /* ✅ consistent gap around each card */
  padding: 0;
  display: flex;
}

@media (max-width: 1200px) {
  .responsive-team .blog-inter {
    flex: 0 1 31%; /* 3 cards per row (small laptops) */
  }
}

/* ✅ Tablet view — must come AFTER the 1200px rule */
@media (max-width: 992px) {
  .responsive-team .blog-inter {
    flex: 0 1 calc(50% - 20px); /* 2 cards per row (tablets) */
  }
}

@media (max-width: 600px) {
  .responsive-team .blog-inter {
    flex: 0 1 100%; /* 1 card per row (mobile) */
  }
}

/* === Team Member Card === */
.member-card {
  flex: 1;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  padding: 15px; /* ⬅️ reduced padding */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.member-card:hover {
  transform: translateY(-5px);
}

.member-card figure {
  margin: 0 0 10px;
}

.member-card figure img {
  width: 100%;
  height: 260px; /* ⬅️ reduced from 320px */
  object-fit: cover;
  border-radius: 10px;
}

.member-name {
  font-size: 1.1em; /* ⬅️ slightly smaller text */
  font-weight: 600;
  margin-bottom: 4px;
}

.member-title {
  color: #666;
  font-size: 0.9em; /* ⬅️ smaller font */
  margin: 3px 0;
}

/* === Popup Modal === */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

/* ✅ Center popup box on the screen */
.popup.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ✅ Updated layout — big image on the left, content on the right */
.popup-content {
  position: relative;
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  max-width: 900px;
  width: 90%;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: row;
  align-items: stretch; /* ✅ aligns text with image height */
  gap: 25px;
  transform: translateY(0);
  top: auto;
  left: auto;
}

/* Left: large photo */
.popup-photo {
  width: 320px;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Right: text block */
.popup-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.popup-text h4 {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 10px;
}

.popup-text p {
  font-size: 15px;
  line-height: 1.6;
  text-align: justify;
  margin: 0;
  align-self: stretch;
}

/* Close button */
.popup-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
  .popup-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .popup-photo {
    width: 220px;
    height: 220px;
    margin-bottom: 15px;
  }

  .popup-text {
    text-align: left;
  }
}
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  padding: 8px 14px;
  transition: background 0.3s;
  z-index: 2;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.nav-btn.left {
  left: 15px;
}

.nav-btn.right {
  right: 15px;
}

