:root {
  --color-bg: #F3FFFE;
  --color-text: #2E3A4C;
  --color-primary: #00B6B2;
  --color-primary-dark: #006167;
  --color-accent: #FF9658;
  --color-accent-dark: #e6833f;
  --color-white: #FFF;
  --color-gray: #E4E6DA;
}

@font-face {
  font-family: 'SansMateo';
  src: url('SansMateo.ttf');
}
@font-face {
  font-family: 'Ubuntu';
  src: url('Ubuntu-Regular.ttf');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Ubuntu';
  src: url('Ubuntu-Bold.ttf');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'Ubuntu';
  src: url('Ubuntu-Italic.ttf');
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: 'Ubuntu';
  src: url('Ubuntu-light.ttf');
  font-weight: lighter;
  font-style: normal;
}

img, .hero, main {
  animation: fadeIn 300ms forwards;
  animation-delay: 200ms;
}
img, .hero, main {
  opacity: 0;
}

*, *::before, *::after { 
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  overflow: hidden;
}

body, html { 
  font-family: 'Ubuntu', Arial, sans-serif; color: var(--color-text); background: var(--color-bg); line-height: 1.6; height: 100vh;width: 100vw;
}

h1, h2, h3 {
  font-family: 'SansMateo', Arial, sans-serif;
}

body {
  padding-top: 55px; /* take into account the space for the nav bar */
}

.scroll-container {
  padding: 0 5px;
  height: calc(100vh - 55px);
  width: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  scrollbar-color: var(--color-primary) var(--color-primary-dark);
} 

nav {
  position: fixed; width: 100%; top: 0; background: var(--color-primary); z-index:1000;
}
.nav-container {
  max-width:1200px; margin:0 auto; padding:1rem;
  display:flex; justify-content:space-between; align-items:center;
}
.nav-container .logo {
  height: 25px;
  content: url("./companylogotext.png");
}
@media (max-width:550px) {
  .nav-container .logo {
    content: url("./companylogo.png");
  }
}

nav a {
  color: var(--color-white); text-decoration:none; margin:0 .75rem; font-weight:600;
  transition: color .3s;
}
nav a:hover { color: var(--color-accent); }

.hero {
  background:url("./titelbild.jpg") center/cover no-repeat;
  min-height:60vh; position:relative; display:flex;
  align-items:center; justify-content:center;
  text-align:center; color: var(--color-white);
  background-position: right bottom;
  width: 100vw;
}
.hero::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(to bottom, rgb(from var(--color-primary) r g b / 0.7), transparent);
}
.hero-content {
  position:relative; z-index:1; max-width:90%; padding:1rem;
  animation: fadeInDown 1s ease;
}
.hero h1 { font-size:2.5rem; margin-bottom:1rem; }
.hero .cta {
  background: var(--color-accent); color: var(--color-white); padding:.75rem 1.5rem;
  border-radius:.3rem; text-decoration:none;
  transition: background .3s;
  font-weight: bold;
}
.hero .cta:hover { background: var(--color-accent-dark); }

.main {
  max-width: 1200px; 
  display: flex;
  gap: 3rem;
  flex: 1 0 auto;  /* Grow to fill space, allow shrink */
  flex-direction: column;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
  position: relative;
  min-height: 500px;
}

/* Image + Text Section */
.section-img-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  background: var(--color-white);
  border-radius: .5rem;
  box-shadow: 0 2px 10px rgba(0,182,178,.08);
  padding: 2rem 1rem;
}

.section-img-text img {
  flex: 1 1 300px;
  max-width: 350px;
  object-fit: cover;
  border-radius: 3px;
  max-height: 400px;
  min-height: 300px;
}
.section-img-text .section-content {
  flex: 2 1;
  min-width: 220px;
}
.section-content > div {
  animation: fadeInUp 1.2s forwards;
  opacity: 0;
}
.section-img-text h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 2rem;
}
.section-img-text p {
  margin-bottom: 1rem;
  font-size: 1.12rem;
}
.section-img-text .cta2 {
  background: var(--color-primary); color: var(--color-white);
  padding: .7rem 1.4rem; border-radius: .3rem;
  text-decoration: none; transition: background .3s;
  font-weight: bold;
  display: inline-block;
}
.section-img-text .cta2:hover { background: var(--color-accent); }

/* Services Section (full-width) */
.section-services-bg {
    position: absolute;
    top: 0;
    left: -50vw;
    right: -50vw;
    height: 100%;
    z-index: -1;
    background: var(--color-primary);
    box-sizing: border-box;
}
.section-services {
    position: relative;
    max-width: 1200px;
    padding: 1.5rem 0;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
}
.service-card {
  position: relative;
  top: 0;
  background: var(--color-white);
  border-radius: .5rem;
  box-shadow: 0 2px 8px rgba(0,182,178,.10);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1.2rem 1.5rem 1.2rem;
  min-height: 350px;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(.4,.2,.2,1), box-shadow 0.3s cubic-bezier(.4,.2,.2,1), opacity 0.5s, top 0.3s;
}

