/* Скопируйте сюда все стили из Финала 1 */
/* Начало стилей */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #111111;
    --white: #ffffff;
    --cream: #f8f6f2;
    --gray-light: #e8e8e8;
    --gray-medium: #666666;
    --gray-dark: #2d2d2d;
    --gold: #b8956a;
}

body {
    font-family: 'PT Sans', sans-serif;
    color: var(--gray-dark);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--black);
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--black);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--black);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--gray-medium);
}

nav a:hover::after {
    width: 100%;
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.burger span {
    width: 25px;
    height: 2px;
    background: var(--black);
    transition: all 0.3s;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Main Layout */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 5rem;
    align-items: start;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--gray-dark);
    font-family: 'PT Sans', sans-serif;
}

.article-body h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.2rem;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--black);
}

.article-body > p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--black);
}

.article-body > p:first-of-type::first-letter {
    float: left;
    font-family: 'Cormorant Garamond', serif;
    font-size: 5rem;
    line-height: 0.8;
    margin-right: 0.8rem;
    margin-top: 0.4rem;
    font-weight: 700;
    color: var(--black);
}

.article-body h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-light);
    letter-spacing: 0.5px;
    color: var(--black);
}

.article-body h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.article-body h2 a:hover {
    color: var(--gray-medium);
}

.article-body h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2rem 0 0.8rem;
    color: var(--black);
}

.article-body h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem;
    color: var(--black);
}

.article-body p {
    margin-bottom: 1.2rem;
    color: var(--gray-dark);
}

.article-body strong {
    color: var(--black);
    font-weight: 700;
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.6rem;
    color: var(--gray-dark);
}

/* Table of Contents */
.table-of-contents {
    background: var(--cream);
    padding: 1.5rem 2rem;
    margin: 2rem 0 3rem;
    border-left: 3px solid var(--black);
    max-width: 700px;
}

.table-of-contents h4 {
    font-family: 'PT Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--black);
}

.toc-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}

.toc-list a {
    text-decoration: none;
    color: var(--gray-dark);
    font-size: 0.95rem;
    transition: color 0.3s;
    display: block;
    line-height: 1.4;
    font-family: 'PT Sans', sans-serif;
}

.toc-list a:hover {
    color: var(--black);
}

/* Images */
figure.content-image {
    margin: 2.5rem 0;
    text-align: center;
    max-width: 600px;
}

figure.content-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

figcaption {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-top: 1rem;
    font-style: italic;
    font-family: 'PT Sans', sans-serif;
}

/* Pull Quote */
blockquote.pull-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    text-align: center;
    margin: 3rem 0;
    padding: 0 2rem;
    color: var(--black);
    max-width: 700px;
    position: relative;
    border: none;
}

blockquote.pull-quote::before {
    content: '"';
    font-size: 7rem;
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.15;
    line-height: 1;
    font-family: 'Cormorant Garamond', serif;
}

/* Info Box */
blockquote.info-box {
    background: var(--cream);
    padding: 2rem;
    margin: 2.5rem 0;
    border-left: 3px solid var(--black);
    max-width: 700px;
}

blockquote.info-box h4 {
    font-family: 'PT Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--black);
}

blockquote.info-box ul,
blockquote.info-box ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

blockquote.info-box li {
    padding: 0.6rem 0 0.6rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--gray-light);
    font-family: 'PT Sans', sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
}

blockquote.info-box li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gray-medium);
}

blockquote.info-box li:last-child {
    border-bottom: none;
}

/* Read Also Block */
.read-also {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--gray-light);
}

.read-also h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--black);
    border: none;
    padding: 0;
}

.read-also-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.read-also-card {
    background: var(--cream);
    padding: 1.5rem;
    border-radius: 4px;
    transition: transform 0.3s;
}

.read-also-card:hover {
    transform: translateY(-3px);
}

.read-also-card .card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.read-also-card .card-icon img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.read-also-card h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.read-also-card h4 a {
    text-decoration: none;
    color: var(--black);
    transition: color 0.3s;
}

