/* ===== БАЗА ===== */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.10), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, #eef4ff 0%, #f7f9fc 35%, #f3f4f6 100%);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ===== ОБЩАЯ ОБЁРТКА ===== */
.site-wrapper {
    min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(17, 24, 39, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.site-header__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 24px;
    display: grid;
    grid-template-columns: 1fr minmax(260px, 480px) 1fr;
    align-items: center;
    gap: 20px;
}

.site-logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #ffffff;
}

.site-logo:hover {
    color: #bfdbfe;
}

.site-nav {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
}

.site-nav__link {
    color: #dbeafe;
    font-size: 15px;
    font-weight: 600;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav__link:hover {
    color: #ffffff;
    opacity: 1;
}

/* ===== MAIN ===== */
.site-main {
    width: 100%;
    padding: 38px 0 56px;
}

.layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

/* ===== CONTENT ===== */
.content-area {
    min-width: 0;
}

/* ===== SIDEBAR ===== */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(8px);
}

.sidebar-title,
.sidebar-subtitle {
    margin: 0 0 12px;
    color: #111827;
    line-height: 1.2;
}

.sidebar-title {
    font-size: 24px;
    font-weight: 800;
}

.sidebar-subtitle {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-text {
    margin: 0;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.75;
}

/* ===== BLOG PAGE ===== */
.blog-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.blog-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92));
    border: 1px solid rgba(219, 234, 254, 0.95);
    border-radius: 26px;
    padding: 34px 34px 30px;
    box-shadow: 0 18px 44px rgba(30, 41, 59, 0.08);
}

.blog-header::before {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 70%);
    pointer-events: none;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.blog-title {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 1.08;
    font-weight: 800;
    color: #0f172a;
}

.blog-subtitle {
    margin: 0;
    max-width: 760px;
    font-size: 17px;
    color: #64748b;
    line-height: 1.75;
}

/* ===== СПИСОК ПОСТОВ ===== */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.10);
    border-color: rgba(191, 219, 254, 1);
}

.post-card__content {
    padding: 30px 30px 28px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 14px;
    color: #64748b;
}

.post-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-meta__dot {
    color: #cbd5e1;
}

.post-card__title {
    margin: 0 0 16px;
    font-size: 31px;
    line-height: 1.18;
    font-weight: 800;
    color: #111827;
}

.post-card__link {
    color: #0f172a;
    transition: color 0.2s ease;
}

.post-card__link:hover {
    color: #2563eb;
}

.post-card__excerpt {
    color: #475569;
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 22px;
}

.post-card__excerpt p {
    margin: 0 0 12px;
}

.post-card__excerpt p:last-child {
    margin-bottom: 0;
}

.post-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
}

.post-card__button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

/* ===== DETAIL PAGE ===== */
.post-detail {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 26px;
    padding: 36px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.post-detail__title {
    margin: 0 0 16px;
    font-size: 42px;
    line-height: 1.12;
    font-weight: 800;
    color: #0f172a;
}

.post-detail .date {
    margin: 0 0 22px;
    color: #64748b;
    font-size: 15px;
}

.post-detail__body,
.post-detail__content {
    font-size: 17px;
    line-height: 1.9;
    color: #374151;
}

.post-detail__body p,
.post-detail__content p {
    margin: 0 0 16px;
}

/* ===== ПУСТОЙ СПИСОК ===== */
.empty-posts {
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed #cbd5e1;
    border-radius: 24px;
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.empty-posts h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #0f172a;
}

.empty-posts p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
}

/* ===== ДАТА И ОБЩИЕ МЕЛОЧИ ===== */
.date {
    color: #6b7280;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar-area {
        order: 2;
    }
}

@media (max-width: 768px) {
    .site-header__inner {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-main {
        padding: 24px 0 40px;
    }

    .layout {
        padding: 0 16px;
        gap: 24px;
    }

    .blog-header {
        padding: 26px 22px 24px;
        border-radius: 22px;
    }

    .blog-title {
        font-size: 32px;
    }

    .blog-subtitle {
        font-size: 15px;
    }

    .post-card__content {
        padding: 22px 20px;
    }

    .post-card__title {
        font-size: 24px;
    }

    .post-detail {
        padding: 24px 20px;
    }

    .post-detail__title {
        font-size: 30px;
    }

    .sidebar-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        font-size: 22px;
    }

    .blog-title {
        font-size: 28px;
    }

    .post-card__title {
        font-size: 22px;
    }

    .post-meta {
        font-size: 13px;
    }

    .post-card__excerpt,
    .post-detail__body,
    .post-detail__content {
        font-size: 15px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 8px 0 4px;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    color: #1f2937;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
}

.pagination__link:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    transform: translateY(-1px);
}

.pagination__info {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

/* ===== COMMENT FORM ===== */
.comment-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comment-form-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.comment-form-card__header {
    margin-bottom: 24px;
}

.comment-form-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
}

