/* ============================================================
   Shady Spring Farm — site stylesheet
   Historic farm B&B theme: deep navy blue, light soft dirty
   blue, and peanut butter, with dark serif type.
   ============================================================ */
:root {
  --sage: #a9bfc9;            /* light, soft, dirty blue — page background */
  --sage-dark: #8fa9b8;
  --forest: #10304e;          /* deep navy blue — nav, footer, headings */
  --forest-dark: #081f36;
  --cream: #f2f5f6;           /* content panels — palest tint of the dusty blue */
  --cream-dark: #dde7ec;
  --ink: #16283a;             /* body text */
  --muted: #5b6d7a;
  --gold: #c8893a;            /* peanut butter — accents */
  --line: #c3d0d7;
  --radius: 8px;
  --font: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 8px 24px rgba(8, 31, 54, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  background-color: var(--sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%238fa9b8' stroke-width='1.4' opacity='0.45'%3E%3Cpath d='M40 400 C 60 300, 30 240, 70 160 M70 160 C 90 130, 110 120, 140 110 M70 160 C 60 130, 50 110, 55 80 M75 230 C 100 220, 120 225, 145 210'/%3E%3C/g%3E%3C/svg%3E");
}

a { color: #12497e; }
a:hover { color: var(--forest); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Masthead ---------- */
.masthead {
  background: var(--cream);
  border-bottom: 4px solid var(--forest);
  text-align: center;
  padding: 30px 20px 22px;
}
.masthead .welcome {
  font-style: italic;
  color: var(--muted);
  font-size: 1.05rem;
}
.masthead h1 {
  font-size: 2.6rem;
  color: var(--forest-dark);
  letter-spacing: 1px;
  margin: 4px 0;
}
.masthead .historic {
  color: var(--ink);
  font-size: 1.08rem;
}
.masthead .locale {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 4px;
}

/* ---------- Nav ---------- */
.site-nav {
  background: var(--forest);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.main-nav > ul > li { position: relative; }
.main-nav a {
  display: block;
  color: #f4efdf;
  text-decoration: none;
  font-size: 1.02rem;
  padding: 14px 20px;
  transition: background 0.2s;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active { background: var(--forest-dark); }
.main-nav .sub {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: var(--forest-dark);
  box-shadow: var(--shadow);
  z-index: 200;
}
.main-nav .sub a { padding: 11px 20px; font-size: 0.97rem; border-top: 1px solid rgba(255,255,255,0.08); }
.main-nav .sub a:hover { background: #06182b; }
.main-nav li.has-sub:hover > .sub,
.main-nav li.has-sub:focus-within > .sub { display: block; }
.main-nav .caret { font-size: 0.75em; margin-left: 5px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  color: #f4efdf;
  font-size: 1.3rem;
  padding: 6px 14px;
  margin: 8px 0;
  cursor: pointer;
}

/* ---------- Page hero ---------- */
.page-hero {
  background: var(--cream-dark);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 40px 20px 32px;
}
.page-hero h2 {
  font-size: 2rem;
  color: var(--forest-dark);
  margin-bottom: 8px;
}
.page-hero p {
  color: var(--muted);
  font-style: italic;
  max-width: 680px;
  margin: 0 auto;
}
.breadcrumb {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.breadcrumb a { color: var(--muted); }

/* ---------- Content panels ---------- */
.section { padding: 56px 0; }
.panel {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
  margin-bottom: 28px;
}
.panel h3 {
  color: var(--forest-dark);
  font-size: 1.5rem;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
}
.panel p { margin-bottom: 14px; }
.panel ul.leaders { list-style: none; }
.panel ul.leaders li {
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
}
.panel ul.leaders li:last-child { border-bottom: none; }
.panel ul.leaders strong { color: var(--forest-dark); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-top: 5px solid var(--forest);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s;
}
.card:hover { transform: translateY(-4px); }
.card h3 { color: var(--forest-dark); font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--muted); flex: 1; margin-bottom: 16px; font-size: 0.99rem; }
.card a.more {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--forest);
  text-decoration: none;
  font-size: 0.95rem;
}
.card a.more:hover { text-decoration: underline; }

/* ---------- Photo frames ---------- */
.photo-frame {
  background: var(--forest-dark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}
.photo-frame img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.photo-frame figcaption {
  background: rgba(8, 31, 54, 0.92);
  color: #f4efdf;
  font-size: 0.92rem;
  padding: 10px 14px;
  font-style: italic;
}
.photo-frame .frame-label {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(244, 239, 223, 0.75);
  font-style: italic;
  padding: 20px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.hero-photo { margin-bottom: 28px; }
.hero-photo img { height: 340px; }

/* ---------- Photo lightbox (click a photo to enlarge) ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 20, 36, 0.93);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: #eaf1f5;
  font-style: italic;
  margin-top: 14px;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 22px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(16, 48, 78, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 52px;
  height: 52px;
  cursor: pointer;
  z-index: 2;
}
.lightbox-nav:hover { background: var(--gold); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

/* ---------- Rates table ---------- */
.rate-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 1rem;
}
.rate-table th, .rate-table td {
  border: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
}
.rate-table th {
  background: var(--forest);
  color: #f4efdf;
  font-weight: normal;
  letter-spacing: 0.5px;
}
.rate-table tr:nth-child(even) td { background: var(--cream-dark); }
.fineprint { font-size: 0.9rem; color: var(--muted); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--forest);
  color: #f4efdf;
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: var(--forest-dark); color: #fff; transform: translateY(-2px); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  align-items: start;
}
.contact-form {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.contact-form label {
  display: block;
  font-weight: bold;
  color: var(--forest-dark);
  margin-bottom: 6px;
  font-size: 0.98rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 1rem;
  margin-bottom: 16px;
  background: #fffdf6;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--forest);
  border-color: var(--forest);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.form-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.form-status.success { background: #e8f5e9; color: #2e7d32; }
.form-status.error { background: #fdecea; color: #b3261e; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-dark);
  color: rgba(244, 239, 223, 0.75);
  padding: 40px 0 0;
  margin-top: 20px;
}
.footer-links {
  text-align: center;
  padding-bottom: 22px;
  font-size: 0.98rem;
}
.footer-links a {
  color: rgba(244, 239, 223, 0.85);
  text-decoration: none;
  margin: 0 8px;
}
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-farm {
  text-align: center;
  padding-bottom: 24px;
  font-style: italic;
  color: rgba(244, 239, 223, 0.6);
  font-size: 0.95rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  padding: 16px 0;
  font-size: 0.85rem;
  font-family: var(--sans);
  color: rgba(244, 239, 223, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .two-col, .contact-grid { grid-template-columns: 1fr; }
  .panel { padding: 28px 24px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-inner { flex-direction: column; align-items: stretch; }
  .nav-inner > .nav-toggle { align-self: center; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav .sub {
    display: block;
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,0.15);
  }
  .main-nav .sub a { padding-left: 36px; }
  .main-nav .caret { display: none; }
  .masthead h1 { font-size: 1.9rem; }
  .hero-photo img { height: 220px; }
}
