/* Open Sans, self-hosted (no Google Fonts request) */
@import url("open-sans.css");

/*
 * PLANWERKSTATT RÜEGG AG — site styles (child theme of Quark 2)
 *
 * Reconstructed 2026-10-08 from a screenshot of the original design, after
 * the original custom.css was overwritten by a Quark 2 update. Loaded last,
 * so it overrides theme.css.
 */

:root {
  --pwr-green: #014225;
  --pwr-green-light: #8fbfa5;
  --pwr-dark: #242424;
  --pwr-alt: #f4f3f0;
  --pwr-text: #555;
  --pwr-muted: #8a8a8a;
  --pwr-line: #d6d6d6;
  --pwr-font: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --pico-font-family-sans-serif: var(--pwr-font);
  --pico-font-family-display: var(--pwr-font);
}

body {
  font-family: var(--pwr-font);
  font-feature-settings: normal;
  background: #fff;
}

/* ---------- Header ---------- */

/* Big logo at the very top that overhangs the header bar onto the hero
 * image, shrinking (animated) into the bar once the page is scrolled.
 * The bar itself always has the small height and the page reserves exactly
 * that, so the shrink never shifts the layout (which would re-toggle
 * .scrolled and flicker). */
:root {
  --pwr-logo-top: 272px;
  --pwr-logo-small: 96px;
  --pwr-header-pad: 12px;
  --pwr-header-height: calc(var(--pwr-logo-small) + 2 * var(--pwr-header-pad));
}
/* Step the big logo down where its width would crowd the menu */
@media (max-width: 1200px) {
  :root {
    --pwr-logo-top: 200px;
  }
}
@media (max-width: 1000px) {
  :root {
    --pwr-logo-top: 120px;
  }
  .dropmenu a {
    font-size: 0.875rem;
    padding-inline: 0.625rem;
  }
}
@media (max-width: 860px) {
  :root {
    --pwr-logo-top: 160px;
    --pwr-logo-small: 64px;
    --pwr-header-pad: 8px;
  }
}
#header {
  background: #fff;
}
body.header-fixed #header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}
body.header-fixed #page-wrapper {
  padding-top: var(--pwr-header-height);
}
#header .navbar,
.header-animated.scrolled #header .navbar {
  min-height: 0;
  padding-block: var(--pwr-header-pad);
}
/* The logo slot keeps the small logo's size; the big image hangs out of it
 * (down and to the right) without pushing the menu. The menu sits above it. */
#header .navbar-section.logo {
  position: relative;
  width: calc(var(--pwr-logo-small) * 1.745); /* oval5.png is 2000×1146 */
  height: var(--pwr-logo-small);
}
#header .navbar-brand {
  position: absolute;
  top: 0;
  left: 0;
}
#header .desktop-menu {
  position: relative;
  z-index: 1;
}
#header .dropmenu ul.navigation {
  flex-wrap: nowrap;
  justify-content: flex-end;
}
#header .navbar-brand img {
  height: var(--pwr-logo-top);
  width: auto;
  max-width: none; /* Pico caps images at the (small) slot width */
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
  transition: height 0.3s ease, filter 0.3s ease;
}
.header-animated.scrolled #header .navbar-brand img {
  height: var(--pwr-logo-small);
  filter: none;
}
.mobile-menu {
  top: calc(var(--pwr-header-pad) + (var(--pwr-logo-small) - 44px) / 2);
}
@media (prefers-reduced-motion: reduce) {
  #header .navbar-brand img {
    transition: none;
  }
}
.mobile-logo .navbar-brand img {
  height: 72px;
  margin-inline: auto;
}
.dropmenu a,
.overlay .overlay-menu a {
  font-family: var(--pwr-font);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pwr-dark);
}
.overlay .overlay-menu a {
  font-size: 1.25rem;
}
.dropmenu a:hover {
  background: transparent;
  color: var(--pwr-green);
}
.dropmenu a.active,
.dropmenu a.active:hover {
  background: transparent;
  color: var(--pwr-dark);
}

/* ---------- One-page layout (home) ---------- */

#body-wrapper {
  padding: 0;
  background: #fff;
}

.pwr-section {
  position: relative;
  margin: 0;
  padding-block: clamp(3rem, 7vw, 5rem);
  color: var(--pwr-text);
  font-size: 0.9375rem;
  line-height: 1.8;
}
.pwr-container {
  max-width: 1110px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.pwr-section h2 {
  font-family: var(--pwr-font);
  font-size: 1.375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pwr-dark);
  margin-bottom: 1.25rem;
}
.pwr-section h2::before {
  content: none;
}
.pwr-section h3 {
  font-family: var(--pwr-font);
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pwr-dark);
  margin: 2rem 0 0.5rem;
}
.pwr-section h3 i {
  color: var(--pwr-green);
  margin-right: 0.6rem;
}
.pwr-section p,
.pwr-section li {
  color: inherit;
}
.pwr-section h2 + p {
  color: var(--pwr-muted);
  margin-top: -0.5rem;
}

