/* ============================================
   KS Energy IT – Corporate Website Stylesheet
   Farbschema: Dunkelblau / Grau (klassisch IT)
   ============================================ */

:root {
  --primary: #0f2b4c;
  --primary-light: #1a3d6e;
  --primary-dark: #091b32;
  --accent: #2d7dd2;
  --accent-light: #4a9ae6;
  --accent-hover: #1f6bbf;
  --gray-50: #f8f9fb;
  --gray-100: #eef1f5;
  --gray-200: #dce1e8;
  --gray-300: #b8c1cf;
  --gray-400: #8e99a9;
  --gray-500: #64707f;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --white: #ffffff;
  --text: #2d3748;
  --text-light: #64707f;
  --text-on-dark: #eef1f5;
  --shadow-sm: 0 1px 3px rgba(15, 43, 76, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 43, 76, 0.1);
  --shadow-lg: 0 8px 30px rgba(15, 43, 76, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  --max-width: 1140px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

/* ---- Typography ---- */
h1, h2, h3, h4 {
  color: var(--primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.85rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

/* ---- Header / Navigation ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  padding: 100px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero h1 {
  color: var(--white);
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.hero p {
  color: var(--text-on-dark);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.8;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(45, 125, 210, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Sections ---- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---- Service Cards ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ---- Benefits / Why Us ---- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.benefit-item {
  text-align: center;
  padding: 32px 20px;
}

.benefit-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.benefit-item h3 {
  margin-bottom: 10px;
}

.benefit-item p {
  color: var(--text-light);
  font-size: 0.93rem;
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 64px 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.cta-banner p {
  color: var(--text-on-dark);
  opacity: 0.85;
  margin-bottom: 28px;
  font-size: 1.05rem;
}

/* ---- Page Header (Subpages) ---- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 60px 0 50px;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-on-dark);
  opacity: 0.8;
  font-size: 1.05rem;
}

/* ---- Service Detail (Leistungen page) ---- */
.service-detail {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-200);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail .service-icon {
  flex-shrink: 0;
  margin-bottom: 0;
}

.service-detail h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.service-detail p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.service-detail ul {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.service-detail ul li {
  padding: 4px 0;
  padding-left: 22px;
  position: relative;
  color: var(--text-light);
  font-size: 0.93rem;
}

.service-detail ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- About Page ---- */
.about-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.85;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.value-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.value-card:hover {
  box-shadow: var(--shadow-md);
}

.value-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Partners */
.partners-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.partner-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-400);
  font-size: 0.9rem;
  font-weight: 600;
}

.partner-badge svg {
  width: 32px;
  height: 32px;
  stroke: var(--gray-300);
  fill: none;
  stroke-width: 1.5;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info-card {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info-item strong {
  display: block;
  color: var(--primary);
  margin-bottom: 3px;
  font-size: 0.9rem;
}

.contact-info-item span {
  color: var(--text-light);
  font-size: 0.93rem;
}

/* Form */
.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 20px;
  transition: border-color var(--transition);
  background: var(--white);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.1);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- Legal Pages (Impressum, Datenschutz) ---- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.legal-content h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.legal-content p, .legal-content li {
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.8;
}

.legal-content a {
  word-break: break-all;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--primary-dark);
  color: var(--text-on-dark);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p {
  color: var(--gray-400);
  font-size: 0.9rem;
  margin-top: 12px;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--gray-200);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

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

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

.footer-col ul a {
  color: var(--gray-400);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  color: var(--gray-500);
  font-size: 0.82rem;
  margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .services-grid,
  .benefits-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .hero { padding: 70px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .section { padding: 56px 0; }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .services-grid,
  .benefits-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .service-detail {
    flex-direction: column;
    gap: 20px;
  }

  .partners-bar {
    gap: 28px;
  }
}
