/* Page-specific sections: home, post cards, suppliers, about, contact, legal */

/* Hero images (paths are relative to this file) */

.page-hero--home        { background-image: url("../img/hero/home.jpg"); }
.page-hero--lieferanten { background-image: url("../img/hero/lieferanten.jpg"); }
.page-hero--blog        { background-image: url("../img/hero/blog.jpg"); }
.page-hero--kontakt     { background-image: url("../img/hero/kontakt.jpg"); }
.page-hero--ueber-uns    { background-image: url("../img/hero/ueber-uns.jpg"); }

/* Home: intro and teaser cards */

.home-intro__title {
  margin-bottom: 0;
  font-size: 36px;
  font-weight: 200;
  text-align: center;
}

.teasers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 520px;
  border: 1px solid var(--color-light);
  border-radius: var(--radius);
  text-align: center;
}

.teaser__media {
  width: 100%;
  aspect-ratio: 390 / 238;
  object-fit: cover;
  background: var(--color-light);
}

.teaser__title {
  margin: 20px 0;
  font-size: 30px;
  font-weight: 500;
}

.teaser__text {
  padding: 0 20px;
}

.teaser .btn {
  width: 95%;
  margin: 25px 0 15px;
}

@media (max-width: 991px) {
  .teasers {
    grid-template-columns: 1fr;
  }
  .teaser {
    min-height: 0;
  }
}

/* Home: philosophy title band with the triangle pointing into the dark band */

.band-title {
  position: relative;
  padding: 20px 0;
  background: var(--color-light);
  text-align: center;
}
.band-title h2 {
  margin: 0;
  font-weight: 500;
}
.band-title::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% - 50px);
  z-index: 1;
  border-top: 50px solid var(--color-light);
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
}

.values {
  background: var(--color-dark);
  color: var(--color-light);
}

.values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.values__icon {
  display: inline-flex;
  padding: 20px;
  border: 2px solid var(--color-light);
  border-radius: 50%;
  color: var(--color-blue-light);
}
.values__icon .icon {
  width: 40px;
  height: 40px;
}

.values__title {
  margin: 15px 0 10px;
  font-size: 20px;
  font-weight: 500;
}

@media (max-width: 991px) {
  .values__grid {
    grid-template-columns: 1fr;
  }
}

.section-heading {
  font-weight: 500;
  text-align: center;
  margin-bottom: 0;
}

/* Post cards (home "News" row and blog list) */

.post-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 30%;
  height: 400px;
  margin: 15px;
  padding: 15px;
  background-color: var(--color-light);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--color-white);
}
.post-card[hidden] {
  display: none;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 75%;
  padding: 10px;
  background: var(--color-dark);
  text-align: center;
  transition: opacity 0.3s;
}

.post-card__title {
  margin-bottom: 15px;
  color: var(--color-white);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
}

.post-card__excerpt {
  margin: 0;
  font-size: 14px;
}

.post-card__arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  padding: 20px;
  background: var(--color-dark);
  color: var(--color-light);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s;
}
.post-card__arrow .icon {
  width: 32px;
  height: 32px;
}

.post-card:hover .post-card__body,
.post-card:focus-visible .post-card__body {
  opacity: 0;
}
.post-card:hover .post-card__arrow,
.post-card:focus-visible .post-card__arrow {
  opacity: 1;
}

@media (max-width: 991px) {
  .post-card { width: 45%; }
}
@media (max-width: 767px) {
  .post-card { width: 95%; }
}

/* Blog: category filter buttons */

.blog-title {
  margin-bottom: 25px;
  text-align: center;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0 0 25px;
  padding: 0;
  list-style: none;
}

.filter-btn {
  width: 100%;
  border-color: var(--color-grey);
  background: var(--color-grey);
}
.filter-btn:hover,
.filter-btn:focus-visible,
.filter-btn[aria-pressed="true"] {
  border-color: var(--color-dark);
  background: var(--color-dark);
}

@media (max-width: 767px) {
  .filters {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* Lieferanten: supplier logo cards */

.lieferanten-intro {
  margin-bottom: 55px;
}

.supplier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.supplier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 10px;
  border: 1px solid var(--color-blue);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-dark);
  text-align: center;
}
.supplier-card:hover,
.supplier-card:focus-visible {
  color: var(--color-dark);
}

.supplier-card__logo {
  max-height: 150px;
  object-fit: contain;
}

.supplier-card__text {
  position: absolute;
  inset: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-white);
  font-size: 14px;
  transition: opacity 0.3s;
}
.supplier-card__text p {
  margin: 0 0 8px;
}

.supplier-card__name {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
}

/* On devices that can hover, show the logo and reveal the text on hover */
@media (hover: hover) {
  .supplier-card--logo .supplier-card__text {
    opacity: 0;
  }
  .supplier-card--logo:hover .supplier-card__text,
  .supplier-card--logo:focus-visible .supplier-card__text {
    opacity: 1;
  }
}

/* Without hover, stack the logo above the text */
@media (hover: none) {
  .supplier-card__text {
    position: static;
    margin-top: 10px;
  }
}

@media (max-width: 991px) {
  .supplier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .supplier-grid { grid-template-columns: 1fr; }
  .supplier-card { min-height: 300px; }
}

/* Über uns: heading column with a divider line, text column */

.about-title {
  color: var(--color-dark);
}

.about-row {
  display: grid;
  grid-template-columns: 30% 70%;
  margin: 20px 0;
}

