/* ============================================================
   TINKER POND HOA — Global Stylesheet
   "Lakeside Sanctuary" — Deep Forest, Copper, Cool Mist
   Fonts: Cormorant Garamond (headings) + DM Sans (body)
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
    --hoa-primary:       #1B3A2D;   /* Deep forest */
    --hoa-primary-dark:  #112218;   /* Darkest forest */
    --hoa-primary-light: #2D6A55;   /* Forest teal */
    --hoa-sage:          #7BAB95;   /* Muted sage */
    --hoa-cream:         #EEF1ED;   /* Cool mist bg */
    --hoa-warm-white:    #FAFCF9;   /* Card / panel bg */
    --hoa-amber:         #B86B38;   /* Copper accent */
    --hoa-amber-light:   #D4935A;   /* Light copper */
    --hoa-slate:         #3D4A5C;   /* Dark slate */
    --hoa-text:          #1E2E25;   /* Body text */
    --hoa-text-muted:    #7A8E82;   /* Muted text */
    --hoa-border:        #CAD4CD;   /* Subtle border */
    --hoa-shadow:        rgba(27, 58, 45, 0.09);
    --hoa-shadow-md:     rgba(27, 58, 45, 0.18);
    --hoa-radius:        10px;
    --hoa-radius-sm:     6px;
    --hoa-radius-lg:     16px;
    --hoa-transition:    0.22s ease;
}

/* ---- Base Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: var(--hoa-text);
    background: var(--hoa-cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--hoa-primary-dark);
    line-height: 1.2;
    margin-top: 0;
    font-weight: 600;
}

a {
    color: var(--hoa-primary-light);
    transition: color var(--hoa-transition);
}

a:hover {
    color: var(--hoa-primary);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.hoa-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Header ---- */
.hoa-header {
    background: var(--hoa-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(123, 171, 149, 0.12), 0 4px 20px rgba(0, 0, 0, 0.22);
}

.hoa-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 3.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

/* Brand */
.hoa-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.hoa-brand:hover { text-decoration: none; }

.hoa-brand-emblem {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.9;
}

.hoa-brand-emblem img {
    width: 100%;
    height: 100%;
}

.hoa-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1;
}

.hoa-brand-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.hoa-brand-tagline {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hoa-sage);
    font-weight: 400;
    white-space: nowrap;
}

/* Header Actions */
.hoa-header-actions {
    flex-shrink: 0;
}

.hoa-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(184, 107, 56, 0.14);
    border: 1px solid rgba(184, 107, 56, 0.3);
    border-radius: 4px;
    color: var(--hoa-amber-light);
    font-size: 0.78rem;
    font-weight: 500;
    font-family: 'DM Sans', inherit;
    cursor: pointer;
    transition: all var(--hoa-transition);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.hoa-logout-btn:hover {
    background: rgba(184, 107, 56, 0.28);
    border-color: var(--hoa-amber);
    color: #fff;
}

/* Main content */
.hoa-main {
    flex: 1;
}

/* ---- Footer ---- */
.hoa-footer {
    background: var(--hoa-primary-dark);
    border-top: 1px solid rgba(123, 171, 149, 0.1);
    padding: 1.75rem 0;
}

.hoa-footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hoa-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hoa-footer-brand strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.hoa-footer-brand span {
    font-size: 0.72rem;
    color: rgba(123, 171, 149, 0.6);
    letter-spacing: 0.05em;
}

.hoa-footer-copy {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 480px) {
    /* Hide decorative tagline to free header space */
    .hoa-brand-tagline { display: none; }
    /* Keep Sign Out icon only — title attr provides tooltip */
    .hoa-logout-btn span { display: none; }
    .hoa-logout-btn { padding: 0.4rem 0.6rem; }
    /* Stack footer brand + copyright centered */
    .hoa-footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
}

/* ============================================================
   BLAZOR LOADING
   ============================================================ */

.loading-progress {
    position: relative;
    display: block;
    width: 6rem;
    height: 6rem;
    margin: 30vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(123, 171, 149, 0.18);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--hoa-sage);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 500;
    inset: calc(30vh + 2.75rem) 0 auto 0.2rem;
    color: var(--hoa-sage);
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading...");
}

/* ---- Splash Screen ---- */
.splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--hoa-primary-dark);
    gap: 1.5rem;
}

.splash-logo {
    width: 5rem;
    height: 5rem;
    animation: pulse 2s ease-in-out infinite;
}

