/*
 * Global styles for the E‑Scooter Werkstatt Allgäu website.
 * The design is light and modern with turquoise accents and is
 * optimized for both desktop and mobile devices. The CSS is kept
 * locally to avoid any external requests and to ensure fast load
 * times and good Core Web Vitals. Images are lazy loaded and
 * containers are responsive using flexbox and grid. Small media
 * queries adjust the layout for smaller devices.
 */

/* Reset margins and paddings for consistency */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #ffffff;
}

/* Colour variables */
:root {
  --primary-color: #0bbf9b;
  --primary-dark: #089c7d;
  --light-grey: #f8f8f8;
  --dark-grey: #555;
}

header {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid #e0e0e0;
}

/* Navigation styling */
.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

.navbar .logo img {
  /* Increase the logo size by ~30% for better visibility */
  height: 78px;
  width: auto;
  /* No color filter for the logo – use original colours supplied in the PNG */
  /* Previously we applied a hue‑rotate filter to recolor a red placeholder logo. */
  /* Since the site now uses a professionally designed logo with its own colours */
  /* we remove all filters to display it unaltered. */
}

/* Hotline next to logo in navigation */
/*
 * Hotline component positioning. The hotline now includes a descriptive label above
 * the contact details and uses a column layout so that the label appears on its own line.
 */
.hotline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font-size: 0.9rem;
  color: var(--primary-color);
}
.hotline-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.hotline-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hotline-contact a.phone {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}
.hotline-contact a.phone:hover {
  text-decoration: underline;
}
.hotline-contact a.whatsapp img {
  /* Enlarge WhatsApp icon by 30% */
  width: 26px;
  height: 26px;
  vertical-align: middle;
}

/* Hide hotline on small screens to save space */
@media (max-width: 768px) {
  .hotline {
    display: none;
  }
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.navbar ul li a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar ul li a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Make the currently active navigation link distinct. */
.navbar ul li a.active {
  /* Underline the active link with the primary colour for clarity */
  border-bottom: 3px solid var(--primary-color);
  font-weight: 700;
  color: var(--primary-dark);
}

/* Prevent visited links from inheriting the default purple colour */
.navbar ul li a:visited {
  color: #333;
}

/* Öffnungszeiten-Tabelle: durch fehlende <strong>-Tags definieren wir die
 * gewünschte Fettschrift im CSS. Diese Regel sorgt dafür, dass sowohl
 * Kopf‑ als auch Datenzellen deutlicher hervorgehoben werden, ohne dass
 * wir den HTML‑Code unnötig aufblähen. */
.opening-hours th,
.opening-hours td {
  font-weight: 600;
}

/* Social sharing section */
.share {
  background-color: var(--light-grey);
  padding: 2rem 1rem;
  margin-top: 2rem;
  text-align: center;
}
.share h2 {
  margin-bottom: 0.5rem;
}
.share p {
  margin-bottom: 1rem;
}
.share-links a {
  margin: 0 0.5rem;
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: underline;
}
.share-links a img.social-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 0.3rem;
}
.share-links a:hover {
  color: var(--primary-color);
}

/* Remove the default focus outline on navigation links */
.navbar ul li a:focus {
  outline: none;
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  height: 3px;
  width: 25px;
  background-color: #333;
  margin-bottom: 4px;
  border-radius: 3px;
  transition: transform 0.3s ease;
}

/* Hero section */
.hero {
  position: relative;
  text-align: center;
  color: #fff;
}

.hero img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  filter: brightness(0.6);
}

.hero .content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
}

.hero h1 {
  font-size: 2.7rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  margin: 0.5rem;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--primary-dark);
}

/* Generic section styling */
section {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

section p {
  margin-bottom: 1rem;
  color: var(--dark-grey);
}

/* Service overview grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  /* Der Rahmen und Hintergrund für Service‑Karten. Der Anker befindet sich jetzt
     im Inneren der Karte, daher werden Block‑Layout, Farbvererbung und
     Textdekoration für den Link in einer separaten Regel gesetzt. */
  /* display: block; entfernt, weil .card jetzt ein div ist */
  /* text-decoration und color werden auf das Ankerelement angewendet */
}

/* Der Link innerhalb einer Service‑Karte soll wie ein Block behandelt werden und
   die Farben der übergeordneten Karte erben. Die Textdekoration wird entfernt,
   damit Überschriften nicht unterstrichen werden. */
.card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 200px;
  /* Use contain so that service icons are fully visible within their cards. When photos are used,
     they will still scale down proportionally without cropping. */
  object-fit: contain;
}

.card h3 {
  padding: 1rem;
  margin: 0;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.card p {
  padding: 0 1rem 1.5rem 1rem;
  color: var(--dark-grey);
  line-height: 1.5;
}

/*
 * Service detail pages use a simple gallery to display one or two relevant
 * images instead of a grid of repetitive icons. The flex layout adapts to
 * screen size and ensures images sit side by side on larger devices and stack
 * vertically on small screens.
 */
.service-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

/*
 * Style the opening hours tables used on the home page.  The table is
 * narrow, collapses borders for a clean look and uses subtle
 * backgrounds on header cells.  Padding makes the text readable, and
 * a max-width prevents it from stretching too wide on large screens.
 */
.opening-hours {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
  max-width: 400px;
}
.opening-hours th,
.opening-hours td {
  padding: 0.3rem 0.5rem;
  border: 1px solid #e0e0e0;
  vertical-align: top;
}
.opening-hours th {
  background-color: #f8f8f8;
  text-align: left;
}
.service-images img {
  flex: 1 1 calc(50% - 1rem);
  max-width: calc(50% - 1rem);
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .service-images img {
    flex-basis: 100%;
    max-width: 100%;
  }
}

/* Footer styling */
.footer {
  background-color: var(--light-grey);
  padding: 2rem 1rem;
  color: #666;
  text-align: center;
  font-size: 0.9rem;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer p {
  margin-bottom: 0.5rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 1rem;
  display: none;
  flex-direction: column;
  align-items: center;
  z-index: 9999;
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.cookie-banner .accept-essential {
  background-color: var(--primary-color);
  color: #fff;
}

.cookie-banner .accept-all {
  background-color: #ffffff;
  color: var(--primary-color);
}

.cookie-banner .accept-all:hover {
  background-color: #e0e0e0;
}

/* Responsive navigation */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: none;
  }
  .navbar ul.show {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
}

/*
 * Utility classes to control content visibility based on viewport size. These classes allow us
 * to show more detailed copy on desktop while providing succinct summaries on mobile devices.
 * By default, desktop content is visible and mobile content is hidden. On screens 768px wide
 * or smaller the behaviour is reversed. If additional elements require responsive display,
 * simply apply the relevant class in the markup.
 */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }
  /* Reduce font sizes and padding in the hero section on small screens to improve readability and layout. */
  .hero h1 {
    font-size: 2rem;
  }
  .hero h2, .hero h3 {
    font-size: 1.4rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .hero ul.hero-list li {
    font-size: 0.95rem;
  }
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  /* Stack the hero image above its text on small screens and remove absolute positioning
     to prevent overlapping content. */
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero img {
    height: 250px;
    object-fit: cover;
    filter: brightness(0.7);
  }
  .hero .content {
    position: static;
    transform: none;
    max-width: 100%;
    padding: 1rem;
    color: #333;
    background-color: #fff;
    text-align: left;
  }
  .hero .content h1,
  .hero .content h2,
  .hero .content h3 {
    color: var(--primary-dark);
  }
  .hero .content ul.hero-list li {
    color: #333;
  }
}