/*
Theme Name: Louise Dorner
Theme URI: https://louisedorner.dk
Author: Bygget til Louise Dorner
Description: Hybrid-tema til Louise Dorner — klinik for samtaler ved sygdom. Faste, laaste sektionslayouts hvor tekst og billeder frit kan redigeres i WordPress-editoren.
Version: 1.9.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: louise-dorner
Tags: block-patterns, full-site-editing, one-column, editor-style, custom-colors, custom-menu
*/

/* ---------------------------------------------------------------
   Alt layout styres af klasserne herunder, ikke af inline styles i
   moenstrene. Det er bevidst: WordPress validerer inline styles mod
   sin egen serialisering, og enhver afvigelse giver "ugyldigt indhold".
   --------------------------------------------------------------- */

body {
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { text-decoration: none; }
a:hover { color: var(--wp--preset--color--ink); }
::selection { background: #ece2e2; }

.wp-block-button__link { border-radius: 0; }

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

.ld-header {
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding-block: 18px;
}
.ld-header .wp-block-site-title a {
  font-family: var(--wp--preset--font-family--display);
  font-size: 26px;
  font-weight: 400;
  color: var(--wp--preset--color--ink);
}
.ld-header .wp-block-navigation {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ld-header .wp-block-navigation a { white-space: nowrap; color: var(--wp--preset--color--muted); }
.ld-header .wp-block-navigation a:hover { color: var(--wp--preset--color--ink); }
.ld-headrow {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: baseline;
  justify-content: space-between;
}

.ld-footer {
  border-top: 1px solid var(--wp--preset--color--line);
  padding-block: 40px;
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
}
.ld-footer a { color: var(--wp--preset--color--muted); }
.ld-footer a:hover { color: var(--wp--preset--color--ink); }
.ld-footer-name {
  font-family: var(--wp--preset--font-family--display);
  font-size: 22px;
  color: var(--wp--preset--color--ink);
  margin-bottom: 8px;
}

/* --- Neutraliser WordPress' constrained-layout i temaets containere ---
   Blokgrupperne bruger "constrained", som saetter max-width: 720px og
   margin: auto paa hvert barn. I et grid-felt centrerer de auto-margener
   indholdet, saa overskrifter staar forskudt. Her slaas det fra. */

.ld-rows > *,
.ld-row > *,
.ld-faq > *,
.ld-cv > *,
.ld-pricerow > *,
.ld-placeholder > *,
.ld-band > *,
.ld-postrow > *,
.ld-secgrid > .wp-block-column > *,
.ld-herorow > .wp-block-column > *,
.ld-trio > .wp-block-column > *,
.ld-split > .wp-block-column > *,
.ld-facts > .wp-block-column > *,
.ld-gallery > .wp-block-column > * {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Sektionsgitteret og hero-raekken skal fylde hele sektionens bredde */
.ld-section > .ld-secgrid,
.ld-section > .wp-block-columns,
.ld-hero > .wp-block-columns,
.ld-hero > *,
.ld-closing > *,
.ld-section > * {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Sikkerhedsnet: intet inde i temaets containere maa centreres af
   WordPress' auto-margener. */
.ld-rows *,
.ld-row > *,
.ld-secgrid > .wp-block-column > *,
.ld-herorow > .wp-block-column > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.ld-row > h3 { justify-self: start; text-align: left !important; }
.ld-row > h3 a { text-align: left; }

/* --- Sektioner ------------------------------------------------- */

.ld-section { padding-top: clamp(52px, 7vw, 92px); }

/* Sektionsgitter: label i venstre margen, indhold til hoejre.
   Egen klasse — maa IKKE ramme andre kolonneblokke i samme sektion. */
.ld-secgrid { gap: clamp(24px, 3vw, 48px); align-items: flex-start; margin-block: 0; }
.ld-secgrid > .wp-block-column { min-width: 0; }
/* 22% + 78% + gap giver over 100% og skubber indholdet ud af rammen.
   Foerste spalte faar en fast bredde, resten tager den plads der er. */
.ld-secgrid > .wp-block-column:first-child { flex: 0 0 20%; }
.ld-secgrid > .wp-block-column:last-child { flex: 1 1 0%; }
.ld-secgrid > .wp-block-column > *:first-child { margin-top: 0; }

.ld-hero { padding-top: clamp(52px, 7vw, 92px); padding-bottom: clamp(36px, 5vw, 60px); }
.ld-hero h1 { margin-top: clamp(24px, 3vw, 40px); }
.ld-herorow { margin-top: clamp(28px, 3.5vw, 48px); align-items: flex-end; }
.ld-herorow > .wp-block-column { min-width: 0; }
.ld-herorow > .wp-block-column:first-child { flex: 1 1 0%; }
.ld-herorow > .wp-block-column:last-child { flex: 0 0 34%; }
.ld-herorow p + p { margin-top: 12px; }

/* Kursiv i overskrifter er accentfarvet — det baerer forsidens headline */
h1 em, h2 em, .wp-block-post-title em { font-style: italic; color: var(--wp--preset--color--accent); }

/* Lille mono-linje under en knap ("20 MIN · INGEN BINDING") */
.ld-meta {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  margin-top: 14px;
}

.ld-eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  line-height: 1.6;
}

.ld-lead { font-size: var(--wp--preset--font-size--lead); color: var(--wp--preset--color--body); }
.ld-pull {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--section);
  line-height: 1.22;
  color: var(--wp--preset--color--display);
}
.ld-note { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.ld-kicker {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
  margin-bottom: 8px;
}
.ld-stat {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.1;
  color: var(--wp--preset--color--display);
}
.ld-price {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(23px, 2.5vw, 29px);
  line-height: 1.1;
  color: var(--wp--preset--color--accent);
}

/* --- Linjedelte lister (uden kortlook) ------------------------- */

.ld-rows > * {
  border-top: 1px solid var(--wp--preset--color--line);
  margin-block: 0;
}
.ld-rows > *:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }

/* Raekke: overskrift i venstre spalte, broedtekst i hoejre */
.ld-row {
  display: grid;
  grid-template-columns: 38% 1fr;
  grid-template-rows: min-content min-content;
  column-gap: clamp(24px, 3vw, 48px);
  row-gap: 6px;
  align-content: start;
  padding-block: 26px;
}
.ld-row > * { margin-block: 0; min-width: 0; }
.ld-row > .ld-kicker { grid-column: 1; grid-row: 1; margin-bottom: 0; }
.ld-row > h3 {
  grid-column: 1;
  line-height: 1.15;
  text-align: left;
  text-wrap: balance;
}
.ld-row > *:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.ld-row h3 a { color: var(--wp--preset--color--display); }
.ld-row h3 a:hover { color: var(--wp--preset--color--accent); }
.ld-row-link:hover { background: #f6f3ee; }

ul.ld-rows { list-style: none; margin: 0; padding: 0; font-size: var(--wp--preset--font-size--base); }
ul.ld-rows > li { padding-block: 13px; }

.ld-faq { padding-block: 22px; }
.ld-faq > * { margin-block: 0; }
.ld-faq > * + * { margin-top: 6px; }

/* --- Prisraekker ----------------------------------------------- */

.ld-pricerow { padding-block: 28px; }
.ld-pricerow .wp-block-columns { gap: clamp(16px, 2.5vw, 40px); align-items: center; margin-block: 0; }
.ld-pricerow .wp-block-columns > .wp-block-column > * { margin-block: 0; }
.ld-pricerow .wp-block-columns > .wp-block-column > * + * { margin-top: 6px; }
.ld-pricerow--featured {
  background: var(--wp--preset--color--sand);
  padding-inline: 20px;
}

/* --- Baand og bokse ------------------------------------------- */

.ld-band {
  background: var(--wp--preset--color--sand);
  padding: clamp(26px, 3.5vw, 44px);
  margin-top: clamp(24px, 3vw, 40px);
}
.ld-band > *:first-child { margin-top: 0; }
.ld-band .wp-block-columns { align-items: center; }

.ld-placeholder {
  background: repeating-linear-gradient(135deg, #f4f0ea 0 8px, #efeae2 8px 16px);
  border: 1px dashed #d5cdc2;
  padding: 26px 24px;
  margin-block: 22px;
}
.ld-placeholder p { font-size: var(--wp--preset--font-size--tiny); color: var(--wp--preset--color--muted); margin: 0; }

/* --- Billeder -------------------------------------------------- */

.ld-photo-wide img,
.ld-photo-tall img,
.ld-photo-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ld-photo-wide, .ld-photo-tall, .ld-photo-square { margin-block: 0; }
.ld-photo-wide img { aspect-ratio: 21 / 9; }
.ld-photo-tall img { aspect-ratio: 3 / 4; }
.ld-photo-square img { aspect-ratio: 4 / 3; }

.ld-gallery { gap: 10px; margin-top: clamp(24px, 3vw, 36px); }
.ld-gallery > .wp-block-column > * { margin-block: 0; }

/* --- Noegletal-baelte ------------------------------------------ */

.ld-facts {
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding-top: 26px;
  padding-bottom: 30px;
  gap: 20px clamp(20px, 3vw, 40px);
}
.ld-facts > .wp-block-column > * { margin-block: 0; }
.ld-facts > .wp-block-column > * + * { margin-top: 5px; }

/* --- Kolonner uden kortlook ------------------------------------ */

.ld-trio { gap: clamp(24px, 3vw, 40px); margin-top: clamp(24px, 3vw, 36px); }
.ld-trio > .wp-block-column > * { margin-block: 0; }
.ld-trio > .wp-block-column > * + * { margin-top: 10px; }

.ld-split { gap: clamp(24px, 3vw, 48px); align-items: flex-start; }
.ld-split > .wp-block-column:first-child { flex: 0 0 32%; }
.ld-split > .wp-block-column:last-child { flex: 1 1 0%; }

.ld-cv { padding-block: 20px; }
.ld-cv .wp-block-columns { align-items: flex-start; margin-block: 0; gap: 12px 32px; }
.ld-cv .wp-block-columns > .wp-block-column:first-child { flex: 0 0 16%; }
.ld-cv .wp-block-columns > .wp-block-column > * { margin-block: 0; }

/* --- Afsluttende opfordring ------------------------------------ */

.ld-closing {
  border-top: 1px solid var(--wp--preset--color--line);
  padding-block: clamp(56px, 8vw, 104px);
}
.ld-closing h2 { max-width: 24em; }
.ld-closing .wp-block-columns { margin-top: clamp(24px, 3vw, 32px); align-items: center !important; }

/* --- Artikelliste ---------------------------------------------- */

.ld-postrow { padding-block: 28px; }
.ld-postrow > * { margin-block: 0; }
.ld-postrow > * + * { margin-top: 10px; }
.ld-postrow .wp-block-post-title { font-size: var(--wp--preset--font-size--row); line-height: 1.15; }
.ld-postmeta { display: flex; flex-wrap: wrap; gap: 24px; padding-bottom: clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--wp--preset--color--line); }
.ld-article-title { margin-block: 22px; }

/* Alle kolonneblokke: aldrig klem indholdet til nul */
.wp-block-columns > .wp-block-column { min-width: 0; }

@media (max-width: 781px) {
  .ld-row { grid-template-columns: 1fr; row-gap: 8px; }
  .ld-row > *, .ld-row > *:last-child { grid-column: 1; grid-row: auto; }

  .ld-secgrid > .wp-block-column,
  .ld-herorow > .wp-block-column,
  .ld-split > .wp-block-column,
  .ld-cv .wp-block-columns > .wp-block-column { flex: 1 1 100% !important; }
}
