/* =============================================
   Montage & Dachtechnik Braun – Stylesheet
   Farben: #2a5a2a (Grün), #FF4D00 (Orange)
   Font: Barlow
   ============================================= */

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

:root {
  --green:       #2a5a2a;
  --green-dark:  #1e4020;
  --green-light: #3a7a3a;
  --orange:      #FF4D00;
  --orange-dark: #cc3d00;
  --text:        #1a1a1a;
  --text-muted:  #555;
  --bg:          #ffffff;
  --bg-gray:     #f5f5f5;
  --border:      #e0e0e0;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.15);
  --transition:  .22s ease;
  --container:   1160px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange); }
ul { list-style: none; }

/* --- Container --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.btn-accent {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-accent:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline:hover { background: #fff; color: var(--green); }

.btn-sm { padding: .5rem 1.25rem; font-size: .9rem; }

/* --- Sections --- */
.section { padding: 5rem 0; }
.section-gray { background: var(--bg-gray); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.2rem; font-weight: 800; color: var(--green); margin-bottom: .75rem; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .5rem;
}

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

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

.logo img { height: 64px; width: auto; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  padding: .25rem 0;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width var(--transition);
}
.main-nav a:hover::after,
.main-nav li.active > a::after { width: 100%; }
.main-nav li.active > a { color: var(--green); }
.main-nav .btn::after { display: none; }
.nav-kontakt {
  color: var(--orange) !important;
  font-weight: 700;
}
.nav-kontakt:hover {
  color: var(--orange-dark) !important;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/hero-bg.jpg') center/cover no-repeat;
  opacity: .18;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  color: #fff;
  padding: 4rem 0;
  margin: 0 auto;
  text-align: center;
}
.hero-btns { justify-content: center; }
.hero-eyebrow {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.hero h1 span { color: var(--orange); }
.hero p {
  font-size: 1.15rem;
  opacity: .9;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  max-width: 520px;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* =============================================
   LEISTUNGEN KARTEN (Home)
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--green);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.service-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .6rem; color: var(--green); }
.service-card p { color: var(--text-muted); font-size: .95rem; }

/* =============================================
   WHY US / USPs
   ============================================= */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}
.usp-item .usp-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}
.usp-item p { color: var(--text-muted); margin-top: .4rem; font-weight: 600; }

/* =============================================
   CTA BANNER
   ============================================= */
.cta-banner {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
}
.cta-banner h2 { font-size: 2rem; font-weight: 800; margin-bottom: .75rem; }
.cta-banner p { opacity: .9; margin-bottom: 1.75rem; font-size: 1.05rem; }

/* =============================================
   REFERENZEN GRID
   ============================================= */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.ref-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  transition: transform var(--transition), box-shadow var(--transition);
}
.ref-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ref-card-img {
  width: 100%; height: 210px;
  object-fit: cover;
  background: var(--bg-gray);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .9rem;
}
.ref-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ref-card-body { padding: 1.5rem; }
.ref-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .7rem;
  border-radius: 20px;
  background: var(--green);
  color: #fff;
  margin-bottom: .75rem;
}
.ref-card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.ref-card-body p { font-size: .9rem; color: var(--text-muted); }
.ref-date { font-size: .8rem; color: var(--text-muted); margin-top: .75rem; }

/* =============================================
   KONTAKTFORMULAR
   ============================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h2 { font-size: 2rem; font-weight: 800; color: var(--green); margin-bottom: 1rem; }
.contact-info p { color: var(--text-muted); margin-bottom: 1.5rem; }
.contact-detail {
  display: flex; align-items: flex-start; gap: .75rem;
  margin-bottom: 1rem; font-size: .95rem;
}
.contact-detail .icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }

.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #fafafa;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(42,90,42,.12);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-weight: 600;
  font-size: .95rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.alert-error   { background: #fdecea; color: #c62828; border-left: 4px solid #c62828; }

/* =============================================
   ÜBER UNS
   ============================================= */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-img img { width: 100%; height: 420px; object-fit: cover; }
.about-img-placeholder {
  width: 100%; height: 420px;
  background: var(--bg-gray);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1rem;
}
.about-text h2 { font-size: 2rem; font-weight: 800; color: var(--green); margin-bottom: 1rem; }
.about-text p  { color: var(--text-muted); margin-bottom: 1rem; }

.check-list { margin: 1.5rem 0; }
.check-list li {
  padding: .4rem 0 .4rem 1.75rem;
  position: relative;
  color: var(--text);
  font-weight: 500;
}
.check-list li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--green);
  font-weight: 800;
}

