/* Mobile-specific styling for the About modal on the Blog */
@media (max-width: 768px) {
  /* Scope to the About modal only to avoid unintended overrides */
  #about-modal .modal-content {
    background: linear-gradient(160deg, rgba(5, 5, 15, 0.95) 0%, rgba(0, 0, 30, 0.98) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding-left: 10px;
    padding-right: 10px;
  }

  #about-modal .about-container {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: calc(85vh - 40px);
    overflow-y: auto;
  }

  #about-modal .about-sidebar {
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    padding-right: 0;
  }

  #about-modal .about-sidebar .profile-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
  }

  #about-modal .about-heading {
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-align: center;
  }

  #about-modal .about-sidebar .about-text {
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 0;
  }

  #about-modal .about-content {
    text-align: center;
    border-left: none;
    padding-left: 0;
    padding-right: 0;
    padding-top: 15px;
    overflow-y: visible;
    width: 100%;
    box-sizing: border-box;
  }

  #about-modal .tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
  }

  #about-modal .tab-button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  #about-modal .about-subheading {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 4px;
    color: #00c6ff;
  }

  #about-modal .about-content .about-text {
    font-size: 0.9rem;
    text-align: justify;
    margin-bottom: 10px;
  }

  #about-modal .tab-content .team-member img {
    margin-bottom: 4px;
  }

  #about-modal .close-modal-btn {
    top: 10px;
    right: 10px;
    font-size: 1rem;
  }

  /* EXACT mobile layout for About The Team (match homepage mobile) */
  #about-team > .about-text {
    display: grid !important;
    grid-template-columns: 1fr !important; /* force single column */
    gap: 16px !important;
    align-items: stretch !important;
  }

  #about-team .team-member {
    text-align: left;
    display: grid;
    grid-template-columns: 80px 1fr !important; /* image left, text right */
    gap: 8px;
    align-items: center; 
    grid-auto-flow: row; /* ensure items fill rows, not columns */
  }

  #about-team .team-member img {
    width: 80px !important;  /* override inline desktop size */
    height: 80px !important; /* override inline desktop size */
    object-fit: cover;
    border-radius: 50%;
    display: block;
  }

  /* Place all non-image content in the right column */
  #about-team .team-member > :not(img) {
    grid-column: 2 / 3 !important; /* force all text to right column */
  }

  /* Ensure title sits above blurb with slight spacing */
  #about-team .team-member h3.about-subheading {
    margin: 0 0 6px 0;
  }

  #about-team .team-member p.about-text {
    margin: 0; /* base reset */
  }

  #about-team .team-member p.about-text:first-of-type {
    margin: 0 0 6px 0; /* space between title and blurb */
  }

  #about-team .team-member .about-subheading {
    margin: 0 0 6px 0;
  }

  #about-team .team-member .about-text {
    margin: 0;
  }

  /* Hide Support nunn.ai upgrade button on blog About modal (mobile only) */
  #about-modal #about-upgrade-btn {
    display: none !important;
  }

  /* Hide the "The Team" heading on mobile in the blog modal only */
  #about-modal #about-team > h2.about-subheading {
    display: none !important;
  }
}


