/* Some common CSS reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 100px; /* Forces all page-jump anchors to stop 100px short */
  scroll-behavior: auto; /* Optional: adds a smooth scroll effect */
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--platinum);
  color: var(--dark-text-color);
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  text-wrap: balance;
}
p {
  text-wrap: pretty; /* Prevents orphans on lines */
}

/* css variables */

:root {
  --off-white-background: #f9f9f9;
  --dark-background: #121212;
  --dark-gray: #202020;
  --dark-text-color: #1a1a1a;
  --light-text-color: #e0e0e0;
  --med-padding: 1rem;
  --small-padding: 0.5rem;
  --large-padding: 2rem;
  --large-container: 1200px;
  --small-container: 480px;
  --med-container: 800px;
  --med-container: 960px;
  --dark-border: #2d2d2d;
  /* metallic color scheme */
  --black: #000000ff;
  --dim-grey: #66666eff;
  --rosy-granite: #9999a1ff;
  --alabaster-grey: #e6e6e9ff;
  --platinum: #f4f4f6ff;
}

main section {
  margin: 1.3rem 0;
}
main h1 {
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.7rem;
}

p {
  margin-top: 2rem;
}
.expectorant-title {
  margin-top: 2rem;
}

.responsive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 275px));
  gap: 1rem;
  justify-content: center;
}
/* Chamber spec styles */

.chamber-spec-grid,
.lp-examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 325px));
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.card-spec {
  border: 1px solid var(--dark-border); /* Subtle border replaces heavy shadows in dark mode */
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  height: min-content;
  /* justify-content: space-between; */
  overflow: hidden;
  flex-direction: column;
  border-radius: 12px;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease; /* Smooth hover transition */
  line-height: 1.4;

  h3 {
    font-size: 1rem;
    color: var(--dark-text-color);
  }
  .card-spec-description {
    background-color: #1a1a1a31;
    padding: 0.6rem;
    border-radius: 0.8rem;

    p {
      margin: 0;
      padding: 0;
      font-size: 0.8rem;
      font-weight: 600;
    }
    ul {
      padding: 0.5rem 1rem;
      font-size: 0.8rem;
    }
    details .title {
      font-size: 0.8rem;
    }
  }
}

/* Card styles */

.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(
    --dark-background
  ); /* Slightly lighter than page bg for visual elevation */
  color: #f5f5f5;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--dark-border); /* Subtle border replaces heavy shadows in dark mode */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
}
.card a:visited {
  color: #f5f5f5;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.lp-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--dark-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  h3 {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 0;
  }
  p {
    margin-top: 0.5rem;
  }
  pre {
    margin-top: -1rem;
  }

  code {
    font-weight: 600;

    i {
      font-size: 0.7rem;
    }
  }
}

/* Hover Effect */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-description {
  padding: 0.5rem;
  font-weight: 200;
  font-size: 1.3rem;
  p {
    margin-top: 0.5rem;
  }
}

.card-product-summary {
  border: 1px solid var(--dark-border); /* Subtle border replaces heavy shadows in dark mode */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  /* justify-content: space-between; */
  overflow: hidden;
  flex-direction: column;
  border-radius: 12px;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease; /* Smooth hover transition */
  line-height: 1.1;

  .card-image {
    text-align: center;
    width: 100%;
    aspect-ratio: 16 / 9; /* Prevents Cumulative Layout Shift (CLS) */
    object-fit: cover; /* Prevents image distortion */
    img {
      max-height: 200px;
      margin: 0 auto;
      border-radius: 6px;
    }
  }
  .card-description {
    padding: 0;
    /* margin: auto 0 0 0; */
  }
  .title {
    font-size: 1rem;
  }
  p {
    font-size: 0.8rem;
    font-weight: 400;
  }

  &:hover {
    /* transform: translateY(-5px);  */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15); /* Deepened shadow */
  }

  a {
    width: 100%;
    margin: auto 0 0 0;
  }
}
.float-left-image-container {
  float: left;
  margin: 1rem 1.7rem 0.5rem 0;
  img {
    border-radius: 0.5rem;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
  }
}
.float-right-image-container {
  float: right;
  margin: 0rem 0 0.5rem 1.7rem;
  img {
    border-radius: 0.8rem;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
  }
}
#expectorant-chambers p {
  font-size: 0.9rem;
  line-height: 1.4;
}

