/*Style nur für index. Texte linke Spalte werden bei kleinen Seiten, als erster Text, angezeigt*/

/*****************linke Spalte***************/
/* Sidebar/left column bei Index und kleiner Seite oben, 
deshalb statt side --> sideIndex der nicht mit media ausgeblendet wird*/
.sideIndex {
  -ms-flex: 20%; /* IE10 */
  flex: 20%;
  background-color: #f9f4c7;
  padding: 20px;
  box-sizing: border-box;
}
/****************ENDE linke Spalte*****************/
/*************** Main Spalte**********************/
/****************Layout Absatz Allgemein*******************/
.allg-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.allg-image {
  flex: 0 1 200px; /* maximale Breite des Bildcontainers */
}

.allg-image img {
  width: 100%;           /* Bild füllt Containerbreite */
  max-width: 200px;      /* auf großen Screens nicht größer als 200px */
  aspect-ratio: 1 / 1;   /* quadratisches Format */
  object-fit: contain;   /* kein Verzerren */
  height: auto;          /* Höhe wird automatisch berechnet */
  display: block;
}

.allg-text {
  flex: 1 1 300px;
  min-width: 250px;
}

.allg-text ul {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
  list-style-position: outside;
}

.allg-text li {
  margin-bottom: 0.3rem;
}
/****************Layout Absatz Allgemein*******************/
 /**********Box Berechnung Widerstand bei index und widerstand*********/
  #flexcontainer{
    display: flex;
    background-color: #f9f4c7;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content:space-around;
    min-height: 60px;
    width: 90%;
    align-items: center;
  }
  #flexitem{
  input {
  text-align: center;
  }
  }
/*Ende Berechnung*/
/*****Bild und link zu Tabellen Generator******/
.tabGen {
  /*text-align: center;*/
  font-weight: normal;
  line-height: 1.5;
  margin-top: 2rem;
}

.tabGen a {
  color: #004080; /* ggf. an deine Farbpalette anpassen */
  text-decoration: none;
  font-weight: bold;
}

.tabGen a:hover {
  text-decoration: underline;
}

.tabGen-img {
  width: 100%;
  max-width: 500px;   /* maximale Breite auf großen Bildschirmen */
  height: auto;       /* behält Seitenverhältnis */
  object-fit: contain;/* kein Verzerren */
  display: block;
 /* margin: 1rem auto;  /* zentriert das Bild */
  border-radius: 8px; /* optional, für sanfte Ecken */
}
/*****Ende Bild und link zu Tabellen Generator******/
/******Grid für Beispielwerte Widerstand************/
  * {
    box-sizing: border-box;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: row;
    max-width: 400px;
    margin-left: 50px;
    margin-top: 20px;
    border: 1px solid #333;
  }

  .cell {
    padding: 10px;
    border: 1px solid #333;
    text-align: center;
    color: #000;
  }

  .headerGrid {
    font-weight: bold;
    background: #f9f4c7;
  }

  /* Spalte 1 & 3 */
  .col-1,
  .col-3 {
    font-weight: bold;
    background: #f9f4c7;
  }
/******Ende Grid für Beispielwerte Widerstand************/

  
/*************** ENDE Main Spalte******************/



/* --- Zusatz für kleine Bildschirme --- */
@media (max-width: 600px) {
  .allg-wrapper {
    flex-direction: column; /* Bild über dem Text */
    align-items: center;    /* zentriert Bild */
  }

  .allg-image img {
    max-width: 80%;         /* auf Smartphones verkleinern */
  }

  .allg-text {
    min-width: auto;
    width: 100%;
  }
/*Absatz Tabellen Generator*/
  .tabGen-img {
    max-width: 90%;   /* kleiner auf Mobilgeräten */
  }

  .tabGen {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
/*Ende Absatz Tabellen Generator*/
 #flexcontainer{
    display: flex;
    background-color: #f9f4c7;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content:space-around;
    min-height: 60px;
    width: 100%;
    align-items: center;
  }
/****responsive Anpassung Grid Beispielwerte Widerstand***/
  .grid {
      margin-left: 5px;
    }
/****Ende responsive Anpassung Grid Beispielwerte Widerstand****/
}
