:root {
  --cream: #f7efdd;
  --cream-dark: #efe2c3;
  --paper: #fffcf5;
  --barn-red: #9a3324;
  --barn-red-dark: #7a2519;
  --sage: #7c8b5e;
  --sage-dark: #5f6b47;
  --brown-dark: #3b2a1e;
  --brown-mid: #6b4e3d;
  --gold: #c9a24b;
  --shadow: rgba(59, 42, 30, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(107, 78, 61, 0.05) 0px,
      rgba(107, 78, 61, 0.05) 2px,
      transparent 2px,
      transparent 80px
    );
  color: var(--brown-dark);
  font-family: 'Lora', Georgia, serif;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--barn-red-dark);
  margin: 0 0 0.5em;
}

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

.tagline-font {
  font-family: 'Caveat', cursive;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--brown-dark);
  color: var(--cream);
  border-bottom: 6px solid var(--gold);
  padding: 1.1rem 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.brand-mark {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--gold);
}

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  margin-left: 1.4rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.02rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover {
  border-bottom-color: var(--gold);
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--cream-dark), var(--cream));
  border-bottom: 1px dashed var(--brown-mid);
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.9rem;
  margin-bottom: 0.3rem;
}

.hero .tagline-font {
  display: block;
  font-size: 1.7rem;
  color: var(--sage-dark);
  margin-bottom: 1.2rem;
}

.hero p.lede {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--brown-mid);
}

.hero-photo {
  max-width: 460px;
  margin: 2.2rem auto 0;
  border-radius: 10px;
  overflow: hidden;
  border: 6px solid var(--paper);
  box-shadow: 0 10px 24px var(--shadow);
}

.hero-photo img {
  width: 100%;
  display: block;
}

.divider {
  width: 120px;
  height: 3px;
  background: var(--gold);
  margin: 1.4rem auto;
  border-radius: 2px;
}

/* Icon dividers: a small rustic line-icon flanked by thin rules */
.icon-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 240px;
  margin: 1.3rem auto;
}

.icon-divider .line {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.icon-divider svg {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  color: var(--gold);
}

.icon-divider.sage .line {
  background: var(--sage);
}

.icon-divider.sage svg {
  color: var(--sage);
}

/* Page banner (News / Events pages) */
.page-banner {
  background: linear-gradient(180deg, var(--cream-dark), var(--cream));
  border-bottom: 1px dashed var(--brown-mid);
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.page-banner h1 {
  font-size: 2.4rem;
}

.page-banner p.lede {
  max-width: 560px;
  margin: 0 auto;
  color: var(--brown-mid);
}

.see-all {
  text-align: center;
  margin-top: 2rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px dashed rgba(107, 78, 61, 0.35);
}

.section.alt {
  background: var(--cream-dark);
}

.story-text {
  max-width: 640px;
  margin: 0 auto 1rem;
  font-size: 1.05rem;
  color: var(--brown-mid);
  text-align: center;
}

.story-text:last-of-type {
  margin-bottom: 1.6rem;
}

.story-photo {
  max-width: 460px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 6px solid var(--paper);
  box-shadow: 0 10px 24px var(--shadow);
}

.story-photo img {
  width: 100%;
  display: block;
}

.story-photo-placeholder {
  max-width: 460px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  border: 2px dashed var(--brown-mid);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--brown-mid);
  opacity: 0.75;
}

.story-photo-placeholder svg {
  width: 34px;
  height: 34px;
}

.story-photo-placeholder span {
  font-size: 0.9rem;
  font-style: italic;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 2rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-top: 5px solid var(--barn-red);
  border-radius: 6px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
}

.card.event {
  border-top-color: var(--sage);
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.card .meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-dark);
  margin-bottom: 0.6rem;
}

.card p {
  margin: 0;
  color: var(--brown-mid);
}

.empty-note {
  text-align: center;
  color: var(--brown-mid);
  font-style: italic;
}

/* Facebook-style news feed */
.feed {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 600px;
  margin: 0 auto;
}

.feed-post {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--shadow);
  overflow: hidden;
}

