html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--hoa-blue-accent);
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

:root {
  --hoa-navy: #0b2a63;
  --hoa-navy-dark: #001233;
  --hoa-blue-accent: #0e7fe0;
  --hoa-gold: #c79c05;
  --hoa-gold-soft: #f1e2a3;
  --hoa-ink: #131f36;
  --hoa-muted: #6b7280;
  --hoa-bg: #eaf2fb;
  --hoa-border: #e5e1d6;
  --hoa-silver: #c0c0c0;
}

body {
  margin-bottom: 60px;
  background-color: var(--hoa-bg);
  color: var(--hoa-ink);
  font-family: Arial, Helvetica, sans-serif;
}

h1, h2, h3, .navbar-brand {
  font-family: Arial, Helvetica, sans-serif;
}

/* Navbar */

.navbar {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--hoa-navy) !important;
  letter-spacing: 0.01em;
}

.navbar-brand svg {
  color: var(--hoa-gold);
}

.brand-logo {
  height: 1.9rem;
  width: auto;
  display: block;
}

.brand-logo--lg {
  height: 2.75rem;
}

.navbar .nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hoa-muted) !important;
  padding: 0.5rem 1rem !important;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--hoa-navy) !important;
  border-bottom-color: var(--hoa-gold);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, rgba(199, 156, 5, 0.25), transparent 45%),
    linear-gradient(135deg, var(--hoa-navy-dark) 0%, var(--hoa-navy) 55%, var(--hoa-blue-accent) 100%);
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--hoa-gold-soft);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.82);
  max-width: 42rem;
}

.hero-bg-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Section heading */

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.section-heading::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 3px;
  background: var(--hoa-gold);
  border-radius: 2px;
}

/* Announcement cards */

.announcement-card {
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(19, 31, 54, 0.04);
  transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
  overflow: hidden;
}

.announcement-card:hover {
  box-shadow: 0 0.75rem 1.5rem rgba(19, 31, 54, 0.08);
  transform: translateY(-2px);
}

.announcement-card--pinned {
  border-color: var(--hoa-gold-soft);
  background: linear-gradient(180deg, #fdf9ef 0%, #ffffff 55%);
}

.announcement-row {
  display: flex;
  align-items: stretch;
}

.announcement-image-square {
  display: block;
  flex: 0 0 20%;
  width: 20%;
  min-width: 100px;
  max-width: 170px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.announcement-row .card-body {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 575.98px) {
  .announcement-row {
    flex-direction: column;
    align-items: stretch;
  }

  .announcement-image-square {
    width: 130px;
    max-width: 130px;
    flex-basis: auto;
  }
}

.announcement-detail-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background-color: var(--hoa-bg);
  border-radius: 0.9rem;
}

.announcement-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  min-width: 3.5rem;
  border-radius: 0.6rem;
  background-color: var(--hoa-navy);
  color: #fff;
  padding: 0.4rem 0.25rem;
  text-align: center;
  line-height: 1.1;
}

.announcement-card--pinned .announcement-date {
  background-color: var(--hoa-gold);
}

