/* Perth Pork Products. Same look as the old site (colours, fonts, column widths), now responsive.
   No inline styles are used anywhere on the site, so the CSP can block them. */
:root {
  --green: #007e3f;
  --panel: #f6faf8;
  --line: #b2b2b2;
  --text: #4e4d4b;
  --title: #333333;
  --muted: #5a5959;
  --hover: #c9e4d6;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--green) url(/assets/img/bg_gradient.gif) repeat-x;
  color: var(--text);
  font: 11px/18px Verdana, Arial, sans-serif;
}

img { max-width: 100%; height: auto; border: 0; }
a { color: #0000ee; }

/* ---------- Top navigation ---------- */
.site-header {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 5px 0 5px;
  min-height: 45px;
}
.main-nav ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.main-nav a {
  display: block;
  padding: 0 12px;
  margin-left: 5px;
  line-height: 25px;
  font: bold 10px/25px Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}
.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  background: var(--panel);
  color: var(--green);
}
.main-nav a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* ---------- Page frame ---------- */
.site-body {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 3px rgba(0, 0, 0, .6);
  margin-bottom: 30px;
}
.banner { background: #fff; line-height: 0; }
.banner img { display: block; width: 100%; }

.page {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 200px;
  grid-template-areas: "left main right";
  background: #fff;
}
.sidebar-left { grid-area: left; background: var(--panel); border-right: 1px solid var(--line); }
.content { grid-area: main; padding: 20px; min-width: 0; }
.sidebar-right { grid-area: right; background: var(--panel); border-left: 1px solid var(--line); }

/* ---------- Pods (Products / News headers) ---------- */
.pod-header {
  height: 44px;
  background: url(/assets/img/pod_header_bg.gif) repeat-x;
  line-height: 0;
}
.sidebar-right .pod-header { border-bottom: 1px solid #646464; }
.pod-header img { margin: 15px 0 0 15px; }

.product-nav ul, .news-list, .social { margin: 0; padding: 0; list-style: none; }
.product-nav { margin-left: 1px; }
.product-nav li { margin-bottom: 1px; }
.product-nav a {
  display: block;
  padding: 13px 9px;
  background: url(/assets/img/nav_bg.gif) repeat-y;
  font: bold 10px/10px Tahoma, Verdana, sans-serif;
  text-decoration: none;
  color: #fff;
}
.product-nav a:hover,
.product-nav a:focus-visible,
.product-nav a[aria-current="page"] { background-position: right; }

.social { padding: 3px 0; }
.social a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 5px;
  font: 11px/18px Tahoma, Verdana, sans-serif;
  color: var(--text);
  text-decoration: none;
}
.social a:hover { text-decoration: underline; }
.social img { flex: none; }

/* News list */
.news-item {
  display: block;
  padding: 15px;
  background: url(/assets/img/divider_dotted.gif) repeat-x bottom;
  font-family: Tahoma, Verdana, sans-serif;
  text-decoration: none;
  color: #606060;
}
.news-list li:last-child .news-item { background: none; }
.news-item:hover, .news-item:focus-visible { background-color: var(--hover); }
.news-title { display: block; font-weight: bold; line-height: normal; color: var(--title); }
.news-date { display: block; margin-top: 2px; font-size: 10px; font-style: italic; line-height: normal; color: var(--muted); }

.pod-footer {
  padding: 14px 15px 16px;
  background: url(/assets/img/divider_dotted.gif) repeat-x top;
  text-align: right;
}
/* Green button, same artwork as the product buttons (left half normal, right half darker on hover). */
.button {
  display: inline-block;
  padding: 8px 20px;
  background: #1f9a48 url(/assets/img/nav_bg.gif) repeat-y left top;
  border-radius: 2px;
  font: bold 11px/14px Tahoma, Verdana, sans-serif;
  color: #fff;
  text-decoration: none;
}
.button:hover, .button:focus-visible { background-position: right top; }
.button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Content ---------- */
.content h1 { margin: 0 0 8px; font-size: 14px; line-height: 18px; color: var(--green); }
.content h2 { margin: 18px 0 8px; font-size: 12px; line-height: 18px; color: var(--green); }
.content p { margin: 0 0 18px; }

/* The four breed tiles fill the same width as the video below (560px max), so the row has no gap at the end. */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-width: 560px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  line-height: 0;
}
.tiles a { display: block; overflow: hidden; }
.tiles img { display: block; width: 100%; transition: transform .25s ease, filter .25s ease; }
.tiles a:hover img, .tiles a:focus-visible img { transform: scale(1.07); filter: brightness(1.1) saturate(1.1); }
.tiles a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tiles img { transition: none; } .tiles a:hover img, .tiles a:focus-visible img { transform: none; } }

