:root {
    --gold: #e0c297;
    --bg: #0a1215;
    --panel: #0c1418;
    --panel2: #0b1215;
    --muted: #b5c0c7;
    --line: #1a2429;
    --rad: 20px;
}

.blog-page {
    direction: rtl;
    text-align: right;
}

.blog-main {
    padding: 90px 0 120px;
    background: var(--bg);
}

.blog-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 58px;
    align-items: start;
}

.blog-sidebar {
    grid-column: 2;
    position: sticky;
    top: 110px;
    align-self: start;
    background: linear-gradient(180deg, rgba(12, 20, 24, 0.96), rgba(10, 18, 21, 0.96));
    border: 1px solid rgba(224, 194, 151, 0.16);
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.blog-posts-area {
    grid-column: 1;
    grid-row: 1;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
    font-family: "Peyda", sans-serif;
    font-size: 23px;
    font-weight: 800;
    margin: 0 0 22px;
    padding-bottom: 14px;
    position: relative;
    line-height: 1.7;
}

.sidebar-title::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 7px rgba(224, 194, 151, 0.08);
    flex: 0 0 auto;
}

.sidebar-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    left: auto;
    width: 54px;
    height: 2px;
    background: var(--gold);
    opacity: 0.9;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin: 0 0 10px;
}

.sidebar-list a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 12px 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.045);
    color: var(--muted);
    border-radius: 15px;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.7;
    transition: background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.sidebar-list a::after {
    content: "›";
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(224, 194, 151, 0.08);
    color: var(--gold);
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.28s ease, color 0.28s ease;
}

.sidebar-list a:hover {
    padding: 12px 16px;
    background: rgba(224, 194, 151, 0.12);
    color: #fff;
    border-color: rgba(224, 194, 151, 0.24);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    transform: none;
}

.sidebar-list a:hover::after {
    background: var(--gold);
    color: #10181b;
}

.posts-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    align-items: stretch;
}

.post-card {
    position: relative;
    height: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--rad);
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background-color 0.28s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    will-change: transform;
    direction: rtl;
}

.post-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(224, 194, 151, 0.18);
}

.post-card img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
    will-change: transform;
}

.post-card:hover img {
    transform: scale(1.025);
    filter: brightness(0.93);
}

.post-content {
    padding: 28px;
    position: relative;
    z-index: 2;
    direction: rtl;
    text-align: right;
}

.post-content,
.post-content * {
    transform: none !important;
    scale: 1 !important;
    letter-spacing: normal !important;
}

.post-content h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 14px;
    color: #fff;
    font-family: "Peyda", sans-serif;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.65;
    text-align: right;
}

.post-content p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 84px;
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.95;
    color: var(--muted);
    text-align: right;
}

.post-card:hover .post-content h3,
.post-card:hover .post-content p {
    color: inherit;
}

.read-more {
    color: var(--gold);
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.read-more:hover {
    transform: none !important;
    scale: 1 !important;
}

.read-more__icon {
    line-height: 1;
    font-size: 16px;
}

.custom-pagination {
    margin-top: 70px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    direction: ltr;
}

.custom-pagination a,
.custom-pagination span {
    background: var(--panel);
    color: var(--muted);
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    min-width: 48px;
    text-align: center;
    border: 1px solid var(--line);
    transition: all 0.3s ease;
}

.custom-pagination a:hover,
.custom-pagination .current,
.custom-pagination .active span {
    background: var(--gold);
    color: #1a1a1a;
    border-color: var(--gold);
}

.empty-posts {
    grid-column: 1 / -1;
    padding: 34px;
    border: 1px solid rgba(224, 194, 151, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    text-align: center;
    line-height: 2;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease, transform 1s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

.animated-hero {
    height: 52dvh;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(to bottom, rgba(10, 18, 21, 0.84), rgba(10, 18, 21, 0.97)), radial-gradient(circle at 32% 42%, rgba(224, 194, 151, 0.12), transparent 44%), radial-gradient(circle at 68% 68%, rgba(224, 194, 151, 0.09), transparent 46%), radial-gradient(circle at 50% 18%, rgba(224, 194, 151, 0.045), transparent 50%), var(--bg);
    direction: rtl;
}

.animated-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(224, 194, 151, 0.035) 1px, transparent 1px), linear-gradient(180deg, rgba(224, 194, 151, 0.025) 1px, transparent 1px);
    background-size: 78px 78px;
    opacity: 0.32;
    pointer-events: none;
    z-index: 0;
    animation: heroGridMove 30s linear infinite;
}

.animated-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 35% 45%, rgba(224, 194, 151, 0.11), transparent 46%), radial-gradient(circle at 65% 70%, rgba(224, 194, 151, 0.08), transparent 48%);
    pointer-events: none;
    z-index: 1;
    animation: heroGlow 20s ease-in-out infinite;
}

