/* =============================================
   REASONABLE FAITH WHATCOM COUNTY
   Warm Academic Theme
   ============================================= */

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

:root {
  --primary:    #7A2535;
  --primary-dk: #5C1A28;
  --primary-lt: #F5E8EB;
  --accent:     #C4922A;
  --accent-lt:  #FBF3E0;
  --bg:         #FAF6F0;
  --surface:    #F0E6D8;
  --surface-dk: #E4D5C3;
  --border:     #DDD0BC;
  --text:       #2C1810;
  --text-muted: #7A6055;
  --white:      #FFFFFF;
  --radius:     6px;
  --radius-lg:  10px;
  --shadow:     0 1px 3px rgba(44,24,16,0.08);
  --shadow-md:  0 4px 16px rgba(44,24,16,0.13);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

h1,h2,h3,h4,h5,h6 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: normal;
  line-height: 1.3;
  color: var(--text);
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container    { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container-sm { max-width:  760px; margin: 0 auto; padding: 0 2rem; }

/* ===== NAV ===== */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1100px; margin: 0 auto; padding: 0 2rem;
}
.nav-brand { display: flex; flex-direction: column; text-decoration: none; }
.nav-brand-main { font-family: Georgia, serif; font-size: 16px; color: var(--primary); line-height: 1.2; }
.nav-brand-sub  { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.nav-links { display: flex; list-style: none; }
.nav-links a {
  display: block; padding: .4rem .9rem;
  font-size: 14px; font-family: system-ui, sans-serif;
  color: var(--text-muted); text-decoration: none;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-lt); }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text); font-size: 22px; }

/* ===== HERO ===== */
.hero {
  background: var(--primary); color: var(--white);
  padding: 5rem 2rem; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 25% 40%, rgba(196,146,42,.12) 0%, transparent 60%),
                    radial-gradient(circle at 75% 70%, rgba(255,255,255,.05) 0%, transparent 50%);
}
.hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.hero-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin-bottom: 1rem; font-family: system-ui, sans-serif; }
.hero h1 { font-size: clamp(28px,4vw,46px); color: var(--white); margin-bottom: 1.25rem; }
.hero-sub { font-size: 17px; opacity: .85; line-height: 1.7; margin-bottom: 2rem; }
.hero-divider { width: 48px; height: 2px; background: var(--accent); margin: 0 auto 2rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 11px 24px;
  font-size: 14px; font-family: system-ui, sans-serif;
  border-radius: var(--radius); border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: all .15s; letter-spacing: .02em;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--accent);   color: var(--white); border-color: var(--accent); }
.btn-primary:hover { background: #a8802e; }
.btn-outline  { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.1); }
.btn-dark     { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-dark:hover { background: var(--primary-dk); }
.btn-ghost    { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-group    { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ===== PAGE HEADER ===== */
.page-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 2.5rem 2rem; }
.page-header h1 { font-size: clamp(22px,3vw,32px); margin-bottom: .5rem; }
.page-header p  { color: var(--text-muted); font-size: 15px; margin: 0; }

/* ===== SECTIONS ===== */
.section     { padding: 3.5rem 0; }
.section-alt { background: var(--surface); padding: 3.5rem 0; }
.section-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-family: system-ui, sans-serif; margin-bottom: .5rem; }
.section-title { font-size: clamp(20px,2.5vw,28px); margin-bottom: 1.5rem; }

/* ===== CARDS ===== */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; transition: box-shadow .2s; }
.card:hover { box-shadow: var(--shadow-md); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.25rem; }

