/* ==========================================================================
   Jensen's Red Barn — custom styles
   Color scheme rebuilt from the archived site (web.archive.org, Dec 25 2023)
   ========================================================================== */

:root {
  --jrb-red: #d61e21;        /* accent / brand red          */
  --jrb-dark-red: #c1292b;   /* nav & footer links, socials */
  --jrb-cream: #f5efe0;      /* page background             */
  --jrb-tan: #d7cfab;        /* borders / subtle fills      */
  --jrb-gold-light: #ffdead; /* header & footer background  */
  --jrb-gold: #f2b963;       /* header & footer borders     */
  --jrb-olive: #69603e;      /* muted secondary text        */
  --jrb-brown: #674b22;      /* footer meta text            */
  --jrb-black: #000000;      /* primary text                */
}

/* ---- Base -------------------------------------------------------------- */

body {
  background-color: var(--jrb-cream);
  background-image: url("../img/ricepaper_v3_backgroud.png");
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--jrb-black);
  font-family: Georgia, "Times New Roman", serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--jrb-dark-red);
}

a {
  color: var(--jrb-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--jrb-dark-red);
}

.text-cream { color: var(--jrb-cream) !important; }
.text-olive { color: var(--jrb-olive) !important; }
.text-brown { color: var(--jrb-brown) !important; }
.text-barn-red { color: var(--jrb-red) !important; }
.text-dark-red { color: var(--jrb-dark-red) !important; }

.bg-cream { background-color: var(--jrb-cream) !important; }
.bg-gold-light { background-color: var(--jrb-gold-light) !important; }
.bg-dark-red { background-color: var(--jrb-dark-red) !important; }

/* ---- Brand / headings --------------------------------------------------- */

.brand-cursive {
  font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
  color: var(--jrb-red);
}

/* ---- Navbar -------------------------------------------------------------- */

.navbar-jrb {
  background-color: var(--jrb-gold-light);
  border-bottom: 4px solid var(--jrb-gold);
  padding-top: .6rem;
  padding-bottom: .6rem;
}

.navbar-jrb .navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--jrb-red);
  line-height: 1.1;
}

.navbar-jrb .navbar-brand:hover { color: var(--jrb-dark-red); }

.navbar-jrb .navbar-brand img {
  height: 52px;
  width: auto;
}

.navbar-jrb .navbar-toggler {
  border: 2px solid var(--jrb-dark-red);
  color: var(--jrb-dark-red);
}

.navbar-jrb .navbar-toggler:focus {
  box-shadow: 0 0 0 .25rem rgba(214, 30, 33, .2);
}

.navbar-jrb .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23c1292b' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-jrb .nav-link {
  color: var(--jrb-dark-red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .95rem;
  padding: .5rem .75rem;
  border-bottom: 3px solid transparent;
}

.navbar-jrb .nav-link:hover,
.navbar-jrb .nav-link:focus,
.navbar-jrb .nav-link.active {
  color: var(--jrb-red);
  border-bottom-color: var(--jrb-red);
}

.navbar-jrb .navbar-nav .nav-link.active {
  color: var(--jrb-red);
}