.comment-form-card__title {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
}

.comment-form-card__subtitle {
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background: #ffffff;
    padding: 14px 16px;
    font-size: 15px;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
    background: #fcfdff;
}

.comment-form textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.7;
}

.comment-form__actions {
    padding-top: 4px;
}

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.comment-submit-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.form-errors,
.field-error {
    border-radius: 12px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 14px;
    line-height: 1.5;
}

.form-errors ul,
.field-error ul {
    margin: 0;
    padding-left: 18px;
}

/* ===== COMMENT SUCCESS ===== */
.comment-success-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(220, 252, 231, 1);
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.comment-success-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.24);
}

.comment-success-card__title {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.comment-success-card__text {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
}

.comment-success-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-weight: 700;
    transition: all 0.2s ease;
}

.comment-success-card__link:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .comment-form-card,
    .comment-success-card {
        padding: 24px 20px;
    }

    .comment-form-card__title,
    .comment-success-card__title {
        font-size: 24px;
    }

    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form textarea {
        padding: 12px 14px;
    }
}

/* ===== POST DETAIL PAGE ===== */
.post-detail-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.post-detail-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 26px;
    padding: 36px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.post-detail-card__top {
    margin-bottom: 24px;
}

.post-detail-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
}

.post-detail__title {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 1.12;
    font-weight: 800;
    color: #0f172a;
}

.post-detail__meta {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.post-detail__content {
    font-size: 17px;
    line-height: 1.9;
    color: #374151;
}

.post-detail__content p {
    margin: 0 0 16px;
}

.post-detail__actions {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.post-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-weight: 700;
    transition: all 0.2s ease;
}

.post-action-link:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* ===== COMMENTS ===== */
.comments-section {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.comments-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.comments-section__title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.comments-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 14px;
    font-weight: 700;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.comment-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.comment-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.comment-card__author-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.comment-card__author {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.comment-card__date {
    color: #6b7280;
    font-size: 14px;
}

.comment-card__body {
    color: #475569;
    font-size: 15px;
    line-height: 1.8;
}

.comment-card__body p {
    margin: 0 0 12px;
}

.comments-empty {
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    color: #64748b;
}

.comments-empty h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 22px;
}

.comments-empty p {
    margin: 0;
}

@media (max-width: 768px) {
    .post-detail-card {
        padding: 24px 20px;
    }

    .post-detail__title {
        font-size: 30px;
    }

    .comments-section__title {
        font-size: 24px;
    }

    .comment-card {
        padding: 18px;
    }
}

.post-tags {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.post-tags__label {
    font-weight: 700;
    color: #1e293b;
}

.post-tags {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
}

.post-tags__label {
    font-weight: 700;
    color: #1e293b;
}

.post-tag-link {
    color: #2563eb;
    font-weight: 600;
    transition: color 0.2s ease;
}

.post-tag-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}


.active-tag-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.active-tag-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
}

.clear-tag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
}

.clear-tag-btn:hover {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
    transform: translateY(-1px);
}

.similar-posts-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.similar-posts-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.similar-posts-section__title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.similar-posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.similar-post-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.similar-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.similar-post-card__link {
    display: inline-block;
    color: #0f172a;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.similar-post-card__link:hover {
    color: #2563eb;
}

.similar-post-card__date {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.similar-posts-empty {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed #cbd5e1;
    color: #64748b;
}

@media (max-width: 768px) {
    .similar-posts-section__title {
        font-size: 24px;
    }
}

.search-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.search-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.search-form__row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    flex: 1 1 320px;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background: #ffffff;
    padding: 14px 16px;
    font-size: 15px;
    color: #111827;
    outline: none;
}

.search-form input[type="text"]:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
}

.search-form__button {
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.search-form__button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-results-header h2 {
    margin: 0;
    font-size: 24px;
    color: #0f172a;
}

.search-results-header p {
    margin: 0;
    color: #64748b;
}

.header-search-form {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(480px, 42vw);
}


.header-search-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

.header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}


.header-search-button {
    flex: 0 0 auto;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.header-search-button:hover {
    background: #1d4ed8;
}

.blog-header__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.blog-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.blog-add-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.home-section-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.home-post-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-post-card__title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.home-post-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.home-post-card__title a:hover {
    color: #2563eb;
}

.home-post-card__meta {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.home-post-card__excerpt {
    color: #475569;
    line-height: 1.75;
}

.home-post-card__excerpt p {
    margin: 0;
}

.home-habit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-habit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-habit-item:hover {
    transform: translateY(-1px);
    border-color: #bfdbfe;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.home-habit-item span {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.home-habit-item__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-habit-item__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

@media (max-width: 768px) {
    .home-section-card {
        padding: 22px;
    }

    .home-post-card__title {
        font-size: 22px;
    }

    .home-habit-item {
        flex-direction: column;
        align-items: stretch;
    }

    .home-habit-item__button {
        width: 100%;
    }
}