.splash-logo svg { width: 100%; height: 100%; }

.splash-screen p {
    color: var(--hoa-sage);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.05); opacity: 0.85; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(160deg, rgba(17, 34, 24, 0.93) 0%, rgba(27, 58, 45, 0.88) 50%, rgba(45, 106, 85, 0.9) 100%),
        url('https://images.unsplash.com/photo-1448375240586-882707db888b?w=1920&q=80') center/cover no-repeat;
    padding: 1.5rem;
    z-index: 999;
}

.login-card {
    background: var(--hoa-warm-white);
    border-radius: var(--hoa-radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(123, 171, 149, 0.1);
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 400px;
}

@media (max-width: 480px) {
    .login-card { padding: 1.75rem 1.5rem; }
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand-emblem {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1rem;
    display: block;
}

.login-brand-emblem img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 10px rgba(27, 58, 45, 0.3));
}

.login-brand h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--hoa-primary-dark);
    margin: 0 0 0.25rem;
}

.login-brand-sub {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hoa-text-muted);
    font-weight: 500;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.65rem 0.85rem;
    border-radius: var(--hoa-radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.login-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--hoa-primary-dark);
    letter-spacing: 0.04em;
}

.login-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--hoa-border);
    border-radius: var(--hoa-radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--hoa-text);
    background: #fff;
    transition: border-color var(--hoa-transition), box-shadow var(--hoa-transition);
    outline: none;
}

.login-input:focus {
    border-color: var(--hoa-primary-light);
    box-shadow: 0 0 0 3px rgba(45, 106, 85, 0.13);
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--hoa-primary);
    color: #fff;
    border: none;
    border-radius: var(--hoa-radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--hoa-transition), transform var(--hoa-transition), box-shadow var(--hoa-transition);
    letter-spacing: 0.03em;
}

.login-btn:hover:not(:disabled) {
    background: var(--hoa-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--hoa-shadow-md);
}

.login-btn:active:not(:disabled) { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.login-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hoa-border);
    text-align: center;
}

.login-footer p {
    font-size: 0.77rem;
    color: var(--hoa-text-muted);
    margin: 0.2rem 0;
    line-height: 1.5;
}

/* ============================================================
   HOME — HERO CAROUSEL (Crossfade + Ken Burns)
   ============================================================ */

.hero {
    position: relative;
    height: 85vh;
    min-height: 540px;
    max-height: 920px;
    overflow: hidden;
    background: var(--hoa-primary-dark);
}

/* Slides are stacked, crossfade via opacity */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.is-active {
    opacity: 1;
}

/* Background image — slightly oversized for Ken Burns zoom/pan */
.hero-slide-bg {
    position: absolute;
    inset: -5%;
    background-size: cover;
    background-position: center;
    animation: kenBurns 7s ease-out forwards;
}

/* Two identical keyframes: alternating names forces CSS restart on re-activation */
@keyframes kenBurns {
    from { transform: scale(1.10) translate(0.8%, 0.4%); }
    to   { transform: scale(1.00) translate(-0.4%, -0.4%); }
}

@keyframes kenBurns2 {
    from { transform: scale(1.10) translate(-0.5%, 0.3%); }
    to   { transform: scale(1.00) translate(0.4%, -0.3%); }
}

/* Gradient overlay — dark vignette at bottom for text */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(17, 34, 24, 0.30) 0%,
            rgba(17, 34, 24, 0.04) 30%,
            rgba(17, 34, 24, 0.42) 65%,
            rgba(17, 34, 24, 0.78) 100%);
    z-index: 5;
}

/* Hero text */
.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 3rem 5rem;
    z-index: 10;
    text-align: center;
}

.hero-eyebrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--hoa-sage);
    margin: 0 0 0.85rem;
    opacity: 0.9;
}

.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.6rem, 6vw, 4.75rem);
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
    margin: 0 0 1.75rem;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.75rem;
    background: rgba(184, 107, 56, 0.9);
    color: #fff;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.hero-cta:hover {
    background: var(--hoa-amber);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 107, 56, 0.42);
}

/* Prev / Next arrows */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.82);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.22s ease;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.48);
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.hero-prev { left: 1.5rem; }
.hero-next { right: 1.5rem; }

/* Dash-style indicators */
.hero-indicators {
    position: absolute;
    bottom: 2.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 20;
}

