@charset "UTF-8";

/* ================================================
   PICHLMAYR – Component Library
   Global reusable UI elements
   ================================================ */


/* ================================================
   DOWNLOAD BUTTON
   Usage:
   <a href="file.pdf" class="download-link" download>
     <span class="download-icon"><i class="bi bi-arrow-down"></i></span>
     <span>Download (PDF)</span>
   </a>
   ================================================ */

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Breathing room when a heading immediately follows the button, instead of
   relying on each page to add its own <br><br> or margin utility. */
.download-link + h2,
.download-link + h3,
.download-link + h4 {
  margin-top: 2rem;
}

.download-link:hover,
.download-link:focus-visible {
  background: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, .2);
  color: #fff;
  text-decoration: none;
}

.download-link:focus-visible {
  outline: none;
  box-shadow: 0 6px 15px rgba(0, 0, 0, .2), 0 0 0 3px #fff, 0 0 0 5px var(--primary);
}

.download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  background: transparent;
  border: 1.5px dotted currentColor;
  border-radius: 50%;
  font-size: .85em;
  transition: border-color 0.25s ease;
}

.download-link:hover .download-icon i {
  animation: downloadBounce 0.6s ease;
}

@keyframes downloadBounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(3px); }
  60%  { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}


/* ================================================
   PILL BUTTON
   Usage:
   <a href="#" class="pm-pill-btn">Label</a>
   <button class="pm-pill-btn">Label</button>
   ================================================ */

.pm-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.pm-pill-btn:hover,
.pm-pill-btn:focus-visible {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, .15);
  text-decoration: none;
}

.pm-pill-btn:focus-visible {
  outline: none;
  box-shadow: 0 6px 15px rgba(0, 0, 0, .15), 0 0 0 3px #fff, 0 0 0 5px var(--primary);
}

.pm-pill-btn--orange {
  background: var(--secondary);
}

.pm-pill-btn--orange:hover,
.pm-pill-btn--orange:focus-visible {
  background: var(--primary);
}


/* ================================================
   IMAGE CARD LINK (grid-box)
   Whole-card link with a background photo, gradient overlay, heading, text
   and a pill-style "button" (a <span>, not a nested <a> — the card itself
   is the one real link). Data-driven via inc/startseite_cards.inc.php;
   fully self-contained here so any brand can drop the include in without
   needing anything from a specific page's own CSS.
   Usage:
   <a href="..." class="grid-box">
     <div class="grid-box-bg" style="--card-image: url('...'); --card-focus-x: 50%; --card-focus-y: 50%;"></div>
     <div class="grid-box-content">
       <h3>Heading</h3>
       <p>Text</p>
       <span class="grid-pill">Label <i class="grid-pill__ext-icon"></i></span>
     </div>
   </a>
   ================================================ */

.grid-box {
  display: block;
  margin: 0.75rem;
  border-radius: 15px;
  overflow: hidden;
  padding: 2rem;
  color: white;
  text-decoration: none;
  position: relative;
  min-height: 350px;
}

.grid-box:hover,
.grid-box:focus-visible {
  color: white;
}

.grid-box:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--primary);
}

.grid-box-bg {
  position: absolute;
  inset: 0;
  /* --card-image/--card-focus-x/--card-focus-y are the only per-card bits
     set inline (see usage above) — the gradient overlay is shared. */
  background-image: linear-gradient(rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.05) 60%), var(--card-image);
  background-size: cover;
  background-position: var(--card-focus-x, 50%) var(--card-focus-y, 50%);
  border-radius: 15px;
  transition: transform 0.6s ease;
  z-index: 0;
}

.grid-box:hover .grid-box-bg {
  transform: scale(1.06);
}

.grid-box-content {
  position: relative;
  z-index: 1;
}

.grid-box-content h3 { margin-bottom: 0.5rem; }
.grid-box-content p  { margin-bottom: 1rem; }

.grid-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.25rem;
  border-radius: 999px;
  background-color: var(--primary);
  color: #fff;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

/* The pill is a <span> (the card itself is the one real link), so it reacts
   to the card being hovered/focused rather than having its own state. */
.grid-box:hover .grid-pill,
.grid-box:focus-visible .grid-pill {
  background-color: var(--secondary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,.25);
  text-decoration: underline;
}

.grid-pill__ext-icon {
  font-size: .8em;
  opacity: .8;
}

@media (prefers-reduced-motion: reduce) {
  .grid-box-bg { transition: none !important; }
  .grid-box:hover .grid-pill,
  .grid-box:focus-visible .grid-pill {
    transform: none !important;
  }
}


/* ================================================
   CAROUSEL DOTS
   Shared pagination dots for the scroll-snap carousels (startseite
   Impressionen, pflege-wg, komfortzimmer): idle dots are small circles,
   the active one grows into a pill via a width transition. Each carousel
   keeps its own track/item/arrow styling (aspect ratios and breakpoints
   differ), only the dots were duplicated 3x before this was centralized.
   Usage:
   <div class="carousel-dots" aria-label="Bildnavigation">
     <button class="carousel-dots__dot is-active" type="button" aria-label="Bild 1"></button>
     ...
   </div>
   ================================================ */

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31,41,55,.06);
  border: 1px solid rgba(0,0,0,.06);
}

