/* ============================
   Grundlayout & Typografie
   ============================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #123015;
  background: #f0ecdd;
  position: relative;
  min-height: 100vh;
}

/* Wasserzeichen im Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  margin: auto;
  width: 60vw;
  max-width: 900px;
  height: auto;
  aspect-ratio: 3 / 2;
  background: url("/assets/img/logo-invisible.png") center center no-repeat;
  background-size: contain;
  opacity: 0.07;
  pointer-events: none;
  z-index: -1;
}

/* Standard-Links */
a {
  color: #1f5c2a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Seitenbereiche */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ============================
   Header & Navigation
   ============================ */

.site-header {
  background: #f7f4e8;
  border-bottom: 1px solid #e3dfcf;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 120px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #123015;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}

.nav-list li {
  position: relative;
}

.nav-link {
  font-size: 0.98rem;
  font-weight: 600;
  color: #0f3014;
  text-decoration: none;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  margin: 0 auto;
  width: 0;
  height: 2px;
  background: #b4d63b;
  transition: width 0.15s ease;
}

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

/* ============================
   Buttons
   ============================ */

.btn,
button,
input[type="submit"] {
  font-family: inherit;
  border: none;
  border-radius: 4px;
  padding: 8px 18px;
  background: #7fb236;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  background: #6a9b2f;
}

/* Spezieller Call-to-Action */
.btn-primary {
  background: #b8d94f;
  color: #123015;
}

.btn-primary:hover {
  background: #a4c645;
}

/* ============================
   Überschriften & Text
   ============================ */

h1, h2, h3, h4 {
  margin: 0 0 10px;
  color: #123015;
}

h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.4rem;
  margin-top: 10px;
}

p {
  margin: 0 0 10px;
}

/* ============================
   Formulare
   ============================ */

label {
  display: block;
  font-weight: 600;
  margin: 10px 0 4px;
}

input[type="text"],
input[type="email"],
input[type="date"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 7px 8px;
  border-radius: 3px;
  border: 1px solid #d3cfbf;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fbfaf5;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  font-size: 0.85rem;
  color: #4f634b;
}

/* ============================
   Hero / Startseite
   ============================ */

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}

.hero-text {
  flex: 1.2;
}

.hero-title {
  font-size: 2.2rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.hero-cta {
  margin-top: 12px;
}

/* ============================
   Geräte-Übersicht (Liste)
   ============================ */

.device-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

.device-card {
  background: rgba(247, 244, 232, 0.9);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.device-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.device-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.device-image-wrapper {
  position: relative;
  overflow: hidden;
  background: #e5e1d2;
}

.device-image-wrapper img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
}

.price-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #c8e160;
  color: #113518;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.device-card-body {
  padding: 12px 14px 14px;
}