.service-card:hover {
  top: -5px;
}
.service-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 0.4rem 0.4rem 0 0;
  margin-bottom: 1.3rem;
  background: var(--color-bg);
  box-shadow: 0 2px 5px rgba(0,182,178,.05);
}
.service-card h3 {
  color: var(--color-accent);
  margin-bottom: .5rem;
  font-size: 1.35rem;
  font-weight: bold;
}
.service-card p {
  font-size: 1.05rem;
  margin-bottom: .7rem;
}
.service-card ul {
  margin: 0 0 .7rem 1.3rem;
  padding: 0;
  font-size: .97rem;
  color: var(--color-text);
}
.service-card li {
  list-style: disc;
  margin-bottom: .2rem;
}
@media (max-width:900px) {
  .section-services { padding: 1rem .5rem; }
}

.service-bg {
    position: absolute;
    top: 0;
    left: -50vw;
    right: -50vw;
    height: 100%;
    z-index: 0;
    background: var(--color-primary);
    box-sizing: border-box;
}
.services {
    position: relative;
    max-width: 1200px;
    padding: 1.5rem 0 2rem;
}
.services .service-grid {
  display:flex;
  flex-direction: row;
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
  justify-content: center;
}
.services .service-grid .shape-before, 
.services .service-grid .shape-after {
  background-color: var(--color-primary);
  position: absolute;
  z-index: 3;
  width: 100%;
  height: 80px;
}
.services .service-grid .shape-before {
  top: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 25%);
}
.services .service-grid .shape-after {
  clip-path: polygon(100% 80%, 0 0, 0 100%, 100% 100%);
  bottom: 0
}
.services .service-col {
  display:flex;
  flex-direction: column;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  position: relative;
  min-width: 250px;
  width: 100%;
}
.services .service-col .card {
  flex: 1 1 auto;
  margin: 7px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  min-height: 400px;
  max-height: 550px;
}
.services .service-col .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 200ms ease, transform 200ms;
}
.services .service-col .card .shadow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
  top: 0;
  left: 0;
}

.services .service-col .card h3, .services .service-col .card p {
  text-align: center;
  width: fit-content;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.services .service-col .card .card-content {
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  justify-content: center; 
  display: flex;
  flex-direction: column;
  align-items: center;  
  z-index: 2;
  padding: 10px;
}
.services .service-col .card p {
  visibility: hidden;
  margin-top: 10px;
}
.services .service-col .card h3 {
  /*background: var(--color-accent-dark-t); */
  background: rgb(from var(--color-accent-dark) r g b / 0.66);
  padding: 0 5px;
  font-size: 22px;
  white-space: nowrap;
  animation: fadeInDown .7s forwards;
}

.services .service-title {
  color: var(--color-white);
  text-shadow: 0 2px 8px rgba(0,0,0,.08);
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 0 1rem;
  z-index: 1;
  position: relative;
}

@media not (pointer:coarse) {
  .services .service-col .card:hover p {
    visibility: visible;
    animation: fadeIn 0.7s forwards;
  }
  .services .service-col .card:hover img {
    filter: blur(3px) brightness(90%);
    transform: scale(1.02);
  }
  .services .service-col .card:hover .shadow {
    animation: fadeIn 0.7s forwards;
    visibility: visible;
  }
}


/* hover effect service cards */
@media (min-width: 1001px) {
  .services .service-grid .service-col .card:last-child:hover .shadow {
    background: linear-gradient(to top, var(--color-primary-dark), transparent) !important;
  }
  .services .service-grid .service-col .card:first-child:hover .shadow {
    background: linear-gradient(to bottom,  var(--color-primary-dark), transparent) !important;
  } 
}

/* small service screens grid */
@media (max-width: 1000px) {
  .card {
    max-height: 400px !important;
    min-height: 400px !important;
  }
  .services .service-col {
    max-width: 400px;
  }
  .services .service-col .card p {
    font-size: 14px;
  }
  .services .service-col .card h3 {
    font-size: 16px;
  }
  .services .service-col .card:hover .shadow {
    background: linear-gradient(to top, var(--color-primary-dark), transparent) !important;
  }
} 

@media (pointer:coarse) {
  .services .service-col .card p {
    visibility: visible;
  }
  .services .service-col .card h3 {
    visibility: visible;
  }
  .services .service-col .card .shadow {
    display: none;
  }
}
@media (max-width: 800px) {
  .services .shape-before {
    display: none;
  }
  .services .shape-after {
    display: none;
  }
  .services .service-grid {
    flex-wrap: wrap;
  }
} 

/* Text section 2 */
.section-img-text-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2.7rem;
  /* background: var(--color-white); */
  border-radius: .6rem;
  /* box-shadow: 0 2px 16px rgba(0,182,178,.08); */
  padding: 2.5rem 2rem 2.5rem 2.3rem;
}

