/* HSR Ingenieure AG – TYPO3 14 / responsive v1.7 */
:root {
  --hsr-blue: #002b6c;
  --hsr-text: #333;
  --hsr-max: 1240px;
  --hsr-gutter: clamp(18px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--hsr-text); line-height: 1.6; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--hsr-blue); }

.hsr-inner { width: min(100% - 2 * var(--hsr-gutter), var(--hsr-max)); margin-inline: auto; }
.hsr-rte > :first-child { margin-top: 0; }
.hsr-rte > :last-child { margin-bottom: 0; }
.hsr-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Header */
.site-header { padding: clamp(14px, 2vw, 24px) var(--hsr-gutter); }
.site-header__inner { max-width: var(--hsr-max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.logo { flex: 0 1 330px; }
.logo img { width: clamp(190px, 24vw, 330px); height: auto; }
.main-nav ul { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: clamp(18px, 4vw, 44px); flex-wrap: wrap; justify-content: flex-end; }
.main-nav a { color: #333; text-decoration: none; font-size: clamp(17px, 1.55vw, 21px); font-weight: 500; padding: 6px 0; }
.main-nav a:hover, .main-nav a.is-active { color: var(--hsr-blue); }

/* Generic content */
.hsr-intro { padding: clamp(34px, 6vw, 72px) 0; text-align: center; }
.hsr-intro__inner { max-width: 760px; }
.hsr-intro__image { width: min(320px, 72vw); margin: clamp(28px, 5vw, 50px) auto 0; }
.hsr-text-section { clear: both; padding: clamp(30px, 5vw, 58px) 0; text-align: center; }
.hsr-text-section__inner { max-width: 760px; }
.hsr-text-section h1, .hsr-text-section h2, .hsr-text-section h3 { line-height: 1.2; }

/* Home service teaser */
.hsr-image-link { float: left; width: 33.3333%; padding: clamp(12px, 2vw, 22px); margin: 0; }
.hsr-image-link__anchor { display: block; max-width: 390px; margin: 0 auto; }
.hsr-image-link__image { width: 100%; height: auto; transition: transform .2s ease; }
.hsr-image-link__anchor:hover .hsr-image-link__image { transform: translateY(-2px); }
.hsr-team-photo { clear: both; padding: clamp(30px, 5vw, 60px) 0; }
.hsr-team-photo__text { text-align: center; margin-bottom: 24px; }
.hsr-team-photo__image-wrap { width: min(100%, 900px); margin: 0 auto; }
.hsr-team-photo__image { width: 100%; height: auto; }

/* Services */
.hsr-service { padding: clamp(28px, 4vw, 52px) 0; }
.hsr-service__inner { display: grid; grid-template-columns: minmax(280px, 450px) minmax(0, 1fr); align-items: start; gap: clamp(28px, 5vw, 64px); max-width: 1100px; }
.hsr-service__image { width: 100%; }
.hsr-service__content ul { margin: 0; padding-left: 1.25rem; }
.hsr-service__content li { margin-bottom: 10px; }

/* Team – preserve original portrait ratio and compact original typography */
.hsr-team-member { width: min(100% - 2 * var(--hsr-gutter), 1040px); margin: 0 auto; padding: 20px 0 30px; }
.hsr-team-member__inner { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 30px; align-items: start; }
.hsr-team-member__image { width: 240px; height: auto; max-width: none; }
.hsr-team-member__content { min-width: 0; line-height: 1.45; }
.hsr-team-member__content h2 { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.3; }
.hsr-team-member__rte > p { margin: 0 0 10px; }
.hsr-team-member__rte .direct-mail-link,
.hsr-team-member__rte .direct-telefon-link { margin-top: 5px; line-height: 1.3; }
.hsr-team-member__rte .direct-mail-link { margin-top: 14px; }
.hsr-team-member__rte a { text-decoration: none; }
.hsr-team-member__rte a:hover { text-decoration: underline; }

/* Contact & legal */
.hsr-legal { padding: 30px 0 60px; }
.hsr-legal__inner { max-width: 820px; font-size: .93rem; line-height: 1.5; }
.hsr-legal h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); }
.hsr-legal h2 { margin-top: 24px; font-size: 1.08rem; }

/* Footer – follows delivered artwork geometry */
.site-footer { padding: 20px var(--hsr-gutter) 18px; clear: both; }
.site-footer__inner { max-width: var(--hsr-max); margin: 0 auto; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(250px, .75fr) minmax(330px, 1.1fr); gap: clamp(24px, 4vw, 54px); align-items: center; }
.footer-image { position: relative; min-width: 0; }
.footer-contact { width: 300px; justify-self: start; }
.footer-contact > img { width: auto; height: 300px; max-width: none; }
.footer-address, .footer-phone, .footer-mail { position: absolute; left: 55px; line-height: 1.3; white-space: nowrap; }
.footer-address { top: 155px; }
.footer-phone { top: 228px; }
.footer-mail { top: 268px; }
.footer-address a, .footer-phone a, .footer-mail a { color: var(--hsr-blue); text-decoration: none; }
.footer-address a:hover, .footer-phone a:hover, .footer-mail a:hover { text-decoration: underline; }

.footer-center { min-width: 0; text-align: center; justify-self: center; align-self: center; }
.footer-logos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.footer-logos a { display: block; width: 250px; max-width: 100%; }
.footer-logos img { width: 250px; height: auto; max-height: none; object-fit: contain; padding: 18px 25px; margin: 0 auto; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 2px; }
.footer-meta a { color: var(--hsr-blue); text-decoration: none; font-size: .9rem; }
.footer-meta a:hover { text-decoration: underline; }

.footer-visual { justify-self: end; }
.footer-visual img { width: auto; height: 300px; max-width: 100%; object-fit: contain; }
.footer-bottom { max-width: var(--hsr-max); margin: 0 auto; padding-top: 20px; text-align: right; font-size: 12px; }
.footer-bottom p { margin: 0; }

@media (max-width: 1050px) {
  .site-footer__inner { grid-template-columns: minmax(280px, 1fr) minmax(230px, .8fr); }
  .footer-visual { grid-column: 1 / -1; justify-self: center; }
  .footer-visual img { height: auto; width: min(100%, 394px); }
}

@media (max-width: 900px) {
  .site-header__inner { align-items: flex-start; }
  .main-nav ul { gap: 18px 26px; }
  .hsr-service__inner { grid-template-columns: minmax(220px, 40%) minmax(0, 1fr); gap: 30px; }
}

@media (max-width: 700px) {
  .site-header { padding-inline: 20px; }
  .site-header__inner { flex-direction: column; align-items: center; gap: 18px; }
  .logo { flex: none; }
  .logo img { width: min(270px, 78vw); }
  .main-nav { width: 100%; }
  .main-nav ul { justify-content: center; gap: 10px 24px; }
  .main-nav a { font-size: 17px; }

  .hsr-image-link { float: none; width: 100%; padding: 12px var(--hsr-gutter); }
  .hsr-image-link__anchor { max-width: 520px; }

  .hsr-service__inner { grid-template-columns: 1fr; }
  .hsr-service__image { width: min(100%, 520px); margin: 0 auto; }
  .hsr-service__content { width: 100%; }

  .hsr-team-member { width: calc(100% - 40px); }
  .hsr-team-member__inner { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .hsr-team-member__image { width: min(240px, 76vw); height: auto; max-width: 100%; margin: 0 auto; }
  .hsr-team-member__content { max-width: 520px; margin: 0 auto; }
  .hsr-team-member__rte .direct-mail-link { margin-top: 12px; }

  .site-footer { padding-inline: 20px; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-contact { width: 300px; max-width: 100%; justify-self: center; }
  .footer-center { justify-self: center; }
  .footer-visual { grid-column: auto; justify-self: center; }
  .footer-logos a { width: min(250px, 70vw); }
  .footer-logos img { width: 100%; }
  .footer-bottom { text-align: center; }
}

@media (max-width: 420px) {
  .main-nav ul { flex-direction: column; gap: 8px; }
  .hsr-inner, .hsr-team-member { width: calc(100% - 32px); }
  .hsr-service__content ul { padding-left: 1.1rem; }
  .footer-contact { transform-origin: top center; }
}

/* v1.7: kompaktere Darstellung der rechtlichen Seiten */
.hsr-legal__inner {
  line-height: 1.35;
}
.hsr-legal .hsr-rte p {
  margin: 0 0 .65rem;
}
.hsr-legal .hsr-rte br + br {
  display: none;
}
.hsr-legal .hsr-rte h2 {
  margin-top: 1.15rem;
  margin-bottom: .45rem;
  line-height: 1.25;
}