@keyframes heroGridMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 78px 78px;
    }
}

@keyframes heroGlow {

    0%,
    100% {
        opacity: 0.72;
    }

    50% {
        opacity: 1;
    }
}

.animated-hero__pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.animated-hero__content {
    position: relative;
    z-index: 2;
    max-width: 860px;
    padding: 0 18px;
    direction: rtl;
}

.animated-hero__eyebrow {
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 0;
    font-size: 13px;
    margin-bottom: 10px;
    text-transform: none;
    line-height: 1.8;
}

.animated-hero__title {
    font-family: "Peyda", sans-serif;
    font-size: clamp(34px, 5.6vw, 58px);
    line-height: 1.35;
    margin: 0 0 14px;
    color: #fff;
    font-weight: 900;
}

.animated-hero__desc {
    font-size: 15px;
    color: var(--muted);
    max-width: 680px;
    margin: 0 auto;
    line-height: 2;
    display: block;
}

.hero-card {
    position: absolute;
    width: 92px;
    height: 92px;
    border-radius: 26px;
    border: 1px solid rgba(224, 194, 151, 0.2);
    background: linear-gradient(135deg, rgba(224, 194, 151, 0.105), rgba(255, 255, 255, 0.025)), rgba(12, 20, 24, 0.28);
    backdrop-filter: blur(2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), inset 0 1px 6px rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 27px;
    opacity: 0;
    animation: heroCardFloat 22s ease-in-out infinite;
}

.hero-card i {
    transform: translateY(1px);
    text-shadow: 0 0 18px rgba(224, 194, 151, 0.28);
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 19px;
    border: 1px solid rgba(224, 194, 151, 0.1);
}

.hero-card--1 {
    top: 16%;
    right: 8%;
    left: auto;
    animation-delay: 0s;
}

.hero-card--2 {
    top: 65%;
    right: 15%;
    left: auto;
    animation-delay: 4s;
}

.hero-card--3 {
    top: 18%;
    left: 10%;
    right: auto;
    animation-delay: 8s;
}

.hero-card--4 {
    top: 66%;
    left: 16%;
    right: auto;
    animation-delay: 12s;
}

.hero-card--5 {
    top: 48%;
    right: 61%;
    left: auto;
    animation-delay: 16s;
}

@keyframes heroCardFloat {
    0% {
        transform: translate3d(0, 44px, 0) scale(0.86) rotate(-4deg);
        opacity: 0;
    }

    18% {
        opacity: 0.42;
    }

    50% {
        transform: translate3d(-18px, -28px, 0) scale(1.03) rotate(4deg);
        opacity: 0.66;
    }

    82% {
        opacity: 0.28;
    }

    100% {
        transform: translate3d(14px, -72px, 0) scale(0.86) rotate(-4deg);
        opacity: 0;
    }
}

.hero-line {
    position: absolute;
    height: 1px;
    width: 280px;
    background: linear-gradient(90deg, transparent, rgba(224, 194, 151, 0.42), transparent);
    opacity: 0;
    animation: heroLineFlow 18s ease-in-out infinite;
}