.section-img-text-right .section-content {
  flex: 2 1;
  min-width: 230px;
  padding-right: 2.2rem;
}
.section-img-text-right h2 {
  color: var(--color-primary);
  margin-bottom: 1.2rem;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: .5px;
}
.section-img-text-right p {
  margin-bottom: 1rem;
  font-size: 1.16rem;
  color: var(--color-text);
}
.section-img-text-right img {
  flex: 1 1 300px;
  max-width: 500px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,182,178,.06);
  background: var(--color-bg);
  min-width: 180px;
  max-height: 400px;
}
@media (max-width: 1000px) {
  .section-img-text-right {
    flex-direction: column-reverse;
    padding: 1.5rem 1rem 1.5rem 1rem;
    gap: 1.3rem;
    text-align: center;
  }
  .section-img-text-right .section-content {
    padding-right: 0;
    min-width: 0;
  }
  .section-img-text-right img {
    margin-bottom: 1.2rem;
    max-width: 98vw;
    min-width: 120px;
  }
} 

/* Latest News */
.news-filter-bar {
    background: var(--color-white);
    position: sticky;
    width: 100%;
    top: 50px;
    z-index: 10;
    padding: 1rem 0 1rem 0;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.news-filter-btn {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: .4rem;
    padding: .55rem 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
    box-shadow: 0 2px 4px rgba(0,182,178,0.06);
    font-size: 1rem;
    outline: none;
}
.news-filter-btn.active,
.news-filter-btn:hover {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 3px 12px rgba(255,150,88,0.11);
}
/* News column layout */
.news-columns {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: center;
}
.news-column {
    flex: 1 1 0;
    min-width: 260px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
/* Responsive: 2 columns */
@media (max-width: 1100px) {
    .news-columns {
    flex-wrap: wrap;
    gap: 1.4rem;
    }
    .news-column {
    min-width: 300px;
    max-width: 1fr;
    }
}
/* Responsive: 1 column */
@media (max-width: 650px) {
    .news-columns {
    flex-direction: column;
    align-items: center;
    gap: 0;
    }
    .news-column {
    min-width: 0;
    max-width: 100%;
    }
    .news-columns > .news-column:not(:first-child) {
    display: none;
    }
}
/* Home: clamp + fade the preview text inside the 3 cards */
.section-latest-news.home-latest .news-card { 
  max-height: 360px; /* tweak as needed */
  max-width: 360px;
}

.section-latest-news.home-latest .news-info {
  position: relative;
  max-height: 300px;          /* controls visible text height */
  overflow: hidden;
  margin-bottom: 10px;
}
.section-latest-news.home-latest .news-info img {
  max-height: 200px;
}
.section-latest-news.home-latest .news-info video {
  max-height: 200px;
}
/* soft fade to the card background color */
.section-latest-news.home-latest .news-info::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3.2rem;
  background: linear-gradient(to bottom, rgba(243,255,254,0), var(--color-bg));
  pointer-events: none;
}

.section-latest-news {
  background: var(--color-white);
  border-radius: .5rem;
  box-shadow: 0 2px 8px rgba(0,182,178,.08);
  padding: 2rem 1rem;
  text-align: center;
}
.latest-news-title {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  font-weight: bold;
}
.news-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.news-card {
  width: 300px;
  flex: 1 1 auto;
  min-height: 200px;
  background: var(--color-bg);
  border-radius: .4rem;
  box-shadow: 0 2px 8px rgba(0,182,178,.08);
  overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left;
  animation: fadeInUp .9s forwards;
  opacity: 0;
}

.news-card img {
  width: 100%; height: fit-content; object-fit: cover;
  border-radius: .4rem;
}
.news-card video {
  width: 100%;
  height: fit-content;
  min-height: 200px;
  border-radius: .4rem;
  margin: .5rem 0;
}
.news-card audio {
  width: 100%;
  margin: .5rem 0;
}
.news-info {
  padding: 1rem;
  flex: 1;
}
.news-info .news-title {
  color: var(--color-primary-dark);
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: .4rem;
  display: block;
}
.news-info .news-date {
  color: var(--color-accent);
  font-size: .92rem;
  margin-bottom: .3rem;
  display: block;
}
.news-info .news-excerpt {
  font-size: .96rem;
  margin-bottom: .3rem;
}
.all-news-link, .more-posts-link {
  display: inline-block;
  margin-top: 1rem;
  padding: .6rem 1.3rem;
  background: var(--color-primary); color: var(--color-white);
  border-radius: .3rem;
  text-decoration: none; font-weight: bold;
  transition: background .3s;
}
.all-news-link:hover, .more-posts-link:hover { background: var(--color-accent); }

.section-contact {
  display: flex;
  gap: 2.5rem;
  padding: 2rem 1rem;
  background: var(--color-white);
  border-radius: .7rem;
  box-shadow: 0 4px 24px rgba(0,182,178,.10);
  margin: 0 auto 0 auto;
  align-items: stretch;
  flex-direction: row;
}
.section-contact .contact-persons {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  position: relative;
  max-width: 600px;
}
.section-contact .contact-content {
  max-width: 350px;
  min-width: 250px;
  flex: 1 1 auto;
  min-width: 300px;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
}
.section-contact .contact-persons-col {
  flex-basis: 50%;
  background: var(--color-primary);
  margin: 0 5px;
  overflow: hidden;
}
.section-contact .contact-persons-content {
  color: white;
  padding: 5px 0 15px 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}
.section-contact .contact-persons img {
  object-fit: cover;
  width: 100%;
  height: 400px;
  /* box-shadow: 0 5px 10px rgb(from var(--color-primary-dark) r g b / 0.66); */
}
.section-contact .contact-persons h3 {
  background: var(--color-accent-dark);
  padding: 0 5px;
  font-size: 22px;
  margin-bottom: 5px;
}
.section-contact .shape-before, 
.section-contact .shape-after {
  background-color: var(--color-white);
  position: absolute;
  z-index: 3;
  width: 100%;
  height: 80px;
}
.section-contact .shape-before {
  top: -1px;
  right: -1px;
  clip-path: polygon(0 0, 100% 0, 100% 30%, 0 5%);
}
.section-contact .shape-after {
  clip-path: polygon(0 100%, 100% 100%, 100% 95%, 0 70%);
  bottom: -1px;
  left: -1px;
}
.contact-content > div {
  animation: fadeInUp 1.2s forwards;
  opacity: 0;
}
.section-contact h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}
.section-contact p {
    margin-bottom: 1.1rem;
    font-size: 1.1rem;
}
.section-contact a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: color .2s;
}
.section-contact a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
.section-contact a {
    margin-right: .75rem;
    text-decoration: none;
    color: var(--color-primary-dark);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color .2s;
}
.section-contact a:hover {
    color: var(--color-accent);
}
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: .4rem;
}