.flex-row-container-no-wrap {
  display: flex;
  justify-content: space-evenly;
  gap: 1rem;
}

.flex-row-container {
  display: flex;
  flex-direction: row-reverse;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
  justify-content: space-between;

  p {
    padding: 0;
    margin: 0 0 1rem 0;
  }
}
.flex-row-container .image-container {
  margin: 0 auto;
  flex: 0 0 350px;
}
.image-container img {
  width: 100%;
  object-fit: cover;
  border-radius: 1.3rem;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
}
.flex-row-container .content-container {
  flex: 1 0 400px;
}
.flex-column-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
section.ec1a-pm .card-spec {
  max-width: 300px;
}
/* EC1xHA */
.ec1xha-content {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ec1xha-content img {
  margin: 0 auto;
  border-radius: 0.5rem;
  object-fit: cover;
  max-width: 350px;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}

.ec1xha-content p {
  margin: 0;
}

.ec1xha-specs {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
/* EC127 chamber */
.ec127-content {
  img {
    max-width: 350px;
  }
  margin-bottom: 2.8rem;
}
.ec127-spec-content {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2.5rem 0;
  .spec-content {
    flex: 1 1 780px;
  }

  .card-spec {
    max-width: 300px;
    min-width: 300px;
  }
  h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
  }
  p {
    margin-top: 0;
    margin-bottom: 1.2rem;
  }
}

/* EC1.3W chamber */

.ec13w-content {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;

  img {
    border-radius: 1rem;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
    object-fit: cover;
  }
}

.ec13w-content > * {
  max-width: 400px;
  height: fit-content;
}

/* ETx Chambers */

.etx-image-content,
.etx-spec-content {
  display: flex;
  gap: 3rem;
  margin: 3rem 0;
  flex-wrap: wrap;
  justify-content: center;
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
  background-color: var(--platinum);
  img {
    border-radius: 1rem;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
    object-fit: cover;
    height: fit-content;
    max-width: 330px;
  }

  .card-spec {
    max-width: 300px;
  }
}
.etx-spec-content {
  justify-content: center;
  gap: 1rem;
  background-color: var(--platinum);
}

/* Standalone controllers */
.intro-standalone-controllers {
  padding: 0 3rem;
  margin-bottom: 3rem;
  font-size: 1.1rem;
  line-height: 1.4;
}
#standalone-controllers h1 {
  margin-top: 2rem;
}
#standalone-controllers .card-description p {
  font-size: 0.9rem;
}

/* PC100-2 controller */
#pc100-2 {
  h1 {
    margin: 3rem 0;
    font-size: 2rem;
    font-weight: 500;
  }
  .pc100-2-content p {
    margin-top: 0rem;
    margin-bottom: 1rem;
    /* margin: 0.5rem 0; */
  }
  .float-left-image-container {
    margin-top: 0rem;
    img {
      max-width: 275px;
    }
  }
  .pc100-2-images {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }

  .pc100-2-images figure {
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
    flex: 1 1 275px;
    max-width: 275px;
  }
  .pc100-2-controller-specs {
    margin-top: 2rem;
  }

  .card-spec {
    margin: 0 auto;
    max-width: 600px;
  }
}
/* TC01 Controller */