/* Leistungen Abschnitt */
.leistungen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.leistung-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--orange);
}
.leistung-item h3 { font-size: 1.15rem; font-weight: 700; color: var(--green); margin-bottom: .6rem; }
.leistung-item p  { color: var(--text-muted); font-size: .95rem; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.85);
}
.footer-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0;
  flex-wrap: wrap;
}
.footer-inline-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}
.footer-inline-brand .footer-logo { height: 40px; flex-shrink: 0; filter: brightness(0) invert(1); }
.footer-inline-brand span { font-size: .82rem; opacity: .7; }
.footer-inline-nav {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}
.footer-inline-nav a { color: rgba(255,255,255,.75); font-size: .88rem; }
.footer-inline-nav a:hover { color: var(--orange); }
.footer-inline-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
  flex-shrink: 0;
}
.footer-inline-contact a { color: rgba(255,255,255,.8); font-size: .88rem; }
.footer-inline-contact a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: .9rem 0;
  font-size: .82rem;
  text-align: center;
  color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--orange); }

/* =============================================
   ADMIN BEREICH
   ============================================= */
.admin-body {
  background: #f0f2f5;
  min-height: 100vh;
  font-family: 'Barlow', sans-serif;
}
.admin-topbar {
  background: var(--green-dark);
  color: #fff;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.admin-topbar .brand { font-weight: 800; font-size: 1.1rem; color: #fff; }
.admin-topbar .brand span { color: var(--orange); }
.admin-topbar-right { display: flex; align-items: center; gap: 1.25rem; font-size: .9rem; }
.admin-topbar-right a { color: rgba(255,255,255,.8); }
.admin-topbar-right a:hover { color: var(--orange); }

.admin-layout { display: flex; min-height: calc(100vh - 60px); }

.admin-sidebar {
  width: 220px;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0,0,0,.06);
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.admin-sidebar nav a {
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1.5rem;
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: rgba(42,90,42,.07);
  color: var(--green);
  border-left-color: var(--green);
}
.admin-sidebar nav a .nav-icon { font-size: 1.1rem; }

.admin-main {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
}
.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 1.75rem;
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .stat-num { font-size: 2.5rem; font-weight: 800; color: var(--green); }
.stat-card .stat-label { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; font-weight: 600; }
.stat-card.orange .stat-num { color: var(--orange); }

/* Admin table */
.admin-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--green);
  color: #fff;
  padding: .85rem 1rem;
  text-align: left;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.admin-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(42,90,42,.04); }

.badge-unread {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 20px;
}
.badge-read {
  display: inline-block;
  background: #e0e0e0;
  color: #666;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 20px;
}

/* Admin form card */
.admin-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.admin-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--green); margin-bottom: 1.25rem; border-bottom: 2px solid var(--bg-gray); padding-bottom: .75rem; }

/* Login page */
.login-body {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo img { height: 56px; margin: 0 auto; }
.login-title { font-size: 1.4rem; font-weight: 800; color: var(--green); text-align: center; margin-bottom: 1.75rem; }

/* Action buttons */
.btn-danger { background: #e53935; color: #fff; border-color: #e53935; }
.btn-danger:hover { background: #c62828; border-color: #c62828; color: #fff; }
.btn-icon { padding: .4rem .75rem; font-size: .85rem; }
.action-btns { display: flex; gap: .5rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .about-layout,
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-inline { flex-wrap: wrap; gap: 1rem; }
  .footer-inline-contact { align-items: flex-start; }
  .about-img { order: -1; }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .section-header h2 { font-size: 1.8rem; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,.1);
    padding: 1rem 1.25rem 1.5rem;
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul li { border-bottom: 1px solid var(--bg-gray); }
  .main-nav ul li:last-child { border-bottom: none; padding-top: .75rem; }
  .main-nav a { display: block; padding: .75rem 0; }
  .main-nav .btn { display: inline-block; margin-top: .5rem; }

  .hero { min-height: 75vh; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { text-align: center; }

  .footer-inline { flex-direction: column; align-items: flex-start; }
  .footer-inline-contact { align-items: flex-start; }
  .footer-inline-nav { flex-wrap: wrap; gap: 1rem; }

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

  /* Admin responsive */
  .admin-sidebar { display: none; }
  .admin-main { padding: 1rem; }
}

@media (max-width: 480px) {
  .usp-grid { grid-template-columns: 1fr 1fr; }
  .login-card { margin: 1rem; }
}
