/*
 Theme Name: Lars Dabbert Theme
 Template: blankslate
*/

/* === Root + Base === */
:root {
  --accent:#2f7d32;
  --muted:#666;
  --rule:#e5e5e5;
  --bg:#fdfdfd;
  --text:#222;
}

html, body { height:100%; }

body{
  margin:0;
  display:flex;
  flex-direction:column;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:18px;
  line-height:1.6;
  color:var(--text);
  background:var(--bg);
}

/* Insert separator between subtitle items */
.site-subtitle span + span::before {
  content: " · ";    
opacity: .9;
    margin: 0 .45em;
}


a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* === Header / Hero (ACF-driven) === */
.site-header{
  position:relative;
  color:#fff;
  background:#101112; /* fallback if no image */
  min-height:220px;
  display:flex;
  justify-content:center;
  text-align:center;
  padding:60px 16px 32px;
}
.site-header::before{
  content:"";
  position:absolute; inset:0;
  background-image:var(--hero);
  background-size:cover;
  background-position:center;
  opacity:.55;
}
.header-inner{ position:relative; z-index:1; }
.site-title{
  margin:0;
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
  font-size:clamp(20px,3vw,37px);
}
.site-subtitle{ margin:0; font-size:15px; opacity:.95; }

/* === Navigation === */
/* Top-level only */
nav.primary-nav > ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: .75rem;
  border-bottom: 1.5px solid gainsboro;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Reset base link styles */
nav.primary-nav a {
  color: #333;
  padding: .35rem .6rem;
  display: block;
}

/* Current/hover */
nav.primary-nav .current-menu-item > a,
nav.primary-nav a:hover {
  background: #efefef;
  color: #1e5a22;
}

/* Dropdowns */
nav.primary-nav li { position: relative; }
nav.primary-nav ul ul {           /* any submenu */
  display: none;
  left: 0;
  top: 100%;
  background: #eee;
  padding: .4rem 0;
  margin: 0;
  list-style: none;
  min-width: 220px;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  z-index: 10;
}
nav.primary-nav li:hover > ul { display: block; }  /* show on hover */
nav.primary-nav ul ul a { padding: .45rem .9rem; white-space: nowrap; }

/* Optional: caret for parent items */
nav.primary-nav .menu-item-has-children > a::after {
    content: "▾";
    margin-left: .4rem;
    font-size: 1.5em;
    opacity: .7;
    line-height: 10px !important;
}

/* Breakpoint */
@media (max-width: 747px){

  /* Show the button on mobile */
  .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 64px;
        height: 34px;
        margin: 8px 12px;
        border: 0;
        background: transparent;
        cursor: pointer;
        align-content: center;
        flex-wrap: wrap;
                position: fixed;
        right: 0;
        z-index: 100;
  }
  .nav-toggle .bar{
    width:24px; height:2px; background:#222;
    display:block; margin:4px 0; transition:transform .2s, opacity .2s;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2){ opacity:0; }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1){ transform:translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3){ transform:translateY(-6px) rotate(-45deg); }

  /* Collapse the menu */
  .primary-nav { position: relative; }
  .primary-nav .menu {
    display:none;           /* collapse by default on mobile */
    left:0; right:0; top:100%;
    background:#fff;
    border-top:1px solid #e5e5e5;
    box-shadow:0 8px 20px rgba(0,0,0,.06);
    padding:8px 0;
    flex-direction:column;
    gap:0;
    z-index:50;
  }
  .primary-nav.is-open .menu { display:flex; }

  .primary-nav .menu li { margin:0; }
  .primary-nav .menu a {
    display:block;
    padding:12px 16px;
    color:#333; text-decoration:none;
  }
  .primary-nav .menu a:hover { background:#f6f6f6; }

  /* Optional: hide your desktop bar/spacing if needed */
  nav.primary-nav { padding:0; }
}

/* Hide toggle on desktop */
@media (min-width: 748px){
  .nav-toggle { display:none; }
  nav.primary-nav ul ul {           /* any submenu */
  position: absolute;
}
}


/* === Layout === */
.main-wrap{
  display:grid;
  grid-template-columns:2fr 1.1fr;
  gap:2rem;
  max-width:1100px;
  margin:2rem auto;
  padding:0 1rem;
      position: relative;
}
@media (max-width:800px){
  .main-wrap{ grid-template-columns:1fr; }
}

