/*
Theme Name: Eigentumsplan
Theme URI: https://eigentumsplan.de
Author: ASSETNEXT
Description: Block-Theme für EIGENTUMSPLAN by ASSETNEXT.
Version: 1.0.13
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: eigentumsplan
*/

:root {
  --ep-graphite:#1F2326;
  --ep-gray:#6D7375;
  --ep-teal:#0F5B58;
  --ep-teal-dark:#0B4846;
  --ep-gold:#B28A4A;
  --ep-warm-white:#F7F5F0;
  --ep-light-gray:#ECEDEA;
  --ep-light-teal:#E8F0EF;
  --ep-sand:#F2ECE0;
  --ep-white:#FFFFFF;
  --ep-radius:6px;
  --ep-shadow:0 14px 38px rgba(44,47,51,.08);
}

html{scroll-behavior:smooth}
body{overflow-x:hidden}
.wp-site-blocks{overflow:hidden}
.ep-section{padding-block:clamp(4rem,8vw,8rem)}
.ep-section-tight{padding-block:clamp(3rem,6vw,5rem)}
.ep-container{width:min(1240px,calc(100% - 2rem));margin-inline:auto}
.ep-narrow{width:min(760px,100%)}
.ep-kicker{font-size:.82rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--ep-teal)}
.ep-card{background:#fff;border:1px solid rgba(44,47,51,.12);border-radius:var(--ep-radius);padding:clamp(1.25rem,2.5vw,2rem)}
.ep-card-number{font-size:2.2rem;line-height:1;font-weight:700;color:var(--ep-gold);margin-bottom:1.2rem}
.ep-btn .wp-block-button__link{border-radius:5px;padding:.95rem 1.35rem;font-weight:700}
.ep-btn-secondary .wp-block-button__link{background:transparent;color:var(--ep-graphite);border:1px solid var(--ep-graphite)}
.ep-trust{font-size:.95rem;color:var(--ep-gray)}
.ep-hero{padding-top:clamp(3rem,7vw,7rem);padding-bottom:clamp(4rem,8vw,8rem)}
.ep-hero-grid{align-items:center;gap:clamp(2rem,5vw,5rem)}
.ep-hero-visual{min-height:520px;border-radius:8px;position:relative;overflow:hidden;background:linear-gradient(145deg,#d9d6cf,#f6f1e7)}
.ep-house-scene{position:absolute;inset:0;display:grid;place-items:center;padding:10%}
.ep-house-scene svg{width:100%;height:auto;max-height:420px}
.ep-overlay-label{position:absolute;background:rgba(255,255,255,.92);border:1px solid rgba(44,47,51,.08);padding:.45rem .65rem;border-radius:4px;font-size:.78rem;font-weight:700;color:var(--ep-graphite);box-shadow:0 8px 20px rgba(44,47,51,.08)}
.ep-label-1{top:16%;right:8%}.ep-label-2{top:42%;left:6%}.ep-label-3{bottom:16%;right:8%}
.ep-collage{display:grid;grid-template-columns:1.25fr .75fr;grid-template-rows:1fr 1fr;gap:1rem}
.ep-collage>div{min-height:180px;border-radius:6px;overflow:hidden;position:relative;background:linear-gradient(145deg,#e3dfd6,#f7f3ea)}
.ep-collage>div:first-child{grid-row:1/3;min-height:380px}
.ep-collage svg{width:100%;height:100%;object-fit:cover}
.ep-perspective{display:grid;grid-template-columns:1fr minmax(260px,360px) 1fr;gap:2rem;align-items:center}
.ep-perspective-list{display:grid;gap:1rem}.ep-perspective-item{padding:1rem 0;border-top:1px solid rgba(44,47,51,.14)}
.ep-house-icon{width:min(100%,340px);margin:auto}
.ep-energy{display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,6vw,6rem);align-items:center}
.ep-energy-house{background:#fff;border-radius:8px;padding:2rem;border:1px solid rgba(44,47,51,.1)}
.ep-energy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-top:1rem}.ep-energy-chip{padding:.85rem 1rem;border:1px solid rgba(44,47,51,.12);border-radius:4px;background:#fff}
.ep-path-card svg{width:100%;height:170px;margin-bottom:1rem}
.ep-funding-card{text-align:left}.ep-funding-amount{font-size:clamp(2rem,4vw,3.2rem);font-weight:700;line-height:1.05;margin:.4rem 0;color:var(--ep-teal)}
.ep-document-wrap{position:relative;min-height:520px}.ep-doc{position:absolute;width:72%;min-height:420px;background:#fff;border:1px solid rgba(44,47,51,.12);border-radius:5px;box-shadow:var(--ep-shadow);padding:1.4rem}.ep-doc-back{right:2%;top:3%;transform:rotate(3deg)}.ep-doc-front{left:3%;top:12%;transform:rotate(-1.5deg)}
.ep-doc-title{font-size:1.4rem;font-weight:700}.ep-doc-grid{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;margin-top:1rem}.ep-doc-box{height:72px;background:var(--ep-light-gray);border-radius:3px}.ep-doc-line{height:8px;background:#d9dcda;border-radius:4px;margin:.55rem 0}.ep-doc-line.short{width:62%}.ep-doc-bar{height:16px;background:var(--ep-teal);border-radius:3px;margin-top:1rem}
.ep-dark{background:var(--ep-graphite);color:var(--ep-warm-white)}.ep-dark h2,.ep-dark h3{color:#fff}.ep-dark a{color:#fff}
.ep-brand-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ep-brand-panel{border:1px solid rgba(44,47,51,.12);padding:2rem;border-radius:6px;background:#fff}
.ep-faq details{border-top:1px solid rgba(44,47,51,.14);padding:1.1rem 0}.ep-faq summary{font-weight:700;cursor:pointer;list-style:none}.ep-faq summary::-webkit-details-marker{display:none}.ep-faq summary:after{content:'+';float:right;color:var(--ep-teal);font-size:1.4rem}.ep-faq details[open] summary:after{content:'–'}
.ep-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ep-form-grid .full{grid-column:1/-1}.ep-field label{display:block;font-weight:700;margin-bottom:.4rem}.ep-field input,.ep-field select,.ep-field textarea{width:100%;border:1px solid rgba(44,47,51,.2);border-radius:4px;padding:.85rem;background:#fff;font:inherit}.ep-field textarea{min-height:150px}
.ep-footer{padding:4rem 0 1.5rem;background:#25282b;color:#f6f2eb}.ep-footer a{color:#f6f2eb;text-decoration:none}.ep-footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:2rem}.ep-footer-small{padding-top:2rem;margin-top:2rem;border-top:1px solid rgba(255,255,255,.14);font-size:.9rem;color:#c7cbc8}
.ep-mobile-only{display:none}

@media (max-width: 900px){
 .ep-hero-grid,.ep-energy{grid-template-columns:1fr!important}.ep-hero-visual{min-height:430px}.ep-perspective{grid-template-columns:1fr}.ep-perspective .ep-house-icon{order:-1}.ep-brand-grid,.ep-footer-grid{grid-template-columns:1fr 1fr}.ep-document-wrap{min-height:460px}
}
@media (max-width: 640px){
 .ep-section{padding-block:4rem}.ep-hero{padding-top:2rem}.ep-hero-visual{min-height:330px}.ep-overlay-label{display:none}.ep-collage{grid-template-columns:1fr 1fr}.ep-collage>div:first-child{grid-row:auto;grid-column:1/-1;min-height:240px}.ep-collage>div{min-height:140px}.ep-energy-grid,.ep-form-grid,.ep-brand-grid,.ep-footer-grid{grid-template-columns:1fr}.ep-doc{width:88%}.ep-doc-back{right:0}.ep-doc-front{left:0}.ep-mobile-only{display:block}.ep-desktop-only{display:none}
}

/* Built-in contact form */
.ep-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.ep-submit{border:0;border-radius:5px;background:var(--ep-teal);color:#fff;padding:1rem 1.4rem;font:inherit;font-weight:700;cursor:pointer;min-height:48px}
.ep-submit:hover,.ep-submit:focus-visible{background:var(--ep-teal-dark)}
.ep-consent label{font-weight:400;display:flex;gap:.65rem;align-items:flex-start}
.ep-consent input{width:1.2rem;height:1.2rem;margin-top:.2rem;flex:0 0 auto}
.ep-form-notice{padding:1rem 1.1rem;margin:0 0 1.5rem;border-left:4px solid;border-radius:4px;background:#fff}
.ep-form-notice.is-success{border-color:#35674E;color:#244B38}
.ep-form-notice.is-error{border-color:#A33A32;color:#7A2B25}

/* v1.0.3: fixed header polish, calm scroll reveals and back-to-top control */
.wp-block-template-part header,
header.wp-block-group{position:sticky!important;top:0;z-index:1000;transition:padding .22s ease,box-shadow .22s ease,background-color .22s ease}
.wp-block-template-part header.is-scrolled,
header.wp-block-group.is-scrolled{padding-top:7px!important;padding-bottom:7px!important;box-shadow:0 8px 24px rgba(44,47,51,.08)}
.admin-bar .wp-block-template-part header,
.admin-bar header.wp-block-group{top:32px}

.ep-reveal-enabled .ep-reveal{opacity:0;transform:translateY(18px);transition:opacity .62s ease var(--ep-reveal-delay,0ms),transform .62s ease var(--ep-reveal-delay,0ms)}
.ep-reveal-enabled .ep-reveal.is-visible{opacity:1;transform:none}

.ep-back-to-top{position:fixed;right:22px;bottom:22px;width:48px;height:48px;border:1px solid rgba(255,255,255,.2);border-radius:6px;background:var(--ep-teal,#0F5B58);color:#fff;display:grid;place-items:center;font:700 22px/1 Manrope,Arial,sans-serif;box-shadow:0 12px 30px rgba(44,47,51,.18);opacity:0;visibility:hidden;transform:translateY(10px);transition:opacity .2s ease,visibility .2s ease,transform .2s ease,background-color .2s ease;cursor:pointer;z-index:999}
.ep-back-to-top.is-visible{opacity:1;visibility:visible;transform:none}
.ep-back-to-top:hover,.ep-back-to-top:focus-visible{background:var(--ep-teal-dark,#0B4846)}
.ep-back-to-top:focus-visible{outline:3px solid #fff;outline-offset:3px}

.ep-legal-page{max-width:820px;margin-inline:auto}
.ep-legal-page h1{margin-bottom:1.5rem}
.ep-legal-page h2{margin-top:2.5rem}
.ep-legal-note{padding:18px 20px;border-left:4px solid var(--ep-gold,#B28A4A);background:var(--ep-sand,#F2ECE0);font-size:.95rem}

@media (max-width:782px){.admin-bar .wp-block-template-part header,.admin-bar header.wp-block-group{top:46px}}
@media (max-width:600px){.ep-back-to-top{right:14px;bottom:14px;width:46px;height:46px}.ep-reveal-enabled .ep-reveal{transform:translateY(12px)}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.wp-block-template-part header,header.wp-block-group,.ep-back-to-top,.ep-reveal{transition:none!important}.ep-reveal{opacity:1!important;transform:none!important}}


/* v1.0.5: refined Signature-Transition wordmark and mobile header polish */
.ep-brand-link{display:flex;align-items:center;flex:0 1 auto;min-width:0;text-decoration:none}
.ep-brand-link picture{display:block;line-height:0;min-width:0}
.ep-logo-header,
.wp-block-template-part header img[src*="/logo-horizontal.svg"],
header.wp-block-group img[src*="/logo-horizontal.svg"]{
  display:block;
  width:min(315px,58vw)!important;
  height:auto!important;
  max-height:54px;
  object-fit:contain;
  object-position:left center;
  transition:width .22s ease,max-height .22s ease;
}
.wp-block-template-part header.is-scrolled .ep-logo-header,
.wp-block-template-part header.is-scrolled img[src*="/logo-horizontal.svg"],
header.wp-block-group.is-scrolled .ep-logo-header,
header.wp-block-group.is-scrolled img[src*="/logo-horizontal.svg"]{
  width:min(286px,54vw)!important;
  max-height:46px;
}
.ep-logo-footer{width:100%;max-width:335px;height:auto;display:block}

/* The two hero actions must never overlap on narrow screens. */
.ep-hero .wp-block-buttons{align-items:stretch;gap:.8rem}
.ep-hero .wp-block-button{margin:0}
.ep-hero .wp-block-button__link{display:flex;align-items:center;justify-content:center;min-height:50px;line-height:1.25;text-align:center}

@media (max-width:640px){
  .wp-block-template-part header>.wp-block-group,
  header.wp-block-group>.wp-block-group{gap:14px}
  .ep-logo-header,
  .wp-block-template-part header img[src*="/logo-horizontal.svg"],
  header.wp-block-group img[src*="/logo-horizontal.svg"]{width:min(225px,65vw)!important;max-height:44px}
  .wp-block-template-part header.is-scrolled .ep-logo-header,
  .wp-block-template-part header.is-scrolled img[src*="/logo-horizontal.svg"],
  header.wp-block-group.is-scrolled .ep-logo-header,
  header.wp-block-group.is-scrolled img[src*="/logo-horizontal.svg"]{width:min(210px,61vw)!important;max-height:40px}
  .ep-logo-footer{max-width:285px}
  .ep-hero .wp-block-buttons{display:grid!important;grid-template-columns:1fr;width:100%;gap:.75rem!important}
  .ep-hero .wp-block-button{width:100%!important}
  .ep-hero .wp-block-button__link{width:100%;white-space:normal;padding:.9rem 1rem}
}


/* v1.0.6: fixed header, corrected mobile menu, refined hero actions */
.wp-site-blocks{padding-top:88px}
header.wp-block-group,
.wp-block-template-part header{
  position:fixed!important;
  top:0;left:0;right:0;
  width:100%;
  z-index:1200;
  background:var(--ep-warm-white)!important;
}
header.wp-block-group .alignwide,
.wp-block-template-part header .alignwide{
  width:min(1240px,calc(100% - 2rem));
  margin-inline:auto;
}
header.wp-block-group.is-scrolled,
.wp-block-template-part header.is-scrolled{
  box-shadow:0 10px 30px rgba(31,35,38,.10);
}
.ep-header-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%}
.ep-nav-desktop{display:flex;align-items:center;gap:1.25rem;margin-left:auto}
.ep-nav-desktop a{color:var(--ep-graphite);text-decoration:none;font-size:15px;font-weight:600;white-space:nowrap}
.ep-nav-desktop a:hover,.ep-nav-desktop a:focus-visible{color:var(--ep-teal)}
.ep-nav-cta{display:inline-flex;align-items:center;justify-content:center;padding:.8rem 1rem;border-radius:5px;background:var(--ep-teal);color:#fff!important;font-weight:700}
.ep-nav-cta:hover,.ep-nav-cta:focus-visible{background:var(--ep-teal-dark);color:#fff}
.ep-menu-toggle,.ep-mobile-menu__close{display:none;border:0;background:transparent;color:var(--ep-graphite);padding:.35rem;cursor:pointer}
.ep-menu-toggle svg,.ep-mobile-menu__close svg{display:block}
.ep-mobile-menu[hidden]{display:none!important}
.ep-mobile-menu{position:fixed;inset:0;z-index:1300;background:rgba(20,24,28,.55);backdrop-filter:blur(2px)}
.ep-mobile-menu__panel{position:absolute;inset:0;background:var(--ep-graphite);color:var(--ep-warm-white);overflow:auto}
.ep-mobile-menu__inner{width:min(680px,calc(100% - 2rem));margin:0 auto;padding:1.4rem 0 2rem}
.ep-mobile-menu__head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.5rem}
.ep-mobile-menu__head .ep-logo-footer{max-width:285px}
.ep-mobile-menu__intro{max-width:28rem;color:rgba(247,245,240,.92);font-size:1.02rem;line-height:1.55;margin:0 0 2rem}
.ep-mobile-menu__grid{display:grid;gap:2rem}
.ep-mobile-menu__section h3{font-size:1.7rem;line-height:1.1;margin:0 0 1rem;color:#fff}
.ep-mobile-menu__links{display:grid;gap:.65rem}
.ep-mobile-menu__links a{color:#fff;text-decoration:none;font-size:1.15rem;line-height:1.4}
.ep-mobile-menu__links a:hover,.ep-mobile-menu__links a:focus-visible{color:#bcdad8}
body.ep-mobile-menu-open{overflow:hidden}
body.ep-mobile-menu-open .ep-back-to-top{opacity:0!important;visibility:hidden!important}

/* Logo sizing */
.ep-logo-header{width:min(296px,42vw)!important;max-height:52px}
header.wp-block-group.is-scrolled .ep-logo-header,
.wp-block-template-part header.is-scrolled .ep-logo-header{width:min(282px,40vw)!important;max-height:48px}

/* Hero buttons */
.ep-hero .wp-block-buttons{display:flex;flex-wrap:wrap;gap:.8rem;align-items:flex-start;justify-content:flex-start!important}
.ep-hero .wp-block-button{width:auto!important;flex:0 0 auto}
.ep-hero .wp-block-button__link{width:auto;min-height:0;padding:.88rem 1.2rem!important;font-size:1rem;line-height:1.25;white-space:normal}
.ep-hero .ep-btn .wp-block-button__link{background:var(--ep-teal);color:#fff;border:1px solid var(--ep-teal)}
.ep-hero .ep-btn-secondary .wp-block-button__link{background:transparent;color:var(--ep-graphite);border:1px solid rgba(31,35,38,.72)}

@media (max-width: 980px){
  .ep-nav-desktop{display:none}
  .ep-menu-toggle,.ep-mobile-menu__close{display:inline-flex;align-items:center;justify-content:center}
}
@media (max-width: 782px){
  .admin-bar header.wp-block-group,.admin-bar .wp-block-template-part header{top:46px}
}
@media (max-width: 640px){
  .wp-site-blocks{padding-top:78px}
  header.wp-block-group, .wp-block-template-part header{padding:10px 16px!important}
  header.wp-block-group .alignwide, .wp-block-template-part header .alignwide{width:calc(100% - 0px)}
  .ep-logo-header{width:min(235px,64vw)!important;max-height:42px}
  header.wp-block-group.is-scrolled .ep-logo-header,
  .wp-block-template-part header.is-scrolled .ep-logo-header{width:min(222px,61vw)!important;max-height:40px}
  .ep-mobile-menu__inner{width:calc(100% - 2rem);padding:1.15rem 0 2rem}
  .ep-mobile-menu__head .ep-logo-footer{max-width:252px}
  .ep-mobile-menu__section h3{font-size:1.15rem;margin-bottom:.8rem}
  .ep-mobile-menu__links a{font-size:1.02rem}
  .ep-mobile-menu__grid{gap:1.8rem}
  .ep-hero .wp-block-buttons{display:flex!important;flex-direction:column;align-items:flex-start;gap:.7rem!important}
  .ep-hero .wp-block-button{max-width:100%}
  .ep-hero .wp-block-button__link{display:inline-flex;width:auto;min-width:min(255px,100%);max-width:100%;padding:.85rem 1.05rem!important}
}


/* v1.0.7: Quiet Premium Real Estate Editorial image system */
.ep-editorial-figure{margin:0;overflow:hidden;border-radius:8px;background:#e8e4dc;box-shadow:0 18px 42px rgba(31,35,38,.08)}
.ep-editorial-image{display:block;width:100%;height:100%;object-fit:cover}
.ep-editorial-caption{font-size:.82rem;color:var(--ep-gray);margin-top:.65rem}

.ep-hero-visual.ep-editorial-ready{min-height:520px;background:#dedbd4}
.ep-hero-visual.ep-editorial-ready .ep-editorial-figure{height:100%;min-height:520px;border-radius:8px}
.ep-hero-visual.ep-editorial-ready .ep-editorial-image{object-position:center center}
.ep-hero-visual.ep-editorial-ready .ep-overlay-label{display:none}

.ep-collage.ep-editorial-ready{grid-template-columns:1.25fr .75fr;grid-template-rows:1fr 1fr}
.ep-collage.ep-editorial-ready .ep-editorial-figure{min-height:180px;border-radius:6px;box-shadow:none}
.ep-collage.ep-editorial-ready .ep-editorial-figure:first-child{grid-row:1/3;min-height:380px}
.ep-collage.ep-editorial-ready .ep-editorial-image{object-position:center}

.ep-house-icon.ep-editorial-ready{width:100%;max-width:390px}
.ep-house-icon.ep-editorial-ready .ep-editorial-figure{aspect-ratio:4/5}
.ep-house-icon.ep-editorial-ready .ep-editorial-image{object-position:center}

.ep-energy-assessment{margin-top:2rem;aspect-ratio:3/2}
.ep-energy-house.ep-editorial-ready{padding:0;border:0;background:transparent}
.ep-energy-house.ep-editorial-ready .ep-editorial-figure{aspect-ratio:4/3}

.ep-renovation-overview{margin:2rem 0 2.25rem;aspect-ratio:3/2}
.ep-renovation-overview .ep-editorial-image{object-position:center}

.ep-document-wrap.ep-editorial-ready{min-height:0}
.ep-document-wrap.ep-editorial-ready .ep-editorial-figure{aspect-ratio:3/2;transform:rotate(-1deg)}

.ep-situations-image{margin:2rem 0 2.25rem;aspect-ratio:4/3}
.ep-situations-image .ep-editorial-image{object-position:center 55%}

.ep-about-editorial{display:grid;grid-template-columns:minmax(260px,.8fr) 1.2fr;gap:clamp(2rem,5vw,5rem);align-items:center;margin-top:2.5rem}
.ep-about-editorial .ep-editorial-figure{aspect-ratio:4/5}
.ep-about-editorial-copy{font-size:1.05rem}

.ep-contact-editorial{margin-top:1.75rem;aspect-ratio:3/2}
.ep-contact-editorial .ep-editorial-image{object-position:center}

@media (max-width:900px){
  .ep-about-editorial{grid-template-columns:1fr}
  .ep-about-editorial .ep-editorial-figure{max-width:520px;aspect-ratio:4/5}
}
@media (max-width:640px){
  .ep-hero-visual.ep-editorial-ready{min-height:430px}
  .ep-hero-visual.ep-editorial-ready .ep-editorial-figure{min-height:430px}
  .ep-hero-visual.ep-editorial-ready .ep-editorial-image{object-position:center}
  .ep-collage.ep-editorial-ready{grid-template-columns:1fr 1fr}
  .ep-collage.ep-editorial-ready .ep-editorial-figure:first-child{grid-row:auto;grid-column:1/-1;min-height:280px}
  .ep-collage.ep-editorial-ready .ep-editorial-figure:not(:first-child){min-height:155px}
  .ep-house-icon.ep-editorial-ready{max-width:none}
  .ep-house-icon.ep-editorial-ready .ep-editorial-figure{aspect-ratio:3/2}
  .ep-energy-assessment,.ep-renovation-overview,.ep-document-wrap.ep-editorial-ready .ep-editorial-figure,.ep-contact-editorial{aspect-ratio:4/3}
  .ep-situations-image{aspect-ratio:4/3}
  .ep-about-editorial{margin-top:2rem}
}


/* v1.0.8: premium renovation-path presentation */
.ep-renovation-overview{
  margin:2rem 0 2.25rem;
  aspect-ratio:3/2;
  border-radius:8px;
  box-shadow:0 14px 34px rgba(31,35,38,.08);
}
.ep-renovation-overview .ep-editorial-image{object-position:center}
.ep-path-card-clean{
  padding:clamp(1.35rem,2.4vw,1.9rem);
  min-height:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.ep-path-card-clean > svg{display:none!important}
.ep-path-number{
  margin:0 0 1.15rem;
  color:var(--ep-gold);
  font-size:1rem;
  line-height:1;
  font-weight:700;
  letter-spacing:.14em;
}
.ep-path-card-clean h3{margin-top:0;margin-bottom:.75rem}
.ep-path-card-clean p{margin-bottom:0}

/* Less intrusive back-to-top control on small screens. */
@media (max-width:640px){
  .ep-renovation-overview{aspect-ratio:3/2;margin:1.6rem 0 1.8rem}
  .ep-path-card-clean{padding:1.35rem}
  .ep-back-to-top{
    right:10px;
    bottom:10px;
    width:40px;
    height:40px;
    font-size:19px;
    background:rgba(15,91,88,.9);
    box-shadow:0 8px 22px rgba(31,35,38,.16);
  }
}


/* v1.0.9: mobile rhythm, compact form, callouts and simplified navigation */
html{scroll-padding-top:96px}
[id]{scroll-margin-top:96px}
.wp-site-blocks{padding-top:0!important}
.wp-site-blocks > .wp-block-template-part + main{margin-block-start:0!important}
main{padding-top:88px}
.ep-container.ep-narrow{width:min(760px,calc(100% - 2rem))}

/* Editorial callouts: aligned, calm and no browser-default indentation. */
.ep-section blockquote{
  margin:1.5rem 0 0;
  padding:.9rem 0 .9rem 1.15rem;
  border-left:3px solid var(--ep-gold);
  color:var(--ep-graphite);
  font-size:1.05rem;
  line-height:1.55;
}
.ep-section blockquote p{margin:0}

/* Compact final call-to-action and contact transition. */
.ep-cta-section{padding-block:clamp(2.5rem,5vw,4rem)!important}
.ep-cta-section h2{margin-top:0}
.ep-cta-section .ep-trust{margin-bottom:0}
#kontakt{padding-block:clamp(3rem,6vw,5rem)}

/* Form fields must stay inside the viewport and feel less oversized. */
.ep-form-grid{gap:.85rem}
.ep-field,.ep-field input,.ep-field select,.ep-field textarea{box-sizing:border-box}
.ep-field label{margin-bottom:.32rem;line-height:1.35}
.ep-field input,.ep-field select{
  min-height:50px;
  padding:.65rem .8rem;
  line-height:1.3;
}
.ep-field textarea{
  min-height:155px;
  padding:.75rem .8rem;
  line-height:1.45;
  resize:vertical;
}
#kontakt .ep-trust + .ep-trust{display:none}

/* Energy decision chips should read like concise criteria, not oversized cards. */
.ep-energy-grid{gap:.6rem}
.ep-energy-chip{padding:.68rem .85rem;line-height:1.3;min-height:46px;display:flex;align-items:center}

/* Simplified, premium mobile navigation. */
.ep-mobile-menu__intro{margin-bottom:1.45rem;max-width:24rem}
.ep-mobile-menu__grid{display:block}
.ep-mobile-menu__primary{display:grid;gap:.25rem}
.ep-mobile-menu__primary a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:.78rem 0;
  border-bottom:1px solid rgba(255,255,255,.12);
  color:#fff;
  text-decoration:none;
  font-size:1.18rem;
  line-height:1.25;
  font-weight:600;
}
.ep-mobile-menu__primary a::after{content:'→';color:#9bc4c1;font-weight:400}
.ep-mobile-menu__cta{
  display:flex;
  justify-content:center;
  align-items:center;
  margin-top:1.2rem;
  padding:.92rem 1rem;
  border-radius:5px;
  background:var(--ep-teal);
  color:#fff;
  text-decoration:none;
  font-weight:700;
}
.ep-mobile-menu__utility{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem 1rem;
  margin-top:1.4rem;
  padding-top:1.15rem;
  border-top:1px solid rgba(255,255,255,.12);
}
.ep-mobile-menu__utility a{color:rgba(255,255,255,.78);font-size:.9rem;text-decoration:none}
.ep-mobile-menu__utility a:hover,.ep-mobile-menu__utility a:focus-visible{color:#fff}

@media (max-width:980px){
  main{padding-top:84px}
}
@media (max-width:640px){
  html{scroll-padding-top:82px}
  [id]{scroll-margin-top:82px}
  main{padding-top:78px}
  .ep-hero{padding-top:1rem;padding-bottom:3.25rem}
  .ep-hero-grid{margin-top:0!important}
  .ep-section{padding-block:3.4rem}
  .ep-cta-section{padding-block:2.35rem!important}
  #kontakt{padding-block:2.8rem}
  .ep-section blockquote{margin-top:1.2rem;padding:.75rem 0 .75rem .9rem;font-size:1rem}
  .ep-energy-grid{gap:.5rem}
  .ep-energy-chip{padding:.62rem .75rem;min-height:44px}
  .ep-form-grid{gap:.72rem}
  .ep-field input,.ep-field select{min-height:48px;padding:.58rem .72rem}
  .ep-field textarea{min-height:145px;padding:.68rem .72rem}
  .ep-submit{min-height:48px;padding:.82rem 1.1rem}
  .ep-mobile-menu__inner{padding-top:1rem}
  .ep-mobile-menu__head{margin-bottom:1.1rem}
  .ep-mobile-menu__intro{font-size:.96rem;line-height:1.45;margin-bottom:1.1rem}
  .ep-mobile-menu__primary a{font-size:1.08rem;padding:.66rem 0}
  .ep-mobile-menu__cta{margin-top:1rem;padding:.82rem .9rem}
  .ep-mobile-menu__utility{margin-top:1.1rem;padding-top:1rem}
  .ep-back-to-top{width:40px;height:40px;right:12px;bottom:12px;font-size:18px;opacity:.92}
}


/* v1.0.10: desktop editorial refinement — controlled image scale, grids and rhythm */
@media (min-width:981px){
  /* WordPress admin bar must not cover the fixed site header. */
  body.admin-bar header.wp-block-group,
  body.admin-bar .wp-block-template-part header{top:32px!important}

  main{padding-top:82px}
  .ep-section{padding-block:5.25rem}
  .ep-section-tight{padding-block:4rem}
  .ep-section > .ep-container,
  .ep-cta-section > .ep-container,
  #kontakt > .ep-container{width:min(1120px,calc(100% - 4rem))}
  .ep-hero > .ep-container{width:min(1180px,calc(100% - 4rem))}
  .ep-section h2{max-width:920px;margin-bottom:2rem}

  /* Hero: balanced editorial split, no oversized image wall. */
  .ep-hero{padding-top:4.5rem;padding-bottom:5.5rem}
  .ep-hero-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1.02fr) minmax(420px,.98fr)!important;
    gap:4.5rem!important;
    align-items:center!important;
  }
  .ep-hero-visual.ep-editorial-ready,
  .ep-hero-visual.ep-editorial-ready .ep-editorial-figure{
    min-height:0;
    height:auto;
    aspect-ratio:4/3;
    max-height:510px;
  }

  /* Ausgangslage: text and restrained image collage. */
  .ep-opening-section .wp-block-columns{
    display:grid!important;
    grid-template-columns:minmax(0,.92fr) minmax(430px,1.08fr)!important;
    gap:4.25rem!important;
    align-items:center!important;
  }
  .ep-opening-section .ep-collage.ep-editorial-ready{height:470px}
  .ep-opening-section .ep-collage.ep-editorial-ready .ep-editorial-figure{min-height:0!important;height:100%}

  /* Reliable three-column cards on desktop, independent of WP core block CSS. */
  .ep-decision-section .wp-block-columns,
  .ep-paths-section .wp-block-columns,
  .ep-funding-section .wp-block-columns,
  .ep-process-section .wp-block-columns,
  .ep-situations-section .wp-block-columns{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:1rem!important;
    align-items:stretch!important;
  }
  .ep-decision-section .ep-card{min-height:238px;padding:1.65rem}
  .ep-process-section .wp-block-columns{margin-bottom:1rem}
  .ep-process-section .ep-card{min-height:180px;padding:1.5rem}
  .ep-process-section .ep-card-number{font-size:1.85rem;margin-bottom:.9rem}
  .ep-process-section .ep-card h3{margin-top:0;margin-bottom:.65rem}
  .ep-process-section .ep-card p{margin-bottom:0}
  .ep-situations-section .ep-card{min-height:190px;padding:1.55rem}

  /* Six perspectives: compact centre image, stronger content balance. */
  .ep-perspectives-section .ep-perspective{
    grid-template-columns:minmax(0,1fr) 300px minmax(0,1fr);
    gap:2.75rem;
    max-width:1040px;
    margin-inline:auto;
  }
  .ep-perspectives-section .ep-house-icon.ep-editorial-ready{max-width:300px}
  .ep-perspectives-section .ep-house-icon.ep-editorial-ready .ep-editorial-figure{aspect-ratio:3/4;max-height:430px}

  /* Energy section: one clear text column and a restrained two-image editorial stack. */
  .ep-energy{
    grid-template-columns:minmax(0,1.05fr) minmax(380px,.95fr);
    gap:4.5rem;
    align-items:start;
  }
  .ep-energy-house.ep-editorial-ready{position:relative}
  .ep-energy-media{display:grid;gap:1.15rem;position:sticky;top:132px}
  .ep-energy-media .ep-energy-primary{aspect-ratio:4/3}
  .ep-energy-media .ep-energy-secondary{width:78%;margin-left:auto;aspect-ratio:3/2}
  .ep-energy-assessment{display:none!important}

  /* Sanierungswege: editorial banner rather than full-width image wall. */
  .ep-paths-section .ep-renovation-overview{
    width:min(900px,100%);
    margin:2.25rem auto 2rem;
    aspect-ratio:16/8.2;
    max-height:470px;
  }
  .ep-paths-section .ep-path-card-clean{min-height:230px;padding:1.6rem}
  .ep-paths-section > .ep-container > p:last-child{max-width:930px;margin:1.4rem auto 0}

  /* Funding: three concise cards on one row. */
  .ep-funding-section .ep-funding-card{min-height:235px;padding:1.75rem}
  .ep-funding-section .ep-funding-amount{font-size:2.65rem}

  /* Core product: two-column editorial composition. */
  .ep-product-section > .ep-container > .wp-block-columns{
    display:grid!important;
    grid-template-columns:minmax(0,.92fr) minmax(430px,1.08fr)!important;
    gap:4.25rem!important;
    align-items:center!important;
  }
  .ep-product-section .ep-document-wrap.ep-editorial-ready{width:100%;max-width:520px;margin-left:auto}
  .ep-product-section .ep-document-wrap.ep-editorial-ready .ep-editorial-figure{
    aspect-ratio:4/3;
    max-height:430px;
    transform:rotate(-.45deg);
  }
  .ep-product-section h3{margin-bottom:.35rem}
  .ep-product-section h3 + p{margin-top:0;margin-bottom:1.25rem}

  /* Typical situations: image as a considered feature, not a billboard. */
  .ep-situations-section .ep-situations-image{
    width:min(860px,100%);
    margin:2rem auto 2.5rem;
    aspect-ratio:16/8;
    max-height:430px;
  }

  /* Guidance: use the full dark area with a clear two-column composition. */
  .ep-guidance-section{padding-block:5.25rem}
  .ep-guidance-section > .ep-container{width:min(1080px,calc(100% - 4rem))}
  .ep-guidance-section .wp-block-columns{
    display:grid!important;
    grid-template-columns:minmax(0,1.08fr) minmax(340px,.92fr)!important;
    gap:5rem!important;
    align-items:start!important;
  }
  .ep-guidance-section ul{margin-top:1rem;padding-left:1.25rem}

  /* About / brand connection: portrait kept human, not dominant. */
  .ep-about-section > .ep-container{width:min(1080px,calc(100% - 4rem))}
  .ep-about-section .ep-narrow{max-width:760px}
  .ep-about-editorial{
    grid-template-columns:350px minmax(0,1fr);
    gap:4rem;
    max-width:960px;
    margin:2.75rem auto 0;
  }
  .ep-about-editorial .ep-editorial-figure{aspect-ratio:3/4;max-height:500px}
  .ep-brand-grid{max-width:960px;margin:2rem auto 0}

  /* FAQ and final CTA remain intentionally narrow. */
  .ep-faq-section > .ep-container{width:min(880px,calc(100% - 4rem))}
  .ep-cta-section > .ep-container{width:min(780px,calc(100% - 4rem))}

  /* Contact: compact portrait/intro column beside a practical form. */
  .ep-contact-section > .ep-container > .wp-block-columns{
    display:grid!important;
    grid-template-columns:minmax(300px,.72fr) minmax(520px,1.28fr)!important;
    gap:4rem!important;
    align-items:start!important;
  }
  .ep-contact-editorial{max-width:430px;aspect-ratio:4/3;margin-top:1.5rem}

  /* Consistent image finish. */
  .ep-editorial-figure{border-radius:10px;box-shadow:0 14px 34px rgba(31,35,38,.075)}
}


/* v1.0.11: consistent desktop alignment and corrected linked-page layout */
.ep-page-main{
  width:min(960px,calc(100% - 2rem));
  margin-inline:auto;
  padding-block:clamp(3rem,7vw,6rem);
}
.ep-page-main .wp-block-post-content{width:100%;max-width:none}
.ep-page-main .wp-block-post-content > h1:first-child{
  margin:0 0 1.25rem;
  font-size:clamp(2.35rem,5vw,4rem);
  line-height:1.04;
  letter-spacing:-.035em;
}
.ep-page-main .wp-block-post-content > h1:first-child + p{
  max-width:780px;
  margin-top:0;
  font-size:clamp(1.15rem,2.1vw,1.48rem);
  line-height:1.55;
}
.ep-page-main .wp-block-post-content h2{margin-top:2.6rem;margin-bottom:1rem}
.ep-page-main .wp-block-post-content ul{padding-left:1.3rem}

@media (min-width:981px){
  /* One dependable left edge throughout the desktop page. */
  .ep-section > .ep-container,
  .ep-cta-section > .ep-container,
  #kontakt > .ep-container,
  .ep-guidance-section > .ep-container,
  .ep-about-section > .ep-container{
    width:min(1080px,calc(100% - 5rem));
    margin-inline:auto;
  }
  .ep-hero > .ep-container{width:min(1140px,calc(100% - 5rem))}
  .ep-section .ep-kicker,
  .ep-section h2{margin-left:0;margin-right:0}

  /* Editorial images align with their section heading instead of floating centrally. */
  .ep-paths-section .ep-renovation-overview{
    width:min(760px,100%);
    max-height:395px;
    margin:2rem 0 1.8rem;
  }
  .ep-paths-section > .ep-container > p:last-child{
    max-width:860px;
    margin:1.35rem 0 0;
  }
  .ep-situations-section .ep-situations-image{
    width:min(760px,100%);
    max-height:385px;
    margin:1.8rem 0 2.2rem;
  }

  /* About section follows the same left edge and keeps the portrait discreet. */
  .ep-about-editorial{
    grid-template-columns:300px minmax(0,1fr);
    gap:3.5rem;
    width:min(900px,100%);
    max-width:none;
    margin:2.4rem 0 0;
  }
  .ep-about-editorial .ep-editorial-figure{
    width:300px;
    max-height:420px;
    aspect-ratio:5/7;
  }
  .ep-about-editorial-copy{max-width:560px}
  .ep-brand-grid{
    width:min(900px,100%);
    max-width:none;
    margin:1.75rem 0 0;
  }

  /* Further restrain large supporting imagery on wide screens. */
  .ep-product-section .ep-document-wrap.ep-editorial-ready{max-width:440px}
  .ep-product-section .ep-document-wrap.ep-editorial-ready .ep-editorial-figure{max-height:360px}
  .ep-energy-media{max-width:430px;margin-left:auto}
  .ep-energy-media .ep-energy-secondary{width:72%}
  .ep-opening-section .ep-collage.ep-editorial-ready{height:420px;max-width:520px;margin-left:auto}

  /* Desktop cards and copy retain a calm, shared visual rhythm. */
  .ep-process-section .ep-card{min-height:160px}
  .ep-situations-section .ep-card{min-height:175px}
  .ep-guidance-section .wp-block-columns{gap:4rem!important}
}

@media (max-width:980px){
  .ep-page-main{padding-top:2rem;padding-bottom:4rem}
  .ep-page-main .wp-block-post-content > h1:first-child{font-size:clamp(2rem,9vw,2.8rem)}
  .ep-page-main .wp-block-post-content > h1:first-child + p{font-size:1.18rem;line-height:1.55}
}


/* v1.0.12: final alignment refinement and mobile CTA placement */
@media (min-width:981px){
  /* The first three editorial chapters share the broader hero alignment. */
  .ep-opening-section > .ep-container,
  .ep-decision-section > .ep-container,
  .ep-perspectives-section > .ep-container{
    width:min(1160px,calc(100% - 5rem));
    margin-inline:auto;
  }

  /* Keep headings and content anchored to the same left edge. */
  .ep-opening-section .ep-kicker,
  .ep-opening-section h2,
  .ep-decision-section .ep-kicker,
  .ep-decision-section h2,
  .ep-perspectives-section .ep-kicker,
  .ep-perspectives-section h2{
    margin-left:0!important;
  }
}

@media (max-width:640px){
  /* The two secondary calls to action sit at the right edge, clear of the copy. */
  .ep-cta-section .wp-block-button,
  .ep-guidance-section .wp-block-button{
    display:block;
    width:fit-content!important;
    max-width:100%;
    margin-top:1rem!important;
    margin-right:0!important;
    margin-left:auto!important;
  }
  .ep-cta-section .wp-block-button__link,
  .ep-guidance-section .wp-block-button__link{
    width:auto!important;
    max-width:100%;
    padding:.9rem 1.15rem!important;
    text-align:center;
  }
}


/* v1.0.13: mobile CTA alignment and spacing between energy images */
.ep-energy-media{
  display:grid;
  gap:1rem;
}
.ep-energy-media > .ep-editorial-figure{
  margin:0;
}

@media (max-width:640px){
  /* Both secondary CTAs sit directly below their copy, aligned to the left. */
  .ep-cta-section .wp-block-button,
  .ep-guidance-section .wp-block-button{
    display:block;
    width:fit-content!important;
    max-width:100%;
    margin-top:.65rem!important;
    margin-right:auto!important;
    margin-bottom:.35rem!important;
    margin-left:0!important;
  }
  .ep-cta-section .wp-block-button__link,
  .ep-guidance-section .wp-block-button__link{
    width:auto!important;
    max-width:100%;
    padding:.88rem 1.12rem!important;
    text-align:left;
  }

  /* Keep a visible, consistent separation between the two assessment images. */
  .ep-energy-media{
    gap:1rem!important;
  }
}
