/**
 * Стили шаблона страницы (page-with-nav): hero, контент, типографика
 */

.cg-page-hero {
    position: relative;
    height: 60vh;
    min-height: 640px;
    overflow: hidden;
}

.cg-page-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cg-page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.15) 70%, rgba(0,0,0,0.25) 100%);
    display: flex;
    align-items: flex-end;
    padding: 60px 0 60px;
}

.cg-page-hero-overlay .cg-container {
    max-width: 1000px;
}

.cg-page-hero-content {
    color: #fff;
}

.cg-page-hero-title {
    font-size: 48px;
    font-weight: 700;
    text-shadow: 0 8px 22px rgba(0,0,0,0.35);
    text-align: left;
    margin: 0;
    color: #fff;
}

.cg-page-content {
    padding: 0px 20px 60px;
    max-width: 1000px;
}

.cg-page-header {
    margin-bottom: 1.5rem;
}

.cg-page-title {
    font-size: 48px;
    font-weight: 700;
    text-align: left;
    margin: 0 0 0.5rem;
    color: #222;
}

/* Типографика контента страницы */
.cg-page-entry-content {
    max-width: 900px;
    margin: 0 auto;
}

.cg-page-entry-content--with-hero {
    padding-top: 30px;
}

.cg-page-entry-content h1 {
    font-size: 56px;
    font-weight: 700;
    text-align: left;
    margin: 1.2em 0 0.5em;
    color: #222;
    line-height: 1.2;
}

.cg-page-entry-content h1:first-child {
    margin-top: 0;
}

.cg-page-entry-content--with-hero h1:first-child,
.cg-page-entry-content--with-hero h2:first-child,
.cg-page-entry-content--with-hero h3:first-child,
.cg-page-entry-content--with-hero h4:first-child,
.cg-page-entry-content--with-hero h5:first-child,
.cg-page-entry-content--with-hero h6:first-child {
    margin-top: 0;
}

.cg-page-entry-content h1 b,
.cg-page-entry-content h2 b,
.cg-page-entry-content h3 b,
.cg-page-entry-content h4 b,
.cg-page-entry-content h5 b,
.cg-page-entry-content h6 b {
    font-weight: inherit;
}

.cg-page-entry-content h2 {
    font-size: 32px;
    font-weight: 600;
    margin: 1.2em 0 0.5em;
    color: #222;
    line-height: 1.3;
}

.cg-page-entry-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 1em 0 0.4em;
    color: #333;
}

.cg-page-entry-content h4 {
    font-size: 19px;
    font-weight: 600;
    margin: 1em 0 0.4em;
    color: #333;
}

.cg-page-entry-content h5 {
    font-size: 17px;
    font-weight: 500;
    margin: 0.8em 0 0.3em;
    color: #444;
}

.cg-page-entry-content h6 {
    font-size: 15px;
    font-weight: 500;
    margin: 0.8em 0 0.3em;
    color: #444;
}

.cg-page-entry-content p {
    margin: 0 0 1em;
    font-size: 17px;
    line-height: 1.6;
    color: #333;
}

.cg-page-entry-content ul,
.cg-page-entry-content ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.cg-page-entry-content li {
    margin-bottom: 0.2em;
    line-height: 1.5;
}

.cg-page-entry-content li p {
    margin-bottom: 0.35em;
}

.cg-page-entry-content li p:last-child {
    margin-bottom: 0;
}

.cg-page-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 1em 0;
}

.cg-page-entry-content a {
    color: #222;
    text-decoration: underline;
}

.cg-page-entry-content a:hover {
    text-decoration: none;
}

.cg-page-entry-content blockquote {
    margin: 1.5em 0;
    padding-left: 1.5em;
    border-left: 4px solid #222;
    font-style: italic;
    color: #555;
}

.cg-page-entry-content hr {
    border: none;
    border-top: 1px solid #bfbfbf;
    margin: 1.5em 0;
}

[data-theme="dark"] .cg-page-title,
[data-theme="dark"] .cg-page-entry-content h1,
[data-theme="dark"] .cg-page-entry-content h2,
[data-theme="dark"] .cg-page-entry-content h3,
[data-theme="dark"] .cg-page-entry-content h4,
[data-theme="dark"] .cg-page-entry-content h5,
[data-theme="dark"] .cg-page-entry-content h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .cg-page-entry-content p,
[data-theme="dark"] .cg-page-entry-content li,
[data-theme="dark"] .cg-page-entry-content blockquote {
    color: var(--text-secondary);
}

[data-theme="dark"] .cg-page-entry-content a {
    color: var(--nav-text);
}

[data-theme="dark"] .cg-page-entry-content hr {
    border-top-color: #404550;
}

@media (max-width: 768px) {
    .cg-page-hero {
        height: 50vh;
        min-height: 400px;
    }

    .cg-page-hero-title {
        font-size: 36px;
        text-align: left;
    }

    .cg-page-title {
        font-size: 36px;
    }

    .cg-page-entry-content h1 {
        font-size: 36px;
    }

    .cg-page-entry-content h2 {
        font-size: 28px;
    }

    .cg-page-entry-content h3 {
        font-size: 19px;
    }

    .cg-page-entry-content h4 {
        font-size: 17px;
    }

    .cg-page-entry-content h5 {
        font-size: 16px;
    }

    .cg-page-entry-content h6 {
        font-size: 14px;
    }

    .cg-page-entry-content p {
        font-size: 16px;
    }
}