.carousel-dots__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  flex-shrink: 0;
  background: rgba(31,41,55,.25);
  padding: 0;
  cursor: pointer;
  transition: width .3s ease, background-color .3s ease;
}

.carousel-dots__dot.is-active {
  width: 24px;
  background: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-dots__dot { transition: none !important; }
}


.pm-carousel {
  position: relative;
}

.pm-carousel__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pm-carousel__track::-webkit-scrollbar {
  display: none;
}

.pm-carousel__item {
  flex: 0 0 85%;
  scroll-snap-align: start;
}

@media (min-width: 576px) {
  .pm-carousel__item { flex: 0 0 48%; }
}

@media (min-width: 992px) {
  .pm-carousel__item { flex: 0 0 calc((100% - 28px) / 3); }
}

/* Peek modifier — shows 4.2 items on desktop (a sliver of the next one,
   as a scroll affordance) instead of exactly 3. Opt-in per carousel via
   .pm-carousel--peek on the wrapper, so the photo-gallery carousels
   elsewhere keep their plain 3-up layout. */
@media (min-width: 992px) {
  .pm-carousel--peek .pm-carousel__item { flex: 0 0 calc((100% - 56px) / 4.2); }
}

/* Full-bleed — breaks an element out of its parent .container's max-width
   to span the full viewport width, desktop only. Own horizontal padding
   replaces what the container's gutter used to provide. */
@media (min-width: 992px) {
  .pm-full-bleed {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.pm-carousel__img {
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

.pm-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 36px;
}

@media (min-width: 992px) {
  .pm-carousel__controls {
    justify-content: center;
    position: relative;
  }
  .pm-carousel__arrows {
    position: absolute;
    right: 5px;
  }
}

.pm-carousel__arrows {
  display: none;
  gap: 8px;
}

@media (min-width: 992px) {
  .pm-carousel__arrows { display: flex; }
}

.pm-carousel__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.pm-carousel__arrow:hover {
  background: var(--primary);
  color: #fff;
}

.pm-carousel__arrow svg {
  width: 20px;
  height: 20px;
}


.headline-badge .pm-quality-badge img {
  max-height: 100px;
}


.pm-content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.pm-content-card__media {
  position: relative;
}

.pm-content-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pm-content-card__ribbon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: .35rem 1rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  text-align: center;
}

.pm-content-card__ribbon--secondary {
  background: var(--secondary);
  color: #1f2937;
}

.pm-content-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.75rem;
}

.pm-content-card__title {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .65rem;
}

.pm-content-card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  flex: 1;
  font-size: 1rem;
}

.pm-content-card__list li {
  position: relative;
  padding: 0 0 .6rem 1.8rem;
  line-height: 1.4;
}

.pm-content-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 13 10 18 19 7'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.pm-content-card__text {
  margin: 0 0 .5rem;
  font-size: 1rem;
  line-height: 1.5;
  /* Collapsed state shows a real preview (not nothing) — clamped to 4
     lines across all its <p> children combined, expanded on toggle. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.pm-content-card__text.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.pm-content-card__text p {
  margin: 0 0 .75rem;
}

.pm-content-card__text p:last-child {
  margin-bottom: 0;
}

.pm-content-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.pm-content-card__toggle:hover,
.pm-content-card__toggle:focus-visible {
  color: var(--secondary-hover);
}

.pm-content-card__toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform .25s ease;
}

.pm-content-card__toggle[aria-expanded="true"] .pm-content-card__toggle-icon {
  transform: rotate(180deg);
}

.pm-content-card__toggle-label--less {
  display: none;
}

.pm-content-card__toggle[aria-expanded="true"] .pm-content-card__toggle-label--more {
  display: none;
}

.pm-content-card__toggle[aria-expanded="true"] .pm-content-card__toggle-label--less {
  display: inline;
}

.pm-content-card__divider {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, .1);
  margin: 0 0 1rem;
}

.pm-content-card__link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.pm-content-card__link:hover,
.pm-content-card__link:focus-visible {
  color: var(--secondary-hover);
}


#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  background-color: var(--secondary-hover);
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.arrow-up {
  width: 14px;
  height: 14px;
  border-left: 3px solid #fff;
  border-top: 3px solid #fff;
  transform: rotate(45deg);
  margin-top: 4px;
}


.pm-quality-badge {
  display: inline-block;
}

.pm-quality-badge img {
  display: block;
  max-height: 120px;
  width: auto;
  transition: transform .25s ease, filter .25s ease;
}

.pm-quality-badge:hover img,
.pm-quality-badge:focus-within img {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .18));
}

@media (prefers-reduced-motion: reduce) {
  .pm-quality-badge img {
    transition: none;
  }
  .pm-quality-badge:hover img,
  .pm-quality-badge:focus-within img {
    transform: none;
  }
}