#tc01 {
  .tc01-examples {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    h2 {
      font-size: 1.2rem;
      margin-bottom: 0.5rem;
    }

    .card {
      max-width: 375px;
      h3 {
        margin-bottom: 0.3rem;
      }
      min-width: 300px;
    }
    p {
      margin-top: 0.4rem;
    }

    figure.sample-diagram {
      max-width: 500px;
      min-width: 300px;
      padding: 0 1.2rem;
    }

    code {
      i {
        font-size: 0.7rem;
      }
      color: #33ff33;
      font-size: 0.8rem;
    }
  }
  h1 {
    font-weight: 500;
    margin-bottom: 1.5rem;
  }
  .tc01-content .content-container p {
    margin-top: 0.6rem;
  }
  .float-left-image-container {
    max-width: 200px;
    object-fit: cover;
    margin-top: 0;
  }
  .card {
    max-width: 350px;
    margin: 2rem auto 2rem auto;

    padding: 1rem 3rem;
    font-size: 0.9rem;

    h3 {
      margin-bottom: 1rem;
    }
  }
  .tc01-controller-specs {
    max-width: 450px;
    margin: 0 auto;
  }
}

/* PC1000 Controller */

#pc1000 {
  h1 {
    margin-bottom: 3rem;
  }

  .pc1000-content {
    p {
      margin: 0 0 1rem 0;
    }

    ul.pc1000-features {
      padding: 1rem 4rem 2rem 4rem;
    }
  }

  .pc1000-example-content {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    figcaption {
      margin: 0 0 1rem 0;
    }
    .pc1000-controller-specs {
      max-width: 450px;
      flex: 0 1 450px;
      margin: 0 auto;
      h3 {
        font-size: 0.9rem;
        font-weight: bolder;
      }
    }
  }
}
/* TC10 Controller */
#tc10 {
  h1 {
    margin-top: 3rem;
    margin-bottom: 3rem;
  }
  .lp-examples-grid {
    margin: 1rem 0;
  }
  .tc10-controller-specs {
    max-width: 600px;
    flex: 0 1 450px;
    margin: 0 auto;
    h3 {
      font-size: 1rem;
      font-weight: bolder;
    }
  }
}

#matrix-door {
  h1 {
    margin: 2rem 0 3rem 0;
  }
  .matrix-intro {
    h2 {
      font-size: 1.2rem;
    }
    p {
      margin: 0 0 1rem 0;
    }

    .float-left-image-container {
      margin-top: 0.5rem;
      img {
        max-width: 275px;
      }
    }
  }

  .matrix-door-content {
    .matrix-diagrams {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 1rem;
      /* background-color: var(--dark-background); */
      margin-bottom: 2rem;
      figure {
        flex: 0 0 200px;
        figcaption {
          margin-bottom: 0.5rem;
        }
      }

      figure:first-child {
        flex: 0 0 300px;
        img {
          margin: 0 auto;
        }
      }
    }
    .lp-examples-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(400px, 500px));
      gap: 1rem;
      justify-content: center;

      margin-bottom: 2rem;
    }

    .matrix-door-images {
      display: flex;
      justify-content: center;
      gap: 1rem;
      flex-wrap: wrap;
    }
  }
  .matrix-commands {
    .card {
      background-color: var(--rosy-granite);
      color: var(--dark-text-color);
      max-width: 350px;
      margin: 0.5rem 0 1rem 0;
      &:hover {
        /* removing hover effec */
        transform: translateY(0);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
      }
      h4 {
        font-size: 0.8rem;
      }
    }
  }
}
/* Chamber Racks  */
.chamber-racks {
  h1 {
    margin-top: 3rem;
  }
  .rack-intro {
    margin-bottom: 6rem;
    .float-left-image-container {
      margin-top: 0;
    }
  }
  .responsive-grid {
    grid-template-columns: repeat(auto-fit, minmax(175px, 175px));

    .card-product-summary {
      h5 {
        font-weight: 400;
        font-size: 0.8rem;
      }
    }
  }
}
/* User Manuals, Troubleshooting guides, Chamber Options, Downloads */

