:root {
    --beige: #F7F0E6;
    --beige-dark: #E8D9C8;
    --bordeaux: #7B1E3A;
    --gold: #D5B49F;
    --text-dark: #2C1B18;
    --text-muted: rgba(44, 27, 24, 0.7);
    font-family: 'Lato', Arial, sans-serif;
}

body {
    background-color: var(--beige);
    color: var(--text-dark);
    margin: 0;
    font-family: var(--font-body, 'Lato', Arial, sans-serif);
    line-height: 1.6;
}

.site-header {
    background-color: var(--bordeaux);
    color: var(--beige);
    padding: 1.25rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--beige);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav a,
.nav-link-btn {
    color: var(--beige);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.nav-link-btn:hover {
    color: var(--gold);
}

.site-nav form {
    margin: 0;
    display: flex;
    align-items: center;
}

.nav-link-btn {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    padding: 3rem 0;
}

.flash-messages {
    padding: 1rem 0 0;
}

.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(123, 30, 58, 0.12);
    color: var(--bordeaux);
}

.alert-error,
.alert-danger {
    background: rgba(123, 30, 58, 0.18);
    color: var(--text-dark);
}

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

a:hover {
    color: var(--gold);
}

.btn-primary,
.button-primary {
    display: inline-block;
    background-color: var(--bordeaux);
    color: var(--beige);
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-primary:hover,
.button-primary:hover {
    background-color: #5b152a;
    color: var(--beige);
}

.btn-secondary,
.button-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--bordeaux);
    color: var(--bordeaux);
    font-weight: 600;
}

.btn-secondary:hover,
.button-secondary:hover {
    background-color: var(--bordeaux);
    color: var(--beige);
}

.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    color: var(--bordeaux);
    margin-bottom: 1rem;
}

.hero-subtitle {
    max-width: 640px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
}

.home-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.home-card {
    background: #fffdf9;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    border: 1px solid rgba(123, 30, 58, 0.06);
}

.home-card.emphasis {
    background: linear-gradient(135deg, rgba(123, 30, 58, 0.1), rgba(213, 180, 159, 0.2));
}

.home-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
    margin-top: 0;
}

.home-card-content ul {
    padding-left: 1.2rem;
}

.badge-group {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--bordeaux);
    color: var(--beige);
    font-size: 0.875rem;
    font-weight: 600;
}

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

.link-more {
    font-weight: 600;
    font-size: 0.95rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: #fffdf9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    border: 1px solid rgba(123, 30, 58, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card.compact {
    box-shadow: none;
    border-radius: 8px;
    border: 1px solid rgba(123, 30, 58, 0.12);
}

.blog-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.gallery-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gallery-hero h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
    margin-bottom: 0.75rem;
}

.gallery-hero .btn-primary {
    margin-top: 1.5rem;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.album-card {
    background: #fffdf9;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    border: 1px solid rgba(123, 30, 58, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.album-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.album-cover,
.album-cover img,
.album-cover--placeholder {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.album-cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(123, 30, 58, 0.12);
    color: var(--bordeaux);
    font-weight: 600;
    font-size: 1.1rem;
}

.album-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.album-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.album-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
    margin: 0 0 0.5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    border: 1px solid rgba(123, 30, 58, 0.08);
}

.gallery-item-link {
    display: block;
}

.gallery-item img,
.gallery-item-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-actions {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    background: rgba(44, 27, 24, 0.75);
    color: var(--beige);
    box-shadow: 0 12px 24px rgba(44, 27, 24, 0.35);
}

.like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.like-button svg {
    width: 22px;
    height: 22px;
    fill: transparent;
    stroke: var(--beige);
    stroke-width: 1.5;
}

.like-button.is-liked svg {
    fill: var(--bordeaux);
    stroke: var(--bordeaux);
}

.like-button:hover svg,
.like-button:focus-visible svg {
    transform: scale(1.08);
}

.like-button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.like-button[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

.like-button.is-disabled {
    pointer-events: auto;
}

.like-count {
    font-weight: 600;
    font-size: 0.95rem;
}

.photo-detail {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.photo-frame img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.15);
}

.photo-info h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
    margin-top: 0;
}

.photo-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.photo-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.upload-form h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
}

.form-card {
    background: #fffdf9;
    padding: 2rem;
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    border: 1px solid rgba(123, 30, 58, 0.06);
    margin-top: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field span.helptext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-input {
    border: 1px solid rgba(123, 30, 58, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    font-size: 1rem;
    background: #fffdf9;
}

.form-input:focus {
    outline: none;
    border-color: var(--bordeaux);
    box-shadow: 0 0 0 3px rgba(123, 30, 58, 0.15);
}

.span-2 {
    grid-column: span 2;
}
.blog-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.blog-hero h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
    margin-bottom: 0.5rem;
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.blog-filters a {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--bordeaux);
    color: var(--bordeaux);
}

.blog-filters a.active,
.blog-filters a:hover {
    background: var(--bordeaux);
    color: var(--beige);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    font-weight: 600;
}

.pagination .disabled {
    color: var(--text-muted);
}

.article-detail h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    color: var(--bordeaux);
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-cover img {
    width: 100%;
    border-radius: 18px;
    margin: 2rem 0;
}

.article-content {
    background: #fffdf9;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    border: 1px solid rgba(123, 30, 58, 0.06);
}

.article-content h2,
.article-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
    margin-top: 2rem;
}

