/* CSS for Testimonials Section */

/* --- Layout (Grid System) --- */
.section.guide .guide_content {
  /* Default Mobile: Stacked naturally (Image -> Testimonials -> Buttons) */
  /* No special display property needed for mobile block layout, or use flex-col if needed */
  gap: 1.5em; /* Add some gap between elements */
}

/* PC Layout (> 800px) */
@media (min-width: 801px) {
  .section.guide .guide_content {
    display: grid;
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "image testimonials"
      "buttons testimonials";
    column-gap: 2em;
    row-gap: 1em;
    align-items: start;
    
    /* Viewport Sizing - use calc to account for padding */
    width: calc(100vw - 8em); /* Account for .content padding (4em * 2) */
    height: calc(100vh - 4em); /* Leave some margin */
    max-width: 1200px;
    max-height: none; /* Remove max-height cap */
    overflow: visible;
    box-sizing: border-box;
    margin: 0 auto;
  }

  .download-preview {
    grid-area: image;
    width: 100%;
    margin-bottom: 0;
  }

  .download-buttons {
    grid-area: buttons;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 0;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .download-btn {
      width: 100%;
      max-width: 100%;
      justify-content: center;
      box-sizing: border-box;
  }

  .team_testimonials {
    grid-area: testimonials;
    /* Calculate height based on grid container minus padding */
    height: calc(100vh - 8em); /* Container height minus padding/margins */
    max-height: calc(100vh - 8em);
    min-height: 300px; /* Ensure minimum usable height */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0;
  }
  
  /* Update Internal Testimonials Layout for PC Fixed Height */
  .testimonials_content {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      max-height: 100%;
      padding-right: 0.5em; 
  }
  
  .testimonials_title {
      flex-shrink: 0;
  }
}

/* --- Testimonials Styling --- */
.team_testimonials {
  width: 100%;
  background: rgba(255, 255, 255, 0.05); /* Subtle background */
  border-radius: 12px;
  padding: 1.5em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  /* Mobile default: auto height */
}

.testimonials_title h3 {
  margin: 0 0 1em 0;
  font-size: 1.3em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5em;
  font-family: "Noto Serif SC", serif;
}

.testimonials_content {
  display: flex;
  flex-direction: column;
  gap: 1em;
  /* max-height is set in media queries - PC: 100%, Mobile: 400px */
  overflow-y: auto;
  padding-right: 0.5em;
}

/* Custom Scrollbar */
.testimonials_content::-webkit-scrollbar {
  width: 6px;
}
.testimonials_content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
.testimonials_content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.testimonial_item {
  display: flex;
  gap: 1em;
  padding: 1em;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0; /* Prevent item compression */
}

.member_info {
  flex: 0 0 100px;
  text-align: right;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  padding-right: 1em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.member_name {
  font-size: 1.1em;
  font-weight: bold;
  color: #dcb5ff; /* Light purple tint */
  margin-bottom: 0.3em;
}

.member_position {
  font-size: 0.8em;
  color: #bbb;
}

.member_comment {
  flex: 1;
  font-size: 0.95em;
  line-height: 1.5;
  color: #eee;
  display: flex;
  align-items: center;
}

/* Mobile Adjustments for Internal Elements */
@media (max-width: 800px) {
  .team_testimonials {
    margin: 1em 0; /* Add margin between image and buttons */
    overflow-x: hidden; /* Hide horizontal scrollbar */
  }
  
  .testimonials_content {
    max-height: 400px; /* Limit height on mobile */
    overflow-x: hidden; /* Hide horizontal scrollbar */
  }
  
  .testimonial_item {
    flex-direction: column;
    gap: 0.5em;
  }

  .member_info {
    text-align: left;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 0;
    padding-bottom: 0.5em;
    flex: auto;
    flex-direction: row;
    align-items: center;
    gap: 1em;
  }
  
  .member_name {
      margin-bottom: 0;
  }
}
