/*
Theme Name: Peter Sonberg Modern
Theme URI: https://petersonberg.dk/
Author: Peter Sonberg
Description: En moderne, blokredigerbar genopbygning af Peter Sonbergs hjemmeside.
Version: 1.1.3
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: peter-sonberg-modern
*/

:root {
  --ps-background: #d9d7cb;
  --ps-ink: #605d34;
  --ps-content: 50vw;
  --ps-gap: clamp(2rem, 5vw, 4rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ps-background);
  color: var(--ps-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 200;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--ps-ink);
  opacity: 0.72;
  text-decoration: none;
  transition: opacity 180ms ease;
}

a:hover,
a:focus-visible {
  opacity: 0.48;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

figure {
  margin-left: 0;
  margin-right: 0;
}

h2,
h3 {
  font-weight: 200;
  line-height: 1.18;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.55em;
}

h3,
summary {
  font-size: 1.6rem;
  font-weight: 200;
}

p,
.ps-hours td {
  font-size: 1.2rem;
}

p {
  margin-bottom: 1em;
}

.ps-site {
  margin: 0 auto;
  max-width: var(--ps-content);
  padding: clamp(1rem, 3vw, 2rem);
}

.ps-layout {
  display: grid;
  gap: var(--ps-gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ps-column {
  min-width: 0;
}

.ps-logo {
  align-items: center;
  display: flex;
  min-height: 290px;
}

.ps-logo img {
  width: 100%;
}

.ps-photo img {
  border: 1px solid rgba(68, 41, 30, 0.35);
  width: 100%;
}

.ps-contact {
  padding-top: 1rem;
}

.ps-contact a {
  overflow-wrap: anywhere;
}

.ps-address span,
.ps-contact-line span {
  display: block;
}

.ps-small {
  font-size: 0.9rem;
}

.ps-book-button,
.ps-book-button .wp-block-button__link {
  background: var(--ps-ink);
  color: var(--ps-background) !important;
  display: inline-block;
  font-size: 1.4rem;
  opacity: 1;
  padding: 0.25rem 0.55rem;
  text-align: center;
}

.ps-book-button:hover,
.ps-book-button:focus-visible,
.ps-book-button .wp-block-button__link:hover,
.ps-book-button .wp-block-button__link:focus-visible {
  opacity: 0.55;
}

.ps-book-button .wp-block-button__link {
  border: 0;
  border-radius: 0;
  padding: 0;
}

.ps-prices-title {
  margin: -0.2rem 0 0.35rem;
}

.ps-price-card {
  border: 0;
  margin: 0;
  padding: 0;
}

.ps-price-card summary {
  cursor: pointer;
  list-style: none;
  margin: 0.05rem 0;
  padding: 0;
  transition: opacity 180ms ease;
}

.ps-price-card summary::-webkit-details-marker {
  display: none;
}

.ps-price-card summary::before {
  content: "+";
  display: inline-block;
  font-size: 0.78em;
  margin-right: 0.35rem;
  transform-origin: center;
  transition: transform 180ms ease;
  width: 0.75rem;
}

.ps-price-card[open] summary::before {
  transform: rotate(45deg);
}

.ps-price-card summary:hover,
.ps-price-card summary:focus-visible {
  opacity: 0.55;
}

.ps-price-card > :not(summary) {
  margin-left: 1.1rem;
}

.ps-price-table,
.ps-hours {
  border-collapse: collapse;
  margin: 0.45rem 0 1rem;
  width: 100%;
}

.ps-price-table table,
.ps-hours table {
  border: 0;
  width: 100%;
}

.ps-price-table td,
.ps-hours td {
  border: 0;
}

.ps-price-table td {
  border: 0;
  font-size: 1rem;
  padding: 0.05rem 0;
}

.ps-price-table td:last-child {
  padding-left: 1rem;
  text-align: right;
  white-space: nowrap;
}

.ps-note {
  font-size: 0.9rem;
}

.ps-sections {
  margin-top: var(--ps-gap);
}

.ps-section {
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.ps-hours {
  margin-top: 0;
}

.ps-hours td {
  padding: 0.02rem 0.65rem 0.02rem 0;
  vertical-align: top;
}

.ps-hours td:first-child {
  width: 55%;
}

.ps-disclaimer {
  margin-bottom: 0;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

@media (max-width: 1024px) and (min-width: 768px) {
  .ps-site {
    max-width: 72vw;
  }
}

@media (min-width: 768px) {
  p,
  .ps-hours td {
    font-size: 1.4rem;
  }

  .ps-price-table td {
    font-size: 1.2rem;
  }
}

@media (min-width: 1400px) {
  h2 {
    font-size: 2.2rem;
  }

  h3,
  summary {
    font-size: 1.8rem;
  }

  p,
  .ps-hours td {
    font-size: 1.8rem;
  }

  .ps-price-table td {
    font-size: 1.6rem;
  }

  .ps-note {
    font-size: 1.1rem;
  }
}

@media (max-width: 767px) {
  :root {
    --ps-content: 100%;
  }

  .ps-site {
    max-width: 100%;
    padding: 1rem;
  }

  .ps-layout {
    gap: 0.5rem 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.85fr);
  }

  .ps-logo {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 0.5rem 1rem 1.5rem;
  }

  .ps-logo img {
    margin: 0 auto;
    width: 88%;
  }

  .ps-contact {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0 1rem 1rem;
  }

  .ps-prices {
    grid-column: 1;
    grid-row: 3;
    padding: 0 0 0 1rem;
  }

  .ps-photo {
    align-self: start;
    grid-column: 2;
    grid-row: 3;
    padding-right: 1rem;
  }

  .ps-address span {
    display: inline;
  }

  .ps-contact-line span {
    display: block;
  }

  .ps-address span + span::before {
    content: " · ";
  }

  .ps-price-table td {
    font-size: 0.96rem;
  }

  .ps-price-card > :not(summary) {
    margin-left: 0.9rem;
  }

  .ps-sections {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .ps-layout {
    grid-template-columns: minmax(0, 1fr) minmax(122px, 0.82fr);
  }

  .ps-price-card summary {
    font-size: 1.23rem;
  }

  .ps-price-table td {
    font-size: 0.86rem;
  }
}