.manuals,
.troubleshooting-guides,
.chamber-options {
  h1 {
    margin-top: 3rem;
  }
  .responsive-grid {
    grid-template-columns: repeat(auto-fit, minmax(125px, 125px));
    gap: 1.5rem;
    margin: 2rem auto 0 auto;
    background-color: var(--rosy-granite);
    padding: 3rem 1rem;
    border-radius: 0.8rem;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
  }
  .card-product-summary {
    justify-content: space-between;
    background-color: var(--platinum);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.8);

    transition:
      transform 0.3s ease,
      border-color 0.3s ease,
      box-shadow 0.3s ease;
    &:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    }

    h3 {
      font-size: 0.8rem;
    }
    h5 {
      font-weight: 400;
      font-size: 0.8rem;
    }

    img {
      max-height: 100px;
    }
    a {
      color: var(--dark-text-color);
    }
  }
}

/* Troubleshooting Guides */
.troubleshooting-guides {
  .responsive-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 175px));
  }
}
/* Chamber Options */
.chamber-options {
  .responsive-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 275px));
    background-color: var(--platinum);
    box-shadow: none;

    .card-product-summary {
      background-color: rgba(0, 0, 0, 0.2);
      &:hover {
        transform: none;
        box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.8);
      }

      img {
        max-height: 125px;
      }
      h3 {
        font-size: 1rem;
      }
      h4 {
        font-size: 0.85rem;
        font-weight: 400;
      }

      a {
        color: revert;
      }
    }
  }
}

/* Contact  */

.contact .building-image {
  margin: 2rem 0;
  img {
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
  }
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 1.3rem;
  margin: 2rem 0;
  /* max-width: 800px; */
  margin: 0 auto;
  flex-wrap: wrap;
}

.info i {
  font-size: 1.3rem;
  margin-right: 1rem;
}

.info > div {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
}

.info {
  flex: 0 1 200px;
  background-color: #eee;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 0 3px;
  max-width: 300px;
  align-self: flex-start;
}

.info a:link {
  color: #000;
}
.map {
  flex: 0 1 400px;

  iframe {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 5px;
    box-shadow: 0 0 3px;
  }
}
/* coolant */
.coolant {
  .content {
    height: 175px;
    margin-top: 2rem;

    .float-left-image-container {
      margin-top: 0rem;
    }
    img {
      margin-top: 0rem;
      max-width: 150px;
    }
  }
  h1.intro-title.center {
    margin: 3rem 0;
  }
  p {
    margin: 0 0 1rem 0;
  }
  h2 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
  }

  h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
  }
  h4 {
    font-size: 1rem;
  }
  .flex-row-container {
    flex-direction: row;
    justify-content: center;
    .image-container {
      margin: 0;
      img {
        box-shadow: none;
        border-radius: 6px;
      }
      flex: 0 1 400px;

      &.small-img {
        flex: 0 1 100px;
      }
      &.xsmall-img {
        flex: 0 1 75px;
      }
      &.lg-img {
        flex: 0 1 300px;
      }
      &.med-img {
        flex: 0 1 200px;
      }
    }
  }
}

/* GPIB RS232 */

.remote {
  ul {
    padding: 0 2rem;
  }
  h1 {
    margin: 3rem 0;
  }
  h2 {
    margin-bottom: 2rem;
  }

  h3 {
    margin-bottom: 1rem;
  }

  p {
    margin-bottom: 1rem;
  }

  img.small-image {
    max-width: 100px;
  }
  .flex-row-container {
    flex-direction: row;

    .content-container {
      flex: 1 1 400px;
    }
    .image-container {
      flex: 0 1 175px;
      img {
        border-radius: 0;
      }

      &.med-image {
        flex: 0 1 300px;
        max-width: 350px;
      }
    }

    .image-container:nth-child(3) {
      flex: 0 1 300px;
    }
  }

  .usb-rs232-option,
  .wifi-rs232-option,
  .serial-bluetooth-option {
    margin: clamp(1rem, 5vw, 3rem) clamp(1rem, 8vw, 6rem);
    p {
      margin-top: 0rem;
    }
  }
  .usb-rs232-option {
    .image-container {
      flex: 1 1 325px;
      max-width: 325x;
      min-width: 250px;
    }

    .image-container:nth-child(2),
    .image-container:nth-child(3) {
      min-width: 200px;
      flex: 0 1 200px;
    }
  }

  .wifi-rs232-option {
    .flex-row-container {
      justify-content: center;
      margin: 2rem 0;
      .image-container {
        margin: 0;
        flex: 0 1 clamp(200px, 300px, 500px);

        figure {
          height: 100%;
        }
      }
      .image-container:nth-child(2) {
        flex-basis: clamp(200px, 350px, 500px);
      }
    }
  }

  .wifi-rs232-option {
    ul {
    }
  }
}

