﻿@media only screen and (max-width: 767px) {
  /* Verwijdert padding voor afbeeldingen in tabellen */
  td.img-position,
  th.img-position {
    padding: 0;
    max-width: 100%;
    height: auto;
  }

  /* Zorgt ervoor dat afbeeldingen in td.img-position schalen */
  td.img-position img {
    max-width: 100%;
    height: auto;
  }

  /* Maakt alle kolommen 100% breed en stackt ze onder elkaar */
  [class*="col-"] {
    width: 100%;
    display: block;
  }

  /* Tabel en rijen als blokken */
  .hfdtab {
    display: block;
    width: 100%;
    overflow-x: auto;
    margin: 0;
    padding: 0;
  }

  /* Elke rij en cel als blok */
  .hfdtab tr,
  .hfdtab th,
  .hfdtab td {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
  }

  * {
    box-sizing: border-box;
  }

  /* Show table headers as labels for each cell */
  .hfdtab td:before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    margin-bottom: 0.25rem;
  }

  .hfdtab th:first-child {
    display: block;
    width: 100%;
    padding: 0;
    text-align: center;
    margin: 0 auto;
    background: #f8f8f8;
    border: 1px solid #ddd;
  }

  .hfdtab th:first-child img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* Afbeeldingen responsief */
  .hfdtab img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* Groene lijn behouden */
  .hfdtab hr.ligneverte {
    display: block;
    margin: 15px auto;
    width: 80%;
    border: none;
    border-top: 2px solid #008000;
  }

  /* Koppen en tekst */
  .hfdtab h1 {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  .hfdtab p {
    margin: 10px 0;
  }

  /* Links als blokken onder elkaar */
  .hfdtab a {
    display: block;
    margin: 5px 0;
    font-size: 1.1em;
  }

  /* Links en tekst onder elkaar en gecentreerd */
  .hfdtab p.centerXL {
    text-align: center;
    margin: 10px auto;
    width: 100%;
  }

  .hfdtab p.centerXL a {
    display: block;
    margin: 10px auto;
    text-align: center;
  }

  /* Niet-linkende tekst ook gecentreerd */
  .hfdtab p.centerXL span {
    display: block;
    text-align: center;
    margin: 10px auto;
  }

  /* Achtergrondklassen */
  [class*="bckgr"], .hfdtab {
    width: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }

  [class*="bckgr"] {
    background-size: cover !important;
    background-position: center !important;
  }

  /* Center tables and their content on small screens */
  .hortab {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    overflow-x: auto;
    display: table;
  }

  .hortab td {
    text-align: center;
    display: block;
    padding: 1rem;
  }

  /* Specifieke aanpassingen voor .hor2tab */
  .hor2tab {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* Center container */
  .center {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    margin: 0 auto;
  }

  /* Stijl voor .llv3tab */
  .llv3tab {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    border-collapse: collapse;
    display: table;
  }

  .llv3tab tr {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
  }

  .llv3tab th {
    flex: 1;
    width: 33.33%;
    box-sizing: border-box;
    padding: 0.5rem;
  }

  /* Afbeeldingen in portrait modus */
  @media (orientation: portrait) {
    .center img {
      width: 100%;
      height: auto;
    }
  }

  /* Body stijlen */
  body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    font-size: 16px;
    margin-bottom: env(safe-area-inset-bottom);
    margin-bottom: constant(safe-area-inset-bottom);
  }

  .wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: env(safe-area-inset-bottom);
  }

  /* Specifieke stijlen voor high-dpi Android-toestellen */
  @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
    .hfdtab td, .hfdtab th {
      padding: 1rem;
    }
  }
}