/* === Content === */
.content{ font-size:18px; }
.content h2{
  font-size:clamp(24px,3.2vw,27px);
  line-height:1.25;
  margin:0 0 12px;
}
.content p{ margin:.6em 0 1em; }
.content ul{ margin:.5em 0 1.2em 1.2em; }
.rule{ height:1px; background:#e9e9e9; margin:14px 0; }

/* === Generic Sidebar === */
.sidebar{
  font-size:.95rem;
  background:#fff;
  border:1px solid #e7e7e7;
  padding:18px;
}
.sidebar h3{
  margin-top:0;
  font-size:1.05rem;
  letter-spacing:.01em;
}

/* === Contact Card (sidebar) === */
.sidebar.contact{
  padding:22px 24px;
  box-shadow:0 1px 3px rgba(0,0,0,.05);
  color:#202124;
  font-size:17px;
  line-height:1.65;
      height: fit-content;
    position: sticky;
    top: 30px;
}
.sidebar.contact h3{
  margin:0 0 14px;
  font-size:1.35rem;
  font-weight:700;
  color:#111;
}
.sidebar.contact address{ font-style:normal; margin:6px 0 0; color:#202124;border-top: 1px solid #eee;
    margin-top: 10px;
    padding-top: 10px; font-weight: bold; }
.sidebar.contact .contact-block{ display:grid; gap:10px; }
.sidebar.contact .practice,
.sidebar.contact .person{ font-weight:600; }
.sidebar.contact .title{     color: #707070;
    hyphens: auto;
    font-size: 15px; }
.sidebar.contact .contact-methods{
  border-top:1px solid #eee;
  margin-top:10px; padding-top:10px;
  display:grid; gap:8px;
}
.sidebar.contact .row{ display:flex; gap:10px; align-items:baseline; }
.sidebar.contact .label{ min-width:56px; color:#666; font-weight:600; font-size:.95rem; letter-spacing:.01em; }
.sidebar.contact .value{ color:#1e6f2b; font-weight:600; }
.sidebar.contact .contact-links{
  border-top:1px solid #eee; margin-top:14px; padding-top:12px;
}
.sidebar.contact .links-heading{ font-weight:700; color:#111; margin-bottom:6px; }
.sidebar.contact .links-list{ list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.sidebar.contact .links-list a{ color:#1e6f2b; }
.sidebar.contact .maps-link a, .cx-map-link a{
    color: #8a8a8a;
    text-decoration: none;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 15px;
}
p.maps-link {
    margin-top: -11px;
}
.sidebar.contact .maps-link a:hover{ text-decoration:underline; opacity:1; }
.sidebar.contact .maps-link .arrow{ opacity:.7; }

@media (max-width:540px){
  .sidebar.contact{ font-size:16px; padding:18px 20px; }
  .sidebar.contact .label{ min-width:52px; }
}

.content ul { list-style: disc; padding-left: 1.2em; margin: .5em 0 1.2em; }
.content ol { list-style: decimal; padding-left: 1.2em; margin: .5em 0 1.2em; }
.content strong, .content b { font-weight: 700; }

/* Bio layout for "Zur Person" */
.bio-wrap {
  display: grid;
  grid-template-columns: minmax(130px, 170px) 1fr;
  gap: 24px;
  align-items: start;
}

.bio-photo { margin: 0; }
.bio-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;    
  object-fit: cover;
}

.bio-content .page-title { margin-top: 0; }
.page-id-81 .page-title {
    display: none;
}

@media (max-width: 800px) {
  .bio-wrap { grid-template-columns: 1fr; }
  .bio-photo { max-width: 240px; }
}


/* Expanded Kontakt layout */
.contact-expanded {
  width: 90%;
  margin: 0 auto 2rem;
}

.contact-expanded__header { margin-bottom: 1rem; }
.contact-expanded__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Card */
.contact-expanded__card {
  background: #fff;
  border: 1px solid #e7e7e7;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}



.cx-address {
  margin: 16px 0 10px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-weight: 700;
}

.cx-methods {
  border-top: 1px solid #eee;
  margin-top: 14px;
  padding-top: 12px;
  display: grid;
  gap: 8px;
}
.cx-row { display: flex; gap: 10px; align-items: baseline; }
.cx-label { min-width: 64px; color: #666; font-weight: 600; }
.cx-value { color: #1e6f2b; font-weight: 600; text-decoration: none; }
.cx-value:hover { text-decoration: underline; }

.cx-links {
  border-top: 1px solid #eee;
  margin-top: 16px; padding-top: 12px;
}
.cx-links-heading { font-weight: 700; margin-bottom: 6px; }
.cx-links-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cx-links-list a { color: #1e6f2b; text-decoration: none; }
.cx-links-list a:hover { text-decoration: underline; }

/* Map */
.contact-expanded__map .map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;       /* responsive */
  overflow: hidden;
  border: 1px solid #e7e7e7;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.contact-expanded__map iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Info blocks */
.contact-expanded__info {
  width: 90%;
  margin: 20px auto 0;
  display: grid;
  gap: 16px;
}
.contact-expanded__info h3 { margin: 0 0 6px; }

@media (max-width: 900px) {
  .contact-expanded__grid {
    grid-template-columns: 1fr;
  }
  .contact-expanded { width: 96%; }
  .contact-expanded__info { width: 96%; }
}


.page-id-81 .main-wrap{
  grid-template-columns: unset !important; gap: unset 
}
@media (max-width: 800px){
  .contact-card--full { width: 100% !important; padding: 18px 18px; }
}

.contact-card__header { margin-bottom: 10px; }

/* Map embed inside the card */
.contact-card__map .map-embed{
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid #e7e7e7;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  margin: 4px 0 14px;
}
.contact-card__map iframe{
  position:absolute; inset:0;
  width:100%; height:100%;
  border:0;
}
/* Full-width contact card */
.contact-card--full {
  width: 75%;
  margin: 0 auto 24px;
  background: #fff;
  border: 1px solid #e7e7e7;
  padding: 22px 24px;
}
.contact-card__map {
    margin: 30px 0 0 0;
}
p.cx-map-link {
    margin: -5px 0 10px 0;
}
/* Sections + dividers */
.contact-card__section { margin: 10px 0; }
.cx-divider { height:1px; background:#eee; margin:14px 0; }

/* Typography keeps parity with your sidebar card */
.cx-practice { font-weight:700; font-size:1.1rem; }
.cx-name     { font-weight:700; margin-top:-3px; }
.cx-title    {     color: #555555;
    margin-top: 2px;
    font-size: 15px; }
p.cx-transport {
    font-size: 15px;
}

.cx-address { font-weight:700; margin: 12px 0 0px;    line-height: 24px; }
.cx-map-link a { color:#1e6f2b; text-decoration:none; display:inline-flex; gap:6px; align-items:center; }
.cx-map-link a:hover { text-decoration:underline; }
.cx-map-link .arrow { opacity:.75; }

.cx-transport { color:#6a6a6a; margin: 4px 0 0; }

/* Tel/E-Mail rows */
.cx-methods { display:grid; gap:8px; }
.cx-row { display:flex; gap:10px; align-items:baseline; }
.cx-label { min-width:64px; color:#666; font-weight:600; }
.cx-value { color:#1e6f2b; font-weight:600; text-decoration:none; }
.cx-value:hover { text-decoration:underline; }

/* Links block */
.cx-links-heading { font-weight:700; margin-bottom:6px; }
.cx-links-list { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.cx-links-list a { color:#1e6f2b; text-decoration:none; }
.cx-links-list a:hover { text-decoration:underline; }

/* Kontakt full card: use only .cx-divider for separators */
.contact-card--full .cx-methods,
.contact-card--full .cx-links,
.contact-card--full .contact-methods,
.contact-card--full .contact-links {
  border-top: 0 !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Hide any <hr> that might be in the content */
.contact-card--full hr { display: none; }

/* Keep a bit of space after removing the extra borders */
.contact-card--full .cx-methods { margin-top: 6px; }
.contact-card--full .cx-links   { margin-top: 6px; }



.bio-photo{ margin: 0; }                /* no border radius, no extra margins */
.bio-photo__img{
  display: block;
  width: 100%;
  height: auto;                         /* keep the 3:4 crop from WP, don’t stretch */
}

/* mobile: stack image above text */
@media (max-width: 760px){
  .bio-wrap{ grid-template-columns: 1fr; }
  .bio-photo{ max-width: 240px; }
}
.bio-content ul {
    margin-top: 0;
}


.home-links {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-btn {
display: block;
    width: 100%;
    text-align: center;
    padding: 16px 12px;
    border: 1px solid var(--gray-200, #ddd);
    background: var(--beige, #f9f9f7);
    text-decoration: none;
    color: var(--text-color, #222);
    transition: background 0.2s, color 0.2s;
}

.home-btn:hover {
  background: var(--green, #2d6b2e);
  color: #fff;
}

.home-btn .btn-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
}

.home-btn .btn-sub {
  display: block;
  font-size: 0.95rem;
  margin-top: 4px;
  opacity: 0.6;
}
a.home-btn span {
    display: inline-block !important;
    padding: 0 7px;
    vertical-align: top;
}
a.home-btn:hover {
    text-decoration: none !important;
}
/* Hide screen-reader-only text visually */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* ===== Mobile nav (≤747px) ===== */
@media (max-width: 747px){
  /* Toggle button fixed top-right */
  .nav-toggle{
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1001;
    background: transparent;
    border: 0;
    padding: 10px;
    line-height: 0;
    cursor: pointer;
  }
  .nav-toggle .sr-only{
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }

  /* Hamburger bars */
  .nav-toggle .bar{
    width: 31px;
    height: 3px;
    background: #222;
    display: block;
    margin: 6px 0;
    transition: transform .25s ease, opacity .25s ease;
  }

  /* Full-screen panel (hidden by default) */
  .primary-nav{
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #fff;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding: 72px 20px 24px; /* space for the button */
  }
  .primary-nav.is-open{ transform: translateY(0); }
  body.nav-open{ overflow: hidden; } /* prevent page scroll while open */

  /* Menu list vertical */
  .primary-nav .menu,
  .primary-nav ul{ 
    display: block !important;
    margin: 0; padding: 0; list-style: none;
  }
  .primary-nav .menu > li{ border-bottom: 1px solid #eee; }
  .primary-nav a{
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 4px;
    font-size: 20px; text-decoration: none;
    color: #222;
  }

  /* Sub-menus always visible + indented */
  .primary-nav .sub-menu{
    display: block !important;
    padding-left: 38px;
    border: 0;
  }
  .primary-nav .sub-menu > li > a{
    font-size: 18px;
    padding: 12px 4px;
    color: #444;
  }

  /* Hide any desktop-specific caret/arrow in mobile */
  .primary-nav .menu-item-has-children > a:after{ content: none !important; }

  /* Hamburger → X animation when panel is open */
  .nav-toggle[aria-expanded="true"] .bar:nth-of-type(1){
    transform: translateY(9px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-of-type(3){
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* --- Hamburger: use absolute bars so they morph to a perfect X --- */
  .nav-toggle{
    position: fixed;
    top: 12px; right: 12px;
    width: 44px; height: 44px;
    padding: 0; border: 0; background: transparent;
    z-index: 1001; cursor: pointer;
  }
  .nav-toggle .sr-only{
    position:absolute!important; width:1px; height:1px; overflow:hidden;
    clip:rect(0 0 0 0); white-space:nowrap;
  }

  .nav-toggle .bar{
    position: absolute;
    left: 9px; right: 9px;
    height: 3px;
    background: #222;
    border-radius: 2px;
    transform-origin: 50% 50%;
    transition: transform .25s ease, opacity .25s ease, top .25s ease;
  }
  .nav-toggle .bar:nth-of-type(1){ top: 14px; }
  .nav-toggle .bar:nth-of-type(2){ top: 21px; }
  .nav-toggle .bar:nth-of-type(3){ top: 28px; }

  /* morph to X */
  .nav-toggle[aria-expanded="true"] .bar:nth-of-type(2){
    top: 21px; transform: rotate(45deg) !important;        opacity: 1 !important;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-of-type(3){
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-of-type(4){
    top: 21px; transform: rotate(-45deg);
  };
}

/* === Footer (pinned) === */
.site-content{ flex:1; }        /* push footer down */
.site-footer{
  margin-top:auto;
  padding:12px 20px;
  font-size:14px;
  color:#6a6a6a;
  text-align:center;
  border-top:1px solid var(--rule);
  background:#fafafa;
}

