/* Peoples Association - News Application */

:root {
    --color-primary: #8B2F3F;
    --color-primary-hover: #6e2633;
    --color-primary-light: #a03d4f;
    --color-primary-soft: rgba(139, 47, 63, 0.08);
    --color-secondary: #5c4a4e;
    --color-bg: #faf8f7;
    --color-card: #ffffff;
    --color-text: #2d2225;
    --color-text-muted: #6b5d60;
    --color-border: #e8e2e3;
    --color-accent-warm: #f2cead;
    --shadow: 0 1px 3px rgba(139, 47, 63, 0.06);
    --shadow-hover: 0 4px 16px rgba(139, 47, 63, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 12px rgba(139, 47, 63, 0.2);
}

.header-inner {
    display: flex;
    align-items: center;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.header-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 4px;
}

.header-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tagline {
    margin: 0;
    opacity: 0.95;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Search & Filter */
.search-filter {
    background: var(--color-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 2rem 0 1rem;
}

.search-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 160px;
}

.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

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

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary-soft);
}

.results-count {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.post-card {
    background: var(--color-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
}

.post-media {
    aspect-ratio: 16 / 9;
    background: var(--color-border);
    overflow: hidden;
    position: relative;
}

.post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.post-media .instagram-media {
    margin: 0;
    width: 100% !important;
}

.post-media .media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-muted);
}

.post-body {
    padding: 1rem 1.25rem;
}

.post-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    line-height: 1.35;
}

.post-content {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.meta-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #f5f1f2;
    color: var(--color-secondary);
}

.meta-location {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.meta-community {
    background: #fef3e6;
    color: #8b5a2b;
}

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

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
    .header-inner {
        justify-content: center;
    }

    .header-logo {
        width: 48px;
        height: 48px;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .search-row {
        flex-direction: column;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}
