/* shared.css — Chaverim of Middlesex County */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f5f7fa; color: #1a1a1a; font-size: 15px; line-height: 1.6; }

.topbar { background: #fff; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; position: sticky; top: 0; z-index: 101; border-bottom: 3px solid #4a7fa5; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.topbar-left img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.topbar-name { min-width: 0; overflow: hidden; }
.topbar-name .name-main { color: #111; font-size: 15px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; }
.topbar-name .name-sub { color: #4a7fa5; font-size: 11px; font-weight: 500; margin-top: 2px; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.topbar-name .name-full { display: block; }
.topbar-name .name-short { display: none; }
.topbar-btn { background: #4a7fa5; color: #fff; padding: 9px 18px; border-radius: 7px; font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: background .15s; white-space: nowrap; flex-shrink: 0; border: none; cursor: pointer; }
.topbar-btn:hover { background: #3a6585; }
.topbar-btn i { font-size: 13px; }
.topbar-btn-outline { background: #f5f7fa; color: #333; border: 1.5px solid #c8d0d8; font-weight: 600; }
.topbar-btn-outline i { color: #4a7fa5; }
.topbar-btn-outline:hover { background: #eaecf0; }

.site-nav { background: #fff; border-bottom: 1px solid #e8eaed; display: flex; align-items: center; padding: 0 24px; gap: 0; position: sticky; top: 70px; z-index: 100; flex-wrap: wrap; margin: 0; }
.nav-item { padding: 15px 16px; font-size: 13px; font-weight: 400; color: #666; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s; text-decoration: none; display: inline-block; flex-shrink: 0; }
.nav-item:hover { color: #1a1a1a; }
.nav-item.active { color: #4a7fa5; border-bottom-color: #4a7fa5; font-weight: 500; }

.main { max-width: 860px; margin: 36px auto; padding: 0 24px 60px; }
.main-wide { max-width: 1020px; margin: 36px auto; padding: 0 24px 60px; }
.main-narrow { max-width: 660px; margin: 36px auto; padding: 0 24px 60px; }
.section-label { font-size: 11px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: .9px; margin-bottom: 16px; }
.card { background: #fff; border: 1px solid #e8eaed; border-radius: 10px; padding: 28px 32px; margin-bottom: 20px; }
.card h2 { font-size: 18px; font-weight: 600; color: #1a1a1a; margin-bottom: 12px; }
.card p { color: #555; line-height: 1.75; margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }

.hero { background: #fff; border-bottom: 1px solid #e8eaed; padding: 48px 28px 44px; }
.hero-inner { max-width: 780px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: #eaf4f8; color: #185fa5; font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 20px; margin-bottom: 18px; }
.hero h1 { font-size: 30px; font-weight: 600; color: #1a1a1a; line-height: 1.25; margin-bottom: 12px; }
.hero p { font-size: 15px; color: #555; line-height: 1.7; max-width: 520px; margin-bottom: 24px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary { background: #4a7fa5; color: #fff; padding: 11px 24px; border-radius: 7px; font-size: 14px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: background .15s; border: none; cursor: pointer; }
.btn-primary:hover { background: #3a6585; }
.btn-secondary { background: #fff; color: #1a1a1a; padding: 11px 24px; border-radius: 7px; font-size: 14px; font-weight: 400; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d0d5dd; transition: background .15s; cursor: pointer; }
.btn-secondary:hover { background: #f5f7fa; }

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px,1fr)); gap: 10px; margin-top: 4px; }
.service-item { background: #f8fbfd; border: 1px solid #e8eaed; border-radius: 8px; padding: 12px 14px; font-size: 13px; font-weight: 500; color: #333; display: flex; align-items: center; gap: 10px; transition: border-color .15s; }
.service-item:hover { border-color: #4a7fa5; }
.service-item i { font-size: 16px; color: #4a7fa5; flex-shrink: 0; width: 18px; text-align: center; }
.service-item svg { flex-shrink: 0; }
.service-cta { grid-column: 1/-1; background: #1a1a1a; border: none; border-radius: 8px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.service-cta p { font-size: 12px; color: rgba(255,255,255,0.5); margin: 0 0 3px; }
.service-cta strong { font-size: 14px; color: #fff; font-weight: 500; }
.service-cta a { background: #4a7fa5; color: #fff; padding: 9px 20px; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; transition: background .15s; }
.service-cta a:hover { background: #3a6585; }

.donate-btn { display: inline-flex; align-items: center; gap: 7px; background: #4a7fa5; color: #fff; padding: 10px 22px; border-radius: 7px; font-size: 13px; font-weight: 500; text-decoration: none; border: none; cursor: pointer; transition: background .15s; }
.donate-btn:hover { background: #3a6585; }
.divider { border: none; border-top: 1px solid #e8eaed; margin: 22px 0; }
.donate-methods { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; margin-top: 20px; }
.donate-method { background: #f8fbfd; border: 1px solid #e8eaed; border-radius: 9px; padding: 22px 20px; text-align: center; }
.donate-method img { max-width: 100px; height: 32px; object-fit: contain; display: block; margin: 0 auto 12px; }
.donate-method .method-title { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; }
.donate-method .method-detail { font-size: 12px; color: #4a7fa5; font-weight: 500; margin-bottom: 14px; }
.donate-hero { text-align: center; padding: 8px 0 24px; }
.donate-hero h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.donate-hero p { font-size: 14px; color: #555; max-width: 400px; margin: 0 auto 20px; }
.tax-note { text-align: center; font-size: 12px; color: #999; margin-top: 24px; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 12px; max-width: 420px; width: 100%; padding: 28px; text-align: center; position: relative; max-height: 90vh; overflow-y: auto; border-top: 4px solid #4a7fa5; }
.modal-close { position: absolute; top: 16px; right: 18px; font-size: 22px; cursor: pointer; color: #999; background: none; border: none; }
.modal-close:hover { color: #333; }
.modal-box img.zeffy-logo { max-width: 120px; display: block; margin: 0 auto 16px; }
.modal-box h3 { font-size: 18px; font-weight: 600; color: #1a1a1a; margin-bottom: 10px; }
.modal-box p { font-size: 14px; color: #555; line-height: 1.65; margin-bottom: 14px; }
.modal-box img.tip-img { width: 100%; max-width: 280px; border-radius: 8px; margin: 6px auto 18px; display: block; border: 1px solid #e8eaed; }

.social-links { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 20px auto 0; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 24px; border-radius: 8px; font-weight: 500; font-size: 14px; text-decoration: none; transition: opacity .15s; }
.social-btn:hover { opacity: .88; }
.social-btn.whatsapp { background: #25D366; color: #fff; }
.social-btn.instagram { background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); color: #fff; }
.social-btn svg { width: 22px; height: 22px; flex-shrink: 0; }

.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.role-card { background: #f8fbfd; border: 1px solid #e8eaed; border-radius: 9px; padding: 24px 22px; transition: border-color .15s; }
.role-card:hover { border-color: #4a7fa5; }
.role-icon { font-size: 30px; margin-bottom: 12px; }
.role-card h3 { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 7px; }
.role-card p { font-size: 13px; color: #666; line-height: 1.65; margin-bottom: 16px; }
.role-card a { display: inline-flex; align-items: center; gap: 6px; background: #4a7fa5; color: #fff; padding: 9px 20px; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; transition: background .15s; }
.role-card a:hover { background: #3a6585; }

.map-embed { width: 100%; height: 440px; border: none; border-radius: 9px; display: block; margin-top: 4px; }
.map-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; padding: 10px 22px; background: #4a7fa5; color: #fff; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; transition: background .15s; }
.map-link:hover { background: #3a6585; }

.search-wrap { margin-bottom: 20px; }
.search-wrap input { width: 100%; padding: 11px 18px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 14px; outline: none; background: #fff; color: #1a1a1a; transition: border-color .15s; }
.search-wrap input:focus { border-color: #4a7fa5; box-shadow: 0 0 0 3px rgba(74,127,165,0.1); }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 12px; }
.dir-card { background: #fff; border: 1px solid #e8eaed; border-radius: 9px; padding: 16px 16px 14px; transition: border-color .15s, box-shadow .15s; }
.dir-card:hover { border-color: #b8dcea; box-shadow: 0 2px 8px rgba(74,127,165,0.1); }
.dir-card.highlight { border-color: #4a7fa5; background: #f0f7fc; }
.dir-card h3 { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; }
.dir-card .phone { font-size: 12px; color: #888; margin-bottom: 12px; }
.dir-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; background: #4a7fa5; color: #fff; border-radius: 5px; font-size: 12px; font-weight: 500; text-decoration: none; transition: background .15s; }
.dir-btn:hover { background: #3a6585; }
.no-results { text-align: center; color: #aaa; font-size: 14px; padding: 40px 0; display: none; }

.toc { background: #f8fbfd; border-left: 3px solid #4a7fa5; border-radius: 0 8px 8px 0; padding: 16px 20px; margin-bottom: 28px; }
.toc h3 { font-size: 11px; font-weight: 600; color: #4a7fa5; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px; }
.toc ol { padding-left: 18px; margin: 0; }
.toc li { font-size: 13px; color: #555; margin-bottom: 4px; }
.toc a { color: #4a7fa5; text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.policy-sec { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid #f0f2f5; }
.policy-sec:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.policy-sec h3 { font-size: 15px; font-weight: 600; color: #1a1a1a; margin-bottom: 10px; }
.policy-sec p, .policy-sec li { font-size: 14px; color: #555; line-height: 1.75; }
.policy-sec ul { padding-left: 20px; margin-top: 6px; }
.policy-sec li { margin-bottom: 4px; }
.policy-sec a { color: #4a7fa5; }
.policy-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.policy-table th { background: #4a7fa5; color: #fff; padding: 10px 12px; text-align: left; font-weight: 500; }
.policy-table td { padding: 9px 12px; border-bottom: 1px solid #f0f2f5; color: #555; vertical-align: top; }
.policy-table tr:nth-child(even) td { background: #f8fbfd; }
.contact-box { background: #f8fbfd; border: 1px solid #e8eaed; border-radius: 8px; padding: 18px 20px; font-size: 14px; color: #333; line-height: 1.8; }
.contact-box a { color: #4a7fa5; text-decoration: none; }
.page-heading { font-size: 22px; font-weight: 600; color: #1a1a1a; margin-bottom: 20px; }

.site-footer { background: #1a1a1a; color: rgba(255,255,255,0.4); text-align: center; padding: 20px 24px; font-size: 12px; }
.site-footer a { color: rgba(255,255,255,0.5); text-decoration: none; }

@media (max-width: 768px) {
  .topbar-name .name-full { display: none; }
  .topbar-name .name-short { display: block; }
  .topbar-name .name-sub { display: none; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-left { gap: 9px; }
  .topbar-left img { width: 36px; height: 36px; }
  .topbar-name .name-main { font-size: 13px; white-space: nowrap; overflow: visible; text-overflow: unset; }
  .topbar-btn { font-size: 12px; padding: 8px 12px; gap: 5px; }
  .topbar-btn-outline { font-size: 12px; padding: 8px 10px; }
}
@media (max-width: 600px) {
  .topbar { padding: 10px 14px; }
  .topbar-left img { width: 36px; height: 36px; }
  .topbar-name { font-size: 13px; }
  .topbar-btn { font-size: 12px; padding: 7px 12px; gap: 5px; }
  .topbar-btn-outline span { display: inline; }
  .site-nav { padding: 4px 8px; }
  .nav-item { padding: 10px 10px; font-size: 12px; }
  .hero { padding: 28px 18px 24px; }
  .hero h1 { font-size: 21px; }
  .hero p { font-size: 14px; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .main, .main-wide, .main-narrow { padding: 0 14px 50px; margin-top: 20px; }
  .card { padding: 18px 16px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .dir-grid { grid-template-columns: 1fr; }
  .donate-methods { grid-template-columns: 1fr; }
  .service-cta { flex-direction: column; text-align: center; }
}
