
/* gartenbuch.css – Ausgabe_023+ (Natur-Optik, responsive, nutzt große Displays besser)
   Ziel: Buch-Layout + mehr grafische Natur-Elemente + sehr gute Skalierung bis 4K. */

:root{
  --bg: #fbfbf8;
  --paper: #ffffff;
  --ink: #1f2a22;
  --muted: #516156;
  --line: #d9dfd7;

  --accent: #2e6b4f;
  --accent2:#7aa36a;
  --accent3:#b7d6a4;

  --warn:#b85c38;

  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --serif: ui-serif, "Georgia", "Times New Roman", Times, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;

  --radius: 18px;

  /* Layout */
  --content-max: 1560px;   /* nutzt 4K besser */
  --content-pad: clamp(14px, 2vw, 22px);
  --shadow: 0 14px 34px rgba(0,0,0,0.06);
}


/* Theme (Hell/Dunkel) */
html.theme-light{ /* default */ }

html.theme-dark{
  --bg: #0e1412;
  --paper: rgba(18,26,22,0.92);
  --ink: #e7efe8;
  --muted: #b8c6bb;
  --line: rgba(255,255,255,0.10);

  --accent: #7fd1a4;
  --accent2:#a7e3b8;
  --accent3:#3a6b52;

  --warn:#ff9b7a;

  --shadow: 0 18px 40px rgba(0,0,0,0.40);
}
html.theme-dark body{
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(127,209,164,0.10) 0%, rgba(14,20,18,1) 52%, rgba(14,20,18,1) 100%),
    radial-gradient(900px 600px at 80% 10%, rgba(127,209,164,0.10) 0%, rgba(127,209,164,0.0) 65%),
    radial-gradient(900px 700px at 20% 90%, rgba(46,107,79,0.16) 0%, rgba(46,107,79,0.0) 70%);
}
html.theme-dark .header{
  background: rgba(14,20,18,0.74);
  border-bottom-color: rgba(255,255,255,0.10);
}
html.theme-dark .nav a:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}
html.theme-dark .nav a.active{
  background: rgba(127,209,164,0.10);
  border-color: rgba(127,209,164,0.20);
}
html.theme-dark .card{
  background: rgba(18,26,22,0.92);
  border-color: rgba(255,255,255,0.10);
}
html.theme-dark .note{
  background: rgba(127,209,164,0.10);
  color: var(--ink);
}
html.theme-dark .warn{
  background: rgba(255,155,122,0.08);
}
html.theme-dark .code{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}
html.theme-dark .badge{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}
html.theme-dark .search input,
html.theme-dark .search button{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  color: var(--ink);
}
html.theme-dark .toc a:hover{
  background: rgba(255,255,255,0.05);
}
html.theme-dark .ph{
  background:
    url("../assets/svg/herb-sprig.svg") right -40px bottom -30px / 180px auto no-repeat,
    linear-gradient(135deg, rgba(127,209,164,0.10), rgba(46,107,79,0.06));
  border-color: rgba(255,255,255,0.12);
}



/* Layout-Modi (umschaltbar) */
html.mode-wide{
  --content-max: 1560px;
}
html.mode-book{
  --content-max: 1020px;  /* klassischer Lesemodus */
}

/* Optional: im Buchmodus etwas weniger "Hero"-Dekor, damit es ruhiger wirkt */
html.mode-book .hero::before{
  background:
    url("../assets/svg/leaf-pattern.svg") right top / 420px auto no-repeat,
    linear-gradient(135deg, rgba(122,163,106,0.18), rgba(46,107,79,0.06));
}


*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--ink);
  font-family: var(--sans);
  line-height:1.65;

  /* Naturiger Hintergrund */
  background:
    radial-gradient(1200px 800px at 20% 0%, #eef7ee 0%, var(--bg) 45%, var(--bg) 100%),
    radial-gradient(900px 600px at 80% 10%, rgba(122,163,106,0.12) 0%, rgba(122,163,106,0.0) 65%),
    radial-gradient(900px 700px at 20% 90%, rgba(46,107,79,0.10) 0%, rgba(46,107,79,0.0) 70%);
}

a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
small{color:var(--muted)}
hr{border:none;border-top:1px solid var(--line);margin:24px 0}

.container{
  /* Maximale Nutzung, aber noch buchartig */
  max-width: min(var(--content-max), 96vw);
  margin: 0 auto;
  padding: 18px var(--content-pad) 72px;
}

