/* Стили для страницы статьи */

/* Типографика статьи */
h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 4rem;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 2rem;
    line-height: 1.9;
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--accent-color);
}

.breadcrumbs span {
    color: var(--secondary-color);
    margin: 0 0.5rem;
}

/* Статья */
.article-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-bottom: 6rem;
}

.article-header {
    background: var(--white);
    border-radius: 24px;
    padding: 5rem 7rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.article-content {
    background: var(--white);
    border-radius: 24px;
    padding: 6rem 7rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.article-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

.article-title {
    margin: 0;
}

.article-lead {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 0;
    line-height: 1.65;
    font-weight: 400;
}

.article-body {
    font-size: 1.15rem;
    color: var(--primary-color);
}

/* Стили для элементов внутри article-body */
.article-body h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.article-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-body ul,
.article-body ol {
    margin: 2rem 0;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.article-body a {
    color: var(--accent-color);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.article-body a:hover {
    opacity: 0.7;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 0 1.5rem;
    border-left: 4px solid #c87941;
    border-radius: 0 10px 10px 0;
    font-size: 1.3rem;
}

.article-body pre {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

.article-body code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-body table th,
.article-body table td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: left;
}

.article-body table th {
    background: #f5f5f5;
    font-weight: 600;
}

.article-body hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 3rem 0;
}


/* START */


/* Общие настройки для блоков с картинками */
.image-hero, .image-cube {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Расстояние между фото и текстом */
    transition: all 0.3s ease;
}

/* Настройки для квадратов (кубиков) */
.image-cube-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Сами изображения */
.image-cube-wrapper img, .image-hero-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Большие картинки (верхние) */
.image-heroes {
    margin: 2rem 0;
}

.heroes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.image-hero-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Общий стиль для всех подписей (и героев, и кубиков) */
.image-caption {
    color: var(--secondary-color);
    padding: 0 5px;
    font-size: 1.2rem;
    line-height: 1.4;
    text-align: center;    /* Центрируем текст под фото */
    font-style: italic;
}


/* Кубики изображений */
.image-cubes {
    margin: 2rem 0;
}

.cubes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.image-cube:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); */
}

/* Кнопка лайка */
.article-like-section {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    background: var(--white);
    border: 2px solid #e8e8e8;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.like-btn:hover {
    border-color: #e0a0a0;
    box-shadow: 0 4px 20px rgba(220, 80, 80, 0.12);
    transform: translateY(-2px);
}

.like-btn:active {
    transform: translateY(0) scale(0.95);
}

.like-heart {
    fill: none;
    stroke: #bbb;
    stroke-width: 1.5;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn:hover .like-heart {
    stroke: #e05555;
}

.like-btn.liked .like-heart {
    fill: #e05555;
    stroke: #e05555;
}

.like-btn.liked {
    border-color: #f0d0d0;
    background: #fff5f5;
}

.likes-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    transition: color 0.3s ease;
    min-width: 1ch;
}

.like-btn.liked .likes-count {
    color: #e05555;
}


/* Ссылка на главную */
.back-to-home {
    margin-top: 4rem;
    margin-bottom: 2rem;
    text-align: center;
}

.back-to-home a {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.1); /**/
}

.back-to-home a:hover {
    background: rgba(78, 205, 196, 0.15);
    color: #2a6b66;
    border: 1px solid rgba(78, 205, 196, 0.1); /**/
    backdrop-filter: blur(4px);
    transform: translateY(-2px);
    box-shadow: none;
}

@keyframes like-pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.like-btn.liked .like-heart {
    animation: like-pop 0.45s ease;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .cubes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 0;
    }

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

    .cubes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .article-wrapper {
        padding: 0;
        gap: 2rem;
    }

    .article-header,
    .article-content {
        padding: 2rem 1rem;
        border-radius: 0;
        box-shadow: none;
    }

    .article-body {
        font-size: 1.05rem;
    }

    .article-body blockquote {
        font-size: 1.2rem;
        padding: 1.2rem 1.2rem 1.2rem 1.5rem;
    }

    .article-body h1 {
        font-size: 2rem;
    }

    .article-body h2 {
        font-size: 1.75rem;
    }

    .article-body h3 {
        font-size: 1.4rem;
    }

    /* ===== ТОЛЬКО ДЛЯ КУБИКОВ (картинки после статьи) ===== */

    .image-cubes {
        margin: 2rem 1rem;
    }

    .image-cubes .cubes-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

}
