/* BenguFarm public website – the look of the old Joomla template (j51_central, "BenguFarm" style) in plain CSS.
   Colours, fonts and sizes are set once here; a redesign starts with these variables. */
:root {
  --maroon: #830300;          /* header, footer, buttons, accents */
  --maroon-dark: #5e0200;
  --band: #4a4a4a;            /* grey bands (home header text, bottom logos) */
  --band-text: #ffffff;
  --text: #424242;
  --heading: #424242;
  --muted: #777777;
  --link: #587487;
  --line: #e2e2e2;
  --soft: #f0f0f0;
  --bg: #ffffff;
  --ok: #2c7a55;
  --err: #c62828;
  --font: "PT Sans", "Segoe UI", Arial, sans-serif;
  --font-head: "Raleway", "Segoe UI", Arial, sans-serif;
  --width: 1180px;
  --side: 240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font);
       min-height: 100vh; display: flex; flex-direction: column; }   /* short pages: the footer stays at the bottom of the window */
body > * { flex-shrink: 0; }
body > .main { width: 100%; flex: 1 0 auto; align-content: start; }   /* fills the window: the bottom band and footer sit at the bottom */
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--maroon); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); font-weight: 600; line-height: 1.25; margin: 1.2em 0 .5em; }
h1 { font-size: 30px; } h2 { font-size: 24px; } h3 { font-size: 19px; } h4 { font-size: 16px; }
p { margin: 0 0 1em; }
table { border-collapse: collapse; max-width: 100%; }
td, th { vertical-align: top; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.wrap { max-width: var(--width); margin: 0 auto; padding: 0 20px; }

/* ---- header + menu ---- */
.site-head { background: var(--maroon); color: #fff; position: relative; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 96px; }
.logo { flex: 0 0 auto; display: block; padding: 10px 0; }
.logo img { display: block; width: 260px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: stretch; margin-left: auto; align-self: stretch; }
.site-nav a { display: flex; align-items: center; padding: 0 clamp(8px, 1.2vw, 18px); color: #fff; text-decoration: none; font: 600 14px var(--font-head); }
.site-nav a:hover { background: var(--maroon-dark); color: #fff; }
.site-nav a.is-on { background: #fff; color: var(--maroon); }
/* menu panels (Products, Info, Downloads): a wide panel centred under the menu bar with a picture per page.
   Open on hover or keyboard focus. The panel is placed against the header (.has-sub is not positioned). */
.has-sub { display: flex; }
.has-sub > a::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.has-sub .sub { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50; padding: 0 16px; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub-in { max-width: 1100px; margin: 0 auto; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.22); border-top: 4px solid var(--maroon);
          padding: 22px 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; animation: sub-in .15s ease-out; }
@keyframes sub-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.site-nav .sub a.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; background: transparent;
                        border: 2px solid transparent; transition: border-color .15s, transform .15s; }
.site-nav .sub a.tile img { display: block; height: 116px; width: auto; transition: opacity .15s; }
.site-nav .sub a.tile:hover { transform: translateY(-2px); border-color: var(--line); }
.site-nav .sub a.tile:hover img { opacity: .78; }
.site-nav .sub a.tile.is-on { border-color: var(--maroon); }
.tile-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }   /* the pictures carry the name */
.tile.no-img .tile-txt { display: grid; place-items: center; width: 120px; height: 120px; padding: 10px; text-align: center; background: var(--maroon); color: #fff;
                         font: 600 14px/1.3 var(--font-head); }
.site-nav .sub a.tile.no-img:hover .tile-txt { background: #b04a47; }
.fb { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; background: #3b5998; color: #fff; text-decoration: none;
      font: 700 22px Arial, sans-serif; border-radius: 4px; }
.fb:hover { color: #fff; background: #2d4373; }
.nav-btn { display: none; margin-left: auto; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 4px;
           padding: 8px 14px; font: 600 14px var(--font-head); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }

/* ---- home slideshow ---- */
.hero { background: var(--soft); }
.slides { position: relative; max-width: 1430px; margin: 0 auto; aspect-ratio: 1430 / 400; overflow: hidden; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.slides img.is-on { opacity: 1; }

/* ---- bands ---- */
.band { padding: 0; }
/* full-width colour behind a block inside .wrap, without sideways scrolling */
.band-top .blk-home_header { background: var(--band); color: var(--band-text); padding: 6px 0; box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); }
.band-top .blk-home_header h2, .band-top .blk-home_header h1 { color: var(--band-text); margin: .6em 0; font-weight: 400; }
.band-top .blk-products_strip { padding: 14px 0; }
.band-bottom { background: var(--band); color: var(--band-text); padding: 18px 0; }
.band-bottom h2, .band-bottom h3 { color: var(--band-text); }
.band-bottom .blk-products_strip { background: #fff; padding: 14px 0; margin: -18px 0 18px; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); }
.band-bottom .blk-products_strip:last-child { margin-bottom: -18px; }
.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; }
.logo-strip a, .logo-strip > img { flex: 0 0 auto; }
.logo-strip img { display: block; max-height: 64px; width: auto; }
/* product logos: six equal boxes in a row (fewer on small screens) */
.blk-products_strip .logo-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.blk-products_strip .logo-strip a { display: flex; justify-content: center; align-items: center; padding: 6px 10px; border-left: 1px solid var(--line); transition: background .2s; }
.blk-products_strip .logo-strip a:first-child { border-left: 0; }
.blk-products_strip .logo-strip a:hover { background: var(--soft); }
.blk-products_strip .logo-strip img { max-height: none; width: 100%; max-width: 200px; }
.band-bottom .blk-societies_logos .logo-strip img { max-height: 72px; max-width: 110px; object-fit: contain; }

/* ---- main ---- */
.main { display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 24px; padding-bottom: 32px; }
.main.has-side { grid-template-columns: minmax(0, 1fr) var(--side); }
.content { min-width: 0; }
.page-title { text-align: center; margin-top: .6em; }
.page-title::after { content: ""; display: block; width: 40px; height: 2px; background: var(--line); margin: 14px auto 0; }
.side .blk-title, .gallery .blk-title { font-size: 22px; margin-top: 0; }
.content-bottom { margin-top: 24px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.clip a { word-break: break-word; }

/* galleries */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 4px; }
.side .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.thumbs a { display: block; aspect-ratio: 9 / 7; overflow: hidden; background: var(--soft); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.thumbs a:hover img { opacity: .7; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 40px 56px; }
.lb img { max-width: 100%; max-height: calc(100vh - 80px); box-shadow: 0 4px 30px rgba(0,0,0,.5); background: #fff; }
.lb button { position: absolute; background: transparent; border: 0; color: #fff; font: 36px/1 Arial, sans-serif; cursor: pointer; padding: 12px; }
.lb .lb-x { top: 8px; right: 12px; }
.lb .lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb .lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
.lb .lb-n { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #ccc; font-size: 13px; }

/* download lines (<p class="down"> on Software / Updates): grey box, thick left border, download icon on the left – as the old template (typo.css) */
.content p.down { margin: 10px 0; padding: 15px 20px 15px 50px; min-height: 36px; box-sizing: border-box;
  background: url(down.png) no-repeat 7px center rgba(0, 0, 0, 0.05);
  border: solid rgba(0, 0, 0, 0.08); border-width: 1px 1px 1px 5px; }
.content p.down a { word-break: break-word; }
/* the whole box downloads: the (first) link's ::after covers the box */
.content p.down { position: relative; transition: background-color .15s; }
.content p.down a:first-of-type::after { content: ""; position: absolute; inset: 0; }
.content p.down:hover { background-color: rgba(0, 0, 0, 0.09); }
@media (max-width: 600px) { .content p.down { margin-left: 0 !important; } }

/* training courses ({training}): as the old hand-made table – black frame, grey heading row, Arial */
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; }
table.events { width: 100%; border: 1px solid #000; border-collapse: collapse; color: #000; font: 13.33px/1.75 Arial, Tahoma, sans-serif; }
table.events th { background: #d3d3d3; text-align: left; padding: 2px 4px; font-weight: 700; width: 120px; }
table.events th:first-child { width: 140px; }
table.events th:last-child { width: auto; }
table.events td { padding: 2px 4px; vertical-align: middle; }
table.events .nowrap { white-space: nowrap; }
table.events a.pdf { color: maroon; font-weight: 700; }

/* FAQ (was the "sliders" plugin) */
details.faq { border: 1px solid var(--line); border-radius: 4px; margin: 0 0 8px; background: #fff; }
details.faq > summary { cursor: pointer; padding: 10px 14px; background: #f7f7f7; list-style: none; font-weight: 700; color: var(--heading); }
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary:hover { background: #efefef; }
details.faq[open] > summary { color: var(--maroon); }
.faq-a { overflow: hidden; }                     /* site.js animates its height */
.faq-in { padding: 12px 16px 4px; }

/* ---- order form ---- */
.form { margin: 8px 0 24px; }
.form .row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 4px 16px; align-items: start; padding: 6px 0; border: 0; margin: 0; }
.form fieldset.row { padding: 6px 0; }
.form .row > label, .form legend { padding-top: 7px; font-size: 14px; }
.form legend { float: left; width: 240px; margin-right: 16px; padding: 7px 0 0; }
.form fieldset.row { display: block; }
.form fieldset.row .checks { margin-left: 256px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select {
  width: 100%; max-width: 480px; height: 38px; padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; font: inherit; color: var(--text); background: #fff; }
.form input[type=file] { padding: 6px 0; font: inherit; }
.form input:focus, .form select:focus { outline: 2px solid var(--maroon); outline-offset: 1px; border-color: var(--maroon); }
.form .checks { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 7px; }
.form .checks label, .form .check { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.form .req { color: var(--err); }
.form .msg { display: block; color: var(--err); font-size: 13px; margin-top: 2px; }
.form .is-err input, .form .is-err select { border-color: var(--err); }
.form .hint { display: block; color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.form .form-sub { margin: 18px 0 4px; }
.form .form-note { margin: 4px 0 8px 256px; font-size: 14px; }
.btn { display: inline-block; background: var(--maroon); color: #fff; border: 0; border-radius: 4px; padding: 10px 22px; font: 700 15px var(--font-head); cursor: pointer; }
.btn:hover { background: var(--maroon-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 16px; border-radius: 4px; margin: 12px 0; }
.notice.ok { background: #eaf5ee; border: 1px solid #b9dcc7; }
.notice.err { background: #fdecec; border: 1px solid #f3b9b9; color: var(--err); }
.order-notes { margin-top: 24px; font-size: 14px; }

/* ---- footer ---- */
.site-foot { background: var(--maroon); color: #f0d6d5; padding: 22px 0; text-align: center; font-size: 13px; }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 6px; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot p { margin: 0; }

/* ---- phones and small tablets ---- */
@media (max-width: 1060px) { .logo img { width: 210px; } .site-head .wrap { gap: 12px; } }
@media (max-width: 860px) {
  .site-head .wrap { flex-wrap: wrap; min-height: 72px; gap: 12px; }
  .logo img { width: 200px; }
  .nav-btn { display: block; }
  .fb { width: 36px; height: 36px; font-size: 20px; }
  .site-nav { display: none; order: 10; flex-basis: 100%; flex-direction: column; margin: 0 -20px; background: var(--maroon-dark); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.12); }
  .has-sub { display: block; }
  .has-sub > a::after { display: none; }
  /* phones: the panels become indented text lines in the open menu */
  .has-sub .sub, .has-sub:hover .sub, .has-sub:focus-within .sub { display: block; position: static; padding: 0; background: rgba(0,0,0,.15); }
  .sub-in { display: block; max-width: none; background: transparent; box-shadow: none; border: 0; padding: 0; animation: none; }
  .site-nav .sub a.tile { display: block; color: #fff; padding: 9px 20px 9px 36px; font: 400 14px var(--font-head); border: 0; border-top: 1px solid rgba(255,255,255,.06); transform: none; }
  .site-nav .sub a.tile img, .tile.no-img .tile-txt { display: none; }
  .tile-lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .site-nav .sub a.tile:hover, .site-nav .sub a.tile.is-on { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
  .main.has-side { grid-template-columns: 1fr; }
  .side .thumbs { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .cols { grid-template-columns: 1fr; }
  .blk-products_strip .logo-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blk-products_strip .logo-strip a:nth-child(3n+1) { border-left: 0; }
  .blk-products_strip .logo-strip a:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  h1 { font-size: 24px; } h2 { font-size: 20px; }
  .wrap { padding: 0 16px; }
  .site-nav { margin: 0 -16px; }
  .content table { display: block; overflow-x: auto; }
  .content img { height: auto !important; }
  .form .row { grid-template-columns: 1fr; }
  .form legend { float: none; width: auto; }
  .form fieldset.row .checks, .form .form-note { margin-left: 0; }
  .form .row > span:empty { display: none; }
  .lb { padding: 40px 8px; }
}
@media print {
  .site-head, .site-foot, .band, .hero, .side, .nav-btn { display: none !important; }
  .main.has-side { grid-template-columns: 1fr; }
}
