/* ============================================================
   Trend Energy — global styles
   ============================================================ */
:root {
  --green:      #16a34a;
  --green-dark: #15803d;
  --blue:       #0ea5e9;
  --blue-dark:  #0369a1;
  --ink:        #0f172a;
  --ink-soft:   #334155;
  --muted:      #64748b;
  --line:       #e2e8f0;
  --bg:         #ffffff;
  --bg-soft:    #f8fafc;
  --bg-mint:    #f0fdf4;
  --radius:     16px;
  --shadow:     0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-sm:  0 4px 16px -8px rgba(15, 23, 42, .25);
  --maxw:       1180px;
  --grad:       linear-gradient(120deg, var(--green) 0%, var(--blue) 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link, var(--green-dark)); text-decoration: none; }
a:hover { color: var(--blue-dark); }

h1, h2, h3 { line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--ink-soft); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--mint { background: var(--bg-mint); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 14px;
}

.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: 14px 26px;
  border-radius: var(--btn-radius, 999px);
  box-shadow: var(--btn-shadow, none);
  font-weight: 700;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(var(--btn-hover-lift, -2px)); box-shadow: var(--btn-hover-shadow, var(--btn-shadow, none)); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn--primary { background: var(--btn-bg, var(--grad)); color: var(--btn-text, #fff); border: var(--btn-border, 1px solid transparent); }
.btn--primary:hover { background: var(--btn-hover-bg, var(--btn-bg, var(--grad))); color: var(--btn-hover-text, #fff); }

/* per-section custom styling (set via the inline editor). Unset vars fall back
   to each element's normal colour/size, so partial overrides never break. */
[data-styled] { font-size: var(--s-fs, inherit); }
[data-styled] p, [data-styled] .lead, [data-styled] li,
[data-styled] .features span, [data-styled] .info-item p { color: var(--s-color, var(--ink-soft)); }
[data-styled] .stat .label { color: var(--s-color, var(--muted)); }
[data-styled] h1, [data-styled] h2, [data-styled] h3 { color: var(--s-heading, var(--s-color, var(--ink))); }

/* per-bar custom styling (fill / track colour, height, radius) */
[data-bars] .bar { background: var(--bar-track, var(--line)); height: var(--bar-h, 12px); border-radius: var(--bar-radius, 999px); }
[data-bars] .bar > i { background: var(--bar-fill, var(--grad)); border-radius: var(--bar-radius, 999px); }

/* per-button custom styling (set via the inline editor; element-level --b-* vars) */
.btn--custom { background: var(--b-bg, var(--btn-bg, var(--grad))) !important; color: var(--b-text, var(--btn-text, #fff)) !important; border-radius: var(--b-radius, var(--btn-radius, 999px)) !important; border: var(--b-border, var(--btn-border, 1px solid transparent)) !important; }
.btn--custom:hover { background: var(--b-hover-bg, var(--b-bg, var(--btn-hover-bg, var(--grad)))) !important; color: var(--b-hover-text, var(--b-text, var(--btn-text, #fff))) !important; }
.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.22); color:#fff; }
.btn--dark { background: var(--ink); color:#fff; }
.btn--dark:hover { background:#1e293b; color:#fff; }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg-top, rgba(255,255,255,.86));
  -webkit-backdrop-filter: var(--header-blur, saturate(180%) blur(12px));
  backdrop-filter: var(--header-blur, saturate(180%) blur(12px));
  border-bottom: var(--header-border, 1px solid var(--line));
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.site-header.scrolled {
  background: var(--header-bg-scroll, rgba(255,255,255,.86));
  box-shadow: 0 6px 24px -16px rgba(15,23,42,.4);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; color: var(--header-text, var(--ink)); letter-spacing: -.02em; }
.brand:hover { color: var(--header-text, var(--ink)); }
.brand .logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand .logo-mark svg { width: 22px; height: 22px; }
.brand small { display:block; font-size:.62rem; font-weight:600; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); margin-top:-3px;}

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 9px 14px; border-radius: 10px;
  font-weight: 600; font-size: .95rem; color: var(--menu-link, var(--ink-soft));
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--menu-hover, var(--green-dark)); }
.nav-links a.active { color: var(--menu-active, var(--green-dark)); background: var(--menu-active-bg, var(--bg-mint)); }
.nav-cta { margin-left: 10px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; border-radius: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 16px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .22s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-cta { margin: 8px 0 0; }
  .nav-links a { padding: 12px 14px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(14,165,233,.18), transparent 60%),
    radial-gradient(700px 500px at 5% 110%, rgba(22,163,74,.18), transparent 60%),
    var(--bg);
  padding: 96px 0 88px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.25rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  aspect-ratio: 1/1; border-radius: var(--media-radius, 28px);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 45%),
    var(--grad);
  box-shadow: var(--media-shadow, var(--shadow));
  border: var(--media-border, none);
  display: grid; place-items: center; position: relative;
}
.hero-visual svg { width: 56%; height: 56%; opacity: .96; }
.hero-badge {
  position: absolute; background: #fff; border-radius: 14px; padding: 14px 18px;
  box-shadow: var(--shadow); display:flex; align-items:center; gap:12px;
}
.hero-badge strong { display:block; font-size:1.3rem; color:var(--ink); }
.hero-badge span { font-size:.78rem; color:var(--muted); }
.hero-badge .dot { width:38px; height:38px; border-radius:10px; background:var(--bg-mint); display:grid; place-items:center; }
.hero-badge .dot svg { width:20px; height:20px; }
.hero-badge.b1 { top: 22px; left: -26px; }
.hero-badge.b2 { bottom: 28px; right: -22px; }
.hero-visual--img { background-size: cover; background-position: center; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { width: 100%; max-width: 380px; margin: 0 auto; }
  .hero-badge.b1 { left: 8px; } .hero-badge.b2 { right: 8px; }
}
@media (max-width: 560px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; text-align: center; }
}

/* ============================================================
   Cards / grids
   ============================================================ */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .icon {
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 18px;
  background: var(--bg-mint); display: grid; place-items: center; color: var(--green-dark);
}
.card .icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .98rem; margin-bottom: 18px; }
.card .more { margin-top: auto; font-weight: 700; font-size: .92rem; color: var(--green-dark); display: inline-flex; align-items: center; gap: 6px; }
.card:hover .more { color: var(--blue-dark); }
.card .more svg { width: 16px; height: 16px; transition: transform .2s; }
.card:hover .more svg { transform: translateX(4px); }

/* ============================================================
   Stats / facts
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { text-align: center; padding: 8px; }
.stat .num { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat .label { color: var(--muted); font-weight: 600; margin-top: 8px; font-size: .95rem; }

/* progress bars (Energy brings quality of life) */
.bars { max-width: 680px; margin: 0 auto; }
.bar-row { margin-bottom: 22px; }
.bar-row .top { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--grad); width: 0; transition: width 1.1s cubic-bezier(.22,1,.36,1); }

/* ============================================================
   Page hero (sub pages)
   ============================================================ */
.page-hero {
  background:
    radial-gradient(700px 400px at 90% -20%, rgba(14,165,233,.16), transparent 60%),
    var(--bg-soft);
  padding: 64px 0 56px; border-bottom: 1px solid var(--line);
}
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green-dark); }

/* feature list */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features .check { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; background: var(--bg-mint); color: var(--green-dark); display: grid; place-items: center; margin-top: 2px; }
.features .check svg { width: 15px; height: 15px; }
.features strong { display: block; color: var(--ink); }
.features span { color: var(--ink-soft); font-size: .97rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.media-card {
  border-radius: var(--media-radius, 24px); aspect-ratio: 4/3;
  background: var(--grad);
  box-shadow: var(--media-shadow, var(--shadow));
  border: var(--media-border, none);
  display: grid; place-items: center;
}
.media-card svg { width: 44%; height: 44%; opacity: .95; }
.media-card.alt { background: linear-gradient(120deg, var(--blue) 0%, var(--green) 100%); }
.media-card--img { background-size: cover; background-position: center; }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  background: var(--grad); color: #fff; border-radius: 28px;
  padding: 56px; text-align: center; box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 56ch; margin: 0 auto 26px; }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 940px; margin: 0 auto; }
@media (max-width: 720px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-cards .info-item { flex-direction: column; align-items: center; text-align: center; gap: 10px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-cards .info-item h4 { margin-bottom: 4px; }
.contact-cards .info-item a { text-decoration: none; }
.contact-cards .info-item a:hover { text-decoration: underline; }
.info-item { display: flex; gap: 14px; margin-bottom: 22px; }
.info-item .ic { flex:0 0 44px; width:44px; height:44px; border-radius:12px; background:var(--bg-mint); color:var(--green-dark); display:grid; place-items:center; }
.info-item .ic svg { width:20px; height:20px; }
.info-item h4 { margin:0 0 2px; font-size:1rem; }
.info-item p { margin:0; }
form .field { margin-bottom: 16px; }
form label { display:block; font-weight:600; font-size:.9rem; margin-bottom:6px; color:var(--ink); }
form input, form textarea {
  width:100%; padding:13px 15px; border:1px solid var(--line); border-radius:12px;
  font:inherit; color:var(--ink); background:#fff; transition:border-color .15s, box-shadow .15s;
}
form input:focus, form textarea:focus { outline:none; border-color:var(--green); box-shadow:0 0 0 3px rgba(22,163,74,.15); }
form textarea { min-height:130px; resize:vertical; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color:#fff; font-size:.85rem; letter-spacing:.1em; text-transform:uppercase; margin-bottom:16px; }
.site-footer a { color:#cbd5e1; display:block; padding:5px 0; font-size:.95rem; }
.site-footer a:hover { color:#fff; }
.site-footer .brand { color:#fff; margin-bottom:14px; }
.site-footer .brand small { color:#94a3b8; }
.footer-about p { color:#94a3b8; font-size:.95rem; }
.footer-bottom { border-top:1px solid #1e293b; margin-top:48px; padding-top:24px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:.88rem; color:#94a3b8; }
.footer-bottom a { display:inline; color:#94a3b8; }

.fade-up { opacity:0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.in { opacity:1; transform:none; }

/* ============================================================
   Fluid row hero (full-bleed, directly under the menu)
   ============================================================ */
.fluidrow {
  position: relative;
  display: flex; align-items: center;
  background: var(--grad);
  background-size: cover; background-position: center;
  color: #fff; overflow: hidden;
}
.fluidrow--sm { min-height: 320px; }
.fluidrow--md { min-height: 460px; }
.fluidrow--lg { min-height: 640px; }
.fluidrow-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(15,23,42,.62), rgba(15,23,42,.30));
}
.fluidrow-inner { position: relative; z-index: 1; padding: 56px 24px; width: 100%; }
.fluidrow--center .fluidrow-inner { text-align: center; }
.fluidrow--center .fluidrow-inner .lead { margin-left: auto; margin-right: auto; }
.fluidrow h1 { color: #fff; margin-bottom: 16px; }
.fluidrow .lead { color: rgba(255,255,255,.92); max-width: 60ch; margin-bottom: 26px; }
.eyebrow--light { color: #fff; opacity: .9; }

/* Cookie notice — centered modal with blurred backdrop */
.cookie-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(15, 23, 42, .42);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
  backdrop-filter: blur(7px) saturate(120%);
  animation: cookieFade .25s ease;
}
@keyframes cookieFade { from { opacity: 0; } to { opacity: 1; } }
.cookie-box {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .55);
  padding: 32px 30px; max-width: 460px; width: 100%; text-align: center;
  animation: cookiePop .28s cubic-bezier(.22, 1, .36, 1);
}
@keyframes cookiePop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.cookie-box p { margin: 0 0 22px; font-size: 1rem; color: var(--ink-soft); line-height: 1.6; }
.cookie-box a { text-decoration: underline; font-weight: 600; }
.cookie-box .btn { padding: 12px 36px; }

/* Legal / prose pages */
.prose { color: var(--ink-soft); font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }
.prose a { text-decoration: underline; }

/* Get in touch — 4 Standort-Boxen */
.contact-cards--4 { grid-template-columns: repeat(4, 1fr); max-width: 1120px; }
@media (max-width: 980px) { .contact-cards--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-cards--4 { grid-template-columns: 1fr; } }
.contact-cards--4 .location-card { flex-direction: column !important; align-items: flex-start !important; text-align: left !important; gap: 12px !important; padding: 24px !important; }
.location-card h4 { margin: 0 0 2px; font-size: 1.05rem; }
.location-card .loc-row { display: flex; gap: 10px; align-items: flex-start; margin: 0; width: 100%; font-size: .95rem; }
.location-card .loc-row .ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; }
.location-card .loc-row .ic svg { width: 16px; height: 16px; }
.location-card .loc-row a { text-decoration: none; color: inherit; }
.location-card .loc-row a:hover { text-decoration: underline; }

/* Standorte: flexible Anzahl + Hinzufügen/Entfernen */
/* vollbreite Fluid-Row: alle Boxen gleich breit + gleich hoch */
.contact-cards--flex { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 20px; width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 0 clamp(16px, 5vw, 64px); align-items: stretch; }
@media (max-width: 980px) { .contact-cards--flex { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-cards--flex { grid-template-columns: 1fr; } }
.contact-cards--flex .location-card { flex-direction: column !important; align-items: flex-start !important; text-align: left !important; gap: 12px !important; padding: 26px !important; position: relative; height: 100%; }
.te-loc-del { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #ef4444; color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; z-index: 5; }
.te-loc-del:hover { background: #dc2626; }
