/*
 * CUSTOM COPYRIGHT-FREE CSS FOR HEIZUNGSNOTDIENST BERLIN
 * This stylesheet is a custom design inspired by common layouts but written from scratch.
 */

@font-face {
  font-family: 'Open Sans';
  src: url('/fonts/open-sans-v44-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('/fonts/open-sans-v44-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- 1. CSS Variables & Global Styles --- */
:root {
  --primary-color: #1a3a5f;
  --secondary-color: #c83028;
  --accent-color: #2c5282;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --light-text: #f8f9fa;
  --font-heading: 'Open Sans', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body), system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: #fff;
  padding-top: 115px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  padding-top: 10px;
  padding-bottom: 10px;
}

h1 {
  font-size: 22px;
}

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

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 1rem;
  border-bottom: 2px dotted var(--secondary-color);
  display: inline-block;
  padding-bottom: 0.2rem;
  color: #2c5282;
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
  color: #434343;
  font-style: normal;
  font-weight: 400;
}

.mt-3 {
  padding-top: 10px;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1e1e1e;
  color: #ffffff;
  padding: 20px;
  display: none;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  font-family: var(--font-body), Arial, sans-serif;
}

.cookie-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.cookie-text {
  font-size: 14px;
  line-height: 1.5;
  flex: 1 1 600px;
}

.cookie-text a {
  color: #4da6ff;
  text-decoration: underline;
}

.cookie-actions {
  flex: 0 0 auto;
}

.cookie-actions button {
  background: #00488f;
  border: none;
  color: #ffffff;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
}

.cookie-actions button:hover {
  background: #2b8ae2;
}

@media (max-width: 1010px) {
  .telefon_bottom {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px;
    background-color: #c83028;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .telefon_link {
    color: #ffffff;
    font-size: 30px;
    font-weight: 700;
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-decoration-thickness: 3px;
  }

  .telefon_link:hover,
  .telefon_link:focus {
    color: #ffe6e6;
    outline: 2px solid #ffffff;
    outline-offset: 4px;
  }
}

/* --- 2. Header & Navigation --- */
.main-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--primary-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.emergency-bar {
  background-color: var(--secondary-color);
  color: var(--light-text);
  text-align: center;
  padding: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.emergency-bar a {
  color: var(--light-text);
  font-weight: 700;
}

.main-header {
  padding: 10px 0;
  background-color: white;
}

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

.main-logo {
  display: flex;
  align-items: center;
}

.main-logo img {
  max-height: 50px;
  margin-right: 15px;
}

.site-title {
  color: var(--light-text);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  display: none;
}

.main-nav {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
}

.main-nav ul li a {
  color: black;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 15px;
  transition: background-color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--light-text);
  background-color: var(--secondary-color);
  border-radius: 5px;
}

.header-cta {
  display: none;
}

.menu-toggle {
  background: none;
  border: none;
  color: black;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

/* Mobile Navigation Menu */
.mobile-nav {
  display: none;
  background-color: var(--primary-color);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

.mobile-nav.is-open {
  max-height: 400px;
  display: block;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
}

.mobile-nav ul li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav ul li a {
  color: var(--light-text);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  padding: 15px 20px;
  transition: background-color 0.3s ease;
}

.mobile-nav ul li a:hover {
  background-color: var(--secondary-color);
}

/* --- 3. Hero Section / Image Carousel --- */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background-size: cover;
  background-position: center;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--light-text);
  padding: 15px;
  border-radius: 5px;
  max-width: 80%;
}

/* Heizungsnotdienst-Section gezielt stylen */
#heizungsnotdienst-info {
  background-color: #f7f7f7;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

/* Überschrift */
#heizungsnotdienst-info h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.3;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #1a3a5f;
}

/* Fließtext */
#heizungsnotdienst-info p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Zwischenüberschriften im Text */
#heizungsnotdienst-info p strong {
  font-weight: 700;
  color: #1a3a5f;
}

#heizungsnotdienst-info p:last-of-type {
  margin-bottom: 0;
}

/* Mobile Optimierung */
@media (max-width: 600px) {
  .content-section {
    padding: 2.5rem 1rem;
  }

  #heizungsnotdienst-info h2 {
    font-size: 1.5rem;
  }

  #heizungsnotdienst-info p {
    font-size: 0.95rem;
  }
}

p {
  font-size: 1rem;
  color: #212529;
}

.main-footer p {
  font-size: 1rem;
  color: #ffffff;
}

.main-footer a {
  color: #ffffff;
}

.carousel-slide p {
  font-size: 1rem;
  color: #ffffff;
}

.carousel-caption h3 {
  color: #fff;
  font-size: 1.8rem;
  text-transform: uppercase;
}

/* --- 4. Content Sections --- */
.content-section {
  background-color: #fff;
}

.content-section.bg-light {
  background-color: var(--light-bg);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.service-card img {
  max-height: 80px;
  margin: 0 auto 15px auto;
}

.service-card h4 {
  font-size: 1.3rem;
}

.info-text-with-image {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  margin-top: 20px;
}

.info-text-with-image .text-content {
  flex: 1;
  min-width: 280px;
}

.info-text-with-image .image-content {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
}

.info-text-with-image img {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.custom-card {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 40px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.custom-card .card-header {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 15px 20px;
  font-size: 1.3rem;
  font-weight: 700;
}

.custom-card .card-body {
  padding: 20px;
}

/* --- 5. FAQ Section --- */
.faq-item {
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 15px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
}

.faq-question.active::after {
  content: '-';
}

.faq-answer {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
  padding: 20px;
  max-height: 500px;
}

/* --- 6. Footer --- */
.main-footer {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 40px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.footer-widget h5 {
  color: #e1e1e1;
  margin-bottom: 15px;
  font-size: 1.4rem;
  font-weight: 700;
}

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

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

.footer-widget a {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* --- 7. Utility Classes --- */
.text-center { 
  text-align: center; 
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--secondary-color);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  font-size: 1rem;
}

.btn:hover {
  background-color: #a02620;
  transform: translateY(-2px);
}

/* --- 8. Responsive Design --- */
@media (max-width: 992px) {
  .main-nav { display: none; }
  .header-cta { display: none; }
  .mobile-nav { display: block; }
}

@media (min-width: 992px) {
  body { padding-top: 120px; }
  .main-header { padding: 15px 0; }
  .main-nav { display: block; }
  .header-cta { display: block; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none; }
  .carousel-caption { max-width: 50%; }
}

.phone-link {
  font-weight: 700;
  color: #0b5ed7;
  text-decoration: underline;
}

.phone-link:hover,
.phone-link:focus {
  color: #084298;
  text-decoration-thickness: 3px;
  outline: none;
}

.footer-bottom a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.footer-bottom a:hover {
  text-decoration-thickness: 3px;
}

.footer-bottom a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}