body {
  padding-top: 56px;
}
.left-aligned {
  margin-left: auto;
}
.bg-dark {
  background-color: #343a40 !important;
}

.navbar .logo {
  height: 70px;
  width: auto;
  display: block;
}

.homepage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
}

.homepage > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.bg-red {
  background-color: rgba(112, 35, 24) !important;
}
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(22rem, 40vw, 100rem);
  display: flex;
  align-items: center;
  padding: 1.5rem;
}

/* text sits above the gradient overlage */
.hero-title > .hero {
  position: relative;
  z-index: 2;
}

/* Increase main navbar link size */
.navbar-nav .nav-link {
  font-size: 1.35rem;
}

/* PDF responsive styling - iframe preferred for scrolling */
.pdf-container {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: #f8f9fa;
}

.pdf-iframe {
  width: 100%;
  height: 800px;
  border: none;
  display: block;
}

/* Fallback for embed if needed */
embed[type="application/pdf"] {
  width: 100%;
  height: 800px;
  border: none;
  display: block;
}

/* Table responsive styling */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  font-size: 0.9rem;
}

table th,
table td {
  white-space: nowrap;
  padding: 0.5rem !important;
}

/* Ensure tables fit within section cards */
.section-card table {
  width: 100% !important;
  table-layout: fixed;
}

.section-card .table-responsive {
  overflow-x: auto;
  width: 100%;
}

/* Desktop table styling - text wrapping within cards */
@media (min-width: 769px) {
  .section-card table th,
  .section-card table td {
    white-space: normal !important;
    word-wrap: break-word;
    vertical-align: top;
    overflow-wrap: break-word;
  }

  .section-card .table-responsive {
    overflow-x: visible;
  }

  /* Optimal column widths for part tables */
  .section-card table th:nth-child(1),
  .section-card table td:nth-child(1) {
    width: 25%;
  }

  .section-card table th:nth-child(2),
  .section-card table td:nth-child(2) {
    width: 20%;
  }

  .section-card table th:nth-child(3),
  .section-card table td:nth-child(3) {
    width: 55%;
  }
}

/* Headers background image*/
.page-safety .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/safety-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-safety .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-attributions .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/notebook-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-attributions .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-contribution .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/contributions-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-contribution .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-description .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/parts-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-description .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-education .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/education-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-education .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-engineering .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/engineering-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-engineering .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-entrepreneurship .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/entre-cover-page.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-entrepreneurship .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-experiments .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/experiments-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-experiments .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-hardware .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/hardware-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-hardware .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-hp .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/human-practices-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-hp .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-members .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/team-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-members .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-notebook .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/notebook-cover-page.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-notebook .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-results .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/results-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-results .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-software .hero {
  background: url("https://static.igem.wiki/teams/5679/software/fig2-prelim-code.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-software .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

.page-ihp .hero {
  background: url("https://static.igem.wiki/teams/5679/coverpages/ihp-cover.webp")
    no-repeat center center / cover;
  position: relative;
  z-index: 0;
}
.page-ihp .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(112, 35, 24, 0.6),
    rgba(255, 255, 255, 0.35)
  );
}

/*Figures Alignment*/
figure figcaption {
  text-align: center;
}

/*Text alignment */
.center {
  text-align: center;
}

/*Button */
.btn-fullwidth {
  width: 100%;
  display: block;
  margin-bottom: 1em;
}
.collapsible.btn-link {
  text-align: left;
  font-size: 1.1em;
  cursor: pointer;
}

