/**
 * Al-Tareekhiyah — Blog (index + single article)
 * Scoped with .alt-blog / .alt-article
 */

/* =========================================================
 * Blog index
 * ======================================================= */
.alt-blog {
    background: #faf7f2;
    padding-bottom: 70px;
}

.alt-blog-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.alt-blog-hero {
    background:
        radial-gradient(110% 150% at 100% 0%, rgba(169, 130, 43, .16) 0%, rgba(169, 130, 43, 0) 60%),
        #411017;
    color: #f8f5ef;
    padding: 54px 0 46px;
    text-align: center;
    margin-bottom: 34px;
    position: relative;
    overflow: hidden;
}

.alt-blog-hero::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, .7), transparent);
}

.alt-blog-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #c9a961;
    margin-bottom: 10px;
}

.alt-blog-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 900;
    line-height: 1.25;
}

.alt-blog-hero p {
    margin: 12px auto 0;
    max-width: 56ch;
    font-size: 14px;
    line-height: 1.9;
    color: #e8dfd2;
}

.alt-blog-rule {
    display: block;
    width: 64px;
    height: 2px;
    margin: 20px auto 0;
    background: linear-gradient(90deg, transparent, #c9a961, transparent);
}

/* Cards */
.alt-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.alt-blog-card {
    background: #fff;
    border: 1px solid #ece4d7;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.alt-blog-card:hover {
    transform: translateY(-4px);
    border-color: #cdba9e;
    box-shadow: 0 26px 50px -34px rgba(65, 16, 23, .55);
}

.alt-blog-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    background: #fcfaf6;
    overflow: hidden;
}

.alt-blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}

.alt-blog-card:hover .alt-blog-thumb img {
    transform: scale(1.04);
}

/* Decorative cover for posts without a featured image */
.alt-blog-thumb.is-empty {
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(201, 169, 97, .35) 0%, rgba(201, 169, 97, 0) 55%),
        linear-gradient(135deg, #411017 0%, #5c1a24 60%, #2b0f13 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.alt-blog-mark {
    width: 62px;
    height: 62px;
    border-radius: 999px;
    border: 1px solid rgba(201, 169, 97, .55);
    color: #c9a961;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, .05);
}

.alt-blog-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
}

.alt-blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #a1968a;
}

.alt-blog-cat {
    color: #a9822b;
}

.alt-blog-dot {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #cbbfa9;
}

.alt-blog-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.6;
}

.alt-blog-title a {
    color: #2b0f13;
    text-decoration: none;
}

.alt-blog-title a:hover {
    color: #a9822b;
}

.alt-blog-excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
    color: #7a6f63;
    flex: 1 1 auto;
}

.alt-blog-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 800;
    color: #411017;
    text-decoration: none;
    border-bottom: 1px solid rgba(65, 16, 23, .2);
    padding-bottom: 2px;
    transition: all .2s ease;
}

.alt-blog-more:hover {
    color: #a9822b;
    border-color: #a9822b;
    gap: 10px;
}

.alt-blog-pagination {
    margin-top: 34px;
}

.alt-blog-empty {
    background: #fff;
    border: 1px dashed #ddd3c3;
    border-radius: 18px;
    padding: 60px 24px;
    text-align: center;
}

.alt-blog-empty i {
    font-size: 34px;
    color: #d8cbb4;
}

.alt-blog-empty h2 {
    margin: 14px 0 6px;
    font-size: 19px;
    font-weight: 800;
}

.alt-blog-empty p {
    margin: 0 0 18px;
    font-size: 13.5px;
    color: #7a6f63;
}

.alt-blog-btn {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 22px;
    border-radius: 11px;
    background: #411017;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

/* =========================================================
 * Single article
 * ======================================================= */
.alt-article {
    background: #faf7f2;
    padding: 26px 0 70px;
}

.alt-article-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.alt-article-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #7a6f63;
    margin-bottom: 22px;
}

.alt-article-crumbs a {
    color: #7a6f63;
    text-decoration: none;
}

.alt-article-crumbs a:hover {
    color: #a9822b;
}

.alt-article-crumbs span {
    color: #cbbfa9;
}

.alt-article-head {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 26px;
}

.alt-article-kicker {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .1em;
    color: #a9822b;
    margin-bottom: 12px;
}

.alt-article-head h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 900;
    line-height: 1.4;
    color: #2b0f13;
}

.alt-article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #7a6f63;
}

.alt-article-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.alt-article-author i {
    color: #a9822b;
    font-size: 13px;
}

.alt-article-sep {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #cbbfa9;
}

.alt-article-cover {
    margin: 0 0 30px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #ece4d7;
    background: #fff;
}

