.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    max-width: 1240px;
    margin: 0 auto 24px;
    padding: 12px 14px;
    background:
        linear-gradient(135deg, rgba(74, 14, 78, 0.96), rgba(37, 10, 52, 0.92)),
        #4a0e4e;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(74, 14, 78, 0.22);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
}

.site-header__brand:hover,
.site-header__brand:focus {
    color: #ffc300;
}

.site-header__mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #4a0e4e;
    background: linear-gradient(135deg, #ffc300, #ffe48a);
    border-radius: 999px;
    box-shadow: 0 0 20px rgba(255, 195, 0, 0.28);
    font-size: 0.8rem;
}

.site-header__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-header__nav::-webkit-scrollbar {
    display: none;
}

.site-header__nav a {
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.site-header__nav a:hover,
.site-header__nav a:focus,
.site-header__nav a.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.site-footer {
    max-width: 1240px;
    margin: 28px auto 0;
    padding: 28px 24px 16px;
    color: rgba(255, 255, 255, 0.78);
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 195, 0, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(74, 14, 78, 0.96), rgba(37, 10, 52, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(74, 14, 78, 0.22);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    gap: 24px;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
}

.site-footer__brand:hover,
.site-footer__brand:focus {
    color: #ffc300;
}

.site-footer__mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #4a0e4e;
    background: linear-gradient(135deg, #ffc300, #ffe48a);
    border-radius: 999px;
    font-size: 0.8rem;
}

.site-footer__brand-block p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
}

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

.site-footer h2 {
    margin: 0 0 10px;
    padding: 0;
    color: #ffc300;
    border: 0;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer a {
    display: block;
    margin: 7px 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.site-footer__bottom {
    margin-top: 22px;
    padding-top: 14px;
    color: rgba(255, 255, 255, 0.58);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
}

.site-footer__bottom p {
    margin: 0;
    text-align: left;
}

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

.post-page-shell > .container {
    margin: 0;
}

.post-sidebar {
    position: sticky;
    top: 20px;
    background: #ffffff;
    border: 1px solid #e7d8ea;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.post-sidebar h2 {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    color: #4a0e4e;
    font-size: 1.25rem;
}

.post-sidebar h3 {
    margin: 22px 0 10px;
    color: #9b4d96;
    font-size: 1rem;
}

.post-sidebar a {
    color: #4a0e4e;
}

.post-list {
    display: grid;
    gap: 8px;
    max-height: 440px;
    overflow: auto;
}

.post-list a {
    display: block;
    padding: 9px 10px;
    text-decoration: none;
    background: #fbf6fc;
    border: 1px solid #eadbed;
    border-radius: 9px;
    font-size: 0.92rem;
    line-height: 1.3;
}

.post-list a:hover,
.post-list a:focus {
    color: #ffffff;
    background: #4a0e4e;
}

.post-tool-card {
    position: relative;
    overflow: hidden;
    display: block;
    margin-bottom: 10px;
    padding: 0 12px 12px;
    text-decoration: none;
    color: #331233;
    background:
        linear-gradient(180deg, rgba(74, 14, 78, 0.04), rgba(74, 14, 78, 0.08)),
        #ffffff;
    border: 1px solid #eadbed;
    border-radius: 12px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-tool-card::before {
    content: "";
    display: block;
    height: 74px;
    margin: 0 -12px 12px;
    background:
        linear-gradient(135deg, rgba(74, 14, 78, 0.6), rgba(155, 77, 150, 0.32)),
        url("../img/tool-placeholder.jpg");
    background-position: center;
    background-size: cover;
}

.post-tool-card[href*="index.php"]::before {
    background-image:
        linear-gradient(135deg, rgba(74, 14, 78, 0.56), rgba(255, 195, 0, 0.2)),
        url("../img/tool-birth-chart.jpg");
}

.post-tool-card[href*="daily-horoscope.php"]::before {
    background-image:
        linear-gradient(135deg, rgba(155, 77, 150, 0.55), rgba(255, 92, 134, 0.18)),
        url("../img/tool-daily-horoscope.jpg");
}

.post-tool-card[href*="compatibility-reading.php"]::before {
    background-image:
        linear-gradient(135deg, rgba(255, 79, 163, 0.48), rgba(74, 14, 78, 0.25)),
        url("../img/tool-compatibility.jpg");
}

.post-tool-card[href*="horary-question.php"]::before {
    background-image:
        linear-gradient(135deg, rgba(155, 77, 150, 0.52), rgba(255, 195, 0, 0.18)),
        url("../img/tool-horary.jpg");
}

.post-tool-card strong,
.post-tool-card span {
    display: block;
}

.post-tool-card strong {
    color: #4a0e4e;
    line-height: 1.25;
}

.post-tool-card span {
    margin-top: 4px;
    color: #6a466a;
    font-size: 0.9rem;
}

.post-tool-card:hover,
.post-tool-card:focus {
    border-color: rgba(155, 77, 150, 0.55);
    transform: translateY(-3px);
    box-shadow:
        0 18px 38px rgba(74, 14, 78, 0.16),
        0 0 28px rgba(155, 77, 150, 0.18);
}

.post-inline-tools {
    margin: 28px 0;
    padding: 22px;
    background: #fbf6fc;
    border: 1px solid #eadbed;
    border-radius: 12px;
}

.post-inline-tools p {
    margin-bottom: 14px;
    text-align: left;
}

.post-inline-tools a {
    font-weight: 700;
}

.post-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ad-slot--hidden {
    display: none;
}

@media (max-width: 980px) {
    .post-page-shell {
        display: block;
    }

    .post-page-shell > .container {
        margin: 0 auto;
    }

    .post-sidebar {
        position: static;
        max-width: var(--max-width);
        margin: 24px auto 0;
    }

    .site-footer__inner,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}

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

    .site-header__nav {
        justify-content: flex-start;
        width: 100%;
    }

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