﻿:root {
    --bg: #f7f8fb;
    --bg-soft: #ffffff;
    --text: #1f2933;
    --muted: #52606d;
    --primary: #96a997;
    --primary-dark: #7e917f;
    --primary-soft: #eef2ee;
    --border: #d9e2ec;
    --danger: #b00020;
    --success: #1a7f37;
    --header-height: 132px;
    --header-gap: 15px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", Verdana, sans-serif;
    background: linear-gradient(180deg, #f7f8fb 0%, #f1f3f7 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    height: var(--header-height);
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    height: 100%;
}

.logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 400px;
    max-width: 100%;
    height: auto;
    display: block;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.cz-navbar {
    position: relative;
    min-height: 44px;
}

.cz-nav-mobile-toggle {
    display: none;
    width: 42px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.cz-nav-mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-dark);
}

.cz-nav-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cz-nav-item {
    position: relative;
}

.cz-nav-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cz-nav-link:hover,
.cz-nav-link:focus,
.cz-nav-link:focus-visible,
.cz-nav-item.is-open > .cz-nav-link {
    outline: none;
    color: var(--primary-dark);
    background: #ffffff;
    border-color: rgba(126, 145, 127, 0.35);
    box-shadow: 0 6px 16px rgba(126, 145, 127, 0.16);
}

.cz-dropdown-trigger::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg);
    margin-left: 8px;
    margin-top: -3px;
}

.cz-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid rgba(126, 145, 127, 0.25);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 1200;
}

.cz-nav-account .cz-dropdown-menu {
    right: 0;
    left: auto;
}

.cz-dropdown-link {
    display: block;
    border-radius: 8px;
    padding: 9px 10px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.cz-dropdown-link:hover,
.cz-dropdown-link:focus,
.cz-dropdown-link:focus-visible {
    outline: none;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.cz-has-dropdown:hover > .cz-dropdown-menu,
.cz-has-dropdown:focus-within > .cz-dropdown-menu,
.cz-has-dropdown.is-open > .cz-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

main.container {
    padding-top: calc(var(--header-height) + var(--header-gap));
    padding-bottom: 40px;
    flex: 1;
}

.hero {
    padding: 24px;
    background: var(--primary-soft);
    border-radius: 12px;
    margin-bottom: 24px;
}

.hero-content h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.hero-content p {
    margin: 0;
    max-width: 680px;
    line-height: 1.5;
}

.home-intro {
    margin-bottom: 34px;
    padding: 36px 34px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(140deg, #f9fbf9 0%, #eef3ee 58%, #f7f9f8 100%);
    box-shadow: 0 10px 28px rgba(31, 41, 51, 0.07);
}

.home-intro-inner {
    max-width: 760px;
}

.home-intro-label {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 12px;
}

.home-intro h1 {
    margin: 0;
    font-size: clamp(30px, 5.2vw, 44px);
    line-height: 1.05;
}

.home-intro-subtitle {
    margin: 16px 0 12px;
    color: var(--text);
    font-size: clamp(16px, 2.2vw, 18px);
    font-weight: 700;
    line-height: 1.45;
}

.home-intro-text {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
    max-width: 62ch;
}

.home-about {
    margin-bottom: 34px;
}

.home-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 26px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(31, 41, 51, 0.06);
}

.home-about-media img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(126, 145, 127, 0.22);
    box-shadow: 0 8px 22px rgba(31, 41, 51, 0.11);
    object-fit: cover;
}

.home-about-content h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 4.2vw, 32px);
}

.home-about-content p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
}

.home-about-content p:last-child {
    margin-bottom: 0;
}

.home-posts-section {
    margin-bottom: 24px;
}

.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.home-section-head h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 32px);
}

.home-section-link {
    font-weight: 700;
    color: var(--primary-dark);
}

.home-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.1);
}

.post-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-card-body {
    padding: 14px 14px 16px;
}

.post-card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.post-card-date {
    margin: 8px 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.post-card-excerpt,
.post-card-text {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.post-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.post-card-link {
    font-weight: 700;
    color: var(--primary-dark);
}

.card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.06);
}

.card.small {
    max-width: 420px;
    margin: 40px auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.panel {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.form {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-weight: 600;
}

.check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.check-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

input,
textarea,
select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(150, 169, 151, 0.25);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(150, 169, 151, 0.35);
}

.btn.large {
    padding: 14px 18px;
    font-size: 15px;
    text-align: center;
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn.ghost:hover {
    background: #ffffff;
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.alert.error {
    background: #fde8e8;
    color: var(--danger);
}

.alert.success {
    background: #e6f4ea;
    color: var(--success);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.table th,
.table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tag.free {
    background: #e0f7e9;
    color: #1b7f39;
}

.tag.paid {
    background: #fff4e6;
    color: #a25c00;
}

.post-img {
    border-radius: 10px;
    margin-bottom: 12px;
}

.ebook-thumb {
    width: 100px;
    height: 140px;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    background: #ffffff;
    object-fit: contain;
    display: block;
}

.ebook-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--muted);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.post-list .post + .post {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.promo-card {
    margin-top: 16px;
    padding: 16px;
    border-radius: 10px;
    background: var(--primary-soft);
    border: 1px dashed var(--border);
}

.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 18px 0;
    text-align: center;
    color: var(--muted);
    margin-top: auto;
}

.visit-counter {
    text-align: center;
}

.visit-counter p {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.visit-counter strong {
    color: var(--text);
}

@media (max-width: 980px) {
    .home-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .home-about-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .home-about-media {
        order: -1;
    }
}

@media (max-width: 640px) {
    .home-intro {
        padding: 26px 20px;
    }

    .home-intro h1 {
        font-size: clamp(28px, 8vw, 32px);
    }

    .home-post-grid {
        grid-template-columns: 1fr;
    }

    .home-section-head {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .row-between {
        flex-direction: column;
        align-items: flex-start;
    }

    .row {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 900px) {
    :root {
        --header-height: 104px;
        --header-gap: 12px;
    }

    .header-wrap {
        padding: 12px 0;
        align-items: center;
    }

    .logo img {
        width: min(290px, 74vw);
    }

    .cz-navbar {
        width: auto;
    }

    .cz-nav-mobile-toggle {
        display: inline-flex;
    }

    .cz-nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: auto;
        min-width: min(340px, calc(100vw - 24px));
        max-height: calc(100vh - 130px);
        overflow-y: auto;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 14px 28px rgba(31, 41, 51, 0.16);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        z-index: 1300;
    }

    .cz-nav-menu.is-open {
        display: flex;
    }

    .cz-nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 10px 12px;
    }

    .cz-nav-item {
        width: 100%;
    }

    .cz-dropdown-menu {
        position: static;
        min-width: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        border-radius: 0;
        padding: 4px 0 6px 10px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .cz-has-dropdown.is-open > .cz-dropdown-menu {
        display: block;
    }

    .cz-dropdown-link {
        padding: 8px 10px;
    }
}