.pwr-light {
  background: #fff;
}
.pwr-alt {
  background: var(--pwr-alt);
}
.pwr-dark {
  background: var(--pwr-dark);
  color: #a8a8a8;
}
.pwr-dark h2,
.pwr-dark h3,
.pwr-dark strong {
  color: #fff;
}
.pwr-dark h3 i {
  color: var(--pwr-green-light);
}
.pwr-dark a {
  color: #ddd;
  text-decoration: none;
}
.pwr-dark a:hover {
  color: #fff;
}

/* Download links (PDF) as outlined buttons */
.pwr-section a[href$=".pdf"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid #999;
  border-radius: 2px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pwr-muted);
  text-decoration: none;
  line-height: 1.6;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pwr-section a[href$=".pdf"]::before {
  content: "\f1c1";
  font-family: "Font Awesome 7 Free", "Font Awesome 6 Free";
  font-weight: 400;
}
.pwr-section a[href$=".pdf"]:hover {
  border-color: var(--pwr-green);
  color: var(--pwr-green);
}
.pwr-dark a[href$=".pdf"] {
  border-color: #ccc;
  color: #ddd;
}
.pwr-dark a[href$=".pdf"]:hover {
  border-color: #fff;
  color: #fff;
}

/* ---------- Hero / image bands ---------- */

.pwr-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(420px, 62vh, 640px);
  text-align: center;
  color: #eee;
}
.pwr-hero {
  --pwr-overlay: rgba(0, 0, 0, 0.35);
}
.pwr-hero h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.pwr-hero h2 + p {
  color: #eee;
  margin-top: 0;
}
#section1 {
  --pwr-bg: url("/user/images/werkbank.jpg");
}
.pwr-hero--band {
  min-height: clamp(320px, 42vh, 420px);
}
.pwr-hero--werkkoennen {
  --pwr-bg: url("/user/images/werkzeug.jpg");
}
.pwr-hero--werkstuecke {
  --pwr-bg: url("/user/images/schaltschrank.jpg");
}

/* Image sections (heroes + Partner): the photo sits on its own layer, 30 %
 * taller than the section on each side, and is shifted by the JS in
 * home.html.twig (--pwr-shift) so it scrolls slower than the content. */
.pwr-hero,
#partner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #333;
}
.pwr-hero::after,
#partner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  bottom: -30%;
  z-index: -2;
  background: var(--pwr-bg) center / cover no-repeat;
  transform: translate3d(0, var(--pwr-shift, 0px), 0);
  will-change: transform;
}
.pwr-hero::before,
#partner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pwr-overlay);
}

.hero-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.25rem;
  text-decoration: none;
  animation: pwr-bounce 2s infinite;
}
.hero-scroll-hint:hover {
  color: #fff;
}
@keyframes pwr-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-hint { animation: none; }
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 2.5rem 1.5rem;
  margin-top: 2rem;
}
.team-member {
  text-align: center;
  cursor: pointer;
  outline-offset: 4px;
}
.team-member img {
  width: 165px;
  height: 165px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ddd;
  box-shadow: 0 0 0 1px #eee;
  margin: 0 auto 1.5rem;
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.team-member:hover img,
.team-member.is-open img {
  transform: scale(1.04);
  border-color: var(--pwr-green);
}
.team-member h3 {
  margin: 0;
  font-size: 0.9375rem;
}
.team-member .role {
  margin: 0.25rem 0 0;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--pwr-muted);
  hyphens: auto;
}
/* Contact details are hidden until the card is clicked (JS toggles .is-open) */
.team-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.team-details p {
  margin: 0;
}
.team-details > :first-child {
  margin-top: 0.75rem;
}
.team-member.is-open .team-details {
  max-height: 12rem;
  opacity: 1;
}
/* Also reveal on hover (mouse) and keyboard focus; touch keeps tap-to-open */
@media (hover: hover) {
  .team-member:hover .team-details {
    max-height: 12rem;
    opacity: 1;
  }
}
.team-member:focus-visible .team-details,
.team-member:has(a:focus-visible) .team-details {
  max-height: 12rem;
  opacity: 1;
}
.team-details a {
  color: var(--pwr-text);
  text-decoration: none;
  word-break: break-word;
}
.team-details a:hover {
  color: var(--pwr-green);
}
.team-details i {
  color: var(--pwr-green);
  width: 1.1em;
}
.pet-emoji {
  font-size: 1.5rem;
}

