/*
 * grid.css – Bootstrap 3 Replacement für comedy-kellner.de
 * Ersetzt: bootstrap.min.css (CDN)
 * Enthält: Container, Grid (col-xs/sm/md/lg), Navbar-Struktur,
 *          Carousel, Buttons, Dropdowns, Responsive-Utilities,
 *          Lightbox-CSS, diverse Bootstrap-Hilfsklassen
 * Kein Framework – reines CSS.
 */

/* ── Reset / Basis ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img  { max-width: 100%; height: auto; vertical-align: middle; }
a    { background-color: transparent; }

/* ── Container ─────────────────────────────────────────── */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left:  15px;
}
@media (min-width: 768px)  { .container { max-width: 750px;  } }
@media (min-width: 992px)  { .container { max-width: 970px;  } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }

.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left:  15px;
  margin-right: auto;
  margin-left:  auto;
}

/* ── Grid ──────────────────────────────────────────────── */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left:  -15px;
}

/* Alle col-* Spalten teilen die Basis-Stile */
[class*="col-"] {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left:  15px;
  min-height: 1px;
}

/* xs (< 768px) – immer 100% außer col-xs-* */
.col-xs-1  { flex: 0 0  8.3333%; max-width:  8.3333%; }
.col-xs-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-xs-3  { flex: 0 0 25%;      max-width: 25%;      }
.col-xs-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-xs-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-xs-6  { flex: 0 0 50%;      max-width: 50%;      }
.col-xs-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-xs-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-xs-9  { flex: 0 0 75%;      max-width: 75%;      }
.col-xs-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-xs-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-xs-12 { flex: 0 0 100%;     max-width: 100%;     }

/* sm (≥ 768px) */
@media (min-width: 768px) {
  .col-sm-1  { flex: 0 0  8.3333%; max-width:  8.3333%; }
  .col-sm-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-sm-3  { flex: 0 0 25%;      max-width: 25%;      }
  .col-sm-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-sm-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-sm-6  { flex: 0 0 50%;      max-width: 50%;      }
  .col-sm-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-sm-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-sm-9  { flex: 0 0 75%;      max-width: 75%;      }
  .col-sm-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-sm-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-sm-12 { flex: 0 0 100%;     max-width: 100%;     }
}

/* md (≥ 992px) */
@media (min-width: 992px) {
  .col-md-1  { flex: 0 0  8.3333%; max-width:  8.3333%; }
  .col-md-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-md-3  { flex: 0 0 25%;      max-width: 25%;      }
  .col-md-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-md-6  { flex: 0 0 50%;      max-width: 50%;      }
  .col-md-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-md-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-md-9  { flex: 0 0 75%;      max-width: 75%;      }
  .col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-md-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-md-12 { flex: 0 0 100%;     max-width: 100%;     }
}

/* lg (≥ 1200px) */
@media (min-width: 1200px) {
  .col-lg-1  { flex: 0 0  8.3333%; max-width:  8.3333%; }
  .col-lg-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-lg-3  { flex: 0 0 25%;      max-width: 25%;      }
  .col-lg-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-lg-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-lg-6  { flex: 0 0 50%;      max-width: 50%;      }
  .col-lg-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-lg-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-lg-9  { flex: 0 0 75%;      max-width: 75%;      }
  .col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-lg-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-lg-12 { flex: 0 0 100%;     max-width: 100%;     }
}

/* ── Responsive Utilities ──────────────────────────────── */
/* hidden-xs: auf kleinen Bildschirmen (<768px) versteckt */
@media (max-width: 767px) {
  .hidden-xs { display: none !important; }
}
/* hidden-sm: auf sm (768–991px) versteckt */
@media (min-width: 768px) and (max-width: 991px) {
  .hidden-sm { display: none !important; }
}
/* hidden-md: auf md (992–1199px) versteckt */
@media (min-width: 992px) and (max-width: 1199px) {
  .hidden-md { display: none !important; }
}
/* hidden-lg: auf lg (≥1200px) versteckt */
@media (min-width: 1200px) {
  .hidden-lg { display: none !important; }
}
/* visible-xs: nur auf xs sichtbar */
.visible-xs { display: none !important; }
@media (max-width: 767px) {
  .visible-xs { display: block !important; }
}