/*Sidebar*/
main,
.page-width {
  max-width: none;
  padding-inline: clamp(1rem, 4vw, 3rem);
  margin-inline: 0;
}
main {
  padding-block: 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: start;
  gap: 2rem;
}
aside {
  position: sticky;
  top: 7rem;
}
.sidebar {
  border-radius: 12px;
  background: #df9210;
  padding: 1rem;
  text-align: center;
}
.sidebar:not(:last-child) {
  margin-block-end: 1rem;
}
.sidebar a {
  display: block;
  text-align: left;
  max-width: 32ch;
  margin: 12px auto;
  line-height: 1.6;

  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.25rem;

  padding-left: 1.25rem;
  text-indent: -1.25rem;
  overflow-wrap: anywhere;
}
.sidebar a:hover {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 6px;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Rounded card sections around text*/
.section-card {
  background: #fffbf0;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: clamp(1rem, 2.5vw, 2rem);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  /* make anchor jumps land below fixed navbar */
  scroll-margin-top: calc(var(--nav-offset, 72px) + 10px);
}

.section-card {
  background: #fffbf0;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: clamp(1rem, 2.5vw, 2rem);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  /* make anchor jumps land below fixed navbar */
  scroll-margin-top: calc(var(--nav-offset, 72px) + 10px);
}

.section-card + .section-card {
  margin-top: clamp(1rem, 2vw, 1.5rem);
}
.section-card > h1,
.section-card > h2:first-child {
  margin-top: 0;
}
.section-card img,
.section-card table {
  max-width: 100%;
}
.section-card table {
  width: 100%;
}

/* different colors for card sections */

/*results sec 2*/
#colorimetric.section-card,
#verification.section-card,
#quantification.section-card,
#competitor.section-card,
#competitors.section-card,
#hemagglutinationexp.section-card,
#benchmarking.section-card,
#customer-interview.section-card,
#engcloningcycle.section-card,
#engcloningcycles.section-card {
  background: #deebf7;
}

/*results sec 3*/
#hemagglutinationres.section-card,
#protocolsexp.section-card,
#initialCrossmatchA.section-card,
#initialCrossmatchB.section-card,
#our-solution.section-card,
#globin.section-card,
#dryeng.section-card,
#dryengs.section-card {
  background: #e2f0d9;
}

/*results sec 4*/
#dry-lab.section-card,
#referencesexp.section-card,
#filtering.section-card,
#sequence-analysis.section-card,
#development-plans.section-card,
#long-term-impacts.section-card,
#protection.section-card,
#exit.section-card,
#hardeng.section-card,
#hardengs.section-card {
  background: #f6d3b8;
}

/*results sec 5*/
#hardwareresults.section-card,
#meab.section-card,
#filtration.section-card,
#scoby.section-card,
#ptfe.section-card,
#futurehardware.section-card,
#longtermimpact.section-card,
#longtermimpacts.section-card,
#long-term-contents.section-card,
#referenceseng.section-card {
  background: #e5d1e5;
}

/*results sec 6*/
#future.section-card,
#softwareproofofconcept.section-card {
  background: #ebbfc3;
}

/*results sec 7*/
#resultsref.section-card {
  background: #d6eee8;
}

/*Box in IHP*/
.box1 {
  border: 2px solid #000;
  padding: 1rem;
  margin: 1.5rem auto;
  border-radius: 6px;
  background: #fff;
  width: 70%;
  text-align: center;
}
.box1 p:last-child {
  margin-bottom: 0;
}
.box2 {
  border: 2px solid #000;
  padding: 0.75rem 1rem;
  margin: 1.5rem auto;
  border-radius: 6px;
  background: #fff;
  width: 70%;
  text-align: left;
}
.box2 p:last-child {
  margin-bottom: 0;
}

