/* ===================================
   Biography Modal Styles
   "Book-Style" Modal with Curved Text Wrapping
   ================================== */

:root {
  --profile-img: none;
  --modal-bg: #242882;
  --modal-text: #ffffff;
  --modal-serif: 'Lora', 'Garamond', 'Georgia', serif;
}

/* Modal Overlay */
.bio-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Content Container */
.bio-modal-content {
  position: relative;
  background-color: var(--modal-bg);
  color: var(--modal-text);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Close Button */
.bio-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2.5rem;
  color: var(--modal-text);
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.2s ease, text-shadow 0.2s ease;
  padding: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bio-modal-close:hover {
  transform: scale(1.2);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.bio-modal-close:active {
  transform: scale(0.95);
}

/* Modal Header - Contains Image & Text */
.bio-modal-header {
  padding: 40px;
  overflow: auto;
  clear: both;
}

/* Image Container - Square with Curved Silhouette */
.bio-modal-image {
  width: 350px;
  height: 350px;
  background-size: cover;
  background-position: center;
  background-color: #f5f5f5;
  background-image: url('http://fictap.com.ph/static/images/logo.jpg');
  border-radius: 8px;
  margin: 0 30px 20px 0;
  float: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Member Name */
.bio-modal-name {
  font-family: var(--modal-serif);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

/* Member Title/Position */
.bio-modal-title {
  font-family: var(--modal-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fbbf24;
  margin: 0 0 20px 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Biography Description Text */
.bio-modal-description {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: justify;
}

/* ===================================
   RESPONSIVE DESIGN
   ================================== */

/* Tablets and below (768px and under) */
@media (max-width: 768px) {
  .bio-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  /* Stack layout on mobile */
  .bio-modal-header {
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    gap: 25px;
  }

  /* Image moves to top center and stacks */
  .bio-modal-image {
    width: 280px;
    height: 280px;
    float: none;
    margin: 0 auto;
    /* Disable shape-outside on mobile for natural text flow */
    shape-outside: none;
    shape-margin: 0;
  }

  /* Text flows naturally below image */
  .bio-modal-text {
    width: 100%;
    margin-top: 30px;
  }

  /* Adjust heading sizes for mobile */
  .bio-modal-name {
    font-size: 1.5rem;
  }

  .bio-modal-title {
    font-size: 1rem;
  }

  .bio-modal-description {
    font-size: 0.9rem;
    text-align: left;
  }

  /* Adjust close button position */
  .bio-modal-close {
    top: 10px;
    right: 10px;
    font-size: 2rem;
    width: 45px;
    height: 45px;
  }
}

/* Small phones (480px and under) */
@media (max-width: 480px) {
  .bio-modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .bio-modal-header {
    padding: 20px 15px;
    gap: 20px;
  }

  .bio-modal-image {
    width: 200px;
    height: 200px;
  }

  .bio-modal-name {
    font-size: 1.25rem;
  }

  .bio-modal-title {
    font-size: 0.9rem;
    margin-bottom: 15px;
  }

  .bio-modal-description {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .bio-modal-close {
    top: 5px;
    right: 5px;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
  }
}

/* Scrollbar Styling */
.bio-modal-content::-webkit-scrollbar {
  width: 8px;
}

.bio-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.bio-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.bio-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
