:root {
  --navy: #1a2a3a;
  --navy-light: #2d4154;
  --forest: #2d4a3e;
  --gold: #b8860b;
  --cream: #f7f4ef;
  --white: #ffffff;
  --gray: #6b7280;
  --gray-light: #e5e7eb;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  color: var(--navy);
  background: var(--cream);
  line-height: 1.6;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Routing banner / Header – logo, social, nav with dropdown */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.logo a { color: var(--white); text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.logo img { height: 36px; width: auto; display: block; }

/* Social (recreate old site banner) */
.header-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-social a {
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}
.header-social a:hover { color: var(--gold); }

/* Nav with dropdown */
.nav-wrap { display: flex; align-items: center; gap: 1rem; }
nav .nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.5rem; }
nav .nav-list > li { position: relative; }
nav .nav-list > li > a,
nav .nav-list > li > .nav-parent {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
nav .nav-list > li > a:hover,
nav .nav-list > li > .nav-parent:hover { color: var(--gold); }
nav .nav-list .nav-parent::after {
  content: '\25BC';
  font-size: 0.6em;
  margin-left: 0.25rem;
  opacity: 0.8;
}
/* Dropdown */
nav .nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  padding: 0.5rem 0;
  background: var(--navy-light);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 50;
}
nav .nav-list > li:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
nav .nav-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
nav .nav-dropdown a:hover { background: rgba(255,255,255,0.1); color: var(--gold); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 4px;
}
.nav-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-toggle[aria-expanded="true"] { background: var(--navy-light); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--forest) 100%);
  color: var(--white);
  padding: 4rem 1.5rem 5rem;
  text-align: center;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}
.hero p { margin: 0; font-size: 1.1rem; opacity: 0.9; max-width: 500px; margin-left: auto; margin-right: auto; }

/* Property page hero (image + title) */
.page-hero {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: var(--navy-light);
}
.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-hero .page-hero-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 0;
}

/* Main */
main { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--navy);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

/* Property page content */
.property-content { padding: 2rem 0; }
.property-content .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.property-content .back-link:hover { color: var(--navy); }
.property-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}
.property-content h2:first-of-type { margin-top: 0; }
.property-content p { margin: 0 0 1rem; color: var(--navy); }
.property-content ul { margin: 0 0 1rem; padding-left: 1.5rem; color: var(--navy); }
.property-content li { margin-bottom: 0.35rem; }
.property-content .news-note, .property-content .ext-link {
  color: var(--navy-light);
  text-decoration: none;
  font-size: 0.95rem;
}
.property-content .ext-link:hover { color: var(--gold); text-decoration: underline; }
.property-content table {
  width: 100%;
  max-width: 500px;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.95rem;
}
.property-content th,
.property-content td {
  border: 1px solid var(--gray-light);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.property-content th { background: var(--navy); color: var(--white); font-weight: 500; }
.property-content tr:nth-child(even) { background: var(--white); }
.property-content caption { font-size: 0.85rem; color: var(--gray); margin-bottom: 0.25rem; text-align: left; }
.property-content .contact-cta {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-light);
}
.property-content .contact-cta a { color: var(--gold); font-weight: 500; text-decoration: none; }
.property-content .contact-cta a:hover { text-decoration: underline; }

/* Kirby Springs – table of contents + sections (matches live site sidebar) */
.ks-toc {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-light);
}
.ks-toc h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: var(--navy);
}
.ks-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.ks-toc a {
  color: var(--navy-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.ks-toc a:hover { color: var(--gold); }
.ks-section {
  margin: 2.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-light);
  scroll-margin-top: 6rem;
}
.ks-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.ks-section h2 {
  font-family: 'Cormorant Garamond', serif;
  text-align: center;
  color: var(--navy);
  margin: 0 0 1rem;
}
.ks-overview-img {
  float: left;
  max-width: 45%;
  margin: 0 1.5rem 1rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
@media (max-width: 640px) {
  .ks-overview-img { float: none; max-width: 100%; margin-right: 0; }
}
.property-content .clearfix::after { content: ""; display: table; clear: both; }
.ks-section figure {
  margin: 1rem auto;
  text-align: center;
  max-width: 100%;
}
.ks-section .img-zoom {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.ks-section iframe {
  max-width: 100%;
  border: 0;
  border-radius: 4px;
}
.kfh-family-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
  text-align: center;
}
@media (max-width: 640px) {
  .kfh-family-row { grid-template-columns: 1fr; }
}
.kfh-family-row figcaption {
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.property-content table.traffic-key td { text-align: left; }
.property-content table.traffic-key .center { text-align: center; }
.muted {
  color: var(--muted, #5a5a5a);
  font-size: 0.95rem;
}
.map-embed-wrap {
  max-width: 100%;
  margin: 1rem 0;
}
.map-embed-wrap iframe {
  width: 100%;
  max-width: 600px;
  display: block;
}
.property-content code {
  font-size: 0.9em;
  background: rgba(0,0,0,0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* Page actions bar (bottom links on property pages – same as old site Email / Print / Contact) */
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-light);
}
.page-actions .page-actions-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.5rem;
}
.page-actions a,
.page-actions button {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--navy-light);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.page-actions a:hover,
.page-actions button:hover { color: var(--gold); }
.page-actions .sep {
  color: var(--gray-light);
  user-select: none;
}
.page-resources {
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--gray-light);
}
.page-resources h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.page-resources ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.page-resources a {
  color: var(--navy-light);
  text-decoration: none;
  font-size: 0.9rem;
}
.page-resources a:hover { color: var(--gold); text-decoration: underline; }

/* Property cards (homepage) – entire card is clickable */
.properties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
a.property-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--gray-light);
}
a.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
a.property-card .thumb {
  height: 200px;
  background: var(--navy-light);
  overflow: hidden;
}
a.property-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
a.property-card .body { padding: 1.5rem; }
a.property-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.75rem;
}
a.property-card p { margin: 0; color: var(--gray); font-size: 0.95rem; }
a.property-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}
a.property-card:hover .read-more { color: var(--navy); }

