/* =========================================
   PHOTOVOLTAIK (photovoltaik.html)
   ========================================= */
:root {
  --bolt-gold: #f59e0b;
  --input-bg: #f1f5f9;
  --input-border: #cbd5e1;
  --padding-top-desktop: 140px;
  --padding-top-mobile: 100px;
}

body {
  font-family: inherit;
}

main {
  display: block;
}

.pv-wrapper {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: var(--padding-top-desktop) 20px 60px;
  box-sizing: border-box;
}

.pv-wrapper.pv-wrapper-padding {
  padding-top: 60px;
}

/* =========================================
   1. FEATURES (Hero: globale .page-hero-Komponente)
   ========================================= */
.tech-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 30px;
}

.tech-card {
  background: var(--white);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  border-bottom: 4px solid var(--blue-tech);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 176, 255, 0.15);
}

.tech-card h3 {
  margin-top: 0;
  color: var(--text-dark);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.tech-card p {
  font-size: 1.05rem;
  color: var(--text-grey);
  line-height: 1.6;
  margin-bottom: 0;
}

.icon-blue {
  color: var(--blue-tech);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* =========================================
   3. BATTERY SECTION
   ========================================= */
.battery-section {
  width: 100%;
  background: var(--white);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  position: relative;
}

.battery-content {
  flex: 1;
  min-width: 300px;
  z-index: 2;
}

.battery-content h2 {
  font-size: 2rem;
  color: var(--text-dark);
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.battery-content p {
  font-size: 1.1rem;
  color: var(--text-grey);
  line-height: 1.6;
  margin-bottom: 30px;
}

.battery-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.battery-list li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
}

.check-icon {
  background: rgba(0, 176, 255, 0.1);
  color: var(--blue-tech);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: bold;
}

.battery-visual {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px 0;
}

.battery-photo {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(0, 35, 57, 0.18));
}

/* =========================================
   4. SOLAR-FUNNEL
   ========================================= */
.funnel-widget {
  background: var(--white);
  width: 100%;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}

.widget-header {
  padding: 30px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.widget-header h2 {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.progress-container {
  background-color: #e2e8f0;
  height: 6px;
  width: 100%;
}

.progress-bar {
  background-color: var(--blue-tech);
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(0, 176, 255, 0.4);
}

.step-container {
  padding: 50px 40px;
  display: none;
  text-align: center;
  animation: fadeIn 0.4s;
}

.step-container.active {
  display: block;
}

.step-title {
  margin-top: 0;
  color: var(--text-dark);
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.step-title:focus-visible {
  outline: 2px solid var(--blue-tech);
  outline-offset: 4px;
}

p.subtitle {
  color: var(--text-grey);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.options-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.options-row.locked {
  pointer-events: none;
}

.option-card {
  background: var(--bg-color-solid);
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  padding: 20px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 150px;
  max-width: 200px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.option-card:hover,
.option-card:focus-visible {
  border-color: var(--blue-tech);
  background-color: var(--white);
  box-shadow: 0 10px 25px rgba(0, 176, 255, 0.15);
  transform: translateY(-5px);
}

.option-card.selected {
  border-color: var(--blue-tech) !important;
  background-color: var(--blue-tech) !important;
  color: var(--white) !important;
  transform: scale(0.98);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.option-card.selected * {
  color: var(--white) !important;
}

.option-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.option-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 3px;
  line-height: 1.2;
}

.option-sub {
  font-size: 0.8rem;
  color: var(--text-grey);
  opacity: 0.9;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  width: 100%;
  margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-dark);
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue-tech);
  background: var(--white);
}

.btn-submit {
  background-color: var(--blue-tech);
  color: var(--white);
  border: none;
  padding: 18px;
  font-size: 1.1rem;
  border-radius: 50px;
  cursor: pointer;
  width: 100%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  margin-top: 10px;
  box-shadow: 0 5px 15px rgba(0, 176, 255, 0.3);
}

.btn-submit:hover,
.btn-submit:focus-visible {
  background-color: #0284c7;
  transform: translateY(-2px);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-back {
  margin-top: 25px;
  background: none;
  border: none;
  color: var(--text-grey);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.9rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 768px) {
  .pv-wrapper {
    padding-top: var(--padding-top-mobile);
  }

  .pv-wrapper.pv-wrapper-padding {
    padding-top: 40px;
  }

  .tech-features {
    gap: 15px;
  }

  .tech-card {
    padding: 20px;
  }

  .tech-card h3 {
    font-size: 1.15rem;
    gap: 10px;
  }

  .tech-card p {
    font-size: 0.95rem;
  }

  .icon-blue {
    width: 28px;
    height: 28px;
  }

  .battery-section {
    padding: 30px 20px;
  }

  .battery-content h2 {
    font-size: 1.6rem;
  }


  .step-container {
    padding: 30px 15px;
  }

  .options-row {
    gap: 10px;
  }

  .option-card {
    flex: 1 1 40%;
    min-width: 130px;
    max-width: none;
    padding: 15px 5px;
  }

  .option-icon {
    font-size: 1.8rem;
  }

  .option-label {
    font-size: 0.9rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* =========================================
   2. TAGESVERLAUF-DIAGRAMM (eigenes SVG, keine externe Bibliothek)
   ========================================= */
.pv-chart-widget {
  background: var(--white);
  border: 1px solid #e3eaf1;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 30px 60px -36px rgba(0, 35, 57, 0.35);
}

.pv-chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-bottom: 20px;
}

.pv-chart-head h2 {
  margin: 0 0 6px 0;
  font-size: 1.5rem;
  color: var(--blue-dark);
}

.pv-chart-head p {
  margin: 0;
  color: #475569;
}

.pv-chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.9rem;
  color: #334155;
}

.legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1.5px solid #d3dee8;
  border-radius: 999px;
  background: var(--white);
  color: #1e293b;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.legend-btn:hover {
  border-color: var(--blue-dark);
}

.legend-btn[aria-pressed="false"] {
  opacity: 0.5;
  text-decoration: line-through;
  background: #f4f7fa;
}

.pv-chart-legend .leg {
  width: 28px;
  height: 8px;
  overflow: visible;
}
.pv-chart-canvas {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-chart-canvas svg {
  display: block;
  width: 100%;
  height: auto;
}

.pv-chart-canvas .grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.pv-chart-canvas .axis {
  font-size: 12px;
  fill: #475569;
}

/* Okabe-Ito-Farben + unterschiedliche Linienmuster: auch bei Farbenblindheit eindeutig */
.pv-chart-canvas polyline,
.pv-chart-legend line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.line-prod { stroke: #0072b2; stroke-width: 3 !important; }
.line-cons { stroke: #d55e00; stroke-dasharray: 7 5; }
.line-charge { stroke: #009e73; stroke-dasharray: 1.5 5; stroke-width: 3 !important; }
.line-discharge { stroke: #cc79a7; stroke-dasharray: 10 4 2 4; }

.pv-chart-canvas .area-prod { fill: rgba(0, 114, 178, 0.12); }

.pv-chart-canvas {
  position: relative;
  border-radius: 12px;
}

.pv-chart-canvas:focus-visible {
  outline: 3px solid var(--blue-text);
  outline-offset: 4px;
}

.pv-chart-canvas .hit {
  fill: transparent;
  cursor: crosshair;
}

.pv-chart-canvas .cursor {
  stroke: var(--blue-dark);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.pv-chart-canvas .cursor-dot {
  fill: var(--white);
  stroke-width: 2.5;
  stroke-dasharray: none;
}

.pv-tip {
  position: absolute;
  top: 6px;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--blue-dark);
  color: var(--white);
  font-size: 0.82rem;
  line-height: 1.3;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 35, 57, 0.3);
}

.pv-tip[hidden] {
  display: none;
}

.pv-tip-time {
  font-weight: 700;
  color: #9fdcff;
}

.pv-tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pv-tip-key {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

.pv-tip-key.line-prod { color: #56b4e9; }
.pv-tip-key.line-cons { color: #e69f00; }
.pv-tip-key.line-charge { color: #3fd0a5; }
.pv-tip-key.line-discharge { color: #e8a6cc; }
.pv-chart-status {
  color: #475569;
}

.pv-chart-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.pv-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f4f7fa;
  border-left: 4px solid #0072b2;
}

.pv-stat:nth-child(2) { border-left-color: #d55e00; }
.pv-stat:nth-child(3) { border-left-color: #009e73; }
.pv-stat:nth-child(4) { border-left-color: #cc79a7; }

.pv-stat-label {
  font-size: 0.85rem;
  color: #475569;
}

.pv-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue-dark);
}

@media (max-width: 768px) {
  .pv-chart-widget {
    padding: 22px 16px;
    border-radius: 18px;
  }
  .pv-chart-head h2 {
    font-size: 1.25rem;
  }
  .pv-chart-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}