/* IbB Engineering – static archive stylesheet.
   Recreates the "bizblue" Joomla template look (green bar, navy headings,
   IbB logo) with a responsive layout. */

:root {
  --green: #80ce60;
  --green-dark: #008000;
  --navy: #000066;
  --link: #292f83;
  --line: #d6dbe1;
  --bg-soft: #f4f6f8;
  --text: #1d1d1f;
  --wrap: 1150px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
}
td, tr, p, div, li { font-family: inherit; font-size: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

a, a:link, a:visited { color: var(--link); text-decoration: none; font-weight: bold; }
a:hover, a:focus { color: var(--green-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; border: 0; }

/* ---------- header ---------- */
.site-header { background: #fff; }
.topbar {
  background: var(--green);
  background: linear-gradient(#86d466, #78c858);
  min-height: 16px;
}
.topbar .topnav {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: flex-end;
}
.topbar .topnav li { margin: 0; padding: 0; background: none; line-height: 1; }
.topbar .topnav a {
  display: block; padding: 8px 12px; color: #fff; font-size: 13px; font-weight: bold;
  text-shadow: 0 1px 1px rgba(0,0,0,.18);
}
.topbar .topnav a:hover { background: var(--green-dark); text-decoration: none; }

.brand {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 12px;
}
.brand .logo { display: inline-block; line-height: 0; }
.brand .logo img { width: 280px; height: auto; }

.mainnav {
  border-top: 1px solid var(--line);
  border-bottom: 3px solid var(--green);
  background: linear-gradient(#ffffff, #eef0f3);
}
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mainnav li { margin: 0; padding: 0; background: none; line-height: 1.2; }
.mainnav a {
  display: block; padding: 12px 14px; color: var(--green-dark); font-size: 14px; font-weight: bold;
}
.mainnav a:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.mainnav li.current a { background: var(--green-dark); color: #fff; }

.nav-toggle { display: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--green-dark); border-radius: 2px; }

/* ---------- layout ---------- */
.layout { padding-top: 24px; padding-bottom: 40px; }
.layout.has-sidebar { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.content { min-width: 0; }

/* ---------- sidebar modules (2013–2016 pages) ---------- */
.sidebar .module {
  margin: 0 0 16px; background: #f8f9fa; border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}
.sidebar .module-title {
  margin: 0; padding: 8px 12px; font-size: 13px; color: #fff; background: var(--link);
  text-transform: none; border: 0;
}
.sidebar .module-body { padding: 8px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0 0 4px; padding: 0; background: none; }
.sidebar .menu-module li a {
  display: block; padding: 7px 10px; font-weight: normal; color: var(--green-dark);
  background: #ecf0f3; border: 1px solid #dddfe4; border-radius: 3px;
}
.sidebar .menu-module li a:hover,
.sidebar .menu-module li.active > a,
.sidebar .menu-module li.current > a { background: var(--green-dark); border-color: var(--green-dark); color: #fff; text-decoration: none; }
.sidebar .menu-module ul ul { margin: 4px 0 4px 12px; }
.sidebar .lang-module ul { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar .lang-module li { margin: 0; }
.sidebar .lang-module a { display: inline-block; padding: 3px; border: 1px solid transparent; }
.sidebar .lang-module li.lang-active a { border-color: var(--green-dark); }
.sidebar .lang-module img { display: block; }

/* ---------- content typography ---------- */
.content h1, .content h2, .content h3, .content h4 { color: var(--navy); line-height: 1.3; }
.content h1 { font-size: 24px; margin: 0 0 16px; }
.content h2 {
  font-size: 19px; text-transform: uppercase; letter-spacing: .02em;
  border-bottom: 2px solid #3b5576; padding: 0 0 6px; margin: 0 0 18px;
}
.content h2 a, .content h1 a { color: inherit; }
.content h3 { font-size: 17px; margin: 22px 0 10px; }
.content p { margin: 0 0 12px; }
.content ul { list-style: none; padding-left: 4px; margin: 8px 0 14px; }
.content ul li {
  padding-left: 18px; margin: 6px 0; position: relative; background: none;
}
.content ul li::before {
  content: ""; position: absolute; left: 3px; top: .55em; width: 0; height: 0;
  border-left: 6px solid var(--green-dark); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.content ol { padding-left: 24px; }
.content ol li { margin: 6px 0; background: none; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.content blockquote { margin: 16px 0; padding: 12px 16px; background: var(--bg-soft); border-left: 4px solid var(--green); }
.content .page-header { margin: 0; }
.content .item-page, .content .blog { max-width: 100%; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; max-width: 100%; }
.content table { border-collapse: collapse; max-width: 100%; }
.content td, .content th { vertical-align: top; padding: 4px 8px; }
.content table p { margin: 0 0 4px; }
.content table.table, .content table.ff_results, .content table.category, .content table.item_list,
.content table.eb_table, .content table.table-striped {
  width: 100%; border: 1px solid var(--line);
}
.content table.table th, .content table.ff_results th, .content table.category th, .content table.item_list th {
  background: var(--link); color: #fff; text-align: left; padding: 8px 10px; white-space: nowrap;
}
.content table.table td, .content table.ff_results td, .content table.category td, .content table.item_list td {
  padding: 7px 10px; border-top: 1px solid var(--line);
}
.content table.table-striped tbody tr:nth-child(even) td,
.content table.ff_results tbody tr:nth-child(even) td { background: var(--bg-soft); }
.content table.ff_results th { white-space: nowrap; }

/* ---------- homepage tiles ---------- */
.tile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 10px 0 20px;
}
.tile-grid a.tile {
  display: flex; align-items: flex-end; min-height: 150px; padding: 18px;
  border: 3px solid var(--green); border-radius: 4px; color: var(--navy);
  background: linear-gradient(135deg, #ffffff 0%, #f1f8ed 100%);
  font-size: 19px; line-height: 1.25; text-decoration: none; position: relative;
  transition: background .15s, color .15s, transform .15s;
}
.tile-grid a.tile::before {
  content: ""; position: absolute; top: 16px; left: 18px; width: 34px; height: 4px; background: #e2001a;
}
.tile-grid a.tile:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; transform: translateY(-2px); }
.home-banner { margin: 0 0 22px; }
.home-banner img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }

/* ---------- jDownloads (archived listing, files mostly not available) ---------- */
.jd_top_navi { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; }
.jd_top_navi_item { float: none !important; width: auto !important; }
.jd_top_navi_item img { vertical-align: middle; width: 24px; height: 24px; }
.jd_cat_subheader, .jd_files_subheader { margin: 10px 0; }
.jd_cat_subheader_title, .jd_files_subheader_title { font-weight: bold; color: var(--navy); font-size: 17px; }
.jd_clear { clear: both; }
.jd_download_title, .jd_cat_title { margin-top: 10px; padding: 8px 10px; background: var(--bg-soft); border-left: 3px solid var(--green); }
.jd_title_block img, .jd_cat_title img { vertical-align: middle; }
.jd_minipic_wrapper { color: #555; font-size: 13px; padding: 4px 10px 8px; overflow: hidden; }
.jd_files_minipic { display: inline-block; margin-right: 14px; float: none !important; }
.jd_files_minipic img { vertical-align: middle; }
.archive-note { padding: 10px 14px; background: #fff8e5; border: 1px solid #f0d58a; border-radius: 4px; margin: 0 0 16px; font-size: 14px; }

/* ---------- filialfinder (expert / specialist directory) ---------- */
#com_filialfinder .store_address { display: block; }
.filialfinder_field { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid #eef0f3; float: none !important; width: auto !important; }
.filialfinder_label { flex: 0 0 150px; font-weight: bold; color: #444; float: none !important; width: auto !important; }
.filialfinder_content { flex: 1 1 auto; float: none !important; width: auto !important; word-break: break-word; }
.filialfinder_content_nolabel h1 { margin: 6px 0 10px; }
.store_images:empty { display: none; }

/* ---------- eventbooking / trombinoscope ---------- */
.eb-container .eb-box-heading h1 { margin-top: 0; }
.personlist .groupheader h2 { margin-top: 26px; }
.personlist .person { display: inline-block; vertical-align: top; width: 260px; max-width: 100%; margin: 0 12px 14px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.personlist .person .links:empty, .personlist .person .links ul:empty { display: none; }

/* contact note replacing server-side forms */
.contact-note { padding: 14px 18px; background: #f1f8ed; border: 1px solid #b9e0a6; border-left: 5px solid var(--green-dark); border-radius: 4px; margin: 10px 0 20px; }
.form-content label { font-weight: bold; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid #ccc; background: var(--bg-soft); padding: 18px 0 26px; text-align: center; color: var(--link); font-size: 13px; }
.site-footer p { margin: 4px 0; text-align: center; }
.site-footer .sep { color: #aaa; margin: 0 6px; }
.site-footer a { margin: 0 4px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout.has-sidebar { grid-template-columns: 1fr; gap: 10px; }
  .sidebar { order: 2; }
  .content { order: 1; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .wrap { padding: 0 14px; }
  .brand .logo img { width: 210px; }
  .nav-toggle { display: block; }
  .mainnav { display: none; }
  .nav-check:checked + .mainnav { display: block; }
  .mainnav ul { flex-direction: column; }
  .mainnav a { padding: 11px 6px; border-bottom: 1px solid var(--line); }
  .topbar .topnav { justify-content: center; }
  .topbar .topnav a { padding: 7px 9px; font-size: 12px; }
  .content h1 { font-size: 21px; }
  .content h2 { font-size: 17px; }
  .tile-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile-grid a.tile { min-height: 110px; font-size: 16px; padding: 12px; }
  .tile-grid a.tile::before { left: 12px; top: 12px; }
  .filialfinder_field { flex-direction: column; gap: 0; }
  .filialfinder_label { flex: none; }
  /* layout tables (no header cells) stack on small screens */
  .content table:not(.table):not(.ff_results):not(.category):not(.item_list):not(.table-striped),
  .content table:not(.table):not(.ff_results):not(.category):not(.item_list):not(.table-striped) > tbody,
  .content table:not(.table):not(.ff_results):not(.category):not(.item_list):not(.table-striped) > tbody > tr,
  .content table:not(.table):not(.ff_results):not(.category):not(.item_list):not(.table-striped) > tbody > tr > td {
    display: block; width: auto !important; float: none !important;
  }
}
@media (max-width: 420px) {
  .tile-grid { grid-template-columns: 1fr; }
}

@media (min-width: 761px) {
  .content table img { max-width: none; }
}