.hero-dot {
    width: 28px;
    height: 3px;
    background: rgba(255, 255, 255, 0.28);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    padding: 0;
    transition: all 0.28s ease;
}

.hero-dot.is-active {
    background: var(--hoa-amber);
    width: 52px;
}

.hero-dot:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.55);
}

/* Progress bar at base of hero */
.hero-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 20;
}

.hero-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(184, 107, 56, 0.55), var(--hoa-amber));
    animation: progressFill 5.5s linear forwards;
}

/* Two identical keyframes — alternating names restart animation */
@keyframes progressFill  { from { width: 0; } to { width: 100%; } }
@keyframes progressFill2 { from { width: 0; } to { width: 100%; } }

@media (max-width: 768px) {
    .hero { height: 75vh; min-height: 460px; }
    .hero-content { padding: 1.5rem 1.25rem 4.5rem; }
    .hero-prev { left: 0.75rem; }
    .hero-next { right: 0.75rem; }
}

@media (max-width: 480px) {
    .hero { min-height: 380px; }
    .hero-content { padding: 1.25rem 1rem 4rem; }
}

/* ============================================================
   HOME — MEMBER RESOURCE CARDS
   ============================================================ */

.nav-cards-section {
    padding: 4.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-cards-section-title {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 500;
    color: var(--hoa-primary-dark);
}

.nav-cards-section-sub {
    text-align: center;
    color: var(--hoa-text-muted);
    margin-bottom: 3rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.nav-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.25rem 1.75rem;
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    text-decoration: none;
    color: var(--hoa-text);
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px var(--hoa-shadow);
    position: relative;
    overflow: hidden;
}

.nav-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: var(--hoa-amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px var(--hoa-shadow-md);
    border-color: rgba(123, 171, 149, 0.4);
    color: var(--hoa-primary-dark);
    text-decoration: none;
}

.nav-card:hover::after {
    transform: scaleX(1);
}

.nav-card-icon {
    width: 3.25rem;
    height: 3.25rem;
    background: var(--hoa-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 14px rgba(27, 58, 45, 0.24);
    flex-shrink: 0;
    transition: background var(--hoa-transition);
}

.nav-card:hover .nav-card-icon {
    background: var(--hoa-primary-light);
}

.nav-card h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--hoa-primary-dark);
    margin: 0 0 0.45rem;
    line-height: 1.3;
}

.nav-card p {
    font-size: 0.8rem;
    color: var(--hoa-text-muted);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 960px) {
    .nav-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-cards-section { padding: 3rem 1.25rem; }
}

@media (max-width: 480px) {
    .nav-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
}

/* ============================================================
   SHARED PAGE LAYOUT
   ============================================================ */

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--hoa-border);
}

.page-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.page-header p {
    color: var(--hoa-text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--hoa-text-muted);
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.page-breadcrumb a {
    color: var(--hoa-primary-light);
    text-decoration: none;
}

.page-breadcrumb a:hover { text-decoration: underline; }

/* ============================================================
   CARDS & PANELS
   ============================================================ */

.hoa-card {
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px var(--hoa-shadow);
}

.hoa-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hoa-border);
}

.hoa-card-header h2,
.hoa-card-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary-hoa {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: var(--hoa-primary);
    color: #fff;
    border: none;
    border-radius: var(--hoa-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--hoa-transition), transform var(--hoa-transition), box-shadow var(--hoa-transition);
}

.btn-primary-hoa:hover {
    background: var(--hoa-primary-light);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--hoa-shadow-md);
}

.btn-secondary-hoa {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--hoa-primary);
    border: 1.5px solid var(--hoa-primary-light);
    border-radius: var(--hoa-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--hoa-transition);
}

.btn-secondary-hoa:hover {
    background: var(--hoa-primary);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-amber-hoa {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: var(--hoa-amber);
    color: #fff;
    border: none;
    border-radius: var(--hoa-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--hoa-transition);
}

.btn-amber-hoa:hover {
    background: #9a5626;
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   ANNOUNCEMENTS PAGE
   ============================================================ */

.announcements-grid { display: grid; gap: 1.1rem; }

.announcements-layout {
    display: grid;
    grid-template-columns: 1fr min(320px, 100%);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .announcements-layout {
        grid-template-columns: 1fr;
    }
}

.announcement-card {
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    padding: 1.35rem 1.5rem;
    box-shadow: 0 2px 8px var(--hoa-shadow);
    transition: box-shadow var(--hoa-transition);
    position: relative;
}

.announcement-card.pinned {
    border-color: rgba(184, 107, 56, 0.35);
    background: linear-gradient(to right, rgba(184, 107, 56, 0.03), var(--hoa-warm-white));
}

.announcement-card:hover { box-shadow: 0 4px 18px var(--hoa-shadow-md); }

.announcement-pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--hoa-amber);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.2rem 0.65rem;
    border-radius: 3px;
    margin-bottom: 0.65rem;
}

