/* ── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
    --terracotta: #c1622f;
    --terracotta-dk: #9e4a20;
    --sand: #e8d5b0;
    --sand-lt: #f5ede0;
    --sandstone: #d4b896;
    --sage: #7a9e7e;
    --sage-dk: #5a7a5e;
    --sky: #6b9ab8;
    --shadow: #2c1f0e;
    --shadow-soft: #4a3728;
    --cream: #faf6f0;
    --white: #ffffff;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 4px 24px rgba(44, 31, 14, 0.10);
    --shadow-hover: 0 8px 36px rgba(44, 31, 14, 0.18);
    --transition: all 0.25s ease;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--shadow);
    font-size: 16px;
    line-height: 1.65;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--shadow);
    line-height: 1.2;
}

a {
    color: var(--terracotta);
    text-decoration: none;
}

    a:hover {
        color: var(--terracotta-dk);
        text-decoration: underline;
    }

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--sandstone);
}

.breadcrumb-item.active {
    color: var(--shadow-soft) !important;
    font-weight: 600;
}

/* Default — no announcements */
.breadcrumb-sticky {
    position: sticky;
    top: 71px;
    z-index: 1019;
    background: var(--sand-lt);
    border-bottom: 1px solid var(--sand);
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar-sb {
    background: var(--shadow) !important;
    border-bottom: 3px solid var(--terracotta);
    padding: 0.75rem 0;
}

    .navbar-sb .navbar-brand {
        font-family: var(--font-display);
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--sand) !important;
        letter-spacing: 0.01em;
    }

        .navbar-sb .navbar-brand span {
            color: var(--terracotta);
        }

    .navbar-sb .nav-link {
        color: var(--sandstone) !important;
        font-weight: 400;
        font-size: 0.95rem;
        padding: 0.5rem 0.9rem !important;
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }

        .navbar-sb .nav-link:hover,
        .navbar-sb .nav-link.active {
            color: var(--sand) !important;
            background-color: rgba(193, 98, 47, 0.25);
        }

        .navbar-sb .nav-link.admin-link {
            color: #f6c90e !important;
        }

.navbar-toggler {
    border-color: var(--sandstone) !important;
}

/* Search box placeholder in dark navbar */
.navbar-sb input[type="search"]::placeholder {
    color: rgba(255,255,255,0.5);
}

.navbar-sb input[type="search"]:focus {
    background: rgba(255,255,255,0.15) !important;
    border-color: var(--terracotta) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(193,98,47,0.25);
}

/* ── Admin Dropdown ──────────────────────────────────────────────────────── */
.dropdown-menu .dropdown-item:hover {
    background-color: rgba(193, 98, 47, 0.25);
    color: var(--sand) !important;
}

/* ── Hero Section ───────────────────────────────────────────────────────────── */



.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: url('/images/sonoran-cacti.svg') right 70% / 55% 130% no-repeat, linear-gradient( 135deg, #2c1f0e 0%, #6b3a1f 25%, #c1622f 55%, #d4956a 75%, #e8d5b0 100% );
}


    /* Subtle noise texture overlay */
    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
        opacity: 0.4;
        pointer-events: none;
    }

    /* Decorative arc shape */
    .hero::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 80px;
        background: var(--cream);
        clip-path: ellipse(55% 100% at 50% 100%);
    }

.hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0 5rem;
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sand);
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 20px rgba(44,31,14,0.4);
    margin-bottom: 0.5rem;
}

    .hero h1 span {
        color: var(--sand);
    }

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--sand);
    opacity: 0.9;
    max-width: 480px;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: var(--sand);
    opacity: 0.8;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Announcements Banner ───────────────────────────────────────────────────── */
.announcement-bar {
    background: var(--terracotta);
    color: var(--white);
    padding: 0.6rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    position: sticky;
    top: -5px;
    z-index: 1020;
}
    .announcement-bar.warning {
        background: #b45309;
    }

    .announcement-bar.urgent {
        background: #991b1b;
        animation: pulse-bar 2s ease-in-out infinite;
    }

    .announcement-bar:nth-child(2) {
        top: calc(-5px + 38px);
    }

    .announcement-bar:nth-child(3) {
        top: calc(-5px + 76px);
    }

@keyframes pulse-bar {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* ── Quill Editor ────────────────────────────────────────────────────────── */
.ql-toolbar {
    border-color: #ced4da !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    background: var(--sand-lt);
}

.ql-container {
    border-color: #ced4da !important;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
}

.ql-editor {
    min-height: 250px;
}

/* ── Group Button Active State ───────────────────────────────────────────── */
.active-group {
    box-shadow: 0 0 0 2px var(--terracotta) !important;
    font-weight: 600;
}

/* ── Section Headings ───────────────────────────────────────────────────────── */
.section-heading {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.section-rule {
    width: 50px;
    height: 3px;
    background: var(--terracotta);
    border: none;
    margin: 0.5rem 0 1.5rem;
    border-radius: 2px;
}

/* ── Drag and Drop ───────────────────────────────────────────────────────── */
.drag-handle {
    cursor: grab;
    user-select: none;
    color: #aaa;
    font-size: 1.2rem;
    padding: 4px;
    line-height: 1;
}

    .drag-handle:active {
        cursor: grabbing;
    }

.drag-over-top {
    border-top: 3px solid var(--terracotta) !important;
}

.drag-over-bottom {
    border-bottom: 3px solid var(--terracotta) !important;
}

/* ── Quick Link Cards ───────────────────────────────────────────────────────── */
.quicklink-card {
    background: var(--white);
    border: 1px solid var(--sand);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    display: block;
    color: inherit;
    text-decoration: none !important;
    height: 100%;
}

    .quicklink-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: var(--terracotta);
        color: inherit;
    }

.quicklink-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.6rem;
}

    .quicklink-icon.terracotta {
        background: rgba(193,98,47,0.12);
        color: var(--terracotta);
    }

    .quicklink-icon.sage {
        background: rgba(122,158,126,0.15);
        color: var(--sage-dk);
    }

    .quicklink-icon.sky {
        background: rgba(107,154,184,0.15);
        color: var(--sky);
    }

    .quicklink-icon.gold {
        background: rgba(202,163,50,0.15);
        color: #9a7a10;
    }