@media (max-width: 991.98px) {
  .navbar-jrb .nav-link { border-bottom-color: var(--jrb-tan); }
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-caption {
  position: absolute;
  inset: auto 0 1.25rem 0;
  text-align: center;
  pointer-events: none;
}

.hero-caption .badge-text {
  display: inline-block;
  background-color: rgba(193, 41, 43, .88);
  color: var(--jrb-gold-light);
  font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
  font-size: clamp(1.4rem, 4vw, 2.75rem);
  padding: .35rem 1.4rem;
  border-radius: .375rem;
  line-height: 1.2;
}

/* ---- Buttons -------------------------------------------------------------- */

.btn-jrb {
  background-color: var(--jrb-red);
  border: 2px solid var(--jrb-red);
  color: var(--jrb-cream);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.btn-jrb:hover,
.btn-jrb:focus {
  background-color: var(--jrb-dark-red);
  border-color: var(--jrb-dark-red);
  color: #ffffff;
}

.btn-outline-jrb {
  border: 2px solid var(--jrb-red);
  color: var(--jrb-red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.btn-outline-jrb:hover,
.btn-outline-jrb:focus {
  background-color: var(--jrb-red);
  color: var(--jrb-cream);
}

/* ---- Cards ----------------------------------------------------------------- */

.card-jrb {
  background-color: #ffffff;
  border: 3px solid var(--jrb-tan);
  border-radius: .5rem;
  overflow: hidden;
  height: 100%;
}

.card-jrb .card-img-top {
  border-bottom: 3px solid var(--jrb-tan);
}

.card-jrb .card-title {
  font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
  font-size: 1.9rem;
  color: var(--jrb-red);
}

/* ---- Social icons ------------------------------------------------------------ */

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  background-color: var(--jrb-dark-red);
  color: var(--jrb-gold-light);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.social-icon:hover,
.social-icon:focus {
  background-color: var(--jrb-red);
  color: #ffffff;
  transform: translateY(-3px);
}

.social-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

.social-icon-sm {
  width: 2.4rem;
  height: 2.4rem;
}

.social-icon-sm svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ---- Page header (inner pages) --------------------------------------------- */

.page-header {
  background-color: var(--jrb-dark-red);
  border-top: 4px solid var(--jrb-gold);
  border-bottom: 4px solid var(--jrb-gold);
}

.page-header h1 {
  color: var(--jrb-gold-light);
  font-size: 2.5rem;
}

.page-header .page-subtitle {
  color: var(--jrb-gold-light);
  font-style: italic;
  opacity: .9;
}

/* ---- Section accents ---------------------------------------------------------- */

.divider-leaf {
  border: 0;
  border-top: 3px solid var(--jrb-tan);
  opacity: 1;
  width: 120px;
  margin: 0 auto;
}

.section-heading {
  font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
  color: var(--jrb-red);
  font-size: 2.25rem;
}

.lead-intro {
  font-size: 1.15rem;
  color: var(--jrb-black);
}

.quote-box {
  background-color: var(--jrb-gold-light);
  border-left: 5px solid var(--jrb-gold);
  color: var(--jrb-brown);
  font-style: italic;
  padding: 1.25rem 1.5rem;
  border-radius: .375rem;
}

/* ---- Forms ---------------------------------------------------------------------- */

.form-jrb label,
.form-jrb .form-label {
  font-weight: 600;
  color: var(--jrb-dark-red);
}

.form-jrb .form-control {
  background-color: #ffffff;
  border: 2px solid var(--jrb-tan);
  border-radius: .375rem;
  padding: .65rem .85rem;
  font-family: inherit;
}

.form-jrb .form-control:focus {
  border-color: var(--jrb-red);
  box-shadow: 0 0 0 .25rem rgba(214, 30, 33, .15);
}

.form-jrb .form-control::placeholder {
  color: #a08d6b;
}

.form-jrb .form-check-input:checked {
  background-color: var(--jrb-red);
  border-color: var(--jrb-red);
}

.form-jrb .form-check-input:focus {
  border-color: var(--jrb-red);
  box-shadow: 0 0 0 .25rem rgba(214, 30, 33, .15);
}

/* ---- Footer ----------------------------------------------------------------------- */

.footer-jrb {
  background-color: var(--jrb-gold-light);
  border-top: 4px solid var(--jrb-gold);
  color: var(--jrb-brown);
}

.footer-jrb h6 {
  color: var(--jrb-dark-red);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.footer-jrb a {
  color: var(--jrb-dark-red);
  text-decoration: none;
}

.footer-jrb a:hover {
  color: var(--jrb-red);
  text-decoration: underline;
}

.footer-jrb .footer-brand {
  font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
  font-size: 1.6rem;
  color: var(--jrb-red);
}

.footer-bottom {
  border-top: 2px solid var(--jrb-gold);
  font-size: .9rem;
}

/* ---- Story / extra content ---------------------------------------------------------- */

.story-post {
  background-color: #ffffff;
  border: 3px solid var(--jrb-tan);
  border-radius: .5rem;
}

.story-post .post-title {
  font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
  color: var(--jrb-red);
  font-size: 2rem;
}

/* ---- PDF scrapbook slideshow ------------------------------------------------ */

.slideshow-frame {
  background-color: #ffffff;
  border: 3px solid var(--jrb-tan);
  border-radius: .5rem;
  padding: 1rem;
}

.slideshow-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  max-height: 75vh;
  overflow: auto;
  background-color: #f7f2e7;
  border: 2px dashed var(--jrb-tan);
  border-radius: .375rem;
  padding: 1rem;
}

.slideshow-stage canvas {
  max-width: 100%;
  height: auto;
  background-color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.slideshow-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--jrb-olive);
  font-style: italic;
}

.slideshow-status.text-danger {
  color: var(--jrb-red);
  font-style: normal;
}

.slideshow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 1rem;
}

.slideshow-page-indicator {
  font-weight: 600;
  color: var(--jrb-brown);
  min-width: 9rem;
  text-align: center;
}

.post-meta {
  color: var(--jrb-olive);
  font-size: .9rem;
  font-style: italic;
}

/* ---- Utility -------------------------------------------------------------------------- */

.to-top-link {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  display: none;
  width: 2.9rem;
  height: 2.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--jrb-dark-red);
  color: var(--jrb-gold-light);
  border: 2px solid var(--jrb-gold);
  text-decoration: none;
  font-size: 1.2rem;
  opacity: .9;
  transition: opacity .2s ease, transform .2s ease;
}

.to-top-link:hover {
  color: #ffffff;
  opacity: 1;
  transform: translateY(-3px);
}

.to-top-link.visible {
  display: inline-flex;
}