.header{
  position: sticky;
  top:0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(251,251,248,0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  max-width: min(var(--content-max), 96vw);
  margin:0 auto;
  padding: 10px var(--content-pad);
  display:flex;
  align-items:center;
  gap:12px;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.brand .title{
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .2px;
}
.brand .subtitle{
  font-size: 12px;
  color: var(--muted);
}

.nav{
  margin-left:auto;
  display:flex;
  flex-wrap:wrap;
  gap:8px 10px;
  align-items:center;
  justify-content:flex-end;
}
.nav a{
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
}
.nav a:hover{
  border-color: var(--line);
  background: rgba(255,255,255,0.70);
  text-decoration:none;
}
.nav a.active{
  border-color: rgba(46,107,79,0.26);
  background: rgba(46,107,79,0.10);
}

/* Mobile: Navigation als "Chip-Wrap", Brand kleiner */
@media (max-width: 520px){
  .brand .title{font-size:16px}
  .nav a{padding:6px 10px}
}

/* Hero */
.hero{
  padding: 18px 0 0;
  position: relative;
}
.hero::before{
  content:"";
  position:absolute;
  inset:-10px -10px auto -10px;
  height: 260px;
  z-index:-1;
  border-radius: 26px;
  background:
    url("../assets/svg/leaf-pattern.svg") right top / 520px auto no-repeat,
    linear-gradient(135deg, rgba(122,163,106,0.20), rgba(46,107,79,0.08));
  border: 1px solid rgba(217,223,215,0.8);
  box-shadow: var(--shadow);
}

/* Cards */
.card{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(14px, 1.6vw, 20px);
}

/* Startseite: nutzt Breite besser (3 Spalten auf groß) */
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 860px){
  .grid{grid-template-columns: 1.25fr .75fr}
}
@media (min-width: 1240px){
  .grid{grid-template-columns: 1.1fr .9fr}
}
@media (min-width: 1480px){
  .grid{grid-template-columns: 1.25fr .75fr}
}

.h1{
  font-family: var(--serif);
  font-size: clamp(28px, 1.8vw + 18px, 44px);
  line-height:1.12;
  margin:0 0 10px;
}
.h2{
  font-family: var(--serif);
  font-size: clamp(20px, 1.1vw + 14px, 28px);
  margin: 0 0 8px;
}
.h3{
  font-family: var(--serif);
  font-size: 18px;
  margin: 18px 0 8px;
}
.lead{
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 8px;
}

.kpi{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.85);
}
.badge b{color:var(--ink); font-weight:600}

.toc a{
  display:block;
  padding: 9px 12px;
  border-radius: 12px;
}
.toc a:hover{background:#f4f8f3;text-decoration:none}

.meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  color: var(--muted);
  font-size: 13px;
}
.meta span{display:inline-flex; gap:6px; align-items:center}

.note{
  border-left: 4px solid rgba(46,107,79,0.35);
  padding: 10px 12px;
  background: #f1f8f3;
  border-radius: 12px;
  color: #2b3a31;
}
.warn{
  border-left: 4px solid rgba(184,92,56,0.45);
  background: #fff3ee;
}

.table{
  width:100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td{
  text-align:left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  vertical-align:top;
}
.table th{color: var(--muted); font-weight:600}

.code{
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 10px 12px;
  background: #f6f7f7;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow:auto;
}

.footer{
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align:center;
}

/* Suchfeld */
.search{
  display:flex;
  gap:10px;
  align-items:center;
}
.search input{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
}
.search button{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  cursor:pointer;
}
.search button:hover{background:#f4f8f3}

/* Galerie */
.gallery{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 760px){
  .gallery{grid-template-columns: repeat(3, 1fr);}
}
@media (min-width: 1400px){
  .gallery{grid-template-columns: repeat(4, 1fr);}
}
.ph{
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px;
  background:
    url("../assets/svg/herb-sprig.svg") right -40px bottom -30px / 180px auto no-repeat,
    linear-gradient(135deg, rgba(122,163,106,0.12), rgba(46,107,79,0.06));
  color: var(--muted);
  min-height: 96px;
  display:flex;
  flex-direction:column;
  gap:6px;
  justify-content:center;
}
.ph b{color: var(--ink)}
.tag{
  display:inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 999px;
  margin-right: 6px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.86);
}


/* Mode Toggle Button */
.mode-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.75);
  cursor:pointer;
  font-size: 13px;
  color: var(--muted);
}
.mode-toggle:hover{background:#f4f8f3}
.mode-toggle b{color:var(--ink); font-weight:600}
.mode-dot{
  width:10px;height:10px;border-radius:999px;
  background: rgba(46,107,79,0.35);
  border: 1px solid rgba(46,107,79,0.25);
}
html.mode-wide .mode-dot{ background: rgba(122,163,106,0.55); border-color: rgba(122,163,106,0.35); }
html.mode-book .mode-dot{ background: rgba(46,107,79,0.55); border-color: rgba(46,107,79,0.35); }



/* Theme Toggle Button */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.75);
  cursor:pointer;
  font-size: 13px;
  color: var(--muted);
}
.theme-toggle:hover{background:#f4f8f3}
.theme-toggle b{color:var(--ink); font-weight:600}
.theme-icon{
  width:14px;height:14px;border-radius:999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.1) 60%);
  border: 1px solid rgba(0,0,0,0.08);
}
html.theme-dark .theme-toggle{ background: rgba(255,255,255,0.06); }
html.theme-dark .theme-toggle:hover{ background: rgba(255,255,255,0.08); }
html.theme-dark .theme-icon{
  background: radial-gradient(circle at 30% 30%, rgba(127,209,164,0.9) 0%, rgba(127,209,164,0.12) 65%);
  border-color: rgba(255,255,255,0.14);
}