.hero-line--1 {
    top: 31%;
    right: 10%;
    left: auto;
    transform: rotate(-18deg);
    animation-delay: 2s;
}

.hero-line--2 {
    top: 64%;
    left: 9%;
    right: auto;
    transform: rotate(18deg);
    animation-delay: 7s;
}

.hero-line--3 {
    top: 48%;
    right: 50%;
    left: auto;
    width: 230px;
    transform: rotate(0deg);
    animation-delay: 12s;
}

@keyframes heroLineFlow {
    0% {
        opacity: 0;
        transform: translateX(36px) rotate(-18deg);
    }

    38% {
        opacity: 0.48;
    }

    72% {
        opacity: 0.18;
    }

    100% {
        opacity: 0;
        transform: translateX(-42px) rotate(-18deg);
    }
}

.animated-hero--contact .hero-card {
    border-radius: 24px;
}

.animated-hero--about .hero-card {
    border-radius: 50%;
}

.animated-hero--about .hero-card::before {
    border-radius: 50%;
}

.animated-hero--blog .hero-card,
.animated-hero--category .hero-card {
    border-radius: 22px;
}

.animated-hero--blog .hero-card::before,
.animated-hero--category .hero-card::before {
    border-radius: 16px;
}

.contact-hero.animated-hero,
.about-hero.animated-hero,
.blog-hero.animated-hero,
.category-hero.animated-hero {
    height: 52dvh;
    min-height: 380px;
    display: flex;
    place-items: unset;
    background: linear-gradient(to bottom, rgba(10, 18, 21, 0.84), rgba(10, 18, 21, 0.97)), radial-gradient(circle at 32% 42%, rgba(224, 194, 151, 0.12), transparent 44%), radial-gradient(circle at 68% 68%, rgba(224, 194, 151, 0.09), transparent 46%), radial-gradient(circle at 50% 18%, rgba(224, 194, 151, 0.045), transparent 50%), var(--bg);
}

.contact-hero.animated-hero::before,
.about-hero.animated-hero::before,
.blog-hero.animated-hero::before,
.category-hero.animated-hero::before {
    background: linear-gradient(90deg, rgba(224, 194, 151, 0.035) 1px, transparent 1px), linear-gradient(180deg, rgba(224, 194, 151, 0.025) 1px, transparent 1px);
    background-size: 78px 78px;
}

@media (max-width: 1100px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .blog-sidebar,
    .blog-posts-area {
        grid-column: auto;
        grid-row: auto;
    }

    .blog-sidebar {
        order: -1;
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding: 70px 0 90px;
    }

    .blog-container {
        padding: 0 18px;
    }

    .blog-sidebar {
        padding: 22px;
    }

    .posts-wrapper {
        grid-template-columns: 1fr;
    }

    .post-card:hover {
        transform: translateY(-4px);
    }

    .post-card:hover img {
        transform: scale(1.015);
    }

    .post-content p {
        min-height: auto;
    }

    .animated-hero,
    .contact-hero.animated-hero,
    .about-hero.animated-hero,
    .blog-hero.animated-hero,
    .category-hero.animated-hero {
        height: 46dvh;
        min-height: 320px;
    }

    .animated-hero__title {
        font-size: 40px;
    }

    .animated-hero__desc {
        font-size: 13px;
    }

    .hero-card {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        font-size: 20px;
    }

    .hero-card::before {
        inset: 9px;
        border-radius: 13px;
    }

    .animated-hero--about .hero-card,
    .animated-hero--about .hero-card::before {
        border-radius: 50%;
    }

    .hero-line {
        width: 180px;
    }

    .hero-card--1 {
        right: 3%;
        left: auto;
    }

    .hero-card--2 {
        right: 8%;
        left: auto;
    }

    .hero-card--3 {
        left: 4%;
        right: auto;
    }

    .hero-card--4 {
        left: 8%;
        right: auto;
    }

    .hero-card--5 {
        right: 58%;
        left: auto;
    }
}