/* Click-to-load video */
.video {
  position: relative;
  display: block;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  text-decoration: none;
}
.video img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute;
  top: 50%; left: 50%;
  width: 68px; height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 12px;
  background: rgba(0, 126, 63, .92);
}
.video-play::after {
  content: "";
  position: absolute;
  top: 13px; left: 27px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.video:hover .video-play, .video:focus-visible .video-play { background: #00a152; }
.video-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 6px 10px;
  background: rgba(0, 0, 0, .6);
  font: 11px/16px Verdana, Arial, sans-serif;
  color: #fff;
}
.video-live iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Inner pages ---------- */
.page { grid-template-columns: 180px minmax(0, 1fr) var(--aside-w, 200px); }
.aside-wide { --aside-w: 232px; }

.content h1.as-h2 { font-size: 12px; margin: 18px 0 0; }
.content hr { height: 1px; margin: 18px 0; border: 0; background: #c7c7c7; }
.content a.button { color: #fff; }

.dash-list, .plain-list { margin: 0 0 18px; padding: 0; list-style: none; }
.dash-list li::before { content: "- "; }

.byline { margin: 0 0 18px; font-size: 10px; font-style: italic; font-weight: bold; }
.back { margin-top: 24px; }

.news-index { margin: 0; padding: 0; list-style: none; }
.news-index li { padding: 0 0 6px; margin-bottom: 14px; background: url(/assets/img/divider_dotted.gif) repeat-x bottom; }
.news-index li:last-child { background: none; }
.news-index h2 { margin: 0 0 2px; }
.news-index h2 a { color: var(--green); text-decoration: none; }
.news-index h2 a:hover { text-decoration: underline; }
.news-index .byline { margin-bottom: 4px; }
.news-index p { margin: 0 0 8px; }

.stroke { border: 1px solid #626463; }

/* Photo strip at the top of the product pages */
.photo-strip { display: flex; gap: 1px; margin: 0 0 18px; border: 1px solid #046434; background: #fff; line-height: 0; }
.photo-strip img { flex: 1 1 0; min-width: 0; height: 134px; object-fit: cover; }
.photo-strip img.strip-narrow { flex: 0 0 38.5%; }

/* Photos in the wide right-hand column */
.photos { margin: 0; padding: 20px; list-style: none; }
.photos li { margin-bottom: 20px; }
.photos img { display: block; max-width: 100%; height: auto; }
.photos p { margin: 8px 0 0; }
.caption { font-style: italic; color: var(--muted); }

/* Contact page */
.contact-info { padding: 20px; }
.contact-info p { margin: 0 0 18px; }
.contact-info hr { height: 1px; margin: 0 0 18px; border: 0; background: #c7c7c7; }
.map { margin: 0 0 6px; max-width: 580px; }
.map img { display: block; width: 100%; height: auto; border: 1px solid #626463; }
.map figcaption { margin-top: 3px; font-size: 10px; line-height: 14px; color: var(--muted); }
.map-key { margin: 0 0 18px; padding: 0; list-style: none; }
.map-key li { margin-bottom: 6px; }
.map-key a { margin-left: 4px; white-space: nowrap; }
.pin {
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green);
  font: bold 11px/20px Verdana, Arial, sans-serif;
  text-align: center;
  color: #fff;
}
.directions { margin-top: 18px; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  body { font-size: 13px; line-height: 1.6; }
  .page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "main main" "left right";
  }
  .sidebar-left { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .sidebar-right { border-left: 0; border-top: 1px solid var(--line); }
  .social a, .news-item { font-size: 13px; }
  .news-date { font-size: 12px; }
  /* The button artwork is exactly 179px wide, so keep the buttons that width and tile them in a grid. */
  .product-nav { margin-left: 0; padding: 0 0 0 1px; }
  .product-nav ul { display: grid; grid-template-columns: repeat(auto-fill, 179px); gap: 1px; }
  .product-nav li { margin-bottom: 0; }
  .product-nav a { font-size: 12px; line-height: 14px; padding: 12px 9px; }
  .main-nav a { font-size: 11px; }
  .content h1 { font-size: 17px; line-height: 1.3; }
  .content h2 { font-size: 15px; line-height: 1.3; }
  .content p { margin-bottom: 1.2em; }
  .content h1.as-h2 { font-size: 15px; }
  .byline, .map figcaption { font-size: 12px; }
  .photos { display: flex; flex-wrap: wrap; gap: 16px 20px; padding: 16px 20px; }
  .photos li { margin-bottom: 0; flex: 0 1 190px; }
  .contact-info { padding: 16px 20px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-header { padding-top: 12px; }
  .main-nav ul { gap: 2px 0; }
  .site-header { padding-left: 2px; padding-right: 2px; }
  .main-nav a { padding: 0 7px; margin-left: 1px; font-size: 11px; line-height: 32px; }
  .banner img { height: 110px; object-fit: cover; object-position: 50% 50%; }
  .page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "left" "right"; }
  /* On the Contact page the contact details matter most, so they come before Products and the social links. */
  .page-contact .page { grid-template-areas: "main" "right" "left"; }
  .sidebar-left, .sidebar-right { border-left: 0; border-right: 0; }
  .content { padding: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-width: none; }
  .product-nav a { padding: 14px 9px; font-size: 13px; }
  .button { padding: 10px 22px; font-size: 13px; }
  .social a { padding: 8px 12px; font-size: 14px; }
  .news-item { padding: 14px 16px; font-size: 14px; }
}
