/* ============================================
   Blue Mountains Connect - Design system
   Grounded in the region: eucalyptus haze, sandstone
   cliffs, and bushwalking trail blaze markers.
   Mobile-first. Base styles = mobile.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700&display=swap');

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

:root {
    --forest-900: #16302A;
    --forest-700: #1E4638;
    --forest-600: #275A48;
    --sandstone-500: #BE7A3C;
    --sandstone-600: #A6672F;
    --mist-100: #EEF3EE;
    --mist-50: #F8FAF7;
    --white: #FFFFFF;
    --charcoal-900: #22282A;
    --charcoal-600: #576259;
    --charcoal-400: #8A948C;
    --haze-500: #5F8598;
    --haze-100: #E3ECF0;
    --ember-600: #B8402A;
    --ember-100: #FBEAE6;
    --gold-100: #F7ECDC;
    --border: #DFE6E0;
    --radius: 14px;
    --max-width: 1080px;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--mist-100);
    color: var(--charcoal-900);
    line-height: 1.55;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--forest-700);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 18px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    background: var(--forest-900);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--mist-50);
    letter-spacing: 0.2px;
}

.logo .logo-mark {
    color: var(--sandstone-500);
    font-size: 18px;
    line-height: 1;
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--mist-50);
    padding: 4px;
}

.nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--forest-700);
}

.nav-links.open {
    display: flex;
}

.nav-links a {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--mist-50);
    font-weight: 500;
    font-size: 15px;
}

.nav-links a.btn-primary {
    color: var(--forest-900);
    background: var(--sandstone-500);
    margin: 10px 18px;
    border-radius: 10px;
    border-bottom: none;
    text-align: center;
    padding: 12px;
}

/* Ridge-line divider under the header, evokes the mountain skyline */
.ridge-divider {
    display: block;
    width: 100%;
    height: 18px;
    background: var(--forest-900);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: transform 0.1s ease, background 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--forest-700);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--forest-600);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--forest-700);
    color: var(--forest-700);
}

/* ============================================
   Hero (community feed intro)
   ============================================ */
.hero {
    background: linear-gradient(180deg, var(--forest-900) 0%, var(--forest-700) 100%);
    color: var(--mist-50);
    padding: 32px 18px 40px;
    margin: -20px -18px 24px;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero p {
    color: rgba(248,250,247,0.78);
    font-size: 15px;
    max-width: 460px;
}

.hero-ridge {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
}

/* ============================================
   Page header row
   ============================================ */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.page-head h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--forest-900);
}

/* ============================================
   Composer (Facebook-style "create post" bar)
   ============================================ */
.composer {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(22,48,42,0.06);
}

.composer-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--forest-700);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    font-family: var(--font-display);
}

.composer-prompt {
    flex: 1;
    background: var(--mist-100);
    border-radius: 22px;
    padding: 11px 16px;
    color: var(--charcoal-400);
    font-size: 15px;
}

.composer-prompt:hover {
    background: var(--border);
}

.composer-quick {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.composer-quick a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal-600);
}

.composer-quick a:hover {
    background: var(--mist-100);
}

.composer-quick .dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ============================================
   Filter tabs
   ============================================ */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs a {
    flex: 0 0 auto;
    padding: 9px 18px;
    border-radius: 30px;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--charcoal-600);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.filter-tabs a.active {
    background: var(--forest-700);
    border-color: var(--forest-700);
    color: var(--white);
}

/* ============================================
   Post cards - Facebook-style header + engagement bar
   ============================================ */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(22,48,42,0.06);
    overflow: hidden;
}

.post-card .post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
}

.post-card .post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    font-family: var(--font-display);
}

.post-card.type-general .post-avatar { background: var(--charcoal-400); }
.post-card.type-event .post-avatar { background: var(--haze-500); }
.post-card.type-emergency .post-avatar { background: var(--ember-600); }
.post-card.type-job .post-avatar { background: var(--sandstone-500); }

.post-card .post-header-text {
    flex: 1;
    min-width: 0;
}

.post-card .author-name {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--charcoal-900);
}

.post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--charcoal-400);
    flex-wrap: wrap;
    margin-top: 1px;
}

.post-card .post-content {
    padding: 0 16px 12px;
}

.post-card h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.post-card h2 a {
    color: var(--charcoal-900);
}

.post-card p.excerpt {
    color: var(--charcoal-600);
    font-size: 14.5px;
}

.post-card .post-thumb {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
}

.post-card .engagement-bar {
    display: flex;
    border-top: 1px solid var(--border);
}