.announcement-date .day {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.announcement-date .month {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.badge-pin {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a5a12;
  background-color: var(--hoa-gold-soft);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.badge-category {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.badge-category-maintenance {
  color: #3a5a82;
  background-color: #eaf1fa;
}

.badge-category-event {
  color: #93650f;
  background-color: #fbf0da;
}

.badge-category-billing {
  color: #a3383d;
  background-color: #fbeaea;
}

.badge-category-general {
  color: #2f6d4c;
  background-color: #e9f5ee;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hoa-navy);
  text-decoration: none;
  background-color: #eef1f5;
  border: 1px solid var(--hoa-border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.read-more:hover {
  background-color: var(--hoa-navy);
  border-color: var(--hoa-navy);
  color: #fff;
}

/* Announcement detail page */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--hoa-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--hoa-navy);
}

.announcement-detail-card {
  max-width: 46rem;
  margin: 0 auto;
  overflow: hidden;
}

.announcement-detail-image-link {
  display: block;
}

.announcement-detail-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background-color: var(--hoa-bg);
  transition: opacity 0.15s ease-in-out;
}

.announcement-detail-image-link:hover .announcement-detail-image {
  opacity: 0.92;
}

.announcement-detail-body {
  padding: 2rem;
}

@media (min-width: 768px) {
  .announcement-detail-body {
    padding: 2.75rem 3rem;
  }
}

.announcement-detail-card h1 {
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.lead-body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--hoa-ink);
}

.attachment-tile {
  display: block;
  text-decoration: none;
  border-radius: 0.7rem;
  transition: transform 0.15s ease-in-out;
}

.attachment-tile:hover {
  transform: translateY(-2px);
}

.attachment-tile__preview {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 0.7rem;
  overflow: hidden;
  border: 1px solid var(--hoa-border);
  background-color: #fff;
  transition: box-shadow 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.attachment-tile:hover .attachment-tile__preview {
  box-shadow: 0 0.5rem 1rem rgba(19, 31, 54, 0.1);
  border-color: var(--hoa-gold-soft);
}

.attachment-tile__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.attachment-tile__filename {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--hoa-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-type-tile {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background-color: #f6f7f9;
}

.file-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--hoa-navy);
}

/* Sidebar */

.sidebar-card {
  background-color: #fff;
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  padding: 1.25rem 1.5rem;
}

.sidebar-card--accent {
  border-color: var(--hoa-gold-soft);
  background: linear-gradient(180deg, #fdf9ef 0%, #ffffff 60%);
}

.sidebar-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--hoa-navy);
  margin-bottom: 0.9rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sidebar-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.sidebar-list--stacked li {
  align-items: flex-start;
}

.sidebar-list .label {
  color: var(--hoa-muted);
}

.sidebar-list .value {
  font-weight: 500;
  text-align: right;
}

/* Generic page header / content block (Privacy, etc.) */

.eyebrow-dark {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--hoa-gold);
  margin-bottom: 0.5rem;
}

.page-header h1 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.content-block {
  max-width: 42rem;
}

.content-block h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--hoa-navy);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.content-block p {
  line-height: 1.7;
  color: var(--hoa-ink);
}

/* Error state */

.error-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--hoa-navy);
  color: var(--hoa-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.btn-elegant {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--hoa-navy);
  color: #fff;
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s ease-in-out;
}

.btn-elegant:hover {
  background-color: var(--hoa-navy-dark);
  color: #fff;
}

.btn-elegant--light {
  background-color: #fff;
  color: var(--hoa-navy);
}

.btn-elegant--light:hover {
  background-color: var(--hoa-gold-soft);
  color: var(--hoa-navy);
}

