/* ── Tennessee Valley Churches — Stylesheet ── */
:root {
  --primary:    #1a2a5e;
  --accent:     #c45c1a;
  --accent-light: #e8733a;
  --green:      #2d6e2d;
  --bg:         #fdf8f4;
  --surface:    #ffffff;
  --surface-2:  #f5ede6;
  --border:     #e8d5c8;
  --text:       #1a1a2e;
  --muted:      #5a6285;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --radius:       10px;
  --radius-lg:    14px;
  --shadow:       0 2px 12px rgba(26,42,94,0.09);
  --shadow-card:  0 6px 24px rgba(26,42,94,0.13);
  --transition:   0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ── Navbar ── */
#navbar { position: sticky; top: 0; z-index: 100; background: var(--primary); box-shadow: 0 2px 12px rgba(26,42,94,0.2); }
.nav-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 24px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-size: 18px; font-weight: 600; color: #fff; }
#nav-logo-img { height: 44px; width: auto; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.75); transition: color var(--transition); }
.nav-links a:hover { color: #fff; }
.nav-btn { padding: 7px 18px; border: 1.5px solid var(--accent); border-radius: 7px; color: var(--accent) !important; font-weight: 600; transition: all var(--transition); }
.nav-btn:hover { background: var(--accent); color: #fff !important; }

/* ── Hero ── */
#hero { position: relative; min-height: 480px; display: flex; align-items: center; justify-content: center; background: var(--primary); background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: rgba(10,18,50,0.58); }
.hero-content { position: relative; z-index: 1; text-align: center; padding: 72px 24px; color: #fff; max-width: 720px; }
#hero-logo { max-height: 220px; width: auto; margin: 0 auto 20px; }
.hero-content h1 { font-family: var(--font-heading); font-size: clamp(28px,5vw,50px); font-weight: 600; line-height: 1.15; margin-bottom: 14px; }
.hero-content p { font-size: clamp(15px,2vw,19px); opacity: 0.9; max-width: 560px; margin: 0 auto 30px; }
.btn-hero { display: inline-block; background: var(--accent); color: #fff; padding: 14px 36px; border-radius: 8px; font-size: 15px; font-weight: 600; box-shadow: 0 4px 18px rgba(0,0,0,0.25); transition: transform var(--transition), box-shadow var(--transition); }
.btn-hero:hover { transform: translateY(-2px); color: #fff; }

/* ── About ── */
.about-banner { background: var(--surface); border-bottom: 1px solid var(--border); padding: 48px 0; }
.about-inner { display: flex; gap: 28px; align-items: flex-start; }
.about-cross { font-size: 40px; color: var(--primary); flex-shrink: 0; width: 70px; height: 70px; background: var(--surface-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--border); }
.about-text h2 { font-family: var(--font-heading); font-size: 22px; color: var(--primary); margin-bottom: 10px; }
.about-text p { font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 8px; }
.founding-note { font-size: 14px !important; color: var(--accent) !important; font-weight: 500; }
.founding-note a { color: var(--accent); font-weight: 700; }

/* ── Directory ── */
#directory { padding: 60px 0 80px; }
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-family: var(--font-heading); font-size: 34px; color: var(--primary); margin-bottom: 8px; }
.section-header p { font-size: 16px; color: var(--muted); }

/* County grid */
.county-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 8px; }
.county-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); box-shadow: var(--shadow); }
.county-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--accent); }
.county-card.active { border-color: var(--primary); border-width: 2px; }
.county-card-image { height: 90px; display: flex; align-items: center; justify-content: center; }
.county-card-label {
  font-family: var(--font-heading); font-size: 28px; font-weight: 600;
  color: #fff; letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.county-count { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.county-card-body { padding: 12px 12px 14px; }
.county-name { font-family: var(--font-heading); font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.county-sub { font-size: 11px; color: var(--muted); }
/* county-count used when label is in image area */
.county-count { font-size: 12px; color: var(--muted); }
.county-founding { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: #fff5e0; color: #92400e; border: 1px solid #f0c060; margin-top: 4px; }

/* County colors */
.county-card:nth-child(6n+1) .county-card-image { background: #1a2a5e; }
.county-card:nth-child(6n+2) .county-card-image { background: #c45c1a; }
.county-card:nth-child(6n+3) .county-card-image { background: #2d6e2d; }
.county-card:nth-child(6n+4) .county-card-image { background: #1a3a6e; }
.county-card:nth-child(6n+5) .county-card-image { background: #8b3a10; }
.county-card:nth-child(6n+0) .county-card-image { background: #1e5c1e; }

/* Location panel */
.location-panel { margin-top: 8px; }
.panel-header { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--border); }
.back-btn { background: none; border: 1.5px solid var(--border); border-radius: 7px; padding: 7px 16px; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all var(--transition); }
.back-btn:hover { border-color: var(--primary); color: var(--primary); }
.panel-header-right h3 { font-family: var(--font-heading); font-size: 22px; color: var(--primary); }

/* Location grid */
.location-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.loc-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); box-shadow: var(--shadow); }
.loc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--accent); }
.loc-card-image { height: 85px; display: flex; align-items: center; justify-content: center; }
.loc-card-cross { font-size: 38px; color: rgba(255,255,255,0.9); text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.loc-card-body { padding: 10px 12px 12px; }
.loc-name { font-family: var(--font-heading); font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.loc-count { font-size: 11px; color: var(--muted); }
.loc-card:nth-child(7n+1) .loc-card-image { background: #1a2a5e; }
.loc-card:nth-child(7n+2) .loc-card-image { background: #c45c1a; }
.loc-card:nth-child(7n+3) .loc-card-image { background: #2d6e2d; }
.loc-card:nth-child(7n+4) .loc-card-image { background: #1a3a6e; }
.loc-card:nth-child(7n+5) .loc-card-image { background: #8b3a10; }
.loc-card:nth-child(7n+6) .loc-card-image { background: #1e5c1e; }
.loc-card:nth-child(7n+0) .loc-card-image { background: #5e3a1a; }

/* Denom tabs */
.denom-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.denom-tab { padding: 8px 22px; border-radius: 24px; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.denom-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.denom-tab:not(.active):hover { background: var(--surface-2); color: var(--primary); border-color: var(--primary); }

/* Church panel */
.church-panel { margin-top: 32px; }
.church-list { display: flex; flex-direction: column; gap: 16px; }
.church-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; overflow: hidden; box-shadow: var(--shadow); transition: box-shadow var(--transition); }
.church-card:hover { box-shadow: var(--shadow-card); }
.church-photo-wrap { width: 120px; flex-shrink: 0; background: var(--surface-2); position: relative; overflow: hidden; }
.church-photo { width: 100%; height: 100%; object-fit: cover; }
.church-photo-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--border); }
.church-body { padding: 16px 20px; flex: 1; min-width: 0; }
.church-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.church-name { font-family: var(--font-heading); font-size: 17px; font-weight: 600; color: var(--primary); flex: 1; }
.church-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 5px; background: var(--surface-2); color: var(--primary); border: 1px solid var(--border); white-space: nowrap; flex-shrink: 0; }
.church-details { margin-bottom: 12px; }
.detail-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 5px; font-size: 14px; color: var(--muted); }
.di { flex-shrink: 0; font-size: 13px; margin-top: 2px; }
.church-links { display: flex; flex-wrap: wrap; gap: 8px; }
.church-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 6px 14px; border-radius: 7px; border: none; color: #fff; transition: all var(--transition); text-transform: uppercase; letter-spacing: 0.02em; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.church-link:hover { text-decoration: none; transform: translateY(-1px); }
.church-link.map      { background: #1a6fb5; }
.church-link.map:hover { background: #1560a0; }
.church-link.website  { background: var(--green); }
.church-link.website:hover { background: #245824; }
.church-link.facebook { background: #1877f2; }
.church-link.facebook:hover { background: #1260cc; }
.lang-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 6px; cursor: default; background: #fff5e0; color: #92400e; border: 1px solid #f0c060; }
.lang-badge-interp { background: #f0f8f0; color: #1a5c1a; border-color: #a0d0a0; }
.empty-msg { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-msg .ei { font-size: 38px; margin-bottom: 12px; }

/* Skeletons */
.loc-skeleton { height: 140px; background: linear-gradient(90deg,var(--surface-2) 25%,var(--border) 50%,var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-lg); }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.spinner { display: flex; justify-content: center; padding: 40px; }
.spinner::after { content:''; width:32px; height:32px; border:3px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin 0.7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* McMinn CTA */
.mcminn-cta { background: #fff8f0; border-top: 1px solid #f0c890; border-bottom: 1px solid #f0c890; padding: 28px 24px; }
.mcminn-cta-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.mcminn-cta-icon { font-size: 32px; flex-shrink: 0; }
.mcminn-cta h3 { font-family: var(--font-heading); font-size: 18px; color: var(--primary); margin-bottom: 4px; }
.mcminn-cta p { font-size: 14px; color: var(--muted); }
.btn-mcminn { margin-left: auto; display: inline-flex; align-items: center; background: var(--accent); color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background var(--transition); }
.btn-mcminn:hover { background: #a34c16; color: #fff; }

/* Submit CTA */
.submit-cta { background: var(--primary); padding: 56px 24px; }
.submit-cta-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.submit-cta h2 { font-family: var(--font-heading); font-size: 26px; color: #fff; margin-bottom: 6px; }
.submit-cta p { color: rgba(255,255,255,0.75); font-size: 15px; }
.btn-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; padding: 13px 28px; border-radius: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background var(--transition); }
.btn-cta:hover { background: #a34c16; color: #fff; }

/* Footer */
#site-footer { background: #0e1630; padding: 32px 24px 24px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 20px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-size: 16px; color: rgba(255,255,255,0.75); }
#footer-logo-img { height: 36px; width: auto; }
#footer-text { font-size: 13px; color: rgba(255,255,255,0.4); text-align: center; }
.footer-admin { font-size: 12px; color: rgba(255,255,255,0.2); }
.footer-admin:hover { color: rgba(255,255,255,0.5); }
.footer-bottom { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 4px; }
.footer-copyright { font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-legal-links { display: flex; gap: 18px; }
.footer-legal-links a { font-size: 12px; color: rgba(255,255,255,0.35); transition: color var(--transition); }
.footer-legal-links a:hover { color: rgba(255,255,255,0.65); }

/* Responsive */
@media (max-width: 600px) {
  .county-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: repeat(2, 1fr); }
  .church-card { flex-direction: column; }
  .church-photo-wrap { width: 100%; height: 160px; }
  .about-inner { flex-direction: column; }
  .submit-cta-inner { flex-direction: column; text-align: center; }
  .mcminn-cta-inner { flex-direction: column; text-align: center; }
  .btn-mcminn { margin-left: 0; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { flex-direction: column; align-items: center; }
  .nav-links a:not(.nav-btn) { display: none; }
}