.announcement-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.announcement-date { font-size: 0.78rem; color: var(--hoa-text-muted); }

.announcement-category {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(45, 106, 85, 0.09);
    color: var(--hoa-primary-light);
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.announcement-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; color: var(--hoa-primary-dark); }
.announcement-card p  { font-size: 0.88rem; color: var(--hoa-text); margin: 0; line-height: 1.65; }

/* ============================================================
   DOCUMENTS PAGE
   ============================================================ */

.doc-tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--hoa-border);
    padding-bottom: 0;
}

.doc-tab {
    padding: 0.55rem 1.1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--hoa-text-muted);
    cursor: pointer;
    transition: all var(--hoa-transition);
    letter-spacing: 0.02em;
}

.doc-tab:hover { color: var(--hoa-primary-light); }

.doc-tab.active {
    color: var(--hoa-primary);
    border-bottom-color: var(--hoa-amber);
}

.doc-list { display: flex; flex-direction: column; gap: 0.6rem; }

.doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius-sm);
    transition: all var(--hoa-transition);
}

.doc-item:hover {
    border-color: var(--hoa-sage);
    box-shadow: 0 2px 10px var(--hoa-shadow);
}

.doc-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(27, 58, 45, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hoa-primary);
    flex-shrink: 0;
}

.doc-info { flex: 1; min-width: 0; }

.doc-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--hoa-primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta { font-size: 0.75rem; color: var(--hoa-text-muted); }

.doc-download {
    flex-shrink: 0;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--hoa-primary-light);
    border: 1px solid var(--hoa-primary-light);
    border-radius: var(--hoa-radius-sm);
    background: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--hoa-transition);
    font-family: inherit;
    letter-spacing: 0.02em;
}

.doc-download:hover {
    background: var(--hoa-primary);
    color: #fff;
    border-color: var(--hoa-primary);
    text-decoration: none;
}

@media (max-width: 520px) {
    .doc-item { flex-wrap: wrap; align-items: flex-start; }
    .doc-name { white-space: normal; overflow: visible; text-overflow: unset; }
    .doc-download { margin-left: auto; margin-top: 0.4rem; }
}

/* ============================================================
   DIRECTORY PAGE
   ============================================================ */

.directory-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hoa-search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--hoa-text);
    background: var(--hoa-warm-white);
    outline: none;
    transition: border-color var(--hoa-transition), box-shadow var(--hoa-transition);
}

.hoa-search-input:focus {
    border-color: var(--hoa-primary-light);
    box-shadow: 0 0 0 3px rgba(45, 106, 85, 0.12);
}

.directory-privacy-notice {
    background: rgba(184, 107, 56, 0.06);
    border: 1px solid rgba(184, 107, 56, 0.22);
    border-radius: var(--hoa-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: #6a400e;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.directory-table-wrap {
    overflow-x: auto;
    border-radius: var(--hoa-radius);
    box-shadow: 0 2px 10px var(--hoa-shadow);
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--hoa-warm-white);
    font-size: 0.875rem;
}

.directory-table th {
    background: var(--hoa-primary-dark);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.directory-table th:first-child { border-radius: var(--hoa-radius-sm) 0 0 0; }
.directory-table th:last-child  { border-radius: 0 var(--hoa-radius-sm) 0 0; }

.directory-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--hoa-border);
    color: var(--hoa-text);
}

.directory-table tr:last-child td { border-bottom: none; }
.directory-table tr:hover td { background: rgba(45, 106, 85, 0.04); }

.directory-street-header td {
    background: var(--hoa-cream);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hoa-primary-dark);
    padding: 0.9rem 1rem 0.5rem;
    border-bottom: 2px solid var(--hoa-amber);
    letter-spacing: 0.02em;
}

.directory-street-header:hover td {
    background: var(--hoa-cream) !important;
}