/* Clickable zoomable images */
.img-zoom {
  cursor: zoom-in;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.is-open {
  display: flex;
}
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: var(--white);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: var(--cream); }
.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 0.9rem;
}

/* Download PDF button */
.btn-download-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.btn-download-pdf:hover {
  background: var(--cream);
  border-color: var(--gold);
}
.pdf-hint {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 0.35rem;
}
@media print {
  header, footer, .no-print, .back-link, .btn-download-pdf, .pdf-hint, .contact-form, .to-top, .page-actions, .page-resources, .page-bottom-links { display: none !important; }
  body { background: #fff; }
  .hero { background: #1a2a3a; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page-hero { break-inside: avoid; }
  a[href]::after { content: none; }
}

/* Contact */
#contact {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-light);
}
#contact .section-title { margin-top: 0; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.contact-item { display: flex; flex-direction: column; gap: 0.25rem; }
.contact-item strong {
  color: var(--navy);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-item a { color: var(--navy-light); text-decoration: none; transition: color 0.2s; }
.contact-item a:hover { color: var(--gold); }

.contact-form { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--gray-light); }
.contact-form h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 1rem;
}
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.form-row label .req { color: #b91c1c; }
.form-row input,
.form-row textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  background: var(--cream);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.2);
}
button[type="submit"] {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
button[type="submit"]:hover { background: var(--navy-light); }
.form-note { font-size: 0.85rem; color: var(--gray); margin-top: 0.5rem; }
.form-note code { font-size: 0.8rem; background: var(--cream); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* Contact form status (Web3Forms) */
.form-status {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.form-status[hidden] { display: none !important; }
.form-status--pending { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.form-status--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.form-status--error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Footer */
footer {
  background: var(--navy);
  color: var(--cream);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: 0.9rem; opacity: 0.9; }
.to-top { color: var(--cream); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.to-top:hover { color: var(--gold); }

/* Page bottom links – unified list (8 for Kirby Gate, 7 for Farm House & Springs) */
.page-bottom-links {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-light);
}
.page-bottom-links .page-bottom-links-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.page-bottom-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.page-bottom-links li { display: inline; }
.page-bottom-links li + li::before {
  content: '|';
  margin-right: 1rem;
  color: var(--gray-light);
}
.page-bottom-links a,
.page-bottom-links button {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--navy-light);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.page-bottom-links a:hover,
.page-bottom-links button:hover { color: var(--gold); }

/* ========== Responsive / Mobile ========== */
@media (max-width: 768px) {
  .header-inner { padding: 0.75rem 1rem; position: relative; }
  .header-social { display: none; }
  .nav-toggle { display: flex; }
  .nav-wrap {
    position: relative;
    margin-left: auto;
  }
  .nav-wrap nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: -1rem;
    margin-top: 0.25rem;
    background: var(--navy);
    padding: 0 1rem 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s, opacity 0.2s;
    pointer-events: none;
  }
  .nav-wrap.is-open nav {
    max-height: 90vh;
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
  }
  .nav-wrap .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-wrap .nav-list > li > a,
  .nav-wrap .nav-list > li > .nav-parent {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-wrap .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0,0,0,0.2);
    padding-left: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s;
  }
  .nav-wrap .nav-list > li.is-expanded .nav-dropdown {
    max-height: 200px;
  }
  .nav-wrap .nav-list > li:hover .nav-dropdown { transform: none; }
  .hero { padding: 3rem 1rem 4rem; }
  main { padding: 0 1rem 3rem; }
  .properties { grid-template-columns: 1fr; gap: 1.5rem; }
  a.property-card .thumb { height: 180px; }
  .page-hero { height: 260px; }
  .page-hero .page-hero-title { padding: 1.25rem 1rem; font-size: 1.5rem; }
  .property-content { padding: 1.5rem 0; }
  .page-actions { flex-wrap: wrap; gap: 0.5rem; }
  .page-bottom-links ul { flex-direction: column; gap: 0.5rem; }
  .page-bottom-links li + li::before { display: none; }
  #contact { padding: 1.5rem; }
  .footer-inner { flex-direction: column; text-align: center; padding: 1.5rem 1rem; }
}

@media (max-width: 480px) {
  .logo { font-size: 1.15rem; }
  .logo img { height: 30px; }
  .section-title { font-size: 1.5rem; }
  .property-content table { font-size: 0.85rem; }
  .property-content th,
  .property-content td { padding: 0.4rem 0.5rem; }
}