.device-card-body h2 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.device-card-body p {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.device-more {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #2f5d27;
}

/* ============================
   Geräte-Detailseite
   ============================ */

.device-detail-container {
  margin-top: 16px;
}

/* Zwei-Spalten-Layout: links Inhalt, rechts Kalender */
.device-detail-two-column {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 16px;
}

.device-detail-main {
  flex: 2;
}

.device-calendar-column {
  flex: 1.2;
  background: rgba(247, 244, 232, 0.95);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.device-detail-image {
  margin-bottom: 14px;
  position: relative;
}

.device-detail-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.device-price-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: #c8e160;
  color: #113518;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.device-price-badge small {
  display: block;
  font-size: 0.75rem;
}

/* ============================
   Kalender
   ============================ */

.calendar {
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 0.85rem;
  width: 100%;
}

.calendar th,
.calendar td {
  border: 1px solid #ddd;
  padding: 4px 6px;
  text-align: center;
  min-width: 26px;
  user-select: none; /* nicht markierbar / kein Textcursor */
}

.calendar th {
  background: #f0ecdd;
  font-weight: 600;
}

.calendar td.empty {
  background: #f8f5ea;
}

/* freie / belegte Tage */
.cal-day.day-free {
  background: #e8f7e2;          /* hellgrün */
}

.cal-day.day-booked {
  background: #f4a7a7;          /* rot */
  color: #ffffff;
}

.cal-day.clickable {
  cursor: pointer;
}

.cal-day.not-clickable {
  cursor: not-allowed;
}

/* Heute & frei: dunkelgrün */
.cal-day.today-free {
  background-color: #1f5c2a;
  color: #ffffff;
  font-weight: 700;
}

/* Heute & belegt: dunkelrot */
.cal-day.today-booked {
  background-color: #8b1b1b;
  color: #ffffff;
  font-weight: 700;
}

/* Kalender-Farben */
.calendar .cal-day.day-free {
    background-color: #e5f8e5; /* hellgrün = frei */
}

.calendar .cal-day.day-booked {
    background-color: #f8d0d0; /* hellrot = belegt */
    color: #800000;
}

/* Heute etwas hervorheben */
.calendar .cal-day.today-free {
    border: 2px solid #2f7f2f;
}

.calendar .cal-day.today-booked {
    border: 2px solid #af2020;
}

/* Ausgewählter Buchungszeitraum */
.calendar .cal-day.selected-range {
    outline: 3px solid #2f7f2f;      /* kräftiger grüner Rand */
    box-shadow: 0 0 0 2px #2f7f2f inset;
    background-color: #c4f0c4;       /* etwas kräftigeres Grün */
}


/* ausgewählter Zeitraum (Start-Ende) */
.cal-day.selected-range {
  border: 2px solid #2f5d27;
  box-sizing: border-box;
}

/* Legende */
.calendar-legend {
  margin-top: 6px;
  font-size: 0.8rem;
}

.calendar-legend .legend-box {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin: 0 4px 0 12px;
  vertical-align: middle;
}

.calendar-legend .legend-box.free {
  background: #e8f7e2;
  border: 1px solid #8fc98a;
}

.calendar-legend .legend-box.booked {
  background: #f4a7a7;
  border: 1px solid #c76868;
}

.calendar-legend .legend-box.today-free {
  background: #1f5c2a;
}

.calendar-legend .legend-box.today-booked {
  background: #8b1b1b;
}

/* ============================
   Referenzen (Galerie)
   ============================ */

.references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.reference-item {
  background: rgba(247, 244, 232, 0.95);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.reference-item img {
  max-width: 100%;
  border-radius: 6px;
  display: block;
  margin-bottom: 6px;
}

/* ============================
   Tabellen / Admin-Bereich
   ============================ */

details {
  margin-bottom: 12px;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 6px;
}

.booking {
  padding: 8px 10px;
  margin-bottom: 10px;
  background: #f7f4e8;
  border-radius: 6px;
  border: 1px solid #e2decf;
}

.booking p {
  margin: 2px 0;
}

/* ============================
   Footer
   ============================ */

.site-footer {
  margin-top: 40px;
  padding: 16px;
  font-size: 0.8rem;
  text-align: center;
  color: #5a664f;
}

/* =========================
   Kalender-Grunddesign
   ========================= */
.calendar {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 14px;
}

.calendar th,
.calendar td {
    width: 14.28%;
    text-align: center;
    padding: 4px;
    border: 1px solid #ccc;
}

.calendar th {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* leere Zellen vor Monatsanfang */
.calendar td.empty {
    background-color: transparent;
    border: none;
}

/* freie Tage: hellgrün */
.calendar .cal-day.day-free {
    background-color: #e5f8e5;
    cursor: pointer;
}

/* belegte Tage: hellrot */
.calendar .cal-day.day-booked {
    background-color: #f8d0d0;
    color: #800000;
    cursor: not-allowed;
}

/* heutiger Tag etwas hervorheben */
.calendar .cal-day.today-free {
    border: 2px solid #2f7f2f;
}

.calendar .cal-day.today-booked {
    border: 2px solid #af2020;
}

/* =========================
   Markierter Buchungszeitraum
   ========================= */
.calendar .cal-day.selected-range {
    outline: 3px solid #2f7f2f;
    box-shadow: 0 0 0 2px #2f7f2f inset;
    background-color: #c4f0c4 !important;
}

/* Start- und Endtag optional etwas fetter */
.calendar .cal-day.selected-start,
.calendar .cal-day.selected-end {
    font-weight: bold;
}
/* =========================================
   Kalender – Auswahlbereich hervorheben
   ========================================= */

/* Grundzustand freie Tage */
.cal-day.day-free {
    background-color: #f4faef; /* hellgrün wie vorher */
}

/* kompletter ausgewählter Zeitraum (Start–Ende) */
.cal-day.selected-range {
    background-color: #d8f2c9 !important;  /* deutliches Hellgrün */
    border: 2px solid #2f6f2f;
}

/* explizit Start- und Endtag im Zeitraum hervorheben */
.cal-day.selected-start,
.cal-day.selected-end {
    border: 3px solid #2f6f2f;
    font-weight: 700;
    background-color: #c6eab8 !important;
}
/* =========================================
   Kalender – Auswahlbereich Start–Ende
   ========================================= */

/* freie Tage, Standard */
.cal-day.day-free {
    background-color: #f4faef; /* hellgrün */
}

/* kompletter gewählter Zeitraum (inkl. Start+Ende) */
.cal-day.selected-range {
    background-color: #d7f2c2 !important;  /* etwas kräftigeres Hellgrün */
    border: 2px solid #2f6f2f;
}

/* Start- und Endtag extra betonen */
.cal-day.selected-start,
.cal-day.selected-end {
    border: 3px solid #2f6f2f;
    font-weight: 700;
    background-color: #c6eab8 !important;
}
/* =========================================
   Layout Geräte-Detail: Gerät oben, Kalender unten
   ========================================= */

.device-detail-two-column {
    display: flex;
    flex-direction: column;   /* alles untereinander */
    gap: 20px;
}

/* beide Bereiche volle Breite */
.device-detail-main,
.device-calendar-column {
    width: 100%;
}

/* etwas Abstand nach oben für den Kalenderblock */
.device-calendar-column {
    margin-top: 10px;
}
/* =========================================
   Geräte-Detail-Layout
   Desktop: links Bild, rechts Kalender+Formular
   Mobil: untereinander
   ========================================= */

.device-detail-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

/* linke Spalte: Bild */
.device-image-column {
    flex: 0 0 320px;
    max-width: 320px;
}

.device-detail-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* rechte Spalte: Kalender oben, Formular darunter */
.device-right-column {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.device-calendar-column {
    width: 100%;
}

.device-detail-info {
    width: 100%;
}

/* Mobil: alles untereinander, volle Breite */
@media (max-width: 768px) {
    .device-detail-layout {
        flex-direction: column;
    }

    .device-image-column,
    .device-right-column {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .device-image-column {
        order: 1;
    }

    .device-right-column {
        order: 2;
    }
}
/* =========================================
   Geräte-Detail: Bild auf gleiche Breite wie rechter Block
   ========================================= */

/* linke Spalte -> genauso breit wie rechte */
.device-image-column {
    flex: 1 1 50%;
    max-width: 100%;
}

/* Bild soll NICHT kleiner skaliert aussehen */
.device-detail-image {
    width: 100%;
}

.device-detail-image img {
    width: 100%;
    height: auto;
    object-fit: contain; /* kein Beschnitt */
}

/* rechte Spalte */
.device-right-column {
    flex: 1 1 50%;
    max-width: 100%;
}

/* Mobil: weiterhin untereinander */
@media (max-width: 768px) {
    .device-detail-layout {
        flex-direction: column;
    }

    .device-image-column,
    .device-right-column {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
/* =========================================
   Geräte-Detail Layout – final
   Desktop: Bild links, rechts Kalender+Formular
   Mobil: alles untereinander
   ========================================= */

/* Grundlayout: nebeneinander */
.device-detail-layout {
    display: flex;
    flex-direction: row;      /* WICHTIG: nebeneinander */
    align-items: flex-start;
    gap: 24px;
    flex-wrap: nowrap;
}

/* linke Spalte: Bild */
.device-image-column {
    flex: 1 1 50%;
    max-width: 50%;
}

/* rechte Spalte: Kalender + Formular */
.device-right-column {
    flex: 1 1 50%;
    max-width: 50%;
}

/* Bild sauber skaliert */
.device-detail-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Mobil: alles untereinander */
@media (max-width: 768px) {
    .device-detail-layout {
        flex-direction: column;   /* untereinander */
        flex-wrap: nowrap;
    }

    .device-image-column,
    .device-right-column {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
/* =========================================
   Geräte-Detail: 3-Spalten-Layout
   Desktop: Bild | Kalender | Formular
   Mobil: Bild -> Kalender -> Formular
   ========================================= */

.device-detail-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: nowrap;
}

/* Alle drei Spalten gleich breit */
.device-image-column,
.device-calendar-column,
.device-detail-info {
    flex: 1 1 33.33%;
    max-width: 33.33%;
}

/* Bild schön skalieren */
.device-detail-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Mobil: alles untereinander, in der Reihenfolge Bild -> Kalender -> Formular */
@media (max-width: 768px) {
    .device-detail-layout {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .device-image-column,
    .device-calendar-column,
    .device-detail-info {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
/* =========================================
   HEADER / NAVIGATION
   ========================================= */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 32px;
    background-color: #111;
    border-bottom: 1px solid #444;
}

/* Logo-Bereich links */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    height: 90px;         /* Logo größer machen */
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Navigation rechts */
.main-nav ul {
    display: flex;        /* >>> Menüpunkte nebeneinander <<< */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 18px;
}

.main-nav li {
    display: block;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* Mobile: Logo etwas kleiner, Menü umbrechen erlaubt */
@media (max-width: 900px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 16px;
    }

    .logo-container img {
        height: 70px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }
}
/* =========================================
   HEADER / NAVIGATION – NEU
   ========================================= */

/* Gesamter Kopfbereich wieder hell */
.site-header {
    background: #f7f4e8;           /* wie der restliche Seitenhintergrund */
    border-bottom: 1px solid #e3dfcf;
}

/* Inhalt des Headers (Logo + Navigation) */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo links – schön groß */
.logo img {
    height: 90px;                  /* HIER Logo-Größe anpassen */
    width: auto;
    display: block;
}

/* Navigation rechts nebeneinander */
.main-nav ul {
    display: flex;                 /* Menüpunkte in EINER Reihe */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 18px;
}

.main-nav li {
    display: block;
}

.main-nav a {
    color: #184220;                /* dunkles Grün, gut lesbar auf hell */
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.main-nav a:hover {
    background-color: rgba(24, 66, 32, 0.08);
}

/* Mobile: Header untereinander & Menü umbrechen erlaubt */
@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo img {
        height: 70px;              /* auf Handy etwas kleiner */
    }
}
1~/* =========================================
   HEADER / NAVIGATION – NEU
   ========================================= */

/* Gesamter Kopfbereich wieder hell */
.site-header {
    background: #f7f4e8;           /* wie der restliche Seitenhintergrund */
    border-bottom: 1px solid #e3dfcf;
}

/* Inhalt des Headers (Logo + Navigation) */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo links – schön groß */
.logo img {
    height: 90px;                  /* HIER Logo-Größe anpassen */
    width: auto;
    display: block;
}

/* Navigation rechts nebeneinander */
.main-nav ul {
    display: flex;                 /* Menüpunkte in EINER Reihe */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 18px;
}

.main-nav li {
    display: block;
}

.main-nav a {
    color: #184220;                /* dunkles Grün, gut lesbar auf hell */
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.main-nav a:hover {
    background-color: rgba(24, 66, 32, 0.08);
}

/* Mobile: Header untereinander & Menü umbrechen erlaubt */
@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo img {
        height: 70px;              /* auf Handy etwas kleiner */
    }
}
