/* ==============
   Guests Page
=============== */
.guests-single {
  padding: 2rem 2rem 4rem;
  background: #fff;
}

body.admin-bar .guests-single {
  padding-top: 4rem;
}

.guests-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.guests-content {
  flex: 0 0 72%;
  border-right: 2px solid #212121;
  padding-right: 2rem;
}

.guests-sidebar {
  flex: 0 0 24%;
  display: flex;
  flex-direction: column;
}

.guests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.guest-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* ensure equal heights within grid */
  text-align: left;
  cursor: pointer;
  padding: 0.5rem 0;
}

.guest-card-inner {
  flex-grow: 1;
}

.guest-image {
  width: 100%;
  aspect-ratio: 3 / 4; /* Portrait aspect ratio */
  overflow: hidden;
  margin-bottom: 2rem;
}

.guest-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.guest-name {
  font-size: clamp(1.1rem, 1vw, 1rem);
  font-weight: 600;
  color: #111;
  margin-bottom: 1rem;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
}

.guest-role {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  font-family: "eb-garamond", serif;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 1rem;
}

.read-bio-btn {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #000;
  border: 2px solid #000;
  background: #fff;
  padding: 0.5rem 0.9rem;
  align-self: flex-start;
  transition: all 0.3s ease;
  text-align: left;
  cursor: pointer;
  margin-top: auto; /* push to bottom */
}

.read-bio-btn:hover,
.read-bio-btn.active {
    background: #000;
    color: #fff;
}


/* Sidebar content styles remain unchanged */
.guest-bio-heading {
  font-size: clamp(1.5rem, 3.8vw, 2.25rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.guest-bio-name {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #111;
  font-family: "eb-garamond", serif;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 1rem;
}

.guest-bio-text {
  font-size: .95rem;
  line-height: 1.7;
  color: #333;
  font-family: "eb-garamond", serif;
  font-weight: 400;
  font-style: normal;
  padding-right: 0;
  margin-bottom: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .guests-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guests-content {
    border-right: 0;
    padding-right: 1rem;
  }

  .guests-container {
    flex-direction: column;
  }

  .guests-content,
  .guests-sidebar {
    flex: 1 1 100%;
  }
}



/* ----------- */

/* Ensure container uses two columns */
.guests-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
  align-items: flex-start;
}

/* Content (grid of guests) */
.guests-content {
  flex: 0 0 65%;
}


/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .guests-container {
    flex-direction: column;
  }
  .guests-content,
  .guests-sidebar {
    flex: 1 1 100%;
    position: static;
    border-left: none;
    box-shadow: none;
    padding: 0;
  }
}


.guests-sidebar {
  flex: 0 0 30%;
  max-height: 60vh; /* Fill viewport height */
  overflow-y: auto;  /* Scroll when content overflows */
  position: sticky;
  top: 6rem; /* adjust if you have a fixed header (use top: 6rem; if needed) */
  align-self: flex-start;
  padding-right: 1rem;
}

/* Smooth scrolling and appearance */
.guests-sidebar::-webkit-scrollbar {
  width: 8px;
}

.guests-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

.guests-sidebar::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
}

/* Responsive: stack on mobile without fixed height */
@media (max-width: 768px) {
  .guests-sidebar {
    flex: 1 1 100%;
    position: static;
    max-height: none;
    overflow: visible;
    border-left: none;
    box-shadow: none;
    padding: 0;
  }
}


/* Hide close button by default */
#guest-bio-sidebar .close-bio-overlay {
    display: none;
}

/* Show overlay + close button only on mobile when mobi-open is active */
@media (max-width: 768px) {
    #guest-bio-sidebar.mobi-open {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100%;
        background-color: white;
        z-index: 1000;
        padding: 2rem;
        overflow-y: auto;
    }

    #guest-bio-sidebar.mobi-open .close-bio-overlay {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
        cursor: pointer;
        background: none;
        border: none;
        color: #000;
        z-index: 1001;
    }

    #guest-bio-sidebar.mobi-open .guest-bio-text {
        max-height: calc(100vh - 8rem);
        overflow-y: auto;
    }
}