@media (max-width: 900px) {
  .section-contact {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 500px) {
  .section-contact .contact-persons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .section-contact .contact-persons .contact-persons-col {
    min-width: 300px;
  }
  .section-contact .contact-persons img { 
    height: 350px; 
  }
}

.section-finalcta {
  text-align: center; padding: 2.5rem 1rem 2rem 1rem;
  animation: fadeInUp 1.2s forwards;
  opacity: 0;
}

.section-finalcta h2 {
  color: var(--color-accent); margin-bottom: 1rem;
  font-size: 2rem;
}
.section-finalcta p {
  color: var(--color-text); margin-bottom: 1.5rem;
  font-size: 1.13rem;
}
.section-finalcta .cta3 {
  background: var(--color-accent); color: var(--color-white);
  padding: .7rem 2.1rem; border-radius: .4rem;
  font-weight: bold; text-decoration: none; font-size: 1.1rem;
  transition: background .3s;
  display: inline-block;
}
.section-finalcta .cta3:hover { background: var(--color-primary); }

footer {
  background: var(--color-primary-dark); color: var(--color-gray);
  text-align:center; padding:.5rem; font-size:.8rem;
  flex-shrink: 0;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
}
footer a {
  text-decoration: none;
  color: var(--color-accent);
  transition: color .2s;
}
footer div > span {
  margin: 0 .75rem;
}
@media (max-width: 500px) {
  footer {
    display: flex;
    flex-direction: column;
    font-size: .7rem;
  }
  footer div > span {
    display: none;
  }
}

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

@media (max-width:900px) {
  .section-img-text { flex-direction: column; text-align: center; }
  .section-img-text img { margin-bottom: 1.3rem; }
  .main { 
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .section-services { padding: 1rem .5rem; }
}
@media (max-width:600px) {
  .hero h1 { font-size:2rem !important; }
  nav a { margin:0 .2rem; font-size:.9rem !important; }
  h2 { font-size: 1.5rem !important;}
  h3 { font-size: 1.2rem !important;}
  .service-card, .news-card { min-height: 200px;}
  .news-card img { height: 150px;}
}

@media (any-hover: none) {
  .services .service-col .card .shadow {
    background: linear-gradient(to bottom, var(--color-primary-dark) 0%, transparent 100%) !important;
  }
  .services .service-col .card p {
    visibility: visible !important;
    background-color: rgb(from var(--color-primary-dark) r g b / 0.66)
  }
}