/**
 * Pages — Sprint 4b.
 * Shared styles for static page, author archive, search results.
 * Element-hide classes added by PHP template when
 * corresponding ::shows_X() returns false.
 */

/* Page header (used by all 3 modules) */
.page-header.ls-page-header { padding: 2rem 0; margin: 0 0 2rem; border-bottom: 1px solid var(--ls-color-border, #E2E8F0); }
.page-header.ls-page-header h1 { margin: 0 0 0.4em; font-size: 2rem; }
.page-header.ls-page-header .page-header__meta { font-size: 0.9em; opacity: 0.7; }

/* Author header (author archive) */
.ls-author-header { display: flex; gap: 1.5rem; align-items: center; padding: 2rem; margin: 0 0 2rem; background: var(--ls-color-bg-alt, #F8FAFC); border-radius: 0.6rem; }
.ls-author-header .ls-author-header__avatar img { width: 80px; height: 80px; border-radius: 50%; }
.ls-author-header .ls-author-header__name { margin: 0 0 0.3em; font-size: 1.3rem; }
.ls-author-header .ls-author-header__bio { margin: 0 0 0.4em; opacity: 0.85; }
.ls-author-header .ls-author-header__count { font-size: 0.85em; opacity: 0.7; }

/* Search results */
.ls-search-header { padding: 1.5rem 0; margin: 0 0 1.5rem; }
.ls-search-header__query { font-size: 1.1rem; opacity: 0.85; }
.ls-search-header__query strong { color: var(--ls-color-primary, #5B5BD6); }
.ls-search-header__count { font-size: 0.9em; opacity: 0.6; }

/* Post listing (used by author + search) */
.ls-post-list { list-style: none; padding: 0; margin: 0; }
.ls-post-list .ls-post-list__item { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--ls-color-border, #E2E8F0); }
.ls-post-list .ls-post-list__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0.4rem; }
.ls-post-list .ls-post-list__title { margin: 0 0 0.4em; font-size: 1.15rem; }
.ls-post-list .ls-post-list__excerpt { margin: 0; opacity: 0.8; font-size: 0.95em; }
@media (max-width: 600px) { .ls-post-list .ls-post-list__item { grid-template-columns: 1fr; } }

/* Grid layout variant */
.ls-post-list.ls-post-list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.ls-post-list.ls-post-list--grid .ls-post-list__item { display: block; padding: 0; border: 0; }

/* Container widths */
.ls-container-narrow .site-main { max-width: 720px; margin: 0 auto; }
.ls-container-full .site-main { max-width: none; }

/* Sidebar */
.ls-page-sidebar-left .site-main { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; }
.ls-page-sidebar-right .site-main { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 2rem; }
@media (max-width: 900px) { .ls-page-sidebar-left .site-main, .ls-page-sidebar-right .site-main { grid-template-columns: 1fr; } }

/* Element-hide classes */
.ls-page-hide-header .page-header.ls-page-header { display: none !important; }
.ls-page-hide-title .page-header.ls-page-header h1 { display: none !important; }
.ls-page-hide-featured-image .post-thumbnail { display: none !important; }
.ls-page-hide-comments .comments-area { display: none !important; }
.ls-author-hide-avatar .ls-author-header__avatar { display: none !important; }
.ls-author-hide-bio .ls-author-header__bio { display: none !important; }
.ls-search-hide-query .ls-search-header__query { display: none !important; }
.ls-search-hide-count .ls-search-header__count { display: none !important; }
