* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: normal;
    color: #333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

header {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem auto;
    background-color: white;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
}

header {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem auto;
    background-color: white;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222;
}

.home-link {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

.home-link:hover {
    color: #0066cc;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

/*список постов*/
.post-item {
    background: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    display: block;
}

/* частная ситуация, когда карточка = ссылка */
a.post-item {
    cursor: pointer;
    text-decoration: none;
    
}

a.post-item:hover {
box-shadow: 0 4px 4px  rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    transition: color 0.2s;
}
.post-item:hover .post-title,
.post-title:hover {
    color: #0066cc;
}

.post-meta {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.5rem;
}

.post-excerpt {
    margin-top: 1rem;
    color: #444;
    line-height: 1.7;
}

.pagination {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background-color: white;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.page-link:hover:not(.disabled) {
    background-color: #f0f0f0;
    border-color: #bbb;
    color: #0066cc;
}

.page-link.active {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.post-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.75rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #222;
}

.back-link {
    text-decoration: none;
    color: #0066cc;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: #f0f7ff;
    transition: all 0.2s;
}

.back-link:hover {
    background-color: #e6f2ff;
    color: #0052a3;
}

.post-meta {
    font-size: 0.875rem;
    color: #666;
}

.post-content {
    line-height: 1.2;
    color: #444;
    margin-top: 1.5rem;
}

.post-content h2 {
    font-size: 2rem;
    margin: 1.5rem 0 0.75rem;
    color: #333;
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 1.25rem 0 0.75rem;
    color: #444;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1rem;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.pagination nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.pagination .page-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background-color: white;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.pagination .page-link:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
    color: #0066cc;
}

.pagination .post-meta {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.25rem;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
    width: 100%;
    flex-wrap: wrap;
}

.post-nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    flex: 1 1 300px;
}

.post-nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
    color: #0066cc;
}

.nav-arrow-col,
.nav-content-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow-col {
    width: 25px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.nav-content-col {
    flex: 1;
    padding: 0.5rem 1.5rem;
    flex-direction: column;
}

.nav-arrow {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0066cc;
    line-height: 1;
}

.nav-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.1;
}

.nav-date {
    font-size: 0.775rem;
    color: #666;
    text-align: right;
    width: 100%;
}

footer {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    background-color: white;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    font-size: 0.875rem;
}

pre {
    position: relative;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow-x: auto;
}