.btn-elegant--outline {
  background-color: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-elegant--outline:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

/* Marketing landing page */

.feature-card {
  height: 100%;
  background-color: #fff;
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(19, 31, 54, 0.04);
}

.feature-card h3 {
  color: var(--hoa-navy);
  margin: 0.9rem 0 0.35rem;
}

.feature-card p {
  color: var(--hoa-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.cta-band {
  background: radial-gradient(circle at 85% 30%, rgba(199, 156, 5, 0.25), transparent 45%),
    linear-gradient(135deg, var(--hoa-navy-dark) 0%, var(--hoa-navy) 100%);
  border-radius: 1rem;
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem;
}

.cta-band h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 34rem;
  margin: 0 auto;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 22rem;
}

.hero-visual svg {
  width: 100%;
  height: auto;
  max-width: 26rem;
  filter: drop-shadow(0 1.5rem 2.5rem rgba(0, 8, 30, 0.35));
}

.brand-footer {
  border-top: 1px solid var(--hoa-border);
  padding-top: 2rem;
}

.brand-footer .navbar-brand {
  font-size: 1.15rem;
}

.brand-footer p {
  color: var(--hoa-muted);
}

/* Landing page animations */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.hero .eyebrow,
.hero h1,
.hero .lead,
.hero .d-flex {
  opacity: 0;
  animation: fadeInUp 0.7s ease-out forwards;
}

.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero .lead { animation-delay: 0.25s; }
.hero .d-flex { animation-delay: 0.35s; }

.hero-visual svg {
  animation: float 6s ease-in-out infinite;
}

.btn-elegant {
  transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-elegant:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.6rem 1.25rem rgba(11, 42, 99, 0.18);
}

.feature-card,
.admin-dashboard-card {
  transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.feature-card:hover {
  box-shadow: 0 0.75rem 1.5rem rgba(19, 31, 54, 0.08);
  transform: translateY(-3px);
}

.feature-card .icon-circle {
  transition: transform 0.2s ease-in-out;
}

.feature-card:hover .icon-circle {
  transform: scale(1.08) rotate(-4deg);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow,
  .hero h1,
  .hero .lead,
  .hero .d-flex,
  .hero-visual svg,
  .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Admin */

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
  background-color: var(--hoa-bg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--hoa-navy);
  text-decoration: none;
}

.login-brand svg {
  color: var(--hoa-gold);
}

.login-card {
  width: 100%;
  max-width: 24rem;
  background-color: #fff;
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  padding: 2rem;
  box-shadow: 0 1rem 2.5rem rgba(19, 31, 54, 0.08);
}

.login-back {
  font-size: 0.85rem;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.admin-dashboard-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  background-color: #fff;
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.admin-dashboard-card:hover {
  box-shadow: 0 0.75rem 1.5rem rgba(19, 31, 54, 0.08);
  transform: translateY(-2px);
  color: inherit;
}

.admin-dashboard-card h3 {
  color: var(--hoa-navy);
  margin-bottom: 0.35rem;
}

.admin-dashboard-card p {
  color: var(--hoa-muted);
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Icon system */

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon--sm {
  opacity: 0.85;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--hoa-navy);
  color: var(--hoa-gold);
  flex-shrink: 0;
}

.icon-circle .icon {
  stroke-width: 2.4;
}

.admin-body .icon-circle:not(.icon-circle--gold):not(.icon-circle--muted):not(.icon-circle--accent) {
  color: var(--hoa-silver);
}

.icon-circle--sm {
  width: 2.1rem;
  height: 2.1rem;
}

.icon-circle--gold {
  background-color: var(--hoa-gold-soft);
  color: var(--hoa-navy);
}

.icon-circle--muted {
  background-color: #eef1f5;
  color: var(--hoa-navy);
}

.icon-circle--accent {
  background: linear-gradient(135deg, var(--hoa-navy) 0%, var(--hoa-blue-accent) 100%);
  color: var(--hoa-gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 1;
}

.btn-icon .icon {
  margin: 0;
}

/* Nav icons */

.navbar .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.navbar .btn {
  white-space: nowrap;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dropdown-item .icon {
  color: var(--hoa-muted);
}

/* Featured image picker (Announcements Create/Edit) */

.image-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.image-picker__thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid var(--hoa-border);
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.image-picker__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-picker__thumb--selected {
  border-color: var(--hoa-gold);
  box-shadow: 0 0 0 2px var(--hoa-gold-soft);
}

/* Elegant card / table wrapper used across admin list pages */

.elegant-card {
  background-color: #fff;
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  box-shadow: 0 1px 2px rgba(19, 31, 54, 0.04);
}

.table-card {
  background-color: #fff;
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 1px 2px rgba(19, 31, 54, 0.04);
}

.table-card .table {
  margin-bottom: 0;
}

.table-card .table thead th {
  border-bottom-color: var(--hoa-border);
  color: var(--hoa-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.table-card .table td, .table-card .table th {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Page header with icon */

.page-icon-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Stat tiles */

.stat-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #fff;
  border: 1px solid var(--hoa-border);
  border-radius: 0.9rem;
  padding: 1.1rem 1.35rem;
  box-shadow: 0 1px 2px rgba(19, 31, 54, 0.04);
}

.stat-tile__value {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--hoa-navy);
  line-height: 1.1;
}

.stat-tile__label {
  color: var(--hoa-muted);
  font-size: 0.82rem;
}

/* Footer */

.footer {
  border-top: 1px solid var(--hoa-border) !important;
  background-color: #fff;
  font-size: 0.85rem;
}
