:root {
  /* CSS validated via view_file. No changes needed. */
  /* Modern Vibrant Palette */
  --color-primary: #0066cc;
  --color-primary-dark: #004c99;
  --color-secondary: #00c3ff;
  --color-accent: #ff9900;

  --color-text: #1a1a1a;
  --color-text-light: #555555;
  --color-bg: #f5f7fa;
  --color-white: #ffffff;

  --color-border: #e6e8eb;
  --color-success: #10b981;
  --color-warning: #f59e0b;

  /* Shadows - deeper and softer for "floaty" tiles */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px 6px -2px rgba(0, 0, 0, 0.025);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* System Font Stack - Modern & GDPR Compliant */
  --font-base: system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif;

  --container-width: 1280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 44px;
  display: block;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--color-primary);
  background: rgba(0, 102, 204, 0.05);
}

.mobile-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-text);
}

/* Hero / Intro */
/* Hero / Intro */
/* Hero / Intro */
.hero {
  background: linear-gradient(rgba(0, 20, 50, 0.7), rgba(0, 20, 50, 0.7)), url('/assets/images/hero-bg.png');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: 100px 0;
  text-align: center;
  margin-bottom: 60px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 25px;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.01em;
  color: var(--color-white);
}

.hero p {
  font-size: 1.4rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 1;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
}

/* Main Content */
main {
  padding: 0 0 80px;
}

section {
  margin-bottom: 80px;
}

/* 2-Column Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.content-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--color-text-light);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

h1,
h2,
h3,
h4 {
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  /* Dynamic font size: Minimum 1.8rem, Preferred 4vw, Max 2.5rem */
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h2 {
  /* Dynamic font size: Minimum 1.0rem, Preferred 2.5vw, Max 1.6rem */
  font-size: clamp(1.0rem, 2.5vw, 1.6rem);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  display: block;
  padding-right: 0;
  border-color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Grid & Cards (Tiles) */
/* Grid & Cards (Tiles) */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* Force 3 columns to fill width */
  gap: 30px;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns on medium screens */
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
    /* 1 column on mobile */
  }
}

/* Tile Design */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 102, 204, 0.3);
}

/* Decorative top border for cards */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::before {
  opacity: 1;
}

.card h3,
.card h4 {
  color: var(--color-text);
  margin-top: 5px;
}


/* Buttons - Pills */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: 50px;
  /* Pill shape */
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid transparent;
  box-shadow: 0 4px 6px rgba(0, 102, 204, 0.2);
}

.btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 8px rgba(0, 102, 204, 0.3);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--color-warning);
  color: #fff;
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

.btn-secondary:hover {
  background: #d97706;
  box-shadow: 0 6px 8px rgba(245, 158, 11, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-primary);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background: rgba(0, 102, 204, 0.05);
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* Features List */
.feature-list {
  list-style: none;
}

.feature-list li {
  margin-bottom: 12px;
  padding-left: 30px;
  position: relative;
  font-weight: 500;
}

.feature-list li::before {
  content: "✓";
  color: var(--color-success);
  position: absolute;
  left: 0;
  font-weight: 900;
  background: rgba(16, 185, 129, 0.1);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 0.8em;
}

/* Fact Box */
.fact-box {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 25px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}

.fact-box h4 {
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Widget Placeholder */
.widget-placeholder {
  background: var(--color-white);
  border: 2px dashed var(--color-border);
  padding: 50px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: 40px 0;
}

.widget-placeholder h3 {
  margin-bottom: 15px;
}

/* Link List (City Tiles) */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  list-style: none;
  font-size: 15px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  /* Explicit 3 columns */
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    /* Stack on mobile */
  }
}


.link-list a {
  display: flex;
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-oeko {
  background-color: #10b981;
  /* Green */
  color: white;
}

.btn-oeko:hover {
  background-color: #059669;
}

.btn-gas {
  background-color: #f97316;
  /* Orange */
  color: white;
}

.btn-gas:hover {
  background-color: #ea580c;
}

.spacer-lg {
  height: 60px;
  /* Lehrzeile */
  display: block;
}

.link-list a:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-primary);
}

/* Footer */
footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-col h4 {
  color: var(--color-white);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: #94a3b8;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #334155;
  margin-top: 40px;
  font-size: 0.9rem;
}

/* Consent Modal */
.consent-modal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  /* other styles inherited from main.js control or previous css logic */
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 90%;
  max-width: 600px;
  padding: 24px;
  z-index: 2000;
  display: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.consent-modal.active {
  display: block;
  transform: translateX(-50%) translateY(0);
}

.consent-buttons .btn {
  padding: 10px 20px;
  font-size: 0.9em;
}

/* Media Queries */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .mobile-toggle {
    display: block;
  }

  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    gap: 15px;
    display: none;
    border-bottom: 1px solid var(--color-border);
  }

  nav ul.active {
    display: flex;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .link-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 600px) {
  h2 {
    font-size: 1.4rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Vertical Page Grid - Explicit Mobile Stack */
.content-grid {
  grid-template-columns: 2fr 1fr;
}

/* FIX: Ensure grid items can shrink below content size (essential for nowrap text) */
.content-grid>div,
.content-grid .content-text {
  min-width: 0;
  width: 100%;
  /* Ensure strict width adherence */
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column;
  }

  #state-selection {
    position: static !important;
    margin-top: 40px;
  }
}

/* CALC WIDGET */
/* CALC WIDGET FULL WIDTH */
.calc-widget {
  background: #fff;
  padding: 30px 40px;
  /* More passing */
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 40px;
  /* Positive margin = Below hero, No Overlap */
  position: relative;
  z-index: 10;
  border: 1px solid var(--color-border);
  width: 100%;
  /* Force full width */
  max-width: 100%;
  /* Ensure it fills container */
}

.calc-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 15px;
  align-items: end;
}

.calc-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--color-text-light);
}

.calc-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.calc-btn {
  background: var(--color-primary-dark);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}

/* STATE GRID CARDS */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.state-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s;
}

.state-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.state-icon {
  width: 32px;
  height: 32px;
  opacity: 0.6;
}

.state-name {
  font-weight: 600;
  color: var(--color-text);
}


/* Old .az-index removed, replaced by new structure */

/* AZ FILTER & GRID */
.az-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  justify-content: center;
}

.az-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}

.az-btn:hover,
.az-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.az-btn.disabled {
  opacity: 0.3;
  cursor: default;
  background: #f9fafb;
}

.az-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.az-card {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.az-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.az-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

.az-zip {
  background: #eff6ff;
  color: var(--color-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 600;
}

.az-gv {
  font-size: 0.9em;
  color: var(--color-text-light);
  margin-bottom: 15px;
}

@media (max-width: 900px) {
  .calc-form {
    grid-template-columns: 1fr;
  }
}