/* ---------- Services (Werkkönnen) ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem 1.75rem;
}
.service-item h3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* icons line up even when a title wraps */
  min-height: 5.75rem;
  margin: 0 0 1.5rem;
  padding: 0.5rem 0 0;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-align: center;
}
.service-item h3 i {
  margin: 0 0 0.9rem;
  font-size: 1.5rem;
}
.service-item p {
  text-align: justify;
  hyphens: auto;
  font-size: 0.875rem;
  color: #444;
}

/* ---------- Werkstücke (projects) ---------- */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.portfolio-item {
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.06);
  padding-bottom: 1.25rem;
}
.portfolio-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.portfolio-item h3 {
  margin: 1.25rem 1rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  hyphens: auto;
}
.portfolio-item p {
  margin: 0 1rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--pwr-muted);
  hyphens: auto;
}

/* «Mehr»: only the first 6 cards until expanded (without JS a <noscript>
 * style in portfolio-grid.html.twig shows them all). */
.portfolio-grid.is-collapsed > .portfolio-item:nth-child(n + 7) {
  display: none;
}
.portfolio-more {
  margin-top: 2rem;
  text-align: center;
}
.portfolio-more-btn {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0.5rem 1.75rem;
  background: transparent;
  border: 1px solid #999;
  border-radius: 2px;
  box-shadow: none;
  font-family: var(--pwr-font);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pwr-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.portfolio-more-btn:hover,
.portfolio-more-btn:focus-visible {
  background: transparent;
  border-color: var(--pwr-green);
  color: var(--pwr-green);
}

/* ---------- Partner ---------- */

#partner {
  --pwr-bg: url("/user/images/sicherungen.jpg");
  --pwr-overlay: rgba(0, 0, 0, 0.55);
  color: #ddd;
}
#partner h2 {
  color: #fff;
}
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 1.75rem 1.5rem;
  align-items: center;
}
.partner-logo img {
  display: block;
  width: 100%;
  max-height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.partner-logo img:hover {
  opacity: 1;
}

/* ---------- Kontakt + map ---------- */

.contact-info h3 {
  margin-top: 1.5rem;
}
.contact-info p {
  margin: 0 0 0.5rem;
}
.contact-info i {
  color: var(--pwr-green-light);
  margin-right: 0.6rem;
}
iframe[title="Map"] {
  display: block;
  margin: 0;
  border: 0;
}

/* ---------- Project detail page ---------- */

.portfolio-item-detail {
  max-width: 900px;
  margin-inline: auto;
}
.portfolio-item-detail {
  padding-top: 1.5rem;
}
.portfolio-item-detail h1 {
  font-family: var(--pwr-font);
  color: var(--pwr-dark);
  line-height: 1.3;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.portfolio-item-detail img {
  width: 100%;
  border-radius: 3px;
  margin: 1rem 0 1.5rem;
}
.back-link {
  color: var(--pwr-green);
  font-weight: 600;
}

/* ---------- Footer ---------- */

#footer {
  background: var(--pwr-dark);
  border-top: 0;
  color: #c8c8c8;
  text-align: center;
  font-size: 0.8125rem;
  padding-block: 1.5rem;
}
#footer p {
  margin: 0;
  color: #c8c8c8; /* Pico gives <p> its own (dark) text colour */
}
#footer .footer-credit {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #9a9a9a;
}
#footer a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
#footer a:hover {
  color: var(--pwr-green-light);
  text-decoration: underline;
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
  }
  .team-member img {
    width: 120px;
    height: 120px;
  }
  .service-item p {
    text-align: left;
  }
}

/* Text for screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Sub-pages (Impressum, projects, …) ---------- */

/* The big overhanging logo only makes sense over the home page's hero image */
body:not(:has(.pwr-hero)) #header .navbar-brand img {
  height: var(--pwr-logo-small);
  filter: none;
}
.content-item h1,
.content-item h2,
.content-item h3 {
  font-family: var(--pwr-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pwr-dark);
}
.content-item h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.content-item h2 {
  font-size: 1.125rem;
  margin-top: 2rem;
}
.content-item h2::before {
  content: none;
}
.content-item a {
  color: var(--pwr-green);
}
.content-item h3 {
  font-size: 0.875rem;
  margin: 1.5rem 0 0.4rem;
}

/* Project cards link to their detail page */
a.portfolio-item {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.portfolio-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14), 0 10px 24px rgba(0, 0, 0, 0.1);
}
a.portfolio-item:hover h3 {
  color: var(--pwr-green);
}
.portfolio-item-detail .details {
  margin-top: 1.5rem;
}

/* Berichte: PDF buttons side by side, wrapping on narrow screens */
.report-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}
