/* ============================================================
   Liberty Park Owners Association — shared stylesheet
   Colors: background #E3E3E3, primary navy #1B3C53 / #234C6A
   ============================================================ */

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

:root {
  --bg:        #E3E3E3;
  --fg:        #1B3C53;
  --primary:   #234C6A;
  --accent:    #456882;
  --card-bg:   #E3E3E3;
  --muted:     #6b8a9e;
  --border:    #b8b8b8;
  --radius:    0.5rem;
  --shadow:    0 1px 3px rgba(27,60,83,0.10);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px circle at 0% 0%,  rgba(227,227,227,0.6), transparent 60%),
    radial-gradient(800px  circle at 100% 100%, rgba(69,104,130,0.18), transparent 60%);
  background-attachment: fixed;
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ── Navbar ── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to right, #dde5ea, #c8d8e4 50%, #dde5ea);
  backdrop-filter: blur(4px);
}

.nav-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nav-brand {
  font-weight: 700;
  color: var(--primary);
  font-size: clamp(13px, 3.5vw, 22px);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

nav.desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

nav.desktop a {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--fg);
  transition: background 0.15s;
}

nav.desktop a:hover { background: rgba(27,60,83,0.10); }

/* hamburger */
.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--fg);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.menu-btn:hover { background: rgba(27,60,83,0.10); }
.menu-btn svg { pointer-events: none; }

/* mobile drawer */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 100;
}
.drawer-overlay.open { display: block; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 220px;
  background: #dde5ea;
  z-index: 101;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}
.drawer.open { transform: translateX(0); }

.drawer a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 0.95rem;
  transition: background 0.15s;
}
.drawer a:hover { background: rgba(27,60,83,0.10); }

.drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

@media (min-width: 1024px) {
  nav.desktop { display: flex; }
  .menu-btn    { display: none; }
}

/* ── Page wrapper ── */
main {
  flex: 1;
  max-width: 64rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Page header (icon + title row) ── */
.page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
}

/* ── Icon bubble ── */
.icon-bubble {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(27,60,83,0.10);
  border: 1px solid rgba(27,60,83,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* ── Cards (list items) ── */
.card-list { display: flex; flex-direction: column; gap: 1rem; }

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 0.5px solid var(--fg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: background 0.15s;
}

a.card:hover { background: rgba(69,104,130,0.18); }

.card-text h2 { font-size: 1.2rem; font-weight: 600; }
.card-text p  { font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }

/* ── Home grid ── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
}

.home-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 0.5px solid var(--fg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: background 0.15s;
  group: true;
}

.home-card:hover { background: rgba(69,104,130,0.18); }

.home-card-left { display: flex; align-items: center; gap: 1rem; }
.home-card h2   { font-size: 1.4rem; font-weight: 600; }

.arrow-icon {
  color: var(--primary);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.home-card:hover .arrow-icon { transform: translateX(4px); }

/* ── Back button ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--fg);
  font-size: 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s;
}
.back-btn:hover { background: rgba(27,60,83,0.08); padding: 0.4rem 0.6rem; }

/* ── Document/Announcement detail page ── */
.doc-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.embed-wrap {
  width: 100%;
  max-width: 800px;
  height: 520px;
  margin: 0 auto;
}

.embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.download-wrap {
  text-align: center;
  margin-top: 1rem;
}

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(27,60,83,0.08); }

/* ── Contact form ── */
.contact-card {
  max-width: 48rem;
  margin: 0 auto;
  background: var(--card-bg);
  border: 0.5px solid var(--fg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.recipient-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.recipient-actions .btns { display: flex; gap: 0.5rem; }

.recipient-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
  .recipient-grid { grid-template-columns: 1fr; }
}

.recipient-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  background: transparent;
  text-align: left;
  color: var(--fg);
  font-size: 0.875rem;
}
.recipient-item:hover { background: rgba(27,60,83,0.06); }
.recipient-item.selected {
  border-color: var(--primary);
  background: rgba(35,76,106,0.08);
}

.recipient-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.recipient-label { font-weight: 500; }
.recipient-desc  { color: var(--muted); font-size: 0.8rem; }

.badge-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; min-height: 1.5rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(27,60,83,0.12);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; }

.form-group input,
.form-group textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--fg);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(35,76,106,0.15);
}

.form-group textarea { resize: vertical; }

.field-error { color: #c0392b; font-size: 0.8rem; margin-top: 0.2rem; display: none; }
.field-error.show { display: block; }

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* turnstile */
.turnstile-wrap { margin-bottom: 1rem; }

/* ── Modal / Preview ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  max-width: 540px;
  width: 100%;
  padding: 1.75rem;
}

.modal h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.25rem; }
.modal .modal-desc { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.25rem; }

.preview-field { margin-bottom: 0.75rem; }
.preview-field strong { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: block; margin-bottom: 0.2rem; }
.preview-field span, .preview-field p { font-size: 0.9rem; }
.preview-message {
  white-space: pre-wrap;
  background: rgba(27,60,83,0.05);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.875rem;
  max-height: 180px;
  overflow-y: auto;
}

.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.25rem; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.success { background: #1e6b3a; }
#toast.error   { background: #b91c1c; }

/* ── Footer ── */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

footer address { font-style: normal; margin-top: 0.2rem; }

/* ── Zeffy iframe ── */
.zeffy-wrap {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: var(--radius);
}
.zeffy-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
