:root {
    color-scheme: light;
    --bg: #f5f9f7;
    --surface: #ffffff;
    --surface-strong: #fdfdfd;
    --text: #3a4a45;
    --muted: #6b8078;
    --border: #4a9f7f;
    --accent: #3a4a45;
    --primary: #4a9f7f;
    --shadow: rgba(74, 159, 127, 0.08);
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #f5f9f7 0%, #f0f7f4 50%, #eef5f2 100%);
    color: var(--text);
}
.page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0px 24px 24px;
}
.site-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    margin-bottom: 16px;
    padding: 16px 20px;

    background: var(--surface);
    border-bottom: 3px solid var(--primary);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px var(--shadow);
}

.who-we-are{
    margin-bottom: 16px;
    background: var(--surface);
    border-bottom: 3px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
}
.who-we-are-logo {
    border-radius: 12px;
    max-width: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    padding: 8px;
}

/* image-based logo when using <img class="logo"> */
.logo {
    width: 140px;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    display: block;
}
.brand-info {
    display: grid;
    gap: 6px;
}
.brand-info .brand-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}
.brand-info .brand-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}
.site-description {
    max-width: 640px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}
.admin-area {
    display: flex;
    align-items: center;
}
.admin-btn {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}
.admin-btn:hover {
    opacity: 0.7;
}
.admin-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 0.3fr));
    gap: 20px;
}
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 3px solid var(--primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 16px var(--shadow);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 0;
    text-decoration: none;
    color: inherit;
    max-width: 350px;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(74, 159, 127, 0.16);
}

.post-card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-text {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
    font-size: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
}
/* card footer removed — only DB fields (image, title, description) are shown */
.no-posts {
    padding: 40px;
    background: var(--surface);
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--border);
}
@media (max-width: 720px) {
    .page {
        padding: 18px;
    }
    .site-header {
        align-items: flex-start;
    }
    .brand {
        width: 100%;
    }
    .site-description {
        width: 100%;
    }
}
.post-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.partner-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.post-card-title {
    margin: 0;
}

.folder-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 3px solid var(--primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 16px var(--shadow);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    max-width: 350px;
}

.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(74, 159, 127, 0.16);
}

.folder-card-empty {
    min-height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    background: linear-gradient(to bottom, #fafbfa, #f7f9f8);
}

.folder-card-title {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.2;
    font-weight: 600;
    color: var(--text);
}

.folder-page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    max-width: calc(100% - 340px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

.post-card-image,
.folder-card-image {
    height: 210px;
    min-height: 210px;
    max-height: 210px;
    overflow: hidden;
    background: #f3f4f6;
}

.post-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
    background: linear-gradient(to bottom, #fafbfa, #f7f9f8);
}

.folder-card-body {
    padding: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(to bottom, #fafbfa, #f7f9f8);
}

.post-card-image img,
.folder-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}


.post-card-body,
.folder-card-body {
    min-height: 110px;
}