html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Navigation - prevent squishing */
#navigation {
  flex-shrink: 0; /* Navigation never shrinks */
}

/* Main body - grows to fill space */
#main-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
  flex: 1 0 auto; /* Grows, doesn't shrink, auto height */
  width: 100%;
}

/* Footer - always at bottom */
#footer {
  flex-shrink: 0; /* Footer never shrinks */
  margin-top: auto;
}

.img-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.1s;
}

#beratung-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  max-width: 400px;
  transition: transform 0.3s ease;
}

#beratung-image:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.introduction {
  display: flex;
  gap: 20px;
  flex-direction: column;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #ddd;
  transition: box-shadow 0.3s ease;
}

.introduction:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

.introduction-description {
  min-width: 300px;
  max-width: 600px;
  text-align: justify;
  word-spacing: -0.5px;
  hyphens: auto;
}

.introduction-description.para2 {
  min-width: 300px;
  max-width: 900px;
}

.introduction-header {
  width: 100%;
  font-size: 1.3em;
  height: 18%;
  color: #4caf50;
}

.introduction.contact {
  display: flex;
  flex-direction: column;
  background-color: #f2f8e7;
  border-color: #a6d96a;
  width: 100%;
  user-select: text;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.15s;
}

.introduction.contact p,
.introduction.para2 p {
  max-width: 100%;
}

.material-symbols-outlined {
  color: #8dc53e;
  font-size: 1.1em;
  margin-right: 8px;
  vertical-align: middle;
}

.introduction.contact .contact-info a {
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

.introduction.para2 {
  display: flex;
  flex-direction: column;
  width: 100%;
  user-select: text;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.125s;
}

.email-cms,
.phone-number-cms {
  font-weight: bold;
  color: #333;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

#main-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

.img-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.1s;
  width: 100%;
}

#beratung-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  max-width: 400px;
  transition: transform 0.3s ease;
}

#beratung-image:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.introduction {
  display: flex;
  gap: 20px;
  flex-direction: column;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #ddd;
  transition: box-shadow 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.introduction:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

.introduction-description {
  min-width: 300px;
  max-width: 600px;
  text-align: justify;
  word-spacing: -0.5px;
  hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.introduction-description.para2 {
  min-width: 300px;
  max-width: 900px;
}

.introduction-header {
  width: 100%;
  font-size: 1.3em;
  height: auto;
  color: #4caf50;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.introduction.contact {
  display: flex;
  flex-direction: column;
  background-color: #f2f8e7;
  border-color: #a6d96a;
  width: 100%;
  user-select: text;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.15s;
}

.introduction.contact p,
.introduction.para2 p {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.material-symbols-outlined {
  color: #8dc53e;
  font-size: 1.1em;
  margin-right: 8px;
  vertical-align: middle;
}

.introduction.contact .contact-info a {
  font-weight: bold;
  color: #333;
  text-decoration: none;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-all;
}

.introduction.para2 {
  display: flex;
  flex-direction: column;
  width: 100%;
  user-select: text;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.125s;
}

.email-cms,
.phone-number-cms {
  font-weight: bold;
  color: #333;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-all;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   TABLET STYLES (Portrait & Landscape)
   Common dimensions: 768px - 1024px
   ============================================ */
@media (min-width: 540px) and (max-width: 768px) and (orientation: portrait) {
  main#main-body {
    margin: 50px auto 0;
    padding-top: 50px;
  }
}

@media screen and (max-width: 1024px) {
  #main-body {
    max-width: 800px;
    padding: 40px 20px;
  }

  .img-wrap {
    margin-bottom: 18px;
    gap: 18px;
  }

  #beratung-image {
    max-width: 350px;
  }

  .introduction {
    padding: 18px;
    gap: 18px;
    margin-bottom: 0;
  }

  .introduction-header {
    font-size: 1.25em;
  }

  .introduction-description {
    min-width: 100%;
    max-width: 100%;
  }

  .introduction-description.para2 {
    min-width: 100%;
    max-width: 100%;
  }

  .material-symbols-outlined {
    font-size: 1.05em;
    margin-right: 7px;
  }

  .introduction.para2 {
    margin-bottom: 20px;
  }
  .introduction-title-cms-1,
  .introduction-title-cms-2 {
    font-size: 1.4em;
    line-height: 1.4;
  }
}

/* ============================================
   MOBILE STYLES (Portrait & Landscape)
   Common dimensions: 320px - 768px
   ============================================ */
@media screen and (max-width: 768px) {
  body {
    font-size: 16px;
  }

  #main-body {
    max-width: 100%;
    width: 100%;
    padding: 30px 15px;
  }

  .img-wrap {
    flex-direction: column;
    margin-bottom: 20px;
    gap: 15px;
    width: 100%;
  }

  #beratung-image {
    max-width: 100%;
    width: 100%;
    border-radius: 8px;
  }

  #beratung-image:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .introduction {
    padding: 18px;
    gap: 15px;
    border-radius: 8px;
    margin-bottom: 0;
    width: 100%;
  }

  .introduction:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .introduction-header {
    font-size: 1.2em;
    height: auto;
    line-height: 1.4;
  }

  .introduction-description {
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    text-align: left;
    font-size: 0.95em;
    line-height: 1.6;
  }

  .introduction-description.para2 {
    min-width: 100%;
    max-width: 100%;
    width: 100%;
  }

  .introduction.contact {
    padding: 20px;
  }

  .introduction.contact .contact-info {
    font-size: 0.95em;
    line-height: 1.7;
  }

  .introduction.contact .contact-info a {
    display: inline-block;
    max-width: 100%;
  }

  .material-symbols-outlined {
    font-size: 1.1em;
    margin-right: 6px;
  }

  .email-cms,
  .phone-number-cms {
    font-size: 0.95em;
    display: inline-block;
    max-width: 100%;
  }

  .introduction.para2 {
    margin-bottom: 20px;
  }
  .introduction-title-cms-1,
  .introduction-title-cms-2 {
    font-size: 1.4em;
    line-height: 1.4;
  }
}

/* ============================================
   SMALL MOBILE OPTIMIZATION
   Common dimensions: 320px - 480px
   ============================================ */
@media screen and (max-width: 480px) {
  #main-body {
    padding: 25px 12px;
    padding-top: 100px;
  }

  .img-wrap {
    margin-bottom: 18px;
    gap: 12px;
  }

  #beratung-image {
    border-radius: 6px;
  }

  .introduction {
    padding: 16px;
    gap: 12px;
    border-radius: 6px;
    margin-bottom: 0;
  }

  .introduction-header {
    font-size: 1.15em;
    line-height: 1.3;
  }

  .introduction-description {
    font-size: 0.92em;
    line-height: 1.55;
  }

  .introduction.contact {
    padding: 16px;
  }

  .introduction.contact .contact-info {
    font-size: 0.92em;
    line-height: 1.7;
  }

  .material-symbols-outlined {
    font-size: 1em;
    margin-right: 5px;
  }

  .email-cms,
  .phone-number-cms {
    font-size: 0.92em;
  }

  .introduction.para2 {
    margin-bottom: 18px;
  }

  .introduction.para2 {
    margin-bottom: 20px;
  }
  .introduction-title-cms-1,
  .introduction-title-cms-2 {
    font-size: 1.3em;
    line-height: 1.4;
  }
}
