/* =========================================================
   Anke Culemann – main.css
   Ruhige, warm-natürliche Ästhetik
   ========================================================= */

/* -------- 1. Design Tokens -------- */
:root {
  /* Farben */
  --bg:         #faf8f4;
  --surface:    #ffffff;
  --ink:        #2d2a26;
  --ink-soft:   #6b6760;
  --ink-mute:   #8a857d;
  --accent:     #7a8f5e;   /* gedämpftes Salbeigrün */
  --accent-dk:  #4f6142;
  --link:       #9c5a4a;   /* warmer Terrakotta */
  --link-hover: #6b3a2d;
  --border:     #e8e3d9;
  --border-soft:#f0ece3;
  --overlay:    linear-gradient(180deg, rgba(30,28,24,0.45) 0%, rgba(30,28,24,0.15) 60%, rgba(30,28,24,0.35) 100%);

  /* Schrift */
  --font-serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --font-sans:  "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --measure:     68ch;
  --container:   760px;
  --radius:      6px;
  --radius-lg:   12px;
  --shadow-sm:   0 1px 2px rgba(45,42,38,0.04), 0 2px 8px rgba(45,42,38,0.04);
  --shadow-md:   0 4px 24px rgba(45,42,38,0.08);
}

/* -------- 2. Reset & Basis -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body, p, div, ul, li, h1, h2, h3, h4, figure, blockquote {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 700px) {
  body { font-size: 18px; }
}

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

/* -------- 3. Typografie -------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); margin-top: 2.2em; }
h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.6em; }

h2 + *,
h3 + * { margin-top: 0.5em; }

p, ul, ol {
  max-width: var(--measure);
  line-height: 1.65;
}

p + p,
p + ul,
p + ol,
ul + p,
ol + p {
  margin-top: 1em;
}

ul, ol {
  padding-left: 1.25em;
}

ul li + li,
ol li + li {
  margin-top: 0.35em;
}

strong { font-weight: 600; }
em     { font-style: italic; }

/* -------- 4. Links -------- */
a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(156, 90, 74, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* -------- 5. Layout: Page Wrapper -------- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 700px) {
  .container { padding: 0 2rem; }
}

/* -------- 6. Header (Hero) -------- */
.header {
  position: relative;
  background-color: var(--accent-dk);
  background-image: var(--overlay), url('/https/www.anke-culemann.de/images/tree.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  padding: 3.5rem 0 1.5rem;
  color: #fff;
  overflow: hidden;
}

.header .container {
  text-align: center;
}

.header .title {
  margin: 0;
  padding: 0;
}

.header h1,
.header .title a {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 1.8rem + 3vw, 3.8rem);
  line-height: 1;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
  border: none;
}

.header .title a {
  display: inline-block;
  padding: 0.1em 0.2em;
}

.header .title a:hover,
.header .title a:focus-visible {
  color: #fff;
  opacity: 0.9;
}

.header p {
  margin: 0.8rem auto 1.8rem;
  max-width: 32rem;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.15rem);
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  line-height: 1.4;
}

/* Hero nur prominent auf der Home-Seite */
body:not(.home) .header {
  padding: 2.5rem 0 1rem;
  background-position: center 40%;
}

body:not(.home) .header h1,
body:not(.home) .header .title a {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem);
}

body:not(.home) .header p {
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

@media (min-width: 700px) {
  .header { padding: 5rem 0 2rem; }
  body:not(.home) .header { padding: 3.5rem 0 1.5rem; }
}

/* -------- 7. Navigation -------- */
.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.4rem;
  font-family: var(--font-sans);
}

.nav li {
  margin: 0;
  padding: 0;
}

.nav a {
  display: inline-block;
  padding: 0.55em 1.1em;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background-color: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background-color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.9);
  color: var(--accent-dk);
  text-shadow: none;
}

/* Aktuelle Seite markieren via pageClass */
body.home        .nav li.start a,
body.profil      .nav li.profil a,
body.kontakt     .nav li.contact a,
body.fallberatung .nav li.fallberatung a {
  background-color: rgba(255,255,255,0.95);
  color: var(--accent-dk);
  border-color: rgba(255,255,255,0.95);
  text-shadow: none;
}

.nav-major {
  margin-top: 1.5rem;
}

