/* About page styles - Two-column Q&A layout */

/* Highlight Text Styling */
.highlight-text {
  color: #7294BB;
}

/* Override default main styles for about page */
main {
  max-width: 1200px !important;
  margin: 2em auto !important;
  padding: 0 2rem !important;
}

/* Main title styling */
h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

/* Q&A Container */
.qa-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Individual Q&A Item - Mobile first approach */
.qa-item {
  display: block;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #e0e0e0;
  width: 100%;
  clear: both;
}

/* Desktop layout - two columns */
@media (min-width: 769px) {
  .qa-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    gap: 3rem;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
  }
  
  /* CSS Grid as progressive enhancement for desktop */
  @supports (display: grid) {
    .qa-item {
      display: grid !important;
      grid-template-columns: 300px 1fr !important;
      grid-gap: 3rem !important;
    }
  }
}

.qa-item:last-child {
  border-bottom: none;
  margin-bottom: 2rem;
}

/* Question Column - Mobile first */
.question {
  margin-bottom: 1rem;
  display: block;
}

/* Desktop layout for question */
@media (min-width: 769px) {
  .question {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 300px;
    flex: 0 0 300px;
    position: sticky;
    top: 2rem;
    align-self: start;
    margin-bottom: 0;
  }
  
  /* CSS Grid override for desktop */
  @supports (display: grid) {
    .question {
      flex: none;
    }
  }
}

.question h2 {
  color: #2c3e50;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  padding-right: 1rem;
  font-family: "Poppins", "Inter", sans-serif;
}

/* Answer Column - Mobile first */
.answer {
  display: block;
}

/* Desktop layout for answer */
@media (min-width: 769px) {
  .answer {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    align-self: start;
  }
  
  /* CSS Grid override for desktop */
  @supports (display: grid) {
    .answer {
      flex: none;
    }
  }
}

.answer p {
  color: #444;
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0 0 1.5rem 0;
  text-align: justify;
}

/* Diagram styling */
.diagram-container {
  text-align: center;
  margin: 2rem 0;
}

.epidemica-diagram {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Project images styling */
.project-images {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.project-image-container {
  text-align: center;
}

.project-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Responsive Design - Fine-tuning for smaller screens */
@media (max-width: 768px) {
  .question h2 {
    font-size: 1.3rem;
    padding-right: 0;
  }
  
  .answer p {
    font-size: 1rem;
    text-align: left;
  }
  
  h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .qa-container {
    padding: 0 1rem;
  }
  
  .qa-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }
  
  .question h2 {
    font-size: 1.2rem;
  }
  
  .answer p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* Diagram responsive */
  .diagram-container {
    margin: 1.5rem 0;
  }
  
  h1 {
    font-size: 1.8rem;
  }
}