.read-also-card h4 a:hover {
    color: var(--gray-medium);
}

.read-also-card .card-category {
    font-size: 0.8rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'PT Sans', sans-serif;
}

/* Sidebar */
.sidebar {
}

.sidebar-widget {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.sidebar-widget:last-child {
    border-bottom: none;
}

.widget-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--black);
    color: var(--black);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.sidebar-list a {
    text-decoration: none;
    color: var(--gray-dark);
    font-size: 0.95rem;
    transition: color 0.3s;
    display: block;
    line-height: 1.4;
    font-family: 'PT Sans', sans-serif;
}

.sidebar-list a:hover {
    color: var(--black);
}

/* Categories */
.categories-list {
    list-style: none;
}

.categories-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-list a {
    text-decoration: none;
    color: var(--gray-dark);
    font-size: 0.95rem;
    transition: color 0.3s;
}

.categories-list a:hover {
    color: var(--black);
}

.category-count {
    font-size: 0.8rem;
    color: var(--gray-medium);
    font-weight: 700;
}

/* Latest Posts */
.latest-post {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.latest-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.latest-post-image {
    width: 80px;
    height: 80px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 4px;
    overflow: hidden;
}

.latest-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-post-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.latest-post-title a {
    text-decoration: none;
    color: var(--black);
    transition: color 0.3s;
}

.latest-post-title a:hover {
    color: var(--gray-medium);
}

.latest-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.latest-post-tag {
    font-size: 0.75rem;
    color: var(--gray-medium);
    text-decoration: none;
    font-family: 'PT Sans', sans-serif;
    transition: color 0.3s;
}

.latest-post-tag::before {
    content: '#';
}

.latest-post-tag:hover {
    color: var(--black);
}

/* Tags Widget */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: var(--cream);
    color: var(--gray-dark);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 3px;
    transition: all 0.3s;
    border: 1px solid var(--gray-light);
}

.tag:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* Ad Banner */
.ad-banner {
    background: var(--cream);
    padding: 2rem;
    text-align: center;
    border: 1px dashed var(--gray-light);
    border-radius: 4px;
}

.ad-banner-placeholder {
    font-size: 0.8rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.ad-banner-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--black);
    font-style: italic;
}

/* Footer */
footer {
    background: var(--black);
    color: var(--white);
    padding: 4rem 2rem 2rem;
    border-top: 3px solid var(--gold);
    text-align: center;
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1.5rem;
    display: inline-block;
    text-decoration: none;
}

.footer-description {
    max-width: 650px;
    margin: 0 auto 2rem;
    color: var(--gray-medium);
    line-height: 1.7;
    font-family: 'PT Sans', sans-serif;
    font-size: 1rem;
}

.footer-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.footer-copyright {
    padding-top: 2rem;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin-top: 2rem;
}

/* Pagination */
.pagination {
    margin: 3rem 0;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
}

.pagination a {
    padding: 0.5rem 1rem;
    background: var(--cream);
    color: var(--black);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.pagination a:hover {
    background: var(--black);
    color: var(--white);
}

/* Post Card (для index.php) */
.post-card {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--gray-light);
}

.post-card h2 {
    font-size: 2rem;
    margin-top: 0;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.post-category a {
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .read-also-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        z-index: 999;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    nav a {
        font-size: 1rem;
    }

    .header-top {
        padding: 0.75rem 1.5rem;
    }

    .article-body h1 {
        font-size: 2.2rem;
    }

    .article-body {
        font-size: 1.1rem;
    }

    .table-of-contents {
        padding: 1.25rem 1.5rem;
    }

    .toc-list {
        grid-template-columns: 1fr;
    }

    figure.content-image {
        max-width: 100%;
    }

    blockquote.pull-quote {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 2rem 1.5rem 3rem;
    }

    .article-body h1 {
        font-size: 2rem;
    }

    .article-body h2 {
        font-size: 1.8rem;
    }

    .article-body h3 {
        font-size: 1.2rem;
    }
}