/* Footer-Navigation */
.nav-base {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.nav-base a {
  background-color: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  text-shadow: none;
  backdrop-filter: none;
}

.nav-base a:hover,
.nav-base a:focus-visible {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* -------- 8. Content -------- */
.content {
  background-color: var(--bg);
  padding: 2.5rem 0 3.5rem;
  flex-grow: 1;
}

@media (min-width: 700px) {
  .content { padding: 3.5rem 0 4.5rem; }
}

.content .container > * + * {
  margin-top: 1.1em;
}

.content .container > h2 {
  margin-top: 2.4em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--border);
}

.content .container > h3 {
  margin-top: 1.8em;
}

.content .container > h2:first-child,
.content .container > h1:first-child {
  margin-top: 0;
}

.content .container > h2:first-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* -------- 9. Bilder im Content -------- */
.responsive-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

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

.center-text-image {
  display: block;
  margin: 1.5rem auto;
  width: 60%;
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* -------- 10. Shortcode: image-with-text -------- */
.image-with-text {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0;
}

.image-with-text--left  .image-with-text__image { order: 0; }
.image-with-text--right .image-with-text__image { order: 1; }

.image-with-text__image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  margin: 0;
}

.image-with-text__text {
  flex: 1;
  padding: 0;
}

.image-with-text__text > :first-child { margin-top: 0; }

@media (max-width: 768px) {
  .image-with-text {
    flex-direction: column;
    gap: 1.2rem;
  }
  .image-with-text--left .image-with-text__image,
  .image-with-text--right .image-with-text__image {
    order: 0;
    margin: 0 auto;
    width: 70% !important;
    max-width: 280px;
  }
  .image-with-text__text { width: 100%; }
}

/* -------- 11. Footer -------- */
.footer {
  padding: 2.5rem 1.25rem 2rem;
  color: var(--ink-soft);
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  height: auto;
}

.footer p {
  margin: 0 auto;
  max-width: none;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

/* -------- 12. Formulare -------- */
form {
  padding: 1em 0;
  max-width: var(--measure);
}

form p {
  margin: 0 0 0.5em;
  padding: 0;
}

input,
textarea,
select {
  width: 100%;
  margin-bottom: 1em;
  padding: 0.7em 0.9em;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 143, 94, 0.18);
}

textarea { min-height: 140px; resize: vertical; }

#submitBtn,
button[type="submit"] {
  display: inline-block;
  margin: 0.5em 0 1em;
  padding: 0.8em 2em;
  width: auto;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background-color: var(--accent-dk);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

#submitBtn:hover,
#submitBtn:focus-visible,
button[type="submit"]:hover,
button[type="submit"]:focus-visible {
  background-color: var(--link);
}

#submitBtn:active { transform: translateY(1px); }

/* -------- 13. Details/Accordion (optional für Profilseite) -------- */
details {
  border-top: 1px solid var(--border);
  padding: 0.6em 0;
}

details > summary {
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  padding: 0.3em 0;
  position: relative;
  padding-right: 2em;
}

details > summary::-webkit-details-marker { display: none; }

details > summary::after {
  content: "+";
  position: absolute;
  right: 0.2em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--accent);
  transition: transform 0.2s ease;
  font-weight: 300;
}

details[open] > summary::after {
  content: "−";
}

/* -------- 14. Utility -------- */
.leader {
  background-color: var(--accent-dk);
  color: #fff;
  padding: 1rem 0;
}

.leader ul {
  list-style: none;
  text-align: center;
  margin: 0;
  padding: 0;
  max-width: none;
}

.leader li {
  display: inline-block;
  margin: 0 0.4em;
  line-height: 2;
}

.leader a {
  color: #d8e4c0;
  border-bottom: none;
}

.leader a:hover,
.leader a:focus-visible {
  color: #fff;
}

.nope { display: none; }

.needs-content {
  border-bottom: dashed 2px #c8574c;
}

.thumbnail-grid {
  margin: 1em 0 2em;
}

ul.posts {
  list-style: none;
  margin: 2em 0 1em;
  padding-left: 0;
}

ul.posts time {
  display: block;
  color: var(--ink-mute);
  font-size: 0.85em;
  margin: 0;
}

ul.posts li + li {
  margin-top: 2em;
}

/* Video-Embeds */
.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5em 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* -------- 15. Home-spezifisches Feintuning -------- */
body.home .content .container {
  max-width: 620px;
}

body.home .content .container h2 {
  border-bottom: none;
  margin-top: 0;
  margin-bottom: 1.2em;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  color: var(--accent-dk);
}

body.home .responsive-image {
  margin: 0 auto 2rem;
  max-height: 420px;
  object-fit: cover;
  width: 100%;
}

body.home .content p {
  font-size: 1.05em;
  line-height: 1.75;
  max-width: 100%;
}

body.home .content p + p {
  margin-top: 1.3em;
}

/* Dezenter Zierstrich nach dem letzten Absatz */
body.home .content .container > p:last-child::after {
  content: "";
  display: block;
  width: 50px;
  height: 1px;
  background-color: var(--accent);
  margin: 2.5rem auto 0;
  opacity: 0.5;
}

/* -------- 16. Reduzierte Animation -------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------- 17. Print -------- */
@media print {
  .header,
  .footer,
  .nav { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .content { padding: 0; }
  a { color: #000; border-bottom: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}


/* -------- Kontaktseite -------- */
body.kontakt .content p {
  margin-bottom: 0.3em;
}

body.kontakt .email-line {
  margin-top: 1.5em;
  font-weight: 500;
}

body.kontakt .email-line a {
  font-family: var(--font-sans);
}

/* -------- Profilseite -------- */
body.profil .image-with-text {
  margin-top: 0;
  margin-bottom: 2.5rem;
}

body.profil .image-with-text__image {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;   /* leicht nach oben, Gesicht in der oberen Bildhälfte */
}

body.profil .content h3 {
  margin-top: 1.8em;
  color: var(--accent-dk);
}

body.profil details + details {
  border-top: none;
}

body.profil details:first-of-type {
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

body.profil details:last-of-type {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}