@media (max-width: 640px) {
    /* Remove horizontal scroll — switch to card layout */
    .directory-table-wrap {
        overflow-x: visible;
        border-radius: 0;
        box-shadow: none;
    }
    .directory-table,
    .directory-table tbody {
        display: block;
    }
    .directory-table thead {
        display: none;
    }
    /* Street name becomes a section label */
    .directory-street-header {
        display: block;
        margin-top: 1.5rem;
    }
    .directory-street-header:first-child {
        margin-top: 0;
    }
    .directory-street-header td {
        display: block;
        border-radius: var(--hoa-radius-sm);
        padding: 0.65rem 0.85rem 0.45rem;
        margin-bottom: 0.5rem;
    }
    /* Each resident row is an independent card */
    .directory-table tbody tr:not(.directory-street-header) {
        display: block;
        border: 1px solid var(--hoa-border);
        border-radius: var(--hoa-radius-sm);
        background: var(--hoa-warm-white);
        margin-bottom: 0.5rem;
        box-shadow: 0 1px 4px var(--hoa-shadow);
    }
    .directory-table tbody tr:not(.directory-street-header) td {
        display: flex;
        align-items: baseline;
        gap: 0.75rem;
        padding: 0.45rem 0.85rem;
        border-bottom: 1px solid rgba(202, 212, 205, 0.35);
        font-size: 0.85rem;
        word-break: break-word;
    }
    .directory-table tbody tr:not(.directory-street-header) td:last-child {
        border-bottom: none;
    }
    /* CSS-generated column labels via pseudo-elements */
    .directory-table tbody tr:not(.directory-street-header) td::before {
        font-size: 0.67rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--hoa-text-muted);
        white-space: nowrap;
        min-width: 4.5rem;
        flex-shrink: 0;
    }
    .directory-table tbody tr:not(.directory-street-header) td:nth-child(1)::before { content: "Name"; }
    .directory-table tbody tr:not(.directory-street-header) td:nth-child(2)::before { content: "Address"; }
    .directory-table tbody tr:not(.directory-street-header) td:nth-child(3)::before { content: "Home"; }
    .directory-table tbody tr:not(.directory-street-header) td:nth-child(4)::before { content: "Cell"; }
    .directory-table tbody tr:not(.directory-street-header) td:nth-child(5)::before { content: "Email"; }
    /* Suppress row-hover background in card mode */
    .directory-table tr:not(.directory-street-header):hover td { background: inherit; }
}

/* ============================================================
   BOARD PAGE
   ============================================================ */

.board-section { margin-bottom: 2.5rem; }

.board-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--hoa-primary-dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--hoa-amber);
    display: inline-block;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.board-card {
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    box-shadow: 0 2px 10px var(--hoa-shadow);
    transition: all var(--hoa-transition);
}

.board-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--hoa-shadow-md);
    border-color: var(--hoa-sage);
}

.board-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hoa-primary) 0%, var(--hoa-primary-light) 100%);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 14px var(--hoa-shadow-md);
}

.board-card-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hoa-primary-dark);
    margin-bottom: 0.25rem;
}

.board-card-role {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--hoa-amber);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.board-card-lot { font-size: 0.8rem; color: var(--hoa-text-muted); }

/* ============================================================
   CALENDAR PAGE
   ============================================================ */

.calendar-grid { display: grid; gap: 1rem; }

.event-card {
    display: flex;
    gap: 1.25rem;
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px var(--hoa-shadow);
    transition: all var(--hoa-transition);
    align-items: flex-start;
}

.event-card:hover {
    border-color: var(--hoa-sage);
    box-shadow: 0 5px 18px var(--hoa-shadow-md);
}

.event-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
    padding: 0.5rem;
    background: var(--hoa-primary);
    color: #fff;
    border-radius: var(--hoa-radius-sm);
    text-align: center;
    flex-shrink: 0;
}

.event-month {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.8;
}

.event-day {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1;
    margin: 0.1rem 0;
}

.event-dow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.7;
}

.event-info h3 { font-size: 1rem; color: var(--hoa-primary-dark); margin: 0 0 0.35rem; }
.event-info p  { font-size: 0.83rem; color: var(--hoa-text-muted); margin: 0; }