/* Safety-features, Over-temp-protection */

.over-temp-protection,
.door-sensor,
.software-protection {
  h3 {
    margin-bottom: 0.5rem;
  }
  p {
    margin: 0 0 2rem 0;
  }
  .flex-row-container {
    flex-direction: row;
    .image-container {
      flex: 0 1 195px;
      img {
        border-radius: 0rem;
        box-shadow: none;
      }
    }

    .image-container:nth-child(2) {
      flex: 0 1 155px;
    }
  }
}

/* Summary Table */

.chamber-summary-table {
  /* The container catches the overflow and enables the scrollbar */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    margin-bottom: 1rem;
    margin-top: 3rem;

    caption {
      font-weight: 500;
      font-size: 1.5rem;
    }
  }

  table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
  }

  th,
  td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    /* white-space: nowrap;  */
  }

  th {
    position: sticky;
    left: 0;
    background-color: #e4e4e4;
  }
  td {
    text-align: center;
  }

  /* Zebra striping for readability */
  tr:nth-child(even) {
    background-color: #f9f9f9;
  }
}

.downloads {
  margin-top: 2rem;

  h1.intro-title {
    margin-bottom: 3rem;
  }
}

/* Footer */

footer.footer {
  padding: 1.5rem 0 0.5rem 0;
  bottom: 0px;
  background-color: var(--dark-background);
  color: var(--dim-grey);
  a {
    color: var(--light-text-color);
  }
  a:visited {
    color: var(--light-text-color);
  }

  .footer-bottom {
    max-width: 600px;
    margin: 1rem auto;
    text-align: center;
    p {
      margin: 0;
      font-size: 0.8rem;
      line-height: 1.2;
    }
  }
}
footer .footer-container ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  justify-content: center;
}
/* Utility classes */

.mtb-sm {
  margin: 0.5rem 0rem;
}
.mtb-med {
  margin: 2rem 0rem;
}
.center {
  text-align: center;
}
figure {
  text-align: center;
  font-weight: bolder;
  figcaption {
    margin-top: 1rem;
  }
}

.btn {
  border: none;
  padding: 0.6rem 1rem;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 0.5rem;
  color: white;
  font-size: 0.9rem;
  font-weight: 300;

  width: 100%;
  transition: background-color 0.3s;
  &:hover {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.8);
  }
}

.lg-container,
.med-container,
.sm-container {
  margin: 0 auto;
  padding: 0 1.2rem;
  width: 100%;
}
.lg-container {
  max-width: var(--large-container);
}
.med-container {
  max-width: var(--med-container);
}
.sm-container {
  max-width: var(--small-container);
}
.small-font {
  font-size: 0.75rem;
}
.med-font {
  font-size: 1rem;
}
.large-font {
  font-size: 1.2rem;
}

.sm-img {
  width: 125px;
}
/****************MEDIA QUERIES******************/