/* ── City / Footer fixes ───────────────────────────────── */
/* Verhindert margin-Kollaps des <p> aus #city heraus (wuerde weissen Spalt erzeugen) */
#city { overflow: hidden; }
footer#main-footer { margin: 0; }

/* ── Clearfix / Pull ───────────────────────────────────── */
.clearfix::after { content: ""; display: table; clear: both; }
.pull-right { float: right !important; }
.pull-left  { float: left  !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right;  }
.text-left   { text-align: left;   }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.center-block { display: block; margin: auto; }

/* ── Navbar (Struktur – Farben kommen aus styles.css) ──── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  min-height: 50px;
  background-color: #333; /* expliziter Fallback – styles.css setzt ebenfalls #333 */
}
.navbar-fixed-top { position: fixed; top: 0; left: 0; right: 0; }
.navbar .container { display: flex; align-items: stretch; flex-wrap: wrap; min-height: 50px; }

/* navbar-header:
   – KEIN position:relative  → .navbar-brand (position:absolute) richtet sich am
     .container aus (hat position:relative aus styles.css) → Logo bleibt sichtbar
   – KEIN overflow:hidden    → würde das absolut positionierte Logo abschneiden
   – Clearfix via ::after    → enthält den float:right Toggle korrekt */
.navbar-header {
  width: 100%;
  min-height: 50px;
}
.navbar-header::after {
  content: '';
  display: table;
  clear: both;
}
@media (min-width: 768px) {
  .navbar-header { width: auto; }
  .navbar .container { flex-wrap: nowrap; padding-right: 155px; /* WFR-Trigger reservieren */ }
}

/* Logo-Größe und Position (absolute, width 75px) kommen von styles.css
   via .navbar.top-nav-collapse .navbar-brand – hier nur Basis-Flex für das Bild */
.navbar-brand {
  display: flex;
  align-items: center;
  padding: 5px 15px;
  height: 50px;
}
.navbar-brand img { max-width: 100%; height: auto; display: block; }

/* Toggle: float:right schiebt ihn zuverlässig an den rechten Rand –
   unabhängig davon, ob .navbar-brand im Flow ist oder nicht */
