/* =========================================
   Mobile Styles
   Drupal 10 / Operator
========================================= */

/* -----------------------------------------------
   FIX: --55-45 fehlt im Theme für min-width:768px
   Wird hier global nachgepflegt
----------------------------------------------- */
@media (min-width: 768px) {

  .layout--operator-twocol-section.layout--operator-twocol-section--55-45 .layout--operator-twocol-section-wrapper > .layout__region--first {
    width: inherit;
    flex: 0 1 55%;
    margin-bottom: 0;
  }

  .layout--operator-twocol-section.layout--operator-twocol-section--55-45 .layout--operator-twocol-section-wrapper > .layout__region--second {
    width: inherit;
    flex: 0 1 45%;
    margin-bottom: 0;
  }

  /* Wrapper muss flex sein damit die Spalten nebeneinander stehen */
  .layout--operator-twocol-section .layout--operator-twocol-section-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
}


/* Tablet und kleiner */
@media (max-width: 991px) {

  .container,
  .layout-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .region-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .block-system-branding-block img {
    max-width: 180px;
    height: auto;
  }

  .menu--main {
    margin-top: 15px;
  }

  .menu--main .menu {
    flex-direction: column;
    gap: 10px;
  }

  .views-row {
    margin-bottom: 20px;
  }

  .node--view-mode-teaser {
    padding: 20px;
  }
}





/* Smartphone */
@media (max-width: 767px) {

  html {
    font-size: 16px;
  }

  body {
    overflow-x: hidden;
  }

  h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.4rem;
    line-height: 1.25;
  }

  h3 {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .container,
  .layout-container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .region-header {
    padding-top: 8px;
    padding-bottom: 8px;
  }

/*---------------------STARTSEITE---------------------------*/

.opag-referenzen .ref1 {
  height: 530px !important;
}

.opag-partner > .col-md-2 {
  width: 100% !important;
}


  .block-system-branding-block {
    text-align: center;
  }

  .block-system-branding-block img {
    max-width: 150px;
  }

  .menu--main .menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .menu--main .menu-item a {
    display: block;
    padding: 10px 0;
  }

  .views-element-container,
  .block,
  .node {
    margin-bottom: 20px;
  }

  .node--view-mode-teaser {
    padding: 15px;
  }

  /* Bilder responsiv — überschreibt inline width-Attribute */
  .node__content img,
  img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  iframe {
    max-width: 100%;
  }

  /* Header-Block Höhe zurücksetzen */
  .block-layout-builder.operator-header {
    height: auto !important;
    min-height: 220px;
    padding: 30px 15px;
  }

  /* Bilder in zweiter Spalte: margin-top reduzieren */
  .layout--operator-twocol-section .layout__region--second img {
    margin-top: 20px !important;
  }

  /* Footer-Spalten umbrechen */
  .opag-footer-rechts .col-md-4 {
    width: 100% !important;
    margin-bottom: 20px;
  }

  /* Kontaktformular */
  .contact-message-form input,
  .contact-message-form textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* Sub-Navigation (region-header-menu-secondary) auf Mobile ausblenden */
  .region-header-menu-secondary {
    display: none;
  }
}


/* Sehr kleine Geräte */
@media (max-width: 480px) {

  html {
    font-size: 15px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .container,
  .layout-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .block-system-branding-block img {
    max-width: 130px;
  }

  .node--view-mode-teaser {
    padding: 12px;
  }

  .contact-message-form {
    border-radius: 12px;
    box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: #f8f8f8;
    padding: 0;
  }
}