.feed-post-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.1rem 1.3rem 0.7rem;
}

.feed-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--barn-red);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.feed-post-header .names strong {
  display: block;
  font-family: 'Playfair Display', serif;
  color: var(--brown-dark);
  font-size: 0.98rem;
}

.feed-post-header .names span {
  font-size: 0.8rem;
  color: var(--brown-mid);
}

.feed-post-body {
  padding: 0 1.3rem 1rem;
}

.feed-post-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.feed-post-body p {
  margin: 0;
  color: var(--brown-mid);
  white-space: pre-wrap;
}

.feed-media {
  width: 100%;
  background: #000;
  line-height: 0;
}

.feed-media img {
  width: 100%;
  display: block;
}

.card .feed-media {
  border-radius: 4px;
  margin-top: 0.8rem;
}

.card .feed-media img {
  border-radius: 4px;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.feed-video-link {
  padding: 0.9rem 1.3rem 1.2rem;
}

.feed-video-link a {
  display: inline-block;
  background: var(--sage);
  color: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
}

/* Footer */
.site-footer {
  background: var(--brown-dark);
  color: var(--cream);
  padding: 2.5rem 0 2rem;
  border-top: 6px solid var(--gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.footer-grid h4 {
  color: var(--gold);
  font-size: 1.15rem;
}

.footer-grid p, .footer-grid li {
  color: var(--cream-dark);
}

.hours-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  max-width: 260px;
  padding: 0.15rem 0;
  border-bottom: 1px dotted rgba(247, 239, 221, 0.25);
}

.footer-map {
  margin-top: 0.8rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(247, 239, 221, 0.25);
  max-width: 280px;
}

.footer-map iframe {
  display: block;
  width: 100%;
  height: 140px;
  border: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cream-dark);
  text-decoration: none;
  margin-top: 0.5rem;
}

.social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gold);
}

.social-link:hover {
  color: var(--cream);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--cream-dark);
  opacity: 0.75;
}

.footer-bottom a {
  color: var(--gold);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--barn-red);
  color: var(--cream);
  border: none;
  padding: 0.65rem 1.4rem;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--barn-red-dark);
}

.btn.secondary {
  background: var(--sage);
}

.btn.secondary:hover {
  background: var(--sage-dark);
}

.btn.danger {
  background: #7a2519;
}

.btn.small {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

/* Admin */
.admin-body {
  min-height: 100vh;
}

.admin-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.login-card {
  max-width: 380px;
  margin: 4rem auto;
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-top: 5px solid var(--barn-red);
  border-radius: 6px;
  padding: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
  text-align: center;
}

.login-card input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin: 0.9rem 0;
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  font-size: 1rem;
}

.form-card {
  background: var(--paper);
  border: 1px solid var(--cream-dark);
  border-top: 5px solid var(--sage);
  border-radius: 6px;
  padding: 1.5rem 1.7rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px var(--shadow);
}

.form-card h2 {
  font-size: 1.4rem;
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.92rem;
  color: var(--brown-mid);
}

.field input, .field textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--cream);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
}

.admin-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--cream-dark);
}

.admin-list-item:last-child {
  border-bottom: none;
}

.admin-list-item .info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.admin-list-item .meta {
  font-size: 0.82rem;
  color: var(--sage-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-msg {
  text-align: center;
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.status-msg.error {
  background: #f4d9d3;
  color: var(--barn-red-dark);
}

.status-msg.success {
  background: #e3ead6;
  color: var(--sage-dark);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

#site-closed-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--brown-dark);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

#site-closed-overlay h1 {
  color: var(--gold);
  font-size: 2rem;
}

#site-closed-overlay p {
  max-width: 480px;
  color: var(--cream-dark);
}

.media-preview {
  display: block;
  max-width: 220px;
  max-height: 160px;
  border-radius: 4px;
  margin: 0.6rem 0 1rem;
  object-fit: cover;
}

.admin-list-item .media-preview {
  max-width: 140px;
  max-height: 100px;
  margin: 0.5rem 0 0;
}
