@charset "UTF-8";

/* ── RESET & BASE ─────────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    font-family: 'PT Serif Caption', Georgia, serif;
}

html, body {
    margin: 0 auto;
    padding: 0;
    background-color: #f5f0e8;
}

@media (min-width: 45rem) {
    html, body { max-width: 50.75rem; }
}
@media (min-width: 62rem) {
    html, body { max-width: 78.75rem; }
}

a { color: #800000; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── HEADER ───────────────────────────────────────────────────────────────── */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #c4a87a;
    padding: 12px 24px 10px;
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-logo {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.site-title-block { flex: 1; }

.site-title {
    margin: 0;
    color: #800000;
    font-size: 1.55rem;
    font-weight: bold;
    line-height: 1.2;
}

.site-subtitle {
    margin: 2px 0 0;
    color: #800000;
    font-size: 1rem;
    font-style: italic;
}

/* ── NAV ──────────────────────────────────────────────────────────────────── */
.site-nav {
    background: #dbcba6;
    border-top: 1px solid #c4a87a;
    border-bottom: 1px solid #c4a87a;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.site-nav ul li {
    display: inline-block;
    position: relative;
}

.site-nav ul li a {
    display: block;
    padding: 9px 13px;
    color: #2a1a0a;
    text-decoration: none;
    font-size: 0.87rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.site-nav ul li a:hover,
.site-nav ul li a.active {
    background: #8a4c1c;
    color: #ffffff;
}

/* ── HERO BANNER ──────────────────────────────────────────────────────────── */
.hero-banner {
    width: 100%;
    height: 195px;
    overflow: hidden;
    position: relative;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-banner-fallback {
    width: 100%;
    height: 195px;
    background: linear-gradient(135deg, #7a6a3a 0%, #5a4a20 35%, #8a7a4a 65%, #6a5a30 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-style: italic;
    letter-spacing: 2px;
    font-size: 0.88rem;
    opacity: 0.85;
}

/* ── PAGE WRAPPER ─────────────────────────────────────────────────────────── */
.page-wrap {
    padding: 0 24px 32px;
}

/* ── BOARD TITLE ──────────────────────────────────────────────────────────── */
.board-title {
    text-align: center;
    color: #800000;
    font-size: 1.75rem;
    margin: 22px 0 10px;
}

.board-desc {
    display: block;
    max-width: 700px;
    margin: 0 auto 16px;
    background: #f0e8d5;
    border: 1px solid #c4a87a;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 0.88rem;
    color: #5a3a1a;
    text-align: center;
}

/* ── CATEGORY TABS ────────────────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-bottom: 16px;
}

.tab-btn {
    background: #dbcba6;
    border: 1px solid #c4a87a;
    border-radius: 5px;
    padding: 7px 15px;
    font-size: 0.83rem;
    cursor: pointer;
    color: #2a1a0a;
    font-family: 'PT Serif Caption', Georgia, serif;
    text-decoration: none;
    display: inline-block;
    transition: background 0.12s, color 0.12s;
}

.tab-btn:hover {
    background: #c4b08a;
    color: #2a1a0a;
    text-decoration: none;
}

.tab-btn.active {
    background: #8a4c1c;
    color: #ffffff;
    border-color: #5c3010;
    font-weight: bold;
}

.search-box {
    margin-left: auto;
    border: 1px solid #c4a87a;
    border-radius: 5px;
    padding: 7px 12px;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.83rem;
    background: #faf6ef;
    width: 150px;
    outline: none;
    color: #2a1a0a;
}

/* ── FEED LAYOUT ──────────────────────────────────────────────────────────── */
.feed-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.feed-col {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 230px;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .feed-layout { flex-direction: column; }
    .sidebar { width: 100%; }
}

/* ── POST CARD ────────────────────────────────────────────────────────────── */
.post-card {
    background: #faf6ef;
    border: 1px solid #c4a87a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transition: box-shadow 0.15s, transform 0.12s;
    text-decoration: none;
    color: inherit;
}

.post-card:hover {
    box-shadow: 0 4px 18px rgba(138,76,28,0.2);
    transform: translateY(-1px);
    text-decoration: none;
}

.post-card.pinned {
    background: #f5ede0;
    border-color: #8a4c1c;
    box-shadow: 0 2px 10px rgba(138,76,28,0.15);
}

.card-thumb {
    width: 105px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #c4b08a, #8a7a5a);
    border: 1px solid #c4a87a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-thumb-placeholder {
    color: white;
    opacity: 0.35;
    font-size: 2rem;
}

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

.pin-badge {
    display: inline-block;
    background: #6b3a2a;
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 2px 8px;
    margin-bottom: 5px;
}

.card-title {
    color: #800000;
    font-size: 1.02rem;
    font-weight: bold;
    margin: 0 0 4px;
    line-height: 1.35;
}

.card-meta {
    font-size: 0.77rem;
    color: #5a3a1a;
    margin-bottom: 6px;
}

.card-excerpt {
    font-size: 0.83rem;
    color: #2a1a0a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.card-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-read {
    background: #8a4c1c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 0.79rem;
    cursor: pointer;
    font-family: 'PT Serif Caption', Georgia, serif;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s;
}

.btn-read:hover {
    background: #5c3010;
    color: white;
    text-decoration: none;
}

.tag-pill {
    background: #f0e8d5;
    border: 1px solid #c4a87a;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 0.73rem;
    color: #5a3a1a;
}

.empty-msg {
    padding: 40px 20px;
    text-align: center;
    color: #5a3a1a;
    font-style: italic;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */
.side-card {
    background: #faf6ef;
    border: 1px solid #c4a87a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.side-title {
    color: #800000;
    font-size: 0.97rem;
    font-weight: bold;
    border-bottom: 1px solid #c4a87a;
    padding-bottom: 7px;
    margin: 0 0 10px;
}

.side-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #f0e8d5;
    font-size: 0.82rem;
}

.side-row:last-child { border-bottom: none; }

.side-row-date {
    color: #8a4c1c;
    font-weight: bold;
    font-size: 0.81rem;
}

.side-row-label {
    color: #5a3a1a;
    font-size: 0.77rem;
}

.side-btn {
    width: 100%;
    margin-top: 10px;
    background: transparent;
    border: 1px solid #8a4c1c;
    color: #8a4c1c;
    border-radius: 5px;
    padding: 6px;
    cursor: pointer;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.8rem;
    text-align: center;
    display: block;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
}

.side-btn:hover {
    background: #8a4c1c;
    color: white;
    text-decoration: none;
}

.contact-btn {
    background: #8a4c1c;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    display: block;
    text-decoration: none;
    transition: background 0.15s;
}

.contact-btn:hover {
    background: #5c3010;
    color: white;
    text-decoration: none;
}

/* ── POST DETAIL ──────────────────────────────────────────────────────────── */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 28px 24px;
}

.post-detail-title {
    color: #800000;
    font-size: 1.65rem;
    font-weight: bold;
    line-height: 1.3;
    margin: 0 0 10px;
}

.post-detail-meta {
    font-size: 0.86rem;
    color: #5a3a1a;
    border-bottom: 1px solid #c4a87a;
    padding-bottom: 12px;
    margin-bottom: 22px;
}

.post-detail-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid #c4a87a;
}

.post-detail-body {
    font-size: 0.97rem;
    line-height: 1.85;
    color: #2a1a0a;
}

.post-detail-body p { margin: 0 0 1em; }
.post-detail-body h2 { color: #800000; margin: 1.2em 0 0.5em; }
.post-detail-body ul, .post-detail-body ol { padding-left: 1.5em; margin-bottom: 1em; }

.post-nav {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid #c4a87a;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.post-nav a {
    color: #8a4c1c;
    font-size: 0.87rem;
    text-decoration: none;
}

.post-nav a:hover { text-decoration: underline; }

/* ── CALENDAR ─────────────────────────────────────────────────────────────── */
.cal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.cal-nav-btn {
    background: #8a4c1c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s;
}

.cal-nav-btn:hover {
    background: #5c3010;
    color: white;
    text-decoration: none;
}

.cal-month-label {
    color: #800000;
    font-size: 1.15rem;
    font-weight: bold;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.cal-day-hdr {
    background: #dbcba6;
    text-align: center;
    padding: 8px 2px;
    font-size: 0.78rem;
    font-weight: bold;
    color: #5c3010;
    border-radius: 4px;
}

.cal-cell {
    background: #faf6ef;
    border: 1px solid #c4a87a;
    border-radius: 6px;
    min-height: 90px;
    padding: 5px;
    vertical-align: top;
}

.cal-cell.empty {
    background: #f0e8d5;
    border-color: #ddd3b8;
}

.cal-cell.today {
    background: #fff8e8;
    border: 2px solid #8a4c1c;
}

.cal-day-num {
    font-size: 0.82rem;
    font-weight: bold;
    color: #5a3a1a;
    margin-bottom: 3px;
}

.cal-cell.today .cal-day-num { color: #8a4c1c; }

.cal-event {
    border-radius: 3px;
    font-size: 0.64rem;
    padding: 2px 5px;
    margin-bottom: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: white;
    cursor: pointer;
    display: block;
    text-decoration: none;
    line-height: 1.4;
    transition: opacity 0.12s;
}

.cal-event:hover { opacity: 0.82; color: white; text-decoration: none; }

.cal-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #5a3a1a;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── CREATE/ADMIN FORM ────────────────────────────────────────────────────── */
.form-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.form-section-title {
    color: #800000;
    font-size: 1.4rem;
    margin: 0 0 6px;
}

.form-desc {
    color: #5a3a1a;
    font-size: 0.87rem;
    margin-bottom: 22px;
}

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

.form-label {
    display: block;
    font-size: 0.87rem;
    color: #5a3a1a;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-label .required { color: #cc0000; margin-right: 3px; }

.form-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid #c4a87a;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.92rem;
    background: #faf6ef;
    color: #2a1a0a;
    outline: none;
    transition: border-color 0.15s;
}

.form-input:focus { border-color: #8a4c1c; }

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group { flex: 1; min-width: 160px; }

.form-check-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.form-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.87rem;
    color: #5a3a1a;
}

.form-check-label input[type="checkbox"] {
    accent-color: #8a4c1c;
    width: 16px;
    height: 16px;
}

/* WYSIWYG */
.wysiwyg-wrap {
    border: 1px solid #c4a87a;
    border-radius: 6px;
    overflow: hidden;
}

.wysiwyg-toolbar {
    background: #f0e8d5;
    border-bottom: 1px solid #c4a87a;
    padding: 6px 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.wysiwyg-toolbar button {
    background: #dbcba6;
    border: 1px solid #c4a87a;
    border-radius: 3px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #2a1a0a;
    font-family: 'PT Serif Caption', Georgia, serif;
    transition: background 0.12s;
}

.wysiwyg-toolbar button:hover { background: #c4b08a; }

.wysiwyg-toolbar select {
    background: #dbcba6;
    border: 1px solid #c4a87a;
    border-radius: 3px;
    padding: 3px 6px;
    font-size: 0.78rem;
    font-family: 'PT Serif Caption', Georgia, serif;
    color: #2a1a0a;
    cursor: pointer;
}

#wysiwyg-body {
    min-height: 220px;
    padding: 12px 14px;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.93rem;
    line-height: 1.65;
    outline: none;
    background: #ffffff;
    color: #2a1a0a;
}

/* Image upload */
.img-drop-zone {
    border: 2px dashed #c4a87a;
    border-radius: 8px;
    padding: 22px;
    text-align: center;
    background: #f0e8d5;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.img-drop-zone:hover {
    border-color: #8a4c1c;
    background: #e8d8c0;
}

.img-drop-zone p {
    color: #5a3a1a;
    font-size: 0.86rem;
    margin: 0 0 4px;
}

.img-drop-zone small { color: #8a7a5a; font-size: 0.76rem; }

.img-preview {
    max-height: 160px;
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 8px;
}

.btn-remove-img {
    background: none;
    border: none;
    color: #800000;
    cursor: pointer;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.8rem;
    padding: 0;
    display: block;
    margin: 4px auto 0;
}

/* Submit buttons */
.btn-submit {
    background: #8a4c1c;
    color: white;
    border: none;
    border-radius: 7px;
    padding: 11px 30px;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.97rem;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 0.3px;
    transition: background 0.15s;
}

.btn-submit:hover { background: #5c3010; }

.btn-secondary {
    background: #f0e8d5;
    color: #5a3a1a;
    border: 1px solid #c4a87a;
    border-radius: 7px;
    padding: 11px 20px;
    font-family: 'PT Serif Caption', Georgia, serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-secondary:hover { background: #dbcba6; }

.btn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Messages */
.msg-success {
    background: #d4edda;
    border: 1px solid #a8d5b0;
    border-radius: 6px;
    padding: 10px 16px;
    color: #276238;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.msg-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px 16px;
    color: #721c24;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
.site-footer {
    background: #8a4c1c;
    color: white;
    text-align: center;
    padding: 18px 24px;
    margin-top: 40px;
    font-size: 0.82rem;
}

.site-footer p { margin: 4px 0; }

.site-footer a {
    color: #dbcba6;
    text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

/* ── UTILITIES ────────────────────────────────────────────────────────────── */
.section-heading {
    color: #800000;
    font-size: 1.4rem;
    margin: 24px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c4a87a;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #8a4c1c;
    font-size: 0.87rem;
    text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.divider {
    border: none;
    border-top: 1px solid #c4a87a;
    margin: 24px 0;
}