/* Fullscreen Button */
.fullscreen-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.75);
  cursor:pointer;
  font-size: 13px;
  color: var(--muted);
}
.fullscreen-toggle:hover{background:#f4f8f3}
.fs-icon{
  width:14px;height:14px;border-radius:4px;
  border: 2px solid rgba(46,107,79,0.35);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.6);
}
html.theme-dark .fullscreen-toggle{ background: rgba(255,255,255,0.06); }
html.theme-dark .fullscreen-toggle:hover{ background: rgba(255,255,255,0.08); }
html.theme-dark .fs-icon{ border-color: rgba(127,209,164,0.45); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.10); }


/* --- Große Screens: Seitenleisten (Sticky) --- */
.page-grid{
  display:block;
}
.side{display:none;}

@media (min-width: 1180px){
  .page-grid{
    display:grid;
    grid-template-columns: 300px minmax(520px, 1fr) 300px;
    gap: 14px;
    align-items:start;
  }
  .side{display:block;}
  .content{min-width: 0;}
  .side .side-card{
    position: sticky;
    top: 74px; /* unter Header */
    padding: 14px;
  }
  .side .toc a{padding:7px 10px}
  .toc-h3{padding-left: 22px !important; opacity: 0.92}
  [data-gb-toc] a.active{
    border: 1px solid rgba(46,107,79,0.20);
    background: rgba(46,107,79,0.08);
    text-decoration:none;
  }
}

/* Ultrawide: noch mehr Luft */
@media (min-width: 1700px){
  .page-grid{
    grid-template-columns: 340px minmax(720px, 1fr) 340px;
  }
}

/* Dark theme tweak for active toc */
html.theme-dark [data-gb-toc] a.active{
  border-color: rgba(127,209,164,0.20);
  background: rgba(127,209,164,0.10);
}

/* Tag Explorer */
.tag-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.85);
  cursor:pointer;
  margin: 0 8px 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.tag-btn:hover{ background:#f4f8f3; }
html.theme-dark .tag-btn{ background: rgba(255,255,255,0.06); }
html.theme-dark .tag-btn:hover{ background: rgba(255,255,255,0.08); }


/* Admin-Hinweise (standardmäßig unsichtbar) */
.admin-only{ display:none !important; }
html.admin-on .admin-only{ display:block !important; }
html.admin-on .admin-only.inline{ display:inline !important; }
html.admin-on .admin-only.card{
  display:block !important;
  border: 1px dashed rgba(46,107,79,0.35);
  background: rgba(122,163,106,0.10);
  color: var(--muted);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0;
}
html.theme-dark.admin-on .admin-only.card{
  border-color: rgba(127,209,164,0.30);
  background: rgba(127,209,164,0.08);
}

/* Vorher/Nachher Slider */
.ba-wrap{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.02);
}
.ba-wrap img{
  display:block;
  width:100%;
  height:auto;
}
.ba-after{
  position:absolute;
  inset:0;
  clip-path: inset(0 50% 0 0);
}
.ba-controls{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top: 10px;
}
.ba-controls input[type=range]{ width: min(520px, 100%); }
.ba-pill{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.85);
}
html.theme-dark .ba-pill{ background: rgba(255,255,255,0.06); }

.admin-modal{ position:fixed; inset:0; z-index:9999; }
.admin-modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,0.35); }
.admin-modal-card{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width: min(520px, 92vw);
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
}
html.theme-dark .admin-modal-card{ background: rgba(18,26,22,0.94); }
.admin-modal-title{ font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.admin-modal-sub{ color: var(--muted); margin-bottom: 12px; }
.admin-modal-row{ display:flex; gap:10px; align-items:center; }
.admin-modal-row input{
  flex:1; padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.80);
}
html.theme-dark .admin-modal-row input{ background: rgba(255,255,255,0.06); color: var(--ink); }
.admin-modal-btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(122,163,106,0.14);
  cursor:pointer;
}
.admin-modal-btn:hover{ background: rgba(122,163,106,0.22); }
.admin-modal-hint{ margin-top: 10px; font-size: 12px; color: var(--muted); }

.tiles{ display:grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px){ .tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px){ .tiles{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile{
  display:block; text-decoration:none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
  transition: transform 120ms ease, box-shadow 120ms ease;
  color: inherit;
}
.tile:hover{ transform: translateY(-1px); box-shadow: 0 16px 30px rgba(0,0,0,0.10); }
html.theme-dark .tile{ background: rgba(18,26,22,0.92); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.tile-title{ font-weight: 900; font-size: 18px; margin-bottom: 6px; }
.tile-meta{ color: var(--muted); font-size: 12px; display:flex; gap:10px; flex-wrap:wrap; }
.tile-desc{ margin: 10px 0 10px; color: var(--muted); }
.tile-tags .tag{ margin-right: 6px; }