/* ===== CALENDAR ===== */
.calendar-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: var(--primary); color: var(--white); }
.calendar-nav h2 { color: var(--white); font-size: 18px; }
.cal-nav-btn { background: rgba(255,255,255,.15); border: none; color: var(--white); width: 34px; height: 34px; border-radius: var(--radius); cursor: pointer; font-size: 18px; transition: background .15s; }
.cal-nav-btn:hover { background: rgba(255,255,255,.28); }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.cal-day-header { padding: .6rem; text-align: center; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-family: system-ui, sans-serif; color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 90px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .5rem; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.other-month .cal-day-num { color: var(--border); }
.cal-day-num { font-size: 13px; font-family: system-ui, sans-serif; color: var(--text-muted); margin-bottom: 4px; }
.cal-day-num-today { background: var(--primary); color: white; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-family: system-ui, sans-serif; }
.cal-event { font-size: 11px; background: var(--primary-lt); color: var(--primary); border-radius: 3px; padding: 2px 5px; margin-bottom: 3px; cursor: pointer; line-height: 1.4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: background .15s; font-family: system-ui, sans-serif; }
.cal-event:hover { background: var(--primary); color: var(--white); }

/* Event modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(44,24,16,.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-box { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; max-width: 480px; width: 100%; box-shadow: var(--shadow-md); }
.modal-box h3 { font-size: 20px; margin-bottom: .75rem; color: var(--primary); }
.modal-meta { font-size: 14px; font-family: system-ui, sans-serif; color: var(--text-muted); margin-bottom: 1rem; }
.modal-close { float: right; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); margin: -0.5rem -0.5rem 0 0.5rem; }

/* ===== BLOG ===== */
.post-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.25rem; transition: box-shadow .2s; }
.post-card:hover { box-shadow: var(--shadow-md); }
.post-card h2 { font-size: 20px; margin-bottom: .5rem; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--primary); }
.post-meta { font-size: 12px; font-family: system-ui, sans-serif; color: var(--text-muted); margin-bottom: .75rem; letter-spacing: .03em; }
.post-excerpt { font-size: 15px; color: var(--text-muted); line-height: 1.7; }
.post-content { font-size: 16px; line-height: 1.85; }
.post-content h2, .post-content h3 { margin: 2rem 0 1rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content blockquote { border-left: 3px solid var(--accent); padding: .75rem 1.25rem; margin: 1.5rem 0; background: var(--accent-lt); font-style: italic; border-radius: 0 var(--radius) var(--radius) 0; }

/* Comments */
.comments-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.comment { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.comment-author { font-size: 14px; font-weight: bold; font-family: system-ui, sans-serif; color: var(--primary); }
.comment-date { font-size: 12px; color: var(--text-muted); font-family: system-ui, sans-serif; margin-left: .5rem; }
.comment-body { margin-top: .5rem; font-size: 15px; }

/* ===== FORMS ===== */
.form-group   { margin-bottom: 1.25rem; }
.form-label   { display: block; font-size: 13px; font-family: system-ui, sans-serif; color: var(--text-muted); margin-bottom: .4rem; letter-spacing: .03em; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 10px 14px; font-size: 15px;
  font-family: Georgia, serif; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--white);
  color: var(--text); transition: border-color .15s; outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ===== RESOURCES ===== */
.resource-list { display: flex; flex-direction: column; gap: 8px; }
.resource-item { display: flex; align-items: center; gap: 1rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; transition: box-shadow .15s; }
.resource-item:hover { box-shadow: var(--shadow); }
.resource-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface); font-size: 20px; }
.resource-info { flex: 1; min-width: 0; }
.resource-title { font-size: 15px; font-family: Georgia, serif; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-meta { font-size: 12px; font-family: system-ui, sans-serif; color: var(--text-muted); }

.category-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cat-tab { padding: 6px 16px; font-size: 13px; font-family: system-ui, sans-serif; border-radius: 20px; border: 1px solid var(--border); background: var(--white); color: var(--text-muted); cursor: pointer; text-decoration: none; transition: all .15s; }
.cat-tab:hover, .cat-tab.active { background: var(--primary); color: var(--white); border-color: var(--primary); text-decoration: none; }

/* ===== FOOTER ===== */
.site-footer { background: var(--text); color: rgba(255,255,255,.7); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2rem; }
.footer-brand { font-family: Georgia, serif; font-size: 16px; color: var(--white); margin-bottom: .75rem; }
.footer-desc  { font-size: 14px; line-height: 1.7; font-family: system-ui, sans-serif; }
.footer-heading { font-family: system-ui, sans-serif; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--white); margin-bottom: 1rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { font-size: 14px; font-family: system-ui, sans-serif; color: rgba(255,255,255,.6); text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; font-size: 12px; font-family: system-ui, sans-serif; flex-wrap: wrap; gap: .5rem; }
.footer-bottom a { color: rgba(255,255,255,.5); }

/* ===== ALERTS ===== */
.alert { padding: .875rem 1.25rem; border-radius: var(--radius); font-size: 14px; font-family: system-ui, sans-serif; margin-bottom: 1rem; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-error   { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }
.alert-info    { background: var(--primary-lt); color: var(--primary); border: 1px solid var(--border); }

/* ===== ADMIN ===== */
.admin-wrap { min-height: 100vh; background: var(--bg); }
.admin-nav { background: var(--text); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.admin-nav-brand { font-size: 14px; font-family: system-ui, sans-serif; color: rgba(255,255,255,.9); }
.admin-nav-links { display: flex; gap: .25rem; flex-wrap: wrap; }
.admin-nav-links a { padding: .3rem .75rem; font-size: 13px; font-family: system-ui, sans-serif; color: rgba(255,255,255,.7); border-radius: var(--radius); text-decoration: none; }
.admin-nav-links a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.admin-nav-links a.active { color: var(--white); }
.admin-main { padding: 2rem; max-width: 1100px; margin: 0 auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.admin-header h1 { font-size: 22px; }
.admin-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.25rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; font-family: system-ui, sans-serif; }
.admin-table th { text-align: left; padding: .75rem 1rem; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); font-weight: normal; }
.admin-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-family: system-ui, sans-serif; font-weight: 500; }
.badge-pending   { background: var(--accent-lt); color: #8a6820; }
.badge-approved, .badge-published { background: #e8f5e9; color: #2e7d32; }
.badge-draft     { background: var(--surface); color: var(--text-muted); }
.action-link { font-size: 13px; color: var(--primary); text-decoration: none; margin-right: .75rem; }
.action-link:hover { text-decoration: underline; }
.action-link.danger { color: #c0392b; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; }
.stat-num   { font-size: 32px; font-family: Georgia, serif; color: var(--primary); line-height: 1; margin-bottom: .25rem; }
.stat-label { font-size: 12px; font-family: system-ui, sans-serif; color: var(--text-muted); letter-spacing: .04em; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 2rem; }
.login-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 380px; text-align: center; }
.login-card h1 { font-size: 22px; margin-bottom: .5rem; }
.login-card p  { font-size: 14px; color: var(--text-muted); margin-bottom: 2rem; font-family: system-ui, sans-serif; }

/* ===== UTILS ===== */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: .5rem; gap: 0; z-index: 99;
  }
  .nav-mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .cal-day { min-height: 60px; }
  .cal-event { font-size: 10px; }
  .container { padding: 0 1rem; }
}
