/* JK Performance Horses — shared styles for every page.
   Desktop (1040px and wider) reproduces the original 1000px image-based design.
   Below that, the header is scaled and the menu becomes real text so it works on phones. */

:root {
  --teal: #82c8c8;
  --panel: #8fd0d1;
  --tan: #c9b498;
  --tan-dark: #a98f6e;
  --ink: #000;
  --link: #333;
  --menu: #2b1a12;
  --menu-hover: #8a2b2b;
  --footer-link: #99ffff;
}

* { box-sizing: border-box; }

html { background: #5c3c28; }

body {
  margin: 0;
  background: #5c3c28 url(/images/leather.jpg) repeat;
  color: var(--ink);
  font-family: Raleway, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img { border: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: #333; }
p { margin-top: 0; }

/* ------------------------------------------------------------------ page shell */
.page {
  position: relative;
  width: 1000px;
  margin: 8px auto 0;
}

.masthead {
  position: absolute;
  left: 0;
  top: 0;
  width: 1000px;
  height: 195px;
}
.masthead .logo { display: block; width: 487px; }
.masthead .logo img { display: block; width: 100%; height: auto; }
.home .masthead .logo { width: 472px; }

/* ------------------------------------------------------------------ menu (desktop = original button art) */
.nav {
  position: absolute;
  left: 0;
  top: 198px;
  display: flex;
  height: 42px;
}
.nav a {
  display: block;
  height: 42px;
  background-repeat: no-repeat;
  background-position: left top;
  overflow: hidden;
}
.nav a span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nav a:hover { text-decoration: none; }

/* inner pages */
.nav-i-home       { width: 153px; background-image: url(/images/nav/i-home.png); }
.nav-i-progeny    { width: 90px;  background-image: url(/images/nav/i-progeny.png); }
.nav-i-highlights { width: 105px; background-image: url(/images/nav/i-highlights.png); }
.nav-i-broodmares { width: 124px; background-image: url(/images/nav/i-broodmares.png); }
.nav-i-sale       { width: 113px; background-image: url(/images/nav/i-sale.png); }
.nav-i-contact    { width: 112px; background-image: url(/images/nav/i-contact.png); }
.nav-i-home:hover       { background-image: url(/images/nav/i-home-hover.png); }
.nav-i-progeny:hover    { background-image: url(/images/nav/i-progeny-hover.png); }
.nav-i-highlights:hover { background-image: url(/images/nav/i-highlights-hover.png); }
.nav-i-broodmares:hover { background-image: url(/images/nav/i-broodmares-hover.png); }
.nav-i-sale:hover       { background-image: url(/images/nav/i-sale-hover.png); }
.nav-i-contact:hover    { background-image: url(/images/nav/i-contact-hover.png); }


/* home page menu: its own strip above the header art, so the horse never covers it */
@media (min-width: 1040px) {
  .home .page { margin-top: 58px; }
  .home .nav {
    top: -50px;
    width: 1000px;
    height: 42px;
    justify-content: center;
    background: linear-gradient(#d9c8ae, var(--tan) 55%, var(--tan-dark));
    border: 1px solid #8c7552;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .4);
  }
  .home .nav a {
    width: auto;
    height: 40px;
    padding: 0 24px;
    line-height: 40px;
    background: none;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    font-size: 18px;
    color: var(--menu);
    overflow: visible;
  }
  .home .nav a span { position: static; width: auto; height: auto; clip: auto; }
  .home .nav a:hover { color: var(--menu-hover); text-decoration: none; }
  .home .nav a + a { border-left: 2px solid rgba(43, 26, 18, .5); }
}

/* ------------------------------------------------------------------ HOME page */
.home .page {
  min-height: 1178px;
  background: url(/images/home-bg.png) no-repeat left top, url(/images/home-repeat.png) repeat-y;
}
.home-copy {
  width: 606px;
  padding: 762px 0 60px 56px;
}
.home-copy p { margin-bottom: 1em; }
.hero-m { display: none; }

.fb-box {
  position: absolute;
  left: 658px;
  top: 546px;
  width: 283px;
  text-align: center;
}
.fb-box .call { display: block; padding: 5px 0 6px; }
.fb-box .call img { display: block; margin: 0 auto; width: 243px; height: 41px; }
.box-contact { color: #f1ece2; padding: 22px 18px 0; font-size: 16px; line-height: 1.45; }
.box-contact p { margin: 0 0 18px; }
.box-contact strong { font-size: 17px; }
.box-contact a, .box-contact a:visited { color: var(--footer-link); }
.box-contact .email { font-size: 14px; white-space: nowrap; }
.box-contact a:hover { color: var(--footer-link); }

.home-footer {
  width: 1000px;
  height: 82px;
  margin: 0 auto;
  background: url(/images/home-footer.png) no-repeat;
}

/* ------------------------------------------------------------------ INNER pages */
.inner .page {
  background: url(/images/inner-bg.png) no-repeat left top, url(/images/inner-repeat.png) repeat-y;
  padding-top: 240px;
}
.content {
  margin: 0 30px;
  padding: 20px;
  min-height: 560px;
}
.content h1 { font-size: 24px; margin: 0 0 20px; text-align: center; }
.content h2 { font-size: 18px; margin: 0 0 22px; }
.content img { max-width: 100%; height: auto; }
.center { text-align: center; }
.inner-bottom {
  width: 1000px;
  height: 75px;
  margin: 0 auto;
  background: url(/images/inner-bottom.png) no-repeat;
}

/* broodmares */
.mares-intro { text-align: center; font-size: 20px; font-style: italic; font-weight: bold; margin: 0 0 18px; }
.mare { text-align: center; border-top: 1px solid rgba(0,0,0,.35); padding: 22px 0 8px; }
.mare img { display: block; margin: 0 auto 10px; border: 0; }
.mare .caption { font-size: 18px; font-style: italic; margin: 14px auto 6px; max-width: 760px; }
.mare .updated { display: block; }

/* contact */
.contact-block { margin: 0 0 28px 40px; }
.contact-block h3 { font-size: 18px; margin: 0 0 14px; line-height: 1.35; }
.contact-block p { margin: 0 0 14px; font-size: 16px; }
.map { width: 100%; max-width: 600px; height: 450px; border: 0; display: block; margin: 0 auto; }

.placeholder { text-align: center; margin: 70px 0 120px; font-size: 16px; }

/* ------------------------------------------------------------------ footer (all pages) */
.site-footer {
  text-align: center;
  width: 95%;
  margin: 0 auto;
  padding: 20px 0 24px;
  color: #fff;
}
.site-footer a, .site-footer a:visited { color: var(--footer-link); }
.site-footer a:hover { text-decoration: underline; color: var(--footer-link); }
.site-footer p { margin: 0 0 1em; }
.site-footer .credit { font-size: 12px; }
.site-footer .credit img { vertical-align: middle; width: 55px; height: 36px; }

/* ------------------------------------------------------------------ 404 */
.notfound { text-align: center; color: #fff; padding: 80px 16px 60px; }
.notfound h1 { font-size: 28px; margin: 0 0 12px; }
.notfound a { color: var(--footer-link); }

/* ================================================================== PHONES AND TABLETS */
@media (max-width: 1039px) {
  body { padding: 0 8px; }

  .page, .home .page, .inner .page {
    width: 100%;
    max-width: 1000px;
    margin: 8px auto 0;
    min-height: 0;
    padding: 0;
    background: var(--teal);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
  }

  .masthead {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1000 / 195;
    background: url(/images/inner-bg.png) no-repeat left top;
    background-size: 100% auto;
  }
  .masthead .logo, .home .masthead .logo { width: 48.7%; }

  .nav, .home .nav {
    position: static;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 0;
    padding: 6px 4px;
    background: linear-gradient(#d6c3a8, var(--tan) 55%, var(--tan-dark));
    border-top: 1px solid #e6d9c4;
    border-bottom: 1px solid #8c7552;
  }
  .nav a, .nav a[class] {
    position: static;
    width: auto !important;
    height: auto;
    margin: 0 !important;
    padding: 9px 12px;
    background: none !important;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    font-size: 16px;
    color: var(--menu);
    overflow: visible;
  }
  .nav a span { position: static; width: auto; height: auto; clip: auto; }
  .nav a:hover { color: var(--menu-hover); text-decoration: none; }
  .nav a:not(:first-child) { border-left: 2px solid rgba(43, 26, 18, .55); }
  /* the home page has no separate Home link in its menu; show it on phones */
  .nav .m-only { display: inline-block; }

  .home-copy { width: auto; padding: 18px 18px 8px; }
  .hero-m {
    display: block;
    width: 100%;
    aspect-ratio: 1000 / 486;
    background: url(/images/home-hero-mobile.png) no-repeat center top;
    background-size: 100% auto;
  }

  .fb-box { position: static; width: auto; margin: 0 18px 22px; padding: 4px 0 14px; background: #211b17; border-radius: 4px; }
  .box-contact { padding: 14px 18px 0; }

  .home-footer { display: none; }

  .content { margin: 0; padding: 18px 16px 8px; min-height: 0; background: var(--panel); }
  .inner-bottom { width: 100%; height: auto; aspect-ratio: 1000 / 75; background-size: 100% auto; }

  .newsflash { font-size: 28px; }
  .big-bold { font-size: 20px; }
  .contact-block { margin-left: 0; }
  .map { height: 320px; }
}

@media (max-width: 520px) {
  .nav a, .nav a[class] { padding: 8px 9px; font-size: 14px; }
  .mare .caption { font-size: 16px; }
  .newsflash { font-size: 24px; }
  .big-bold { font-size: 18px; }
  .content h1 { font-size: 22px; }
  .mares-intro { font-size: 18px; }
}