.related-articles {
    margin-top: 3rem;
}

/* Forum */
.forum-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.forum-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
    margin-bottom: 0.5rem;
}

.forum-hero p {
    margin: 0 auto;
    max-width: 640px;
    color: var(--text-muted);
}

.forum-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.forum-category-card {
    background: #fffdf9;
    border-radius: 18px;
    padding: 1.75rem;
    border: 1px solid rgba(123, 30, 58, 0.1);
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.forum-category-card h2 {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
}

.forum-category-card h2 a {
    color: inherit;
}

.forum-category-desc {
    margin: 0;
    color: var(--text-muted);
}

.forum-category-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.forum-category-meta div {
    background: rgba(123, 30, 58, 0.06);
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.forum-category-meta dt {
    font-weight: 700;
    color: var(--bordeaux);
}

.forum-category-meta dd {
    margin: 0.25rem 0 0;
}

.forum-category-card footer {
    margin-top: auto;
}

.forum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: #fffdf9;
    border-radius: 18px;
    border: 1px solid rgba(123, 30, 58, 0.1);
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
}

.forum-header h1 {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
}

.forum-header p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    max-width: 520px;
}

.forum-login-hint {
    margin: 0;
    font-weight: 600;
    color: var(--text-muted);
}

.forum-topic-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.forum-topic-card {
    position: relative;
    background: #fffdf9;
    border-radius: 18px;
    padding: 1.5rem 1.75rem 1.5rem 2.25rem;
    border: 1px solid rgba(123, 30, 58, 0.1);
    box-shadow: 0 18px 32px rgba(123, 30, 58, 0.06);
    border-left: 6px solid rgba(123, 30, 58, 0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-left-color 0.2s ease;
}

.forum-topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(123, 30, 58, 0.12);
    border-left-color: var(--bordeaux);
}

.forum-topic-card header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.forum-topic-card h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--bordeaux);
}

.forum-topic-card h2 a {
    color: inherit;
}

.forum-topic-meta {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.forum-topic-excerpt {
    margin: 1rem 0;
    color: var(--text-dark);
}

.forum-topic-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(123, 30, 58, 0.2);
    font-size: 0.9rem;
}

.forum-topic-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(123, 30, 58, 0.12);
    color: var(--bordeaux);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
}

.forum-topic-activity {
    background: none;
    color: var(--text-muted);
    padding: 0;
    font-weight: 500;
}

.forum-topic-detail {
    background: #fffdf9;
    border-radius: 22px;
    padding: 2.25rem;
    border: 1px solid rgba(123, 30, 58, 0.1);
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
}

.topic-detail-header {
    border-bottom: 1px dashed rgba(123, 30, 58, 0.2);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.breadcrumb {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: inherit;
}

.topic-detail-header h1 {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
}

.topic-detail-meta {
    margin: 0.75rem 0 0;
    color: var(--text-muted);
}

.topic-posts {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.forum-post {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.75rem 1.5rem 2.25rem;
    border: 1px solid rgba(123, 30, 58, 0.1);
    box-shadow: 0 12px 26px rgba(123, 30, 58, 0.08);
    border-left: 4px solid rgba(123, 30, 58, 0.35);
}

.forum-post h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--bordeaux);
}

.forum-post header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.forum-post-meta {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.forum-post-content {
    line-height: 1.7;
}

.forum-reply {
    margin-top: 3rem;
    background: rgba(123, 30, 58, 0.06);
    border-radius: 20px;
    padding: 1.75rem;
}

.forum-reply h2 {
    margin-top: 0;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--bordeaux);
}

.forum-form {
    background: #fffdf9;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(123, 30, 58, 0.12);
    box-shadow: 0 18px 38px rgba(123, 30, 58, 0.08);
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.forum-form .form-field label {
    font-weight: 600;
}

.forum-form .form-field textarea,
.forum-reply textarea {
    min-height: 200px;
    resize: vertical;
}

.forum-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.forum-form-actions .button-secondary {
    margin-left: 0;
}

.meta-muted {
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
}

.site-footer {
    background: var(--beige-dark);
    padding: 1.5rem 0;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .site-nav a {
        margin-left: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .main-content {
        padding: 2rem 0;
    }

    .photo-detail {
        grid-template-columns: 1fr;
    }

    .photo-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .span-2 {
        grid-column: span 1;
    }

    .forum-header {
        padding: 1.5rem;
    }

    .forum-topic-card,
    .forum-post {
        padding: 1.5rem;
        border-left-width: 4px;
    }

    .forum-topic-card header {
        flex-direction: column;
    }

    .forum-topic-stats {
        flex-direction: column;
        align-items: flex-start;
    }

    .forum-category-meta {
        grid-template-columns: 1fr;
    }
}
