/* =============================================
   Little Creek Farm — Warm Rustic Stylesheet
   ============================================= */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Palatino Linotype', serif;
  line-height: 1.7;
  color: #3a2e1e;
  background-color: #f5f0e8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================
   Navigation Bar
   ============================================= */
.site-nav {
  background-color: #3a2e1e;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-brand {
  color: #e8d5a3;
  font-size: 1.1em;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: #c9b98a;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9em;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background-color: #5c4a2a;
  color: #f5f0e8;
}

.nav-links a.active {
  background-color: #c9923a;
  color: #fff;
  font-weight: bold;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #e8d5a3;
  font-size: 1.6em;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.nav-logout-btn {
  background: none;
  border: 1px solid #5c4a2a;
  color: #c9b98a;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 6px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9em;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-logout-btn:hover {
  background-color: #5c4a2a;
  color: #f5f0e8;
  border-color: #5c4a2a;
}

/* =============================================
   Header / Hero
   ============================================= */
header {
  text-align: center;
  padding: 70px 40px 60px;
  background: linear-gradient(160deg, #5a7a3a 0%, #3a5c20 60%, #2e4a18 100%);
  color: #f5f0e8;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

header h1 {
  font-size: 2.8em;
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
  position: relative;
}

header p {
  font-size: 1.2em;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 28px;
  position: relative;
}

.hero-cta {
  display: inline-block;
  background-color: #c9923a;
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1em;
  font-weight: bold;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.15s;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.hero-cta:hover {
  background-color: #b07a28;
  transform: translateY(-2px);
}

/* =============================================
   Main / Page Content
   ============================================= */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 50px auto;
  padding: 0 30px;
}

/* =============================================
   Cards — Grid on homepage
   ============================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 10px;
}

.lesson-card {
  background: #fff9f0;
  padding: 28px 24px;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.10);
  border-top: 4px solid #c9923a;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lesson-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(90,60,20,0.16);
}

.lesson-card .card-icon {
  font-size: 2.2em;
  margin-bottom: 14px;
  display: block;
}

.lesson-card h2 {
  color: #5a7a3a;
  margin-bottom: 12px;
  font-size: 1.25em;
}

.lesson-card p {
  font-size: 1em;
  color: #5c4a2a;
  line-height: 1.7;
}

/* =============================================
   Lesson Items (lessons.html stacked cards)
   ============================================= */
.lesson-item {
  background: #fff9f0;
  padding: 28px 30px;
  margin-bottom: 28px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(90,60,20,0.08);
  border-left: 6px solid #5a7a3a;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lesson-item:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(90,60,20,0.13);
}

.lesson-item h2 {
  color: #5a7a3a;
  margin-bottom: 10px;
  font-size: 1.35em;
}

.lesson-item p {
  font-size: 1em;
  color: #5c4a2a;
  margin-bottom: 8px;
}

.lesson-item p:last-child {
  margin-bottom: 0;
}

.lesson-meta {
  margin-top: 12px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.9em;
  color: #6b4c2a;
  background: #f5ece0;
  padding: 8px 14px;
  border-radius: 6px;
  display: inline-block;
}

/* =============================================
   About Page
   ============================================= */
.about-content {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.09);
  padding: 36px 40px;
  border-top: 4px solid #5a7a3a;
}

.about-content p {
  font-size: 1.05em;
  color: #3a2e1e;
  margin-bottom: 20px;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* =============================================
   Contact Form
   ============================================= */
.contact-form {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.09);
  padding: 36px 40px;
  border-top: 4px solid #c9923a;
  max-width: 620px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.9em;
  font-weight: bold;
  color: #6b4c2a;
  margin-bottom: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #d9c9a8;
  border-radius: 8px;
  font-family: 'Georgia', serif;
  font-size: 1em;
  color: #3a2e1e;
  background: #fdfaf4;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #5a7a3a;
  box-shadow: 0 0 0 3px rgba(90,122,58,0.15);
}

.btn-submit {
  background-color: #5a7a3a;
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 8px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 1em;
  font-weight: bold;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.btn-submit:hover {
  background-color: #3a5c20;
  transform: translateY(-2px);
}

/* =============================================
   Footer
   ============================================= */
footer {
  text-align: center;
  padding: 28px 30px;
  background: #3a2e1e;
  color: #c9b98a;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.9em;
}

footer p {
  margin-bottom: 10px;
}

.link {
  color: #c9923a;
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
  transition: color 0.2s;
}

.link:hover {
  color: #e8d5a3;
  text-decoration: underline;
}

/* =============================================
   Page title bar (non-hero pages)
   ============================================= */
.page-header {
  text-align: center;
  padding: 50px 30px 40px;
  background: linear-gradient(160deg, #6b4c2a 0%, #4a3015 100%);
  color: #f5f0e8;
}

.page-header h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.page-header p {
  font-size: 1.1em;
  opacity: 0.88;
}

/* =============================================
   Blog — Index & Post Pages
   ============================================= */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-card {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.09);
  border-left: 6px solid #c9923a;
  padding: 28px 30px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(90,60,20,0.15);
}

.blog-card .blog-date {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.85em;
  color: #9a7a4a;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.blog-card h2 {
  color: #5a7a3a;
  font-size: 1.3em;
  margin-bottom: 10px;
}

.blog-card p {
  color: #5c4a2a;
  font-size: 1em;
  line-height: 1.65;
}

.blog-post {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.09);
  padding: 40px 44px;
  border-top: 4px solid #c9923a;
}

.blog-post .post-meta {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.88em;
  color: #9a7a4a;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.blog-post h2 {
  color: #5a7a3a;
  font-size: 1.35em;
  margin: 28px 0 10px;
}

.blog-post p {
  color: #3a2e1e;
  font-size: 1.05em;
  margin-bottom: 18px;
  line-height: 1.75;
}

.blog-post .back-link {
  display: inline-block;
  margin-top: 32px;
  color: #c9923a;
  font-weight: bold;
  text-decoration: none;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.blog-post .back-link:hover {
  text-decoration: underline;
  color: #b07a28;
}

/* =============================================
   Facebook Section (homepage)
   ============================================= */
.fb-section {
  margin-top: 60px;
  padding-top: 50px;
  border-top: 2px solid #e8dcc8;
}

.fb-section-heading {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.8em;
  color: #3a2e1e;
}

.fb-section-sub {
  text-align: center;
  color: #6b4c2a;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 1em;
  margin-bottom: 36px;
}

.fb-layout {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 32px;
  align-items: start;
}

.fb-post-card {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.10);
  border-left: 6px solid #1877f2;
  padding: 28px 30px;
}

.fb-post-card .fb-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.fb-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5a7a3a, #3a5c20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4em;
  flex-shrink: 0;
}

.fb-post-author {
  font-weight: bold;
  color: #3a2e1e;
  font-size: 1em;
}

.fb-post-date {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.82em;
  color: #9a7a4a;
  display: block;
  margin-top: 2px;
}

.fb-post-text {
  color: #3a2e1e;
  font-size: 1.05em;
  line-height: 1.75;
  margin-bottom: 18px;
}

.fb-read-more {
  display: inline-block;
  color: #1877f2;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.9em;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.2s;
}

.fb-read-more:hover {
  color: #0d5cbf;
  text-decoration: underline;
}

.fb-stats {
  display: flex;
  gap: 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e8dcc8;
}

.fb-stat {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.88em;
  color: #6b4c2a;
}

.fb-stat strong {
  display: block;
  font-size: 1.3em;
  color: #3a2e1e;
}

.fb-embed-wrapper {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(90,60,20,0.10);
}

.fb-embed-wrapper iframe {
  display: block;
  width: 100%;
  border: none;
}

.fb-follow-bar {
  text-align: center;
  margin-top: 32px;
}

.fb-follow-btn {
  display: inline-block;
  background-color: #1877f2;
  color: #fff;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 8px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95em;
  font-weight: bold;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(24,119,242,0.3);
}

.fb-follow-btn:hover {
  background-color: #0d5cbf;
  transform: translateY(-2px);
}

/* =============================================
   Gallery Page
   ============================================= */
.gallery-intro {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-intro p {
  color: #6b4c2a;
  font-size: 1.05em;
  max-width: 560px;
  margin: 0 auto;
}

.gallery-fb-embed {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.10);
  border-top: 4px solid #1877f2;
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.gallery-fb-embed h2 {
  color: #3a2e1e;
  font-size: 1.3em;
  margin-bottom: 8px;
}

.gallery-fb-embed p {
  color: #6b4c2a;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95em;
  margin-bottom: 24px;
}

.gallery-fb-embed iframe {
  border-radius: 10px;
  max-width: 100%;
}

.gallery-cta {
  background: linear-gradient(135deg, #1877f2 0%, #0d5cbf 100%);
  border-radius: 14px;
  padding: 40px 32px;
  text-align: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(24,119,242,0.25);
}

.gallery-cta h2 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #fff;
}

.gallery-cta p {
  opacity: 0.9;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  margin-bottom: 24px;
  font-size: 1em;
}

.gallery-cta-btn {
  display: inline-block;
  background: #fff;
  color: #1877f2;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 8px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 1em;
  font-weight: bold;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.gallery-cta-btn:hover {
  background: #e8f0fe;
  transform: translateY(-2px);
}

/* Contact Info Block */
.contact-info-block {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.09);
  padding: 28px 30px;
  border-left: 6px solid #5a7a3a;
  margin-bottom: 32px;
}

.contact-info-block h2 {
  color: #5a7a3a;
  font-size: 1.2em;
  margin-bottom: 16px;
}

.contact-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95em;
  color: #3a2e1e;
}

.contact-info-row:last-child {
  margin-bottom: 0;
}

.contact-info-row .info-icon {
  font-size: 1.1em;
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-info-row a {
  color: #c9923a;
  text-decoration: none;
  font-weight: bold;
}

.contact-info-row a:hover {
  text-decoration: underline;
}

/* =============================================
   Blog Post — Title & Body
   ============================================= */
.post-title {
  color: #3a2e1e;
  font-size: 1.9em;
  margin-bottom: 24px;
  line-height: 1.3;
}

.post-body p {
  color: #3a2e1e;
  font-size: 1.05em;
  margin-bottom: 18px;
  line-height: 1.75;
}

/* =============================================
   Write New Post Button (admin only, blog index)
   ============================================= */
.btn-write-post {
  display: inline-block;
  background-color: #5a7a3a;
  color: #fff;
  text-decoration: none;
  padding: 11px 26px;
  border-radius: 8px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95em;
  font-weight: bold;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px rgba(90,122,58,0.25);
}

.btn-write-post:hover {
  background-color: #3a5c20;
  transform: translateY(-2px);
}

/* =============================================
   Comments Section
   ============================================= */
#comments-section {
  margin-top: 48px;
}

.comments-heading {
  font-size: 1.4em;
  color: #3a2e1e;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8dcc8;
}

.no-comments {
  color: #9a7a4a;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95em;
  padding: 8px 0 20px;
}

.comment-card {
  background: #fff9f0;
  border-radius: 10px;
  border-left: 4px solid #c9923a;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(90,60,20,0.07);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.comment-author {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-weight: bold;
  font-size: 0.92em;
  color: #3a2e1e;
}

.comment-date {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.82em;
  color: #9a7a4a;
}

.comment-delete-btn {
  margin-left: auto;
  background: none;
  border: 1px solid #d9c9a8;
  color: #8b2020;
  border-radius: 5px;
  padding: 3px 10px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 0.8em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.comment-delete-btn:hover {
  background: #8b2020;
  color: #fff;
  border-color: #8b2020;
}

.comment-body {
  color: #3a2e1e;
  font-size: 0.98em;
  line-height: 1.65;
}

.comment-form-card {
  background: #fff9f0;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(90,60,20,0.09);
  border-top: 4px solid #5a7a3a;
  padding: 28px 32px;
  margin-top: 28px;
}

.comment-error {
  color: #8b2020;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.88em;
  margin-top: 10px;
}

/* =============================================
   Utility Classes
   ============================================= */
.loading-text {
  color: #9a7a4a;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

#toast {
  position: fixed; bottom: 28px; right: 28px;
  background: #5a7a3a; color: #fff;
  padding: 12px 22px; border-radius: 8px;
  font-family: 'Segoe UI', sans-serif; font-size: 0.95em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: none; z-index: 999;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #a8d8b0;
  border-radius: 8px;
  color: #1a6b2a;
  padding: 14px 18px;
  font-family: 'Segoe UI', sans-serif;
  margin-bottom: 24px;
  max-width: 620px;
  display: none;
}

.alert-error {
  background: #fdf0ef;
  border: 1px solid #e8a8a0;
  border-radius: 8px;
  color: #8b2020;
  padding: 14px 18px;
  font-family: 'Segoe UI', sans-serif;
  margin-bottom: 24px;
  max-width: 620px;
  display: none;
}

.text-center { text-align: center; }

.comment-form-heading {
  color: #3a2e1e;
  font-size: 1.1em;
  margin-bottom: 18px;
}

.admin-post-link {
  color: #5a7a3a;
  font-weight: bold;
  text-decoration: none;
}

.admin-meta-cell {
  color: #9a7a4a;
  font-family: 'Segoe UI', sans-serif;
  font-size: 0.85em;
}

.hero-cta-secondary {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95em;
  opacity: 0.85;
  margin-left: 16px;
  transition: opacity 0.2s;
  position: relative;
}

.hero-cta-secondary:hover {
  opacity: 1;
  text-decoration: underline;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1100px) {
  .nav-toggle {
    display: block;
  }
  .site-nav {
    flex-wrap: wrap;
    padding: 12px 16px;
    height: auto;
  }
  .site-nav .nav-top {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 2px;
    padding-top: 8px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 10px 12px;
    font-size: 0.95em;
    border-radius: 4px;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fb-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  header {
    padding: 50px 20px 40px;
  }
  header h1 {
    font-size: 2em;
  }
  .page-header h1 {
    font-size: 1.7em;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  main {
    padding: 0 16px;
    margin: 30px auto;
  }
  .about-content,
  .contact-form {
    padding: 24px 20px;
  }
}
