/*
  haribu.ch – Coppermine Theme "haribu"
  Basiert auf rainy_day (Coppermine 1.6.03)
  Angepasst an haribu-2.0 Designsystem
  Farben: --rhb-red #c8102e | --nav-bg #5E697B | --bg #7a8fa8
  Schrift: Barlow / Barlow Condensed
*/

/* ============================================================
   0. CSS-VARIABLEN
   ============================================================ */
:root {
  --rhb-red:    #c8102e;
  --rhb-red-dk: #a80d26;
  --nav-bg:     #5E697B;
  --nav-hover:  #4a5363;
  --nav-border: #c8102e;
  --bg:         #7a8fa8;
  --surface:    #ffffff;
  --surface2:   #e8ecf0;
  --content-bg: #e8ecf0;
  --card-bg:    #ffffff;
  --border:     #ccd3db;
  --text:       #2a3240;
  --text-light: #ffffff;
  --text-muted: #5a6678;
  --text-head:  #1a2332;
  --accent:     #3a6ea8;
  --link:       #c8102e;
  --link-hover: #a80d26;
  --font-main:  'Barlow', Verdana, Arial, sans-serif;
  --font-cond:  'Barlow Condensed', 'Barlow', Arial, sans-serif;
}

/* ============================================================
   1. RESET & BASIS
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

table {
  font-size: 14px;
  font-family: var(--font-main);
}

h1 {
  font-family: var(--font-cond);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-light);
  margin: 0;
  font-style: normal;
  letter-spacing: 0.02em;
}

h2 {
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-light);
  margin: 0;
  font-style: normal;
}

h3 {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14px;
  margin: 4px 0;
  color: var(--text);
}

p {
  font-family: var(--font-main);
  font-size: 14px;
  margin: 4px 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

ul, ol {
  margin-left: 5px;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
}

li {
  margin-left: 12px;
  margin-top: 4px;
  margin-bottom: 4px;
  padding: 0;
  list-style-position: outside;
}

ul li { list-style-type: disc; }

/* ============================================================
   2. HEADER / NAVIGATION
   ============================================================ */
.haribu-header {
  background: var(--nav-bg);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--rhb-red);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.haribu-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  gap: 12px;
}

/* --- Links: Back-Button + Logo --- */
.haribu-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.haribu-back-btn {
  color: var(--text-light);
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 5px 10px;
  white-space: nowrap;
  transition: background 0.2s;
}

.haribu-back-btn:hover {
  background: rgba(255,255,255,0.22);
  color: var(--text-light);
  text-decoration: none;
}

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

.haribu-logo {
  max-width: 200px;
  max-height: 44px;
  width: auto;
  height: auto;
  display: block;
}

/* --- Mitte: Galerie-Titel --- */
.haribu-header-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.haribu-gal-title {
  font-family: var(--font-cond);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  cursor: default;
}

/* --- Rechts: Icons + Hamburger --- */
.haribu-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.haribu-icon-link {
  color: var(--text-light);
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.haribu-icon-link:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text-light);
  text-decoration: none;
}

/* Hamburger */
.haribu-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.haribu-hamburger span {
  display: block;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all 0.25s;
}

/* --- Sub-Navigation --- */
.haribu-subnav {
  background: var(--nav-hover);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.haribu-subnav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-height: 34px;
}

/* SUB_MENU: nimmt den verfügbaren Platz, Links zentriert links */
.haribu-submenu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  flex: 1;
}

.haribu-submenu a {
  color: #b0bac8;
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.haribu-submenu a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* SYS_MENU: kompakt rechts — Startseite ausblenden (hardcoded im Template) */
.haribu-sysmenu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  flex-shrink: 0;
}

/* Ersten Link (Startseite) im SYS_MENU ausblenden */
.haribu-sysmenu a:first-child {
  display: none;
}