.navbar-toggle {
  float: right;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  margin-top: 8px;
  margin-bottom: 8px;
  margin-right: 15px;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
@media (min-width: 768px) { .navbar-toggle { display: none; } }

/* Mobile: aufgeklapptes Menü bekommt dunklen Hintergrund –
   ohne das erscheinen die Links weiß über dem Carousel-Bild */
@media (max-width: 767px) {
  .navbar-collapse.in {
    background-color: #333;
    padding-bottom: 10px;
  }
}

/* Collapsible nav */
.navbar-collapse {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  width: 100%;
}
.navbar-collapse.in {
  max-height: 1000px;
}
@media (min-width: 768px) {
  .navbar-collapse {
    display: flex !important;
    max-height: none;
    overflow: visible;
    width: auto;
    flex: 1;
    align-items: center;
  }
}

.navbar-nav {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}
@media (min-width: 768px) {
  .navbar-nav {
    flex-direction: row;
    width: auto;
    align-items: center;
    margin-top: 0;
  }
  .navbar-left  { margin-right: auto; }
  .navbar-right { margin-left:  auto; }
}
.navbar-nav > li { position: relative; }
.navbar-nav > li > a {
  display: block;
  padding: 10px 15px;
  line-height: 20px;
  text-decoration: none;
}

/* ── Dropdown ──────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  z-index: 1000;
  min-width: 160px;
  padding: 5px 0;
  margin: 9px 0 0;
  list-style: none;
  border-radius: 4px;
  background-color: #333 !important;
  border: 1px solid #ff8401 !important;
  border-top: none !important;
}
.dropdown-menu.open { display: block; }
.dropdown-menu > li > a { color: #fff !important; }
.dropdown-menu > li > a {
  display: block;
  padding: 6px 20px;
  text-decoration: none;
  white-space: nowrap;
}
.dropdown-menu .divider {
  height: 1px;
  margin: 9px 0;
  overflow: hidden;
}
@media (max-width: 767px) {
  .dropdown-menu {
    position: static;
    float: none;
    width: auto;
    box-shadow: none;
  }
}
.caret {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left:  4px solid transparent;
}

/* ── Buttons (Basis – Farben aus styles.css) ───────────── */
.btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.428;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  user-select: none;
  background-image: none;
}
.btn:focus, .btn:active { outline: 0; }
.btn-lg { padding: 10px 16px; font-size: 18px; border-radius: 6px; }
.btn-md { padding: 8px 14px;  font-size: 16px; }
.btn-sm { padding: 5px 10px;  font-size: 12px; }
.btn-block { display: block; width: 100%; }
.btn-group { display: inline-flex; }
/* Button variants */
.btn-default { color: #333; background-color: #fff; border-color: #ccc; }
.btn-default:hover { color: #333; background-color: #e6e6e6; border-color: #adadad; }
.btn-primary { color: #fff; background-color: #337ab7; border-color: #2e6da4; }
.btn-primary:hover { color: #fff; background-color: #286090; border-color: #204d74; }
.btn-success { color: #fff; background-color: #5cb85c; border-color: #4cae4c; }
.btn-success:hover { color: #fff; background-color: #449d44; border-color: #398439; }
.btn-warning { color: #fff; background-color: #f0ad4e; border-color: #eea236; }
.btn-warning:hover { color: #fff; background-color: #ec971f; border-color: #d58512; }
.btn-danger  { color: #fff; background-color: #d9534f; border-color: #d43f3a; }
.btn-danger:hover  { color: #fff; background-color: #c9302c; border-color: #ac2925; }
.btn-link { color: #337ab7; background: none; border-color: transparent; text-decoration: underline; }

/* ── Carousel ──────────────────────────────────────────── */
.carousel {
  position: relative;
  overflow: hidden;
}
.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.carousel-inner .item {
  display: none;
  position: relative;
  transition: opacity 0.6s ease;
}
.carousel-inner .item.active {
  display: block;
}
/* Fade-Transition */
.carousel-inner .item.fade-out {
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.carousel-inner .item.fade-in {
  display: block;
  opacity: 1;
}
.carousel-inner img {
  display: block;
  width: 100%;
  height: auto;
}

/* Prev / Next Controls */
.carousel-control {
  position: absolute;
  top: 0; bottom: 0;
  width: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.carousel-control:hover { opacity: 0.9; }
.carousel-control.left  { left: 0; }
.carousel-control.right { right: 0; }
.carousel-control .fa {
  font-size: 30px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* Glyphicon → Font Awesome Fallback
   (HTML enthält noch glyphicon-Klassen; fa-Klasse wird per JS gesetzt) */
.glyphicon { font-size: 30px; color: #fff; }
.glyphicon-chevron-left::before  { content: '\2039'; font-size: 40px; }
.glyphicon-chevron-right::before { content: '\203A'; font-size: 40px; }

/* Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 15;
  margin: 0;
  padding: 0;
  list-style: none;
}
.carousel-indicators li {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 1px solid #fff;
  cursor: pointer;
  text-indent: -9999px;
}
.carousel-indicators li.active {
  background: #fff;
}

/* Caption */
.carousel-caption {
  position: absolute;
  right: 15%; bottom: 20px; left: 15%;
  z-index: 10;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* ── Progress / Misc Bootstrap bits ───────────────────── */
.img-responsive { display: block; max-width: 100%; height: auto; }
.img-rounded    { border-radius: 6px; }
.img-circle     { border-radius: 50%; }
.img-thumbnail  {
  padding: 4px; border: 1px solid #ddd;
  border-radius: 4px; display: inline-block; max-width: 100%;
}
.thumbnail {
  display: block; padding: 4px; border: 1px solid #ddd;
  border-radius: 4px; margin-bottom: 20px;
}
.thumbnail > img { display: block; max-width: 100%; }

/* ── Embed (Video) ─────────────────────────────────────── */
.embed-responsive {
  position: relative;
  display: block;
  height: 0;
  padding: 0;
  overflow: hidden;
}
.embed-responsive-16by9 { padding-bottom: 56.25%; }
.embed-responsive-4by3  { padding-bottom: 75%; }
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ── Page-Scroll (Link-Wrapper) ────────────────────────── */
.page-scroll a { cursor: pointer; }

/* ── Label / Badge ─────────────────────────────────────── */
.label {
  display: inline; padding: .2em .6em .3em;
  font-size: 75%; font-weight: 700;
  line-height: 1; color: #fff;
  text-align: center; white-space: nowrap;
  border-radius: .25em;
}

/* ── Tabs (nav-tabs / tab-content / tab-pane) ──────────── */
/* Ohne diese CSS zeigen alle Panels gleichzeitig an –
   hier wird Bootstrap 3 Tab-Verhalten komplett nachgebaut */

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 0 0;
  padding: 0;
  border-bottom: 2px solid #ff8401;
}
.nav-tabs > li {
  margin-bottom: -2px;
}
.nav-tabs > li > a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  background: #2a2a2a;
  border: 1px solid #444;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-right: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  opacity: 1 !important;
  line-height: 1.4;
}
.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
  color: #fff;
  background: #3d3d3d;
  opacity: 1 !important;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: #fff;
  background: #ff8401;
  border-color: #ff8401 #ff8401 transparent;
  opacity: 1 !important;
  cursor: default;
}

.tab-content {
  border: 1px solid #e0e0e0;
  border-top: none;
  padding: 28px 20px 20px;
  background: #fff;
}
/* Alle Panels standardmäßig versteckt */
.tab-pane { display: none; }
/* Aktives Panel sichtbar */
.tab-pane.active { display: block; }

/* Text-Lesbarkeit im Tab-Inhalt */
.tab-content h3,
.tab-content h4,
.tab-content h5 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
}
.tab-content p {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
  margin-bottom: 20px;
  max-width: 820px;
}

/* Mobile: Tabs untereinander stapeln */
@media (max-width: 767px) {
  .nav-tabs > li { width: 100%; margin-right: 0; margin-bottom: 2px; }
  .nav-tabs > li > a { border-radius: 4px; border: 1px solid #444; }
  .nav-tabs > li.active > a { border-color: #ff8401; }
}

/* ── Lightbox (ersetzt jquery.fancybox.css) ────────────── */
#ck-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#ck-lightbox-overlay.active { display: flex; }

#ck-lightbox-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#ck-lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border: 4px solid #fff;
}
#ck-lightbox-title {
  color: #ccc;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}
#ck-lightbox-close {
  position: absolute;
  top: -36px; right: 0;
  background: none; border: none;
  color: #fff; font-size: 28px;
  cursor: pointer; line-height: 1;
  padding: 4px 8px;
  opacity: 0.8;
}
#ck-lightbox-close:hover { opacity: 1; }
#ck-lightbox-prev,
#ck-lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none; color: #fff;
  font-size: 26px; cursor: pointer;
  padding: 10px 14px;
  border-radius: 3px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
#ck-lightbox-prev:hover,
#ck-lightbox-next:hover { opacity: 1; }
#ck-lightbox-prev { left: -54px; }
#ck-lightbox-next { right: -54px; }
@media (max-width: 600px) {
  #ck-lightbox-prev { left: 4px; }
  #ck-lightbox-next { right: 4px; }
}