.about-row__heading {
  margin: 0;
  padding: 0 20px;
  border-right: 3px solid var(--color-light);
  font-size: 24px;
  font-weight: 400;
  text-align: center;
}

.about-row__body {
  padding: 0 0 0 30px;
  color: var(--color-dark);
}
.about-row__body ul {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 991px) {
  .about-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .about-row__heading {
    padding: 0;
    border-right: 0;
  }
  .about-row__body {
    padding: 0;
  }
}

.quote {
  background: var(--color-dark);
  color: var(--color-light);
  text-align: center;
}
.quote blockquote {
  max-width: 900px;
  margin: 0 auto;
  font-size: 18px;
  font-weight: 300;
}
.quote cite {
  font-size: 16px;
}

/* Über uns: team cards */

.team-title {
  text-align: center;
}

.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--color-light);
  text-align: center;
}

.member__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--color-light);
}

.member__name {
  margin: 10px 0 5px;
  font-size: 20px;
  font-weight: 400;
}

.member__role {
  margin: 5px 0;
  padding: 0 10px;
  font-size: 14px;
}

.member__contact {
  display: flex;
  width: 90%;
  margin: auto 0 1em;
  border: 1px solid var(--color-border);
  font-size: 14px;
}

.member__phone,
.member__mail {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
}
.member__phone {
  flex: 1;
  color: var(--color-text);
}
.member__mail {
  justify-content: center;
  width: 20%;
  border-left: 1px solid var(--color-border);
  color: var(--color-grey);
}

@media (max-width: 991px) {
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .team { grid-template-columns: 1fr; }
}

/* Kontakt */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.contact-grid address {
  font-style: normal;
}

.contact-logo {
  width: 150px;
  margin-top: 25px;
}

.contact-grid .btn {
  font-size: 14px;
}

.map {
  width: 100%;
  height: 350px;
  border: 0;
}

@media (max-width: 991px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Legal pages */

.legal {
  max-width: 900px;
}
.legal h2 {
  margin-top: 1.5em;
  font-size: 24px;
}

/* Blog post */

.post {
  padding-bottom: 25px;
}

.post__container {
  max-width: 900px;
}

.post__title {
  font-weight: 500;
  text-align: center;
}

.post__image {
  width: 100%;
  margin: 20px 0 0;
}

.share {
  display: inline-flex;
  margin: 15px 0 0;
  padding: 5px 10px;
  border: 1px solid var(--color-dark);
  list-style: none;
}
.share[hidden] {
  display: none;
}
.share li + li {
  border-left: 1px solid var(--color-dark);
}
.share__icon,
.share__link {
  display: flex;
  padding: 4px 10px;
  color: var(--color-dark);
}
.share__link:hover,
.share__link:focus-visible {
  color: var(--color-blue);
}
.share .icon {
  width: 20px;
  height: 20px;
}

.post__content {
  margin-top: 15px;
}
.post__content h2 {
  margin-top: 1.2em;
  font-size: 26px;
  font-weight: 500;
}
.post__content h3,
.post__content h4 {
  margin-top: 1em;
}
.post__content figure {
  margin: 1.5em 0;
}
.post__content figcaption,
.post__content .small {
  font-size: 14px;
}
.post__content figcaption {
  margin-top: 6px;
  color: var(--color-dark);
  text-align: center;
}

.embed iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.gallery,
.gallery > ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 1.5em 0;
  padding: 0;
  list-style: none;
}
.gallery > ul {
  margin: 0;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery figure {
  margin: 0;
}

.columns {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 1.5em 0;
}
.column {
  flex: 1 1 250px;
}

.table {
  overflow-x: auto;
}
.table table {
  width: 100%;
  border-collapse: collapse;
}
.table td,
.table th {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
}

/* Related posts under a blog post */

.related {
  padding-top: 25px;
}

.related__title {
  margin: 55px 0 15px;
  font-size: 22px;
  font-weight: 400;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.related-card {
  border: 1px solid var(--color-dark);
}

.related-card__image {
  display: block;
  height: 250px;
  background-color: var(--color-light);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.related-card__title {
  margin: 0;
  padding: 15px;
  font-size: 20px;
  font-weight: 400;
  text-align: center;
}
.related-card__title a {
  color: var(--color-dark);
}
.related-card__title a:hover,
.related-card__title a:focus-visible {
  color: var(--color-blue);
}

@media (max-width: 767px) {
  .related__grid {
    grid-template-columns: 1fr;
  }
}

/* Supplier detail page */

.supplier {
  display: grid;
  grid-template-columns: 60% 40%;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--color-light);
}

.supplier__text {
  padding-right: 30px;
  color: var(--color-dark);
}

.supplier__logo {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 991px) {
  .supplier {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .supplier__text {
    padding-right: 0;
  }
  .supplier__logo {
    max-width: 300px;
  }
}

.catalogs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1em;
  margin: 1em 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.catalog {
  background: #f0f0f0;
}

.catalog__preview {
  width: 100%;
  height: 400px;
  border: 0;
  background: var(--color-dark);
}

.catalog__body {
  width: 90%;
  margin: 0 auto;
  padding-bottom: 10px;
}

.catalog__btn {
  width: 95%;
  margin: 25px 0 15px;
}

.catalog__title {
  margin-bottom: 5px;
  font-family: var(--font-body);
  font-size: 16px;
}

.catalog__text {
  font-size: 14px;
}

@media (max-width: 991px) {
  .catalogs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .catalogs { grid-template-columns: 1fr; }
}