.quicklink-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.quicklink-desc {
    font-size: 0.88rem;
    color: var(--shadow-soft);
    opacity: 0.8;
    margin: 0;
}

/* ── Events List ────────────────────────────────────────────────────────────── */
.events-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--sand);
    overflow: hidden;
}

.events-panel-header {
    background: var(--shadow);
    color: var(--sand);
    padding: 1rem 1.5rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--sand-lt);
    align-items: flex-start;
    transition: var(--transition);
}

    .event-item:last-child {
        border-bottom: none;
    }

    .event-item:hover {
        background: var(--sand-lt);
    }

.event-date-badge {
    min-width: 48px;
    text-align: center;
    background: var(--sand-lt);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.5rem;
    border-left: 3px solid var(--terracotta);
}

    .event-date-badge.BoardMeeting {
        border-color: #1e40af;
    }

    .event-date-badge.Maintenance {
        border-color: #b45309;
    }

    .event-date-badge.Irrigation {
        border-color: var(--sage-dk);
    }

    .event-date-badge.RoofRepair {
        border-color: #991b1b;
    }

    .event-date-badge.Community {
        border-color: #6d28d9;
    }

.event-month {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--shadow-soft);
    font-weight: 600;
}

.event-day {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--shadow);
}

.event-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.event-meta {
    font-size: 0.8rem;
    color: var(--shadow-soft);
    opacity: 0.75;
}

.event-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--shadow-soft);
    opacity: 0.6;
    font-style: italic;
}

/* ── Board Contact Section ──────────────────────────────────────────────────── */
.board-section {
    background: var(--shadow);
    color: var(--sand);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

    .board-section h3 {
        color: var(--sand);
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

.board-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(232,213,176,0.15);
    font-size: 0.9rem;
}

    .board-item:last-child {
        border-bottom: none;
    }

    .board-item i {
        color: var(--terracotta);
        font-size: 1rem;
        width: 20px;
    }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer-sb {
    background: var(--shadow);
    color: var(--sandstone);
    padding: 2rem 0 1.5rem;
    margin-top: 4rem;
    font-size: 0.85rem;
    border-top: 3px solid var(--terracotta);
}

    .footer-sb a {
        color: var(--sandstone);
        transition: var(--transition);
    }

        .footer-sb a:hover {
            color: var(--sand);
            text-decoration: none;
        }

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--sand);
    margin-bottom: 0.25rem;
}

/* ── Away status pulse ─────────────────────────────────────────────────── */
.badge-away {
    animation: away-pulse 3s ease-in-out infinite;
}

@keyframes away-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ── Utility ────────────────────────────────────────────────────────────────── */
.bg-cream {
    background-color: var(--cream);
}

.bg-sand-lt {
    background-color: var(--sand-lt);
}

.text-terra {
    color: var(--terracotta) !important;
}

.text-sage {
    color: var(--sage-dk) !important;
}

.text-shadow {
    color: var(--shadow) !important;
}

.btn-terra {
    background: var(--terracotta);
    border-color: var(--terracotta);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

    .btn-terra:hover {
        background: var(--terracotta-dk);
        border-color: var(--terracotta-dk);
        color: var(--white);
        transform: translateY(-1px);
    }

.btn-outline-terra {
    border: 2px solid var(--terracotta);
    color: var(--terracotta);
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: transparent;
    transition: var(--transition);
}

    .btn-outline-terra:hover {
        background: var(--terracotta);
        color: var(--white);
        transform: translateY(-1px);
    }

.card-sb {
    border: 1px solid var(--sand);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    background: var(--white);
}

/* ── Fade-in animation ──────────────────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeInUp 0.55s ease forwards;
}

    .fade-in:nth-child(1) {
        animation-delay: 0.05s;
    }

    .fade-in:nth-child(2) {
        animation-delay: 0.15s;
    }

    .fade-in:nth-child(3) {
        animation-delay: 0.25s;
    }

    .fade-in:nth-child(4) {
        animation-delay: 0.35s;
    }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .hero::after {
        height: 50px;
    }
}

/* ── Help panel ────────────────────────────────────────────────────────── */
#helpPanel { width: 34rem; max-width: 92vw; }

.help-group-title {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--terracotta);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.help-topic-title { font-family: var(--font-display); color: var(--shadow); }

.help-content h3 { font-size: 1.05rem; margin-top: 1.25rem; color: var(--terracotta); }
.help-content table { font-size: 0.9rem; margin: 0.75rem 0; }
.help-content th { background: var(--sand-lt); }
.help-content blockquote {
    border-left: 4px solid var(--terracotta);
    background: var(--sand-lt);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
}