.event-type-badge {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 3px;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.event-type-meeting  { background: rgba(27, 58, 45, 0.09);   color: var(--hoa-primary); }
.event-type-social   { background: rgba(184, 107, 56, 0.11); color: #7a3c10; }
.event-type-deadline { background: rgba(185, 28, 28, 0.09);  color: #b91c1c; }
.event-type-other    { background: rgba(61, 74, 92, 0.09);   color: var(--hoa-slate); }

/* ============================================================
   SERVICE PROVIDERS PAGE
   ============================================================ */

.service-category { margin-bottom: 2rem; }

.service-category-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    cursor: pointer;
    user-select: none;
}

.service-category-header h2 { font-size: 1.1rem; margin: 0; color: var(--hoa-primary-dark); }

.service-category-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--hoa-primary) 0%, var(--hoa-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.service-providers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.provider-card {
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    padding: 1.25rem;
    box-shadow: 0 2px 8px var(--hoa-shadow);
    transition: all var(--hoa-transition);
}

.provider-card:hover {
    border-color: var(--hoa-sage);
    box-shadow: 0 5px 16px var(--hoa-shadow-md);
}

.provider-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hoa-primary-dark);
    margin-bottom: 0.25rem;
}

.provider-desc { font-size: 0.82rem; color: var(--hoa-text-muted); margin-bottom: 0.75rem; line-height: 1.5; }
.provider-contact { font-size: 0.82rem; color: var(--hoa-primary-light); font-weight: 500; }

.provider-recommended-badge {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 600;
    background: var(--hoa-amber);
    color: #fff;
    padding: 0.15rem 0.55rem;
    border-radius: 3px;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* ============================================================
   MEETING MINUTES PAGE
   ============================================================ */

.minutes-list { display: flex; flex-direction: column; gap: 0.75rem; }

.minutes-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px var(--hoa-shadow);
    transition: all var(--hoa-transition);
}

.minutes-item:hover {
    border-color: var(--hoa-sage);
    box-shadow: 0 4px 14px var(--hoa-shadow-md);
}

.minutes-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3.5rem;
    text-align: center;
}

.minutes-year  { font-size: 0.68rem; font-weight: 500; color: var(--hoa-text-muted); letter-spacing: 0.05em; }

.minutes-month {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--hoa-primary);
}

.minutes-info { flex: 1; }
.minutes-title { font-size: 0.92rem; font-weight: 500; color: var(--hoa-primary-dark); margin-bottom: 0.15rem; }
.minutes-desc  { font-size: 0.8rem; color: var(--hoa-text-muted); }

/* ============================================================
   FORMS PAGE
   ============================================================ */

.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.form-card {
    background: var(--hoa-warm-white);
    border: 1px solid var(--hoa-border);
    border-radius: var(--hoa-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 10px var(--hoa-shadow);
    transition: all var(--hoa-transition);
    display: flex;
    flex-direction: column;
}

.form-card:hover {
    border-color: var(--hoa-sage);
    box-shadow: 0 8px 22px var(--hoa-shadow-md);
    transform: translateY(-2px);
}

.form-card-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--hoa-primary) 0%, var(--hoa-primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px var(--hoa-shadow-md);
}

.form-card h3 { font-size: 1rem; color: var(--hoa-primary-dark); margin-bottom: 0.4rem; }
.form-card p  { font-size: 0.82rem; color: var(--hoa-text-muted); margin-bottom: 1.25rem; flex: 1; line-height: 1.55; }

/* ============================================================
   UTILITIES
   ============================================================ */

.text-muted-hoa  { color: var(--hoa-text-muted); }
.text-primary-hoa { color: var(--hoa-primary); }
.text-amber-hoa  { color: var(--hoa-amber); }

.divider-hoa {
    border: none;
    border-top: 1px solid var(--hoa-border);
    margin: 1.5rem 0;
}

.badge-green {
    display: inline-block;
    background: rgba(45, 106, 85, 0.09);
    color: var(--hoa-primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.empty-state { text-align: center; padding: 3rem 2rem; color: var(--hoa-text-muted); }
.empty-state svg, .empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.35; display: block; margin-left: auto; margin-right: auto; }
.empty-state p { font-size: 0.9rem; }

/* ---- Blazor framework ---- */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--hoa-sage); }
.invalid { outline: 1px solid #ef4444; }
.validation-message { color: #ef4444; font-size: 0.8rem; }

.blazor-error-boundary {
    background: #7b2828;
    padding: 1rem 1rem 1rem 3.5rem;
    color: white;
    border-radius: var(--hoa-radius-sm);
}
.blazor-error-boundary::after { content: "An error has occurred."; }

#blazor-error-ui {
    background: #7b2828;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
    font-size: 0.88rem;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