/*butonsssss*/
.btn-link {
  display: inline-block;
  background: #6d8c49;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.02s ease-in-out,
    box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.btn-link:hover {
  filter: brightness(1.05);
  text-decoration: none;
}
.btn-link:active {
  transform: translateY(1px);
}
.btn-link:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}
.btn-row {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-row.center {
  justify-content: center;
  display: flex;
  gap: 1.5rem;
}
.btn-row.right {
  justify-content: flex-end;
  display: flex;
}

@media (max-width: 768px) {
  /* Mobile navbar adjustments */
  .navbar-nav .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }

  .navbar .logo {
    height: 50px;
  }

  /* Mobile sidebar - stack vertically */
  main {
    display: block;
    padding-block: 1rem;
  }

  aside {
    position: static;
    margin-bottom: 1.5rem;
  }

  .sidebar {
    margin: 0;
    border-radius: 8px;
  }

  .sidebar a {
    font-size: 1.1rem;
    margin: 8px auto;
  }

  /* Mobile hero sections */
  .hero {
    min-height: clamp(18rem, 35vw, 25rem);
    padding: 1rem;
  }

  .hero h1 {
    font-size: 2rem !important;
  }

  .hero .lead {
    font-size: 1rem;
  }

  /* Mobile section cards */
  .section-card {
    padding: clamp(0.75rem, 2vw, 1.5rem);
    margin: 0.75rem 0;
  }

  /* Mobile team member cards */
  .teamback {
    max-width: 100%;
    margin: 1rem 0;
  }

  /* Mobile image responsiveness */
  .teamback img {
    max-width: 80% !important;
  }

  /* Mobile button adjustments */
  .btn-row {
    gap: 0.5rem;
    flex-direction: column;
  }

  .btn-link {
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mobile container adjustments */
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Mobile page content */
  .page-content {
    margin-left: 0 !important;
  }

  .col-8 {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile PDF responsiveness */
  .pdf-iframe {
    height: 60vh !important;
    min-height: 400px;
    max-height: 600px;
  }

  .pdf-container {
    margin: 1rem 0;
  }

  /* Fallback for embed */
  embed[type="application/pdf"] {
    width: 100% !important;
    height: 60vh !important;
    min-height: 400px;
    max-height: 600px;
  }

  /* Mobile table responsiveness */
  table {
    font-size: 0.75rem !important;
  }

  table th,
  table td {
    padding: 0.4rem !important;
    white-space: normal !important;
    word-break: break-word;
  }

  .table-responsive {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 480px) {
  /* Extra small mobile adjustments */
  .hero h1 {
    font-size: 1.75rem !important;
  }

  .teamback {
    padding: 1rem;
  }

  .section-card {
    padding: 0.75rem;
  }

  .btn-link {
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
  }

  /* Extra small mobile PDF adjustments */
  .pdf-iframe {
    height: 50vh !important;
    min-height: 300px;
    max-height: 400px;
  }

  embed[type="application/pdf"] {
    height: 50vh !important;
    min-height: 300px;
    max-height: 400px;
  }
}

/* CALLOUT */
.bd-callout {
  padding: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e9ecef;
  border-left-width: 0.25rem;
  border-radius: 0.25rem;
}
.bd-callout h4 {
  margin-bottom: 1.25rem;
}
.bd-callout p:last-child {
  margin-bottom: 0;
}
.bd-callout code {
  border-radius: 0.25rem;
}
.bd-callout + .bd-callout {
  margin-top: -0.25rem;
}
.bd-callout-info {
  border-left-color: #5bc0de;
}
.bd-callout-warning {
  border-left-color: #f0ad4e;
}
.bd-callout-danger {
  border-left-color: #d9534f;
}

/* footer */

.fa {
  padding: 12px;
  font-size: 24px;
  width: 44px;
  height: 44px;
  text-align: center;
  text-decoration: none;
  margin: 0 6px 0 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fa:hover {
  opacity: 0.85;
}

.fa-instagram {
  background: #c13584; /* more recognizable IG color than #125688 */
  color: #fff;
}

.fa-link {
  background: #43e660; /* Linktree green */
  color: #000;
}

.footer .logo {
  height: auto;
  max-width: 100%;
  max-height: clamp(80px, 12vw, 160px);
}
.footer a.footer-link {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 2px;
}
.footer a.footer-link:hover {
  text-decoration: underline;
}
.footer hr {
  border-color: rgba(255, 255, 255, 0.35);
}
.footer .footer-legal {
  padding-left: 1rem;
}
.footer .top-row {
  align-items: flex-start;
}
.footer h4 {
  margin-top: 0;
  line-height: 1.2;
}