.haribu-sysmenu a {
  color: #b0bac8;
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.haribu-sysmenu a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* Hardcoded Startseite-Link links */
.haribu-subnav-home {
  color: #b0bac8;
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}

.haribu-subnav-home:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* ============================================================
   3. HAUPTINHALT
   ============================================================ */
.haribu-page-wrap {
  width: 100%;
  overflow-x: hidden;
}

.haribu-main-wrap {
  max-width: 1400px;
  margin: 16px auto;
  padding: 0 12px;
  width: 100%;
  box-sizing: border-box;
}

.haribu-content {
  background: var(--content-bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  padding: 12px;
  min-height: 400px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ============================================================
   4. COPPERMINE-KLASSEN (angepasst auf haribu-Palette)
   ============================================================ */

/* Tabellen-Grundlayout - RESPONSIVE FIX */
.maintable {
  border: 1px solid var(--border);
  background-color: var(--card-bg);
  margin-top: 2px;
  margin-bottom: 2px;
  border-radius: 4px;
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.maintable td,
.maintable th {
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
}

/* Spacer-GIFs die fixe Breiten erzwingen auf 0 reduzieren */
.maintable img[src*="spacer.gif"] {
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
}

/* Thumbnail-Bilder bleiben normal */
.maintable img.thumbnail,
.maintable img.image {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
}

/* Tabellenheader dunkel */
.tableh1 {
  background: var(--nav-bg);
  color: var(--text-light);
  font-weight: 600;
  font-family: var(--font-cond);
  padding: 5px 10px;
}

/* Tabellenheader hell */
.tableh2 {
  background: #b8c2cc;
  color: var(--text);
  padding: 4px 10px;
}

/* Tabellenzelle normal */
.tableb {
  background: var(--card-bg);
  padding: 4px 10px;
}

/* Tabellenzelle alternierend */
.tableb_alternate {
  background: #dde3ea;
}

/* Footer-Bereich der Tabellen */
.tablef {
  background: #b8c2cc;
  padding: 8px 10px;
}

/* Kategorie-Zeilen */
.catrow_noalb {
  background: #b8c2cc;
  color: var(--text);
  padding: 4px 10px;
}

.catrow {
  background: var(--content-bg); /* Ebene 2: Zellhintergrund = Seitenhintergrund → überschüssige Fläche verschwindet */
  padding: 4px 10px;
}

/* Thumbnail-Infos */
.album_stat {
  font-size: 12px;
  margin: 4px 0;
  color: var(--text-muted);
  display: none !important;
}

.thumb_filename {
  font-size: 11px;
  display: block;
  color: var(--text-muted);
}

.thumb_title {
  font-weight: 600;
  font-size: 12px;
  padding: 2px;
  display: block;
  color: var(--text);
}

.thumb_caption {
  font-size: 12px;
  padding: 1px;
  display: block;
  color: var(--text-muted);
}

.thumb_caption a {
  text-decoration: underline;
  color: var(--text);
}

.thumb_num_comments {
  font-weight: normal;
  font-size: 11px;
  padding: 2px;
  font-style: italic;
  display: block;
  color: var(--text-muted);
}

/* Navigationsmenü (Coppermine intern) */
.navmenu {
  font-family: var(--font-cond);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  background: var(--nav-bg);
  border-style: none;
}

.navmenu img {
  margin: 2px 5px;
}

.navmenu a {
  display: block;
  padding: 3px 8px;
  text-decoration: none;
  color: var(--text-light);
}

.navmenu a:hover {
  background: var(--nav-hover);
  color: var(--text-light);
  text-decoration: none;
}

/* Sortierung */
.sortorder_cell {
  background: var(--nav-bg);
  color: var(--text-light);
  padding: 0;
  margin: 0;
}

.sortorder_options {
  font-family: var(--font-main);
  background: var(--nav-bg);
  color: var(--text-light);
  padding: 0;
  margin: 0;
  font-weight: normal;
  font-size: 11px;
  white-space: nowrap;
}

/* Admin-Menü */
.admin_menu {
  font-family: var(--font-main);
  font-size: 12px;
  border: 1px solid var(--nav-bg);
  background-color: var(--card-bg);
  color: var(--text);
  margin: 0;
  text-align: center;
  border-radius: 4px;
  width: auto;        /* war 100% → Buttons nehmen nur so viel Platz wie nötig */
  box-sizing: border-box;
}

.admin_menu a {
  color: var(--text);
  text-decoration: none;
  padding: 2px 8px;
  display: block;     /* damit der ganze Button klickbar ist */
}

.admin_menu a:hover {
  color: var(--rhb-red);
  text-decoration: underline;
}

.admin_float {
  float: left;
  margin: 2px 3px 2px 0;
  display: block;
  position: relative;
  white-space: nowrap;
}

.admin_menu_wrapper {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;   /* clearfix für die gefloateten Buttons */
  padding-bottom: 4px;
}

/* Icons */
.icon {
  vertical-align: middle;
  margin-right: 2px;
}

/* Kommentar-Datum */
.comment_date {
  color: var(--text-muted);
  font-size: 12px;
  vertical-align: middle;
}

/* Bilder */
.image {
  border: 1px solid var(--border);
  margin: 2px;
}

.imageborder {
  border: 1px solid var(--border);
  background-color: var(--card-bg);
  margin: 3px 0;
}

.display_media {
  background: var(--card-bg);
  padding: 4px 10px;
}

.thumbnails {
  background: var(--content-bg);
  padding: 6px;
  width: 100%;
  box-sizing: border-box;
}

/* Coppermine verwendet Tabellen für Thumbnail-Layouts */
table.thumbnails {
  display: table !important;
}

/* Bildanzeige Beschriftung - RESPONSIVE FIX */
.img_caption_table {
  border: none;
  background-color: var(--card-bg);
  width: 100%;
  margin: 0;
  table-layout: fixed;
  max-width: 100%;
  overflow-x: hidden;
}

.img_caption_table th {
  background: var(--nav-bg);
  font-size: 14px;
  color: var(--text-light);
  padding: 5px 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-family: var(--font-cond);
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.img_caption_table td {
  background: var(--card-bg);
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

/* Bildtitel & Caption */
.pic_title {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-cond);
  text-align: center;
  padding: 0;
  margin: 0;
  line-height: 1.2em;
}

.pic_caption {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: normal;
  text-align: center;
  padding: 0;
  margin: 0;
  line-height: 1.2em;
}

/* Benutzer-Thumbnail-Infobox */
.user_thumb_infobox { 
  margin: 1px 0;
  width: 100%;
  box-sizing: border-box;
}

.user_thumb_infobox th {
  font-weight: 600;
  font-size: 14px;
  margin: 1px 0;
  text-align: center;
}

.user_thumb_infobox td {
  font-size: 12px;
  margin: 1px 0;
  text-align: center;
}

.user_thumb_infobox a {
  text-decoration: none;
  color: var(--text);
}

.user_thumb_infobox a:hover {
  color: var(--rhb-red);
  text-decoration: underline;
}

/* Links allgemein */
.bblink a { color: var(--link); text-decoration: none; }
.bblink a:hover { color: var(--link-hover); text-decoration: underline; }

.alblink { font-weight: 600; }
.alblink a { text-decoration: underline; color: var(--text); }
.alblink a:hover { color: var(--rhb-red); text-decoration: underline; }

.catlink { display: block; margin-bottom: 2px; font-weight: 600; }
.catlink a { text-decoration: underline; color: var(--text); }
.catlink a:hover { color: var(--rhb-red); text-decoration: underline; }

.statlink { color: var(--text-light); }
.statlink a { text-decoration: none; color: var(--text-light); }
.statlink a:hover { color: var(--text-light); text-decoration: underline; }

/* Top-Menü */
.topmenu { font-size: 14px; }
.topmenu a { color: var(--text-light); text-decoration: none; }
.topmenu a:hover { color: var(--text-light); text-decoration: underline; }
.topmenu td { white-space: nowrap; font-weight: 600; }

/* Formulare */
.textinput {
  font-family: var(--font-main);
  font-size: 14px;
  border: 1px solid var(--border);
  padding: 3px 6px;
  background-color: #f5f6f8;
  border-radius: 3px;
  box-sizing: border-box;
}

.listbox {
  font-family: var(--font-main);
  background-color: #f5f6f8;
  font-size: 14px;
  border: 1px solid var(--border);
  vertical-align: middle;
  border-radius: 3px;
  box-sizing: border-box;
}

.listbox_lang {
  color: var(--text);
  background-color: #f5f6f8;
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--font-main);
  vertical-align: middle;
  border-radius: 3px;
  box-sizing: border-box;
}

.button, .buttonlist ul li a {
  font-family: var(--font-cond);
  font-size: 13px;
  border: 1px solid var(--nav-bg);
  background: var(--nav-bg);
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 10px;
  margin-right: 3px;
  white-space: nowrap;
  border-radius: 3px;
  transition: background 0.2s;
  box-sizing: border-box;
}

.button:hover, .buttonlist ul li a:hover {
  background: var(--nav-hover);
}

.radio, .checkbox {
  font-family: var(--font-main);
  font-size: 14px;
  vertical-align: middle;
}

/* Wichtig / Fehler */
.important {
  color: var(--rhb-red);
  font-weight: 600;
  padding: 2px 3px;
}

/* Filmstrip */
.filmstrip_background { background-color: #1a1a1a; }
.prev_strip { text-align: left; }
.next_strip { text-align: right; }

/* Meldungen */
.cpg_message_info {
  color: #00529B;
  background-color: #BDE5F8;
  border: 1px solid #00529B;
  margin: 10px 0;
  padding: 12px 16px 12px 48px;
  background-repeat: no-repeat;
  background-position: 12px center;
  background-image: url('../../images/message/info.png');
  border-radius: 4px;
}

.cpg_message_success {
  color: #4F8A10;
  background-color: #DFF2BF;
  border: 1px solid #4F8A10;
  margin: 10px 0;
  padding: 12px 16px 12px 48px;
  background-repeat: no-repeat;
  background-position: 12px center;
  background-image: url('../../images/message/ok.png');
  border-radius: 4px;
}

.cpg_message_warning {
  color: #9F6000;
  background-color: #FEEFB3;
  border: 1px solid #9F6000;
  margin: 10px 0;
  padding: 12px 16px 12px 48px;
  background-repeat: no-repeat;
  background-position: 12px center;
  background-image: url('../../images/message/warning.png');
  border-radius: 4px;
}

.cpg_message_error {
  color: #D8000C;
  background-color: #FFBABA;
  border: 1px solid #D8000C;
  margin: 10px 0;
  padding: 12px 16px 12px 48px;
  background-repeat: no-repeat;
  background-position: 12px center;
  background-image: url('../../images/message/stop.png');
  border-radius: 4px;
}

.cpg_message_validation {
  color: #D63301;
  background-color: #FFCCBA;
  border: 1px solid #D63301;
  margin: 10px 0;
  padding: 12px 16px 12px 48px;
  background-repeat: no-repeat;
  background-position: 12px center;
  background-image: url('../../images/message/error.png');
  border-radius: 4px;
}

.message {
  margin: 10px 0;
  padding: 10px 16px;
  border: 1px solid #e0c060;
  background-color: #fffbe6;
  border-radius: 4px;
}

.cpg_summary {
  font-size: 0.9em;
  border: 1px solid var(--border);
  margin: 10px 0;
  padding: 5px 10px;
  color: var(--text-muted);
  background-color: var(--card-bg);
  text-align: right;
  float: right;
  width: 400px;
  border-radius: 4px;
}

/* Lightbox */
#GB_window {
  background-color: var(--card-bg);
  border: 4px solid var(--border);
}

/* Sonstiges */
.detail_head_collapsed, .detail_head_expanded {
  color: var(--rhb-red);
}

.clickable_option { cursor: default; }

.external {
  background: transparent url('../../images/link.gif') 100% 50% no-repeat;
  padding-right: 10px;
}

pre.filepath { margin: 0; padding: 0; }

.debug_text {
  border: 1px solid var(--border);
  background-color: #f5f6f8;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

/* Upload-Fortschritt */
div.fieldset {
  border: 2px solid var(--nav-bg);
  margin: 10px 0;
  padding: 20px 10px;
  border-radius: 4px;
}

div.fieldset span.legend {
  position: relative;
  padding: 3px 8px;
  top: -30px;
  background-color: var(--nav-bg);
  color: #FFF;
  font-weight: 600;
  font-family: var(--font-cond);
  border-radius: 3px;
}

.progressWrapper { 
  width: 360px; 
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.progressContainer {
  margin: 5px;
  padding: 4px;
  border: 1px solid #ddd;
  background-color: #f7f7f7;
  overflow: hidden;
  border-radius: 3px;
}

.progressName {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  width: 320px;
  height: 14px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.progressBarInProgress,
.progressBarComplete,
.progressBarError {
  font-size: 0;
  width: 0%;
  height: 3px;
  background-color: var(--nav-bg);
  margin-top: 2px;
  border-radius: 2px;
}

.progressBarComplete {
  width: 100%;
  background-color: #4F8A10;
  visibility: hidden;
}

.progressBarError {
  width: 100%;
  background-color: var(--rhb-red);
  visibility: hidden;
}

.progressBarStatus {
  margin-top: 2px;
  width: 340px;
  font-size: 10px;
  font-family: var(--font-main);
  text-align: left;
  white-space: nowrap;
  color: #555;
  max-width: 100%;
  box-sizing: border-box;
}

/* Bild-Pseudo-Klassen */
a:link .image, a:visited .image { border-color: var(--border); }
a:focus .image, a:hover .image  { border-color: var(--rhb-red); }
a:active .image                  { border-color: var(--rhb-red-dk); }

a:link .middlethumb, a:visited .middlethumb,
a:focus .middlethumb, a:hover .middlethumb,
a:active .middlethumb { border: 2px solid var(--rhb-red); }

/* Sprach-/Theme-Wrapper */
#cpgChooseLanguageWrapper,
#cpgChooseThemeWrapper {
  margin: 0 3px;
}

/* Photo Manager / Album Manager */
table#pic_sort tr td {
  padding: 4px;
  border-bottom: 1px solid var(--border);
}

table#album_sort tr td {
  padding: 3px;
  border-bottom: 1px solid var(--border);
}

table#album_sort tr td span.editAlbum {
  margin-left: 100px;
  font-size: 10px;
  text-decoration: underline;
  cursor: pointer;
  display: none;
  color: var(--rhb-red);
}

/* ============================================================
   4b. ALBUM VIEW & CATEGORY VIEW - RESPONSIVE
   ============================================================ */

/* Album-Ansicht (Kategorie mit mehreren Alben) - 4 Spalten auf Desktop */

/* Ebene 2: Albumkacheln – alle Zell-Hintergründe auf content-bg setzen,
   damit keine weisse/graue Fläche rund ums Vorschaubild sichtbar ist */
.maintable tr.tableb.tableb_alternate,
.maintable tr.tableb.tableb_alternate > td,
.maintable tr.tableb.tableb_alternate > td table td {
  background: var(--content-bg) !important;
}

/* Albumtitel (.tableh2) wieder herstellen */
.maintable tr.tableb.tableb_alternate > td table td.tableh2 {
  background: #b8c2cc !important;
}

.albrow {
  width: 100%;
  overflow: hidden;
}

.albrow table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.albrow td,
.albrow th {
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  vertical-align: top;
  background: var(--content-bg); /* Zellhintergrund = Seitenhintergrund → überschüssige Fläche unsichtbar */
}

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

/* Thumbnail-Gitter */
table.thumbnails {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

table.thumbnails td,
table.thumbnails th {
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  vertical-align: middle;
  text-align: center;
}

table.thumbnails img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* ============================================================
   5. FOOTER
   ============================================================ */
.haribu-footer {
  background: var(--nav-bg);
  border-top: 3px solid var(--rhb-red);
  color: #b0bac8;
  margin-top: 24px;
  padding: 1.2rem 1.5rem;
  font-family: var(--font-cond);
  font-size: 0.78rem;
  text-align: center;
}

.haribu-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
}

.haribu-footer a {
  color: #b0bac8;
  text-decoration: none;
}

.haribu-footer a:hover {
  color: var(--rhb-red);
  text-decoration: none;
}

.haribu-footer-sep {
  color: rgba(255,255,255,0.25);
}

.haribu-footer-credits,
.footer {
  font-size: 0.72rem;
  color: #b0bac8;
}

.footer a { text-decoration: none; color: #b0bac8; }
.footer a:hover { color: var(--rhb-red); text-decoration: none; }

/* ============================================================
   6. MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .cpg_summary {
    width: 100%;
    float: none;
    margin: 10px 0;
  }
}

@media (max-width: 700px) {

  /* Header compact */
  .haribu-header-inner {
    height: 50px;
    padding: 0 10px;
  }

  .haribu-back-btn {
    font-size: 12px;
    padding: 4px 8px;
  }

  .haribu-logo { 
    max-width: 130px; 
  }

  .haribu-gal-title {
    font-size: 15px;
  }

  /* Icons auf Mobil ausblenden, nur Hamburger zeigen */
  .haribu-icon-link { 
    display: none; 
  }

  .haribu-hamburger {
    display: flex;
  }

  /* Subnav kollabieren */
  .haribu-subnav {
    display: none;
  }

  .haribu-subnav.open {
    display: block;
  }

  .haribu-subnav-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
    gap: 6px;
  }

  /* Main Content responsive */
  .haribu-main-wrap {
    margin: 8px auto;
    padding: 0;
    max-width: 100%;
  }

  .haribu-content {
    padding: 4px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-height: auto;
  }

  /* Headings */
  h1 { font-size: 20px; }
  h2 { font-size: 16px; }

  /* ALBUM-ANSICHT: 4 Spalten → 2 Spalten auf Mobile */
  .albrow table {
    font-size: 12px;
  }

  .albrow td,
  .albrow th {
    padding: 4px 2px !important;
  }

  /* THUMBNAIL-GALERIE: 8 Spalten → 4 Spalten auf 700px */
  table.thumbnails {
    font-size: 12px;
  }

  table.thumbnails td {
    padding: 3px 2px !important;
    width: 25% !important;
  }

  table.thumbnails img {
    max-width: 90%;
  }

  /* Allgemeine Tabellen */
  .maintable,
  .img_caption_table {
    font-size: 12px;
  }

  .maintable td,
  .maintable th,
  .img_caption_table td,
  .img_caption_table th {
    padding: 3px 5px !important;
  }

  /* Thumbnail-Infos kompakt */
  .album_stat {
    font-size: 11px;
  }

  .thumb_filename,
  .thumb_caption,
  .thumb_num_comments {
    font-size: 10px;
  }

  .thumb_title {
    font-size: 11px;
  }

  .cpg_summary {
    width: 100%;
    float: none;
  }

  /* Formular-Elemente */
  .textinput,
  .listbox,
  .button {
    max-width: 100%;
  }

  /* Progress */
  .progressWrapper {
    width: 100%;
  }

  .progressName {
    width: 100%;
  }

  .progressBarStatus {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .haribu-back-btn { 
    display: none; 
  }

  .haribu-header-center { 
    text-align: left; 
  }

  /* ALBUM-ANSICHT: 2 Spalten → 1 Spalte auf 480px */
  .albrow td {
    padding: 4px !important;
    width: 100% !important;
    display: block !important;
  }

  .albrow td img {
    margin-bottom: 4px;
  }

  /* THUMBNAIL-GALERIE: 4 Spalten → 3 Spalten auf 480px */
  table.thumbnails td {
    padding: 2px !important;
    width: 33.333% !important;
  }

  /* Allgemeine Tabellen */
  .maintable,
  .img_caption_table {
    font-size: 11px;
  }

  .maintable td,
  .maintable th,
  .img_caption_table td,
  .img_caption_table th {
    padding: 2px !important;
  }

  .album_stat {
    font-size: 10px;
  }

  .thumb_filename,
  .thumb_caption,
  .thumb_num_comments {
    font-size: 9px;
  }

  .thumb_title {
    font-size: 10px;
  }

  h1 { font-size: 16px; }
  h2 { font-size: 14px; }
}

/* ============================================================
   7. SYS-MENU BUTTONS (theme.php)
   ============================================================ */
.haribu-sysmenu-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.haribu-sysnav-btn {
  color: var(--text-light);
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.15s;
  display: inline-block;
}

.haribu-sysnav-btn:hover {
  background: rgba(255,255,255,0.15);
  color: var(--text-light);
  text-decoration: none;
}

/* Kontakt-Button (wie nav-contact in index4.html) */
.haribu-nav-contact {
  background: var(--rhb-red) !important;
  color: #fff !important;
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 12px !important;
  border-radius: 3px;
}

.haribu-nav-contact:hover {
  background: var(--rhb-red-dk) !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* ============================================================
   8. SUBNAV REIHENFOLGE & AUSBLENDEN
   Alle Links landen via display:contents direkt im Flex-Container.
   SYS_MENU: Startseite (nth-child 1) → order 0 (ganz links)
             Anmelden  (nth-child 2) → order 99 (ganz rechts, via margin-left:auto)
   SUB_MENU original: 1=Zuletzt angesehen, 2=Albenliste, 3=Neueste Uploads,
   4=Neueste Kommentare, 5=Am meisten angesehen, 6=Am besten bewertet,
   7=Meine Favoriten, 8=Suche
   Gewünscht: Albenliste zuerst, dann Zuletzt angesehen, Meine Favoriten weg
   ============================================================ */
.haribu-submenu a:nth-child(1) { order: 2; } /* Zuletzt angesehen */
.haribu-submenu a:nth-child(2) { order: 1; } /* Albenliste */
.haribu-submenu a:nth-child(3) { order: 3; } /* Neueste Uploads */
.haribu-submenu a:nth-child(4) { order: 4; } /* Neueste Kommentare */
.haribu-submenu a:nth-child(5) { order: 5; } /* Am meisten angesehen */
.haribu-submenu a:nth-child(6) { order: 6; } /* Am besten bewertet */
.haribu-submenu a:nth-child(7) { order: 99; display: none; } /* Meine Favoriten — ausblenden */
.haribu-submenu a:nth-child(8) { order: 7; } /* Suche */
