/* The App Joinery - recreated from the original Bourkes Joinery site
   (FrontPage "Leaves" theme). Banner/nav/rule images regenerated or reused
   from the original site's own assets to match it as closely as possible. */

@import url('https://fonts.googleapis.com/css2?family=Playball&display=swap');

body {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
}

a:link { color: #666633; }
a:visited { color: #999933; }
a:active { color: #993300; }

.harrington {
  font-family: 'Playball', cursive;
}

.wrap {
  max-width: 622px;
  margin: 0 auto;
  padding: 0 10px 40px;
}

/* Banner + nav, centered at the original's 600px width */
.bannerwrap {
  text-align: center;
}

.bannerwrap img.banner {
  width: 600px;
  max-width: 100%;
  height: auto;
  display: inline-block;
}

nav.leafnav {
  text-align: center;
  padding: 6px 0;
}

nav.leafnav a {
  display: inline-block;
  width: 140px;
  height: 50px;
  vertical-align: middle;
  background-size: cover;
  background-position: center;
  text-indent: -9999px;
  overflow: hidden;
}

nav.leafnav a.nav-home { background-image: url('images/joinery/nav/home-normal.gif'); }
nav.leafnav a.nav-home:hover { background-image: url('images/joinery/nav/home-hover.gif'); }
nav.leafnav a.nav-home.active { background-image: url('images/joinery/nav/home-pressed.gif'); }

nav.leafnav a.nav-background { background-image: url('images/joinery/nav/background-normal.gif'); }
nav.leafnav a.nav-background:hover { background-image: url('images/joinery/nav/background-hover.gif'); }
nav.leafnav a.nav-background.active { background-image: url('images/joinery/nav/background-pressed.gif'); }

nav.leafnav a.nav-contact { background-image: url('images/joinery/nav/contact-normal.gif'); }
nav.leafnav a.nav-contact:hover { background-image: url('images/joinery/nav/contact-hover.gif'); }
nav.leafnav a.nav-contact.active { background-image: url('images/joinery/nav/contact-pressed.gif'); }

nav.leafnav a.nav-apps { background-image: url('images/joinery/nav/apps-normal.png'); }
nav.leafnav a.nav-apps:hover { background-image: url('images/joinery/nav/apps-hover.png'); }
nav.leafnav a.nav-apps.active { background-image: url('images/joinery/nav/apps-pressed.png'); }

/* Preload the hover/active button art so the first hover never flashes blank */
body::after {
  content: url('images/joinery/nav/home-hover.gif') url('images/joinery/nav/home-pressed.gif')
    url('images/joinery/nav/background-hover.gif') url('images/joinery/nav/background-pressed.gif')
    url('images/joinery/nav/contact-hover.gif') url('images/joinery/nav/contact-pressed.gif')
    url('images/joinery/nav/apps-hover.png') url('images/joinery/nav/apps-pressed.png');
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  z-index: -1;
  opacity: 0;
}

.rulewrap { text-align: center; margin: 4px 0 0; }
.rulewrap img { width: 600px; max-width: 100%; height: auto; }

main { padding-top: 14px; }

h2.tagline, h3.tagline {
  text-align: center;
  font-weight: normal;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0 0 16px;
}

/* Collage on the home page, standing in for the old product-photo collage */
.collage {
  position: relative;
  width: 340px;
  height: 150px;
  margin: 10px auto 20px;
}

.collage .card {
  position: absolute;
  width: 150px;
  padding: 14px 10px;
  background: #fff;
  border: 3px solid #fff;
  outline: 1px solid #ccc;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.4);
  text-align: center;
}

.collage .card:nth-child(1) { left: 0; top: 0; transform: rotate(-6deg); z-index: 1; }
.collage .card:nth-child(2) { left: 150px; top: 20px; transform: rotate(4deg); z-index: 2; }

.collage .card .icon { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.collage .card .icon-img { width: 34px; height: 34px; border-radius: 8px; display: block; margin: 0 auto 4px; }
.collage .card .name { font-weight: bold; font-size: 0.95rem; }

/* Bullet list styled after the theme's bluebullet.gif */
ul.leaf-bullets {
  list-style: none;
  padding-left: 0;
}

ul.leaf-bullets li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}

ul.leaf-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  background: #336;
  background: #99cc;
  background-color: #6699cc;
}

/* Two-column layout for the Background page, matching the old <table> layout */
table.twocol {
  border-collapse: collapse;
  margin: 0 auto 10px;
}

table.twocol td {
  vertical-align: top;
  padding: 10px;
}

table.twocol td.figure {
  width: 200px;
  text-align: center;
}

table.twocol td.figure .icon {
  font-size: 4rem;
  display: block;
}

.placeholder {
  color: #666;
  font-style: italic;
  border: 1px dashed #999;
  background: #f7f7f0;
  padding: 8px 12px;
}

/* Contact table */
table.contact {
  border-collapse: collapse;
  margin: 10px auto 20px;
}

table.contact td {
  padding: 4px 16px 4px 0;
  vertical-align: top;
}

table.contact td:first-child {
  font-weight: normal;
}

/* App list on the Apps page */
.applist {
  text-align: center;
  margin-bottom: 16px;
}

.applist a {
  margin: 0 6px;
}

.app-entry {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.app-entry .icon { font-size: 2rem; }
.app-entry .icon-img { width: 40px; height: 40px; border-radius: 9px; flex: none; }

.app-entry h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.backtotop {
  text-align: center;
  margin-top: 16px;
}