@media (max-width: 900px) {
  .med-font {
    font-size: 0.7rem;
  }
  .ec1xha-content {
    flex-direction: column-reverse;
  }
  .ec1xha-specs {
    flex-direction: column;
    align-items: center;
    .card-spec {
      max-width: 350px;
    }
  }
}
@media (max-width: 768px) {
  /* Clear floats for mobile devices */
  .float-left-image-container {
    float: none;
    margin: 1.2rem auto;
    img {
      margin: 0 auto;
    }
  }

  .float-right-image-container {
    float: none;
    margin: 1.2rem auto;
    img {
      margin: 0 auto;
    }
  }

  .float-right-image-container.keep-float {
    float: right;
  }

  #tc10 .float-left-image-container {
    float: left;
    margin: 2rem 2rem 0rem 1rem;
    img {
      max-width: 75px;
    }
  }

  main h1.intro-title {
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
    font-size: 1.5rem;
  }
  .flex-column-container {
    flex-direction: column;
  }
  .flex-row-container {
    flex-direction: column;
  }
  .flex-row-container-no-wrap {
    flex-direction: column;

    .card-spec {
      margin: 0 auto;
    }
  }

  .ec1xha-content {
    margin-top: 1.2rem;
  }
  .ec13w-content {
    flex-direction: column-reverse;
    align-items: center;

    img {
      max-width: 300px;
    }
  }
  .intro-standalone-controllers {
    padding: 0 0.5rem;
    p {
      font-size: 1rem;
    }
  }
  #pc1000 {
    .pc1000-content {
      ul.pc1000-features {
        padding: 0.5rem 1.5rem 1rem 1.5rem;
      }
    }

    .pc1000-example-content {
      margin-top: 0rem;
    }
  }

  #pc100-2,
  #tc10 {
    .card-spec .card-spec-description p {
      font-size: 0.7rem;
    }
  }
  #matrix-door .matrix-commands .card {
    margin-left: auto;
    margin-right: auto;
  }

  .chamber-racks {
    h1.intro-title {
      margin-bottom: 2rem;
    }
    .rack-intro {
      margin-bottom: 2rem;
    }
  }
  .coolant {
    h1.intro-title.center {
      margin: 1.5rem 0;
    }
    h4 {
      font-size: 0.8rem;
    }
    .content {
      margin-top: 0;
      img {
        margin-top: 2rem;
        max-width: 300px;
      }
      height: auto;
    }
  }

  .remote {
    .flex-row-container.gpib {
      flex-direction: column-reverse;
      gap: 1rem;

      .image-container:nth-child(3) {
        max-width: 300px;
        align-content: flex-end;
      }
    }

    .hide-on-small {
      display: none;
    }
    h1.intro-title {
      margin-bottom: 1rem;
    }
    h2 {
      font-size: 1.2rem;
    }
  }

  .chamber-summary-table {
    .table-container {
      caption {
        text-align: left;
        font-size: 1rem;
      }
      table {
        font-size: 0.7rem;
      }
      th,
      td {
        padding: 4px;
      }
      th {
        text-wrap: wrap;
        padding: 0 8px;
        font-size: 0.6rem;
      }
    }
  }
}

/*  this is for printing chamber summary table */
@media print {
  /* 1. Hide interactive elements like buttons, navs, and sidebars */
  nav,
  .no-print {
    display: none;
  }

  /* 2. Configure page margins and size */
  @page {
    size: auto; /* auto, portrait, or landscape */
    margin: 15mm; /* clean breathing room on paper */
  }

  /* 3. Reset body constraints to allow full-width usage */
  body {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #000;
    font-size: 11pt; /* pt is the standard unit for print typography */
  }

  /* 4. Force the table to behave on paper */
  table {
    width: 100% !important;
    max-width: 100%;
    table-layout: auto; /* use 'fixed' if cells must be strictly uniform */
    border-collapse: collapse; /* merges spacing into a clean grid line */
    page-break-inside: auto; /* lets rows break across pages if needed */
  }

  /* 5. Prevent individual rows from breaking awkwardly in half */
  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  /* 6. Repeat table headers automatically at the top of every printed page */
  thead {
    display: table-header-group;
  }

  /* Keep footers at the bottom of every page */
  tfoot {
    display: table-footer-group;
  }

  /* 7. Ensure standard grid formatting and readability */
  th,
  td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }

  /* Force background colors/striping to show up if the browser allows it */
  tr:nth-child(even) {
    background-color: #f9f9f9 !important;
    -webkit-print-color-adjust: exact; /* for Chrome/Safari */
    print-color-adjust: exact; /* standard */
  }
}
