/*
Theme Name: Bavaria Automation
Theme URI: https://bavaria-automation.de
Author: Bavaria Automation GmbH
Description: Professionelles WordPress Theme für Bavaria Automation GmbH – Elektrotechnik, Netzwerk, BWA, Photovoltaik & Smart Home.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: bavaria-automation
Tags: business, industrial, electrical, professional, responsive
*/

/* =========================================
   TOKENS
   ========================================= */
:root {
  --iron:       #535E65;
  --iron-dark:  #3E4A52;
  --dark:       #1A1A1A;
  --darker:     #111111;
  --white:      #FFFFFF;
  --gray-bg:    #F5F6F8;
  --gray-light: #E2E8F0;
  --gray-text:  #4A5568;
  --accent:     #00B87A;
  --accent-dim: #008F5E;
  --border:     #2A2A2A;
  --font:       'Inter', 'Helvetica Neue', Arial, sans-serif;
  --radius:     6px;
  --trans:      0.25s ease;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1,h2,h3,h4 { line-height: 1.15; font-weight: 800; color: var(--dark); letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem,4.5vw,3.4rem); }
h2 { font-size: clamp(1.6rem,3vw,2.4rem); }
h3 { font-size: clamp(1.1rem,2vw,1.4rem); }
p  { color: var(--gray-text); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 88px 0; }
.section--gray { background: var(--gray-bg); }
.section--dark { background: var(--darker); }

.section-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--trans);
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--accent);
  color: var(--dark);
  box-shadow: 0 0 20px rgba(0,184,122,0.25);
}
.btn--primary:hover {
  background: #00D48E;
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0,184,122,0.4);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn--outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}
.btn--outline-dark {
  background: transparent;
  color: var(--dark);
  border-color: var(--iron);
}
.btn--outline-dark:hover {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}
.site-header.scrolled {
  background: rgba(17,17,17,0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 32px; width: auto; }
.logo-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.2;
}
.logo-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--trans);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--trans);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--accent) !important;
  color: var(--dark) !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 700 !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: #00D48E !important; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all var(--trans);
}

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 68px;
  background: var(--darker);
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.2;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(17,17,17,0.97) 45%, rgba(17,17,17,0.5) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 80px 24px;
  margin: 0 auto 0 auto;
  width: 100%;
}

/* =========================================
   SERVICE CARDS
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  overflow: hidden;
  transition: all var(--trans);
  position: relative;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--trans);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card-img {
  height: 180px;
  overflow: hidden;
}
.service-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.service-card:hover .service-card-img img { transform: scale(1.05); }
.service-card-body { padding: 24px; }
.service-card-icon {
  width: 44px; height: 44px;
  background: rgba(0,184,122,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.service-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.service-card p  { font-size: 0.85rem; margin-bottom: 16px; }
.service-link {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--trans);
}
.service-card:hover .service-link { gap: 8px; }

/* =========================================
   REFERENZEN GRID
   ========================================= */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
}
.ref-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--gray-light);
}
.ref-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.ref-item:hover img { transform: scale(1.06); }

/* =========================================
   CTA SECTION
   ========================================= */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, #0A1F10 100%);
  padding: 88px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,184,122,0.08) 0%, transparent 65%);
}
.cta-content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.cta-content h2 { color: var(--white); margin-bottom: 16px; }
.cta-content p  { color: rgba(255,255,255,0.6); font-size: 1.05rem; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-contact-info {
  display: flex; gap: 32px; justify-content: center;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.cta-contact-item {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.5); font-size: 0.88rem;
}
.cta-contact-item a { color: rgba(255,255,255,0.7); transition: color var(--trans); }
.cta-contact-item a:hover { color: var(--accent); }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: #0A0A0A;
  border-top: 1px solid var(--border);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.7;
  max-width: 240px;
  margin-top: 14px;
}
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  transition: color var(--trans);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,0.2); transition: color var(--trans); }
.footer-bottom a:hover { color: var(--accent); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width:1024px) {
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .ref-grid      { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:768px) {
  .section { padding: 60px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; }
  .ref-grid      { grid-template-columns: repeat(2,1fr); }
  .nav-links     { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top:0; left:0; right:0; bottom:0;
    background: var(--darker);
    justify-content: center; align-items: center; gap: 32px;
  }
  .nav-links.open a { font-size: 1.4rem; }
  .nav-toggle { display: flex; }
  .cta-contact-info { flex-direction: column; gap: 12px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.6; transform:scale(0.8); }
}