.post-card .engagement-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--charcoal-600);
}

.post-card .engagement-bar a:hover {
    background: var(--mist-100);
}

.post-card .engagement-bar svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* ============================================
   Blaze badges (post type indicator)
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 7px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 2px;
    display: inline-block;
}

.badge-general { background: var(--mist-100); color: var(--charcoal-600); }
.badge-general::before { background: var(--charcoal-400); }

.badge-event { background: var(--haze-100); color: #2E4C5A; }
.badge-event::before { background: var(--haze-500); }

.badge-emergency { background: var(--ember-100); color: var(--ember-600); }
.badge-emergency::before { background: var(--ember-600); }

.badge-job { background: var(--gold-100); color: var(--sandstone-600); }
.badge-job::before { background: var(--sandstone-500); }

/* ============================================
   Forms
   ============================================ */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px 22px;
    max-width: 440px;
    margin: 24px auto;
    box-shadow: 0 1px 3px rgba(22,48,42,0.08);
}

.form-card h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--forest-900);
}

.form-card .subtitle {
    color: var(--charcoal-600);
    font-size: 14px;
    margin-bottom: 22px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
    color: var(--charcoal-900);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    font-family: var(--font-body);
    background: var(--mist-50);
    color: var(--charcoal-900);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--forest-600);
    background: var(--white);
}

.form-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--charcoal-600);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 18px;
}

.alert-error {
    background: var(--ember-100);
    color: var(--ember-600);
    border: 1px solid #F0C4BA;
}

.alert-success {
    background: var(--mist-100);
    color: var(--forest-700);
    border: 1px solid #C9DBD0;
}

/* ============================================
   Single post page
   ============================================ */
.post-full h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.25;
    color: var(--charcoal-900);
}

.post-full .post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--charcoal-400);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.post-full .post-body {
    font-size: 15.5px;
    line-height: 1.75;
    margin-bottom: 18px;
    white-space: pre-line;
    color: var(--charcoal-900);
}

.post-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.post-images img {
    border-radius: 12px;
    width: 100%;
    object-fit: cover;
}

.post-extra {
    background: var(--gold-100);
    border-radius: 10px;
    padding: 13px 15px;
    font-size: 14px;
    margin-bottom: 18px;
    color: var(--sandstone-600);
    font-weight: 600;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.post-actions a {
    font-size: 13px;
    color: var(--charcoal-400);
    font-weight: 500;
}

.post-actions a.danger {
    color: var(--ember-600);
}

/* ============================================
   Comments
   ============================================ */
.comments-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.comments-section h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--forest-900);
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--forest-700);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    font-family: var(--font-display);
}

.comment-body {
    background: var(--mist-100);
    border-radius: 12px;
    padding: 11px 13px;
    flex: 1;
}

.comment-body .comment-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--charcoal-900);
}

.comment-body .comment-time {
    font-size: 12px;
    color: var(--charcoal-400);
    margin-left: 6px;
}

.comment-body p {
    font-size: 14px;
    margin-top: 4px;
    color: var(--charcoal-900);
}

.comment-form textarea {
    resize: vertical;
    min-height: 70px;
}

/* ============================================
   Empty state
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--charcoal-600);
    background: var(--white);
    border-radius: var(--radius);
}

.empty-state p {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--forest-900);
}

.file-input-hint {
    font-size: 12px;
    color: var(--charcoal-400);
    margin-top: 5px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    text-align: center;
    padding: 28px 16px 36px;
    color: var(--charcoal-400);
    font-size: 13px;
}

/* ============================================
   Tablet and up
   ============================================ */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-links {
        display: flex !important;
        flex-direction: row;
        width: auto;
        background: none;
        align-items: center;
        gap: 4px;
    }

    .nav-links a {
        border-bottom: none;
        padding: 9px 16px;
        border-radius: 8px;
    }

    .nav-links a:hover {
        background: rgba(255,255,255,0.08);
    }

    .nav-links a.btn-primary {
        margin: 0 0 0 6px;
    }

    .nav-links a.btn-primary:hover {
        background: var(--sandstone-600);
    }

    .btn {
        width: auto;
    }

    .form-card {
        padding: 36px;
    }

    .hero {
        padding: 48px 18px 56px;
        margin: -20px 0 28px;
        border-radius: 0 0 24px 24px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }
}

/* ============================================
   Desktop
   ============================================ */
@media (min-width: 1024px) {
    .post-images {
        grid-template-columns: 1fr 1fr;
    }
}