.alt-article-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.alt-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 34px;
    align-items: start;
}

.alt-article-body {
    background: #fff;
    border: 1px solid #ece4d7;
    border-radius: 20px;
    padding: 34px 38px 40px;
    font-size: 15px;
    line-height: 2.1;
    color: #3f352d;
}

.alt-article-body > *:first-child {
    margin-top: 0;
}

.alt-article-body h2 {
    margin: 34px 0 14px;
    font-size: 21px;
    font-weight: 900;
    color: #2b0f13;
    line-height: 1.5;
    padding-inline-start: 14px;
    border-inline-start: 3px solid #c9a961;
}

.alt-article-body h3 {
    margin: 26px 0 10px;
    font-size: 17px;
    font-weight: 800;
    color: #411017;
}

.alt-article-body p {
    margin: 0 0 16px;
}

.alt-article-body strong {
    color: #2b0f13;
    font-weight: 800;
}

.alt-article-body a {
    color: #a9822b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.alt-article-body ul,
.alt-article-body ol {
    margin: 0 0 18px;
    padding-inline-start: 22px;
}

.alt-article-body li {
    margin-bottom: 8px;
}

.alt-article-body blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    background: #faf6ee;
    border-inline-start: 3px solid #a9822b;
    border-radius: 10px;
    font-size: 14.5px;
    color: #5d5348;
}

/* Side rail */
.alt-article-side {
    position: sticky;
    top: calc(var(--alt-shop-top, 96px) + 10px);
    display: grid;
    gap: 14px;
}

.alt-article-share {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ece4d7;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #7a6f63;
}

.alt-article-share span {
    margin-inline-end: auto;
}

.alt-article-share a,
.alt-article-share button {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #ece4d7;
    background: #fdfbf7;
    color: #411017;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.alt-article-share a:hover,
.alt-article-share button:hover {
    background: #411017;
    color: #fff;
    border-color: #411017;
}

.alt-article-side-cta {
    background: linear-gradient(150deg, #411017, #5c1a24);
    color: #f8f5ef;
    border-radius: 14px;
    padding: 18px;
}

.alt-article-side-kicker {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    color: #c9a961;
}

.alt-article-side-cta p {
    margin: 8px 0 14px;
    font-size: 12.5px;
    line-height: 1.8;
    color: #e8dfd2;
}

.alt-article-side-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border-radius: 10px;
    background: #c9a961;
    color: #2b0f13;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
}

.alt-article-side-cta a:hover {
    background: #f0d9a8;
}

/* Related */
.alt-article-related {
    margin-top: 40px;
}

.alt-article-related h2 {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 16px;
}

.alt-article-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.alt-related-card {
    background: #fff;
    border: 1px solid #ece4d7;
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    display: grid;
    gap: 6px;
    transition: all .2s ease;
}

.alt-related-card:hover {
    border-color: #cdba9e;
    transform: translateY(-2px);
}

.alt-related-date {
    font-size: 11px;
    font-weight: 700;
    color: #a9822b;
}

.alt-related-card strong {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.7;
    color: #2b0f13;
}

/* =========================================================
 * Responsive
 * ======================================================= */
@media (max-width: 1024px) {
    .alt-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alt-article-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .alt-article-side {
        position: static;
        order: 2;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .alt-blog-container,
    .alt-article-container {
        padding: 0 16px;
    }

    .alt-blog-hero {
        padding: 40px 0 34px;
    }

    .alt-blog-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .alt-article-body {
        padding: 22px 18px 26px;
        border-radius: 16px;
        font-size: 14.5px;
        line-height: 2;
    }

    .alt-article-body h2 {
        font-size: 18px;
        margin-top: 26px;
    }

    .alt-article-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .alt-article-related-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Article tables */
.alt-article-body table,
.alt-article-body .alt-art-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0 26px;
    font-size: 13.5px;
    line-height: 1.8;
    border: 1px solid #ece4d7;
    border-radius: 12px;
    overflow: hidden;
}

.alt-article-body table th {
    background: #411017;
    color: #f8f5ef;
    font-weight: 800;
    font-size: 12.5px;
    text-align: start;
    padding: 12px 14px;
}

.alt-article-body table td {
    padding: 11px 14px;
    border-top: 1px solid #f1ebe1;
    vertical-align: top;
    color: #4b4038;
}

.alt-article-body table tbody tr:nth-child(even) {
    background: #fdfbf7;
}

@media (max-width: 640px) {
    .alt-article-body table {
        font-size: 12px;
    }
    .alt-article-body table th,
    .alt-article-body table td {
        padding: 9px 10px;
    }
}
