/* ===== Yalla Blog theme — blog.aspx / blogdetails.aspx / index.aspx blog section ===== */

.yalla-blog {
    --yblog-red: var(--yidx-red, #e51e2a);
    --yblog-ink: #161616;
    --yblog-muted: #808080;
    max-width: 1320px;
    margin: 0 auto;
    padding: 18px 18px 55px;
}

.yalla-blog * {
    box-sizing: border-box;
}

/* Page header */
.yalla-blog-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
    text-align: center;
}

.yalla-blog-header h1 {
    font-size: 28px;
    font-weight: 900;
    color: var(--yblog-ink);
    margin: 0;
}

.yalla-blog-header .yalla-blog-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: var(--yblog-muted);
}

.yalla-blog-header .yalla-blog-breadcrumb a {
    color: var(--yblog-muted);
    text-decoration: none;
}

.yalla-blog-header .yalla-blog-breadcrumb a:hover {
    color: var(--yblog-red);
}

.yalla-blog-header .yalla-blog-breadcrumb i {
    font-size: 10px;
}

/* Layout: grid + sidebar */
.yalla-blog-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 26px;
    align-items: start;
}

@media (max-width: 991px) {
    .yalla-blog-layout {
        grid-template-columns: 1fr;
    }
}

/* Main column (card grid + pagination), sits beside the sidebar in .yalla-blog-layout */
.yalla-blog-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Blog card grid (listing page) */
.yalla-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .yalla-blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .yalla-blog-grid { grid-template-columns: 1fr; }
}

/* Blog card component */
.yalla-blog-card {
    direction: rtl;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px #1c232b14;
    height: 100%;
    transition: .25s;
}

.yalla-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px #1c232b24;
}

.ybc-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
    position: relative;
}

.ybc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s;
}

.yalla-blog-card:hover .ybc-image img {
    transform: scale(1.05);
}

.ybc-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.ybc-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--yblog-muted, #808080);
    font-size: 11.5px;
    margin-bottom: 8px;
}

.ybc-date i {
    color: var(--yblog-red);
}

.ybc-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 16px;
    font-weight: 800;
    color: var(--yblog-ink);
    line-height: 1.4;
    margin-bottom: 8px;
    text-decoration: none;
}

.ybc-title:hover {
    color: var(--yblog-red);
}

.ybc-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.7;
    color: var(--yblog-muted, #808080);
    margin-bottom: 14px;
}

.ybc-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: var(--yblog-red);
    color: #fff !important;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    transition: .2s;
}

.ybc-more:hover {
    background: #c01822;
    color: #fff;
}

.ybc-more i {
    font-size: 10px;
}

/* Sidebar: latest posts list */
.yalla-blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ybs-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 16px;
}

.ybs-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.ybs-card__header h4 {
    font-size: 15px;
    font-weight: 900;
    color: var(--yblog-ink);
    margin: 0;
    position: relative;
    padding-right: 12px;
}

.ybs-card__header h4:before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 7px;
    height: 2px;
    background: var(--yblog-red);
}

.ybs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ybs-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f2f2;
}

.ybs-list .ybs-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ybs-item__img {
    flex-shrink: 0;
    width: 70px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
}

.ybs-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ybs-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ybs-item__title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--yblog-ink);
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
}

.ybs-item__title:hover {
    color: var(--yblog-red);
}

.ybs-item__date {
    font-size: 10.5px;
    color: var(--yblog-muted, #808080);
}

/* Search widget (simplified) */
.ybs-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f7f7;
    border-radius: 30px;
    padding: 4px 6px 4px 4px;
}

.ybs-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
}

.ybs-search button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: var(--yblog-red);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

/* Empty state */
.yalla-blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--yblog-muted, #808080);
    font-size: 14px;
}

/* ===== blogdetails.aspx — article page ===== */
.yalla-blog-article {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 18px 55px;
}

.yba-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: 360px;
    margin-bottom: 26px;
    background: #111;
}

.yba-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .55;
}

.yba-hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    background: linear-gradient(0deg, rgba(0,0,0,.85), transparent 65%);
}

.yba-hero__overlay h1 {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 12px;
    line-height: 1.5;
}

.yba-hero__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.yba-hero__meta li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #eee;
    font-size: 12.5px;
}

.yba-hero__meta i {
    color: var(--yblog-red, #e51e2a);
}

@media (max-width: 650px) {
    .yba-hero { height: 240px; }
    .yba-hero__overlay h1 { font-size: 19px; }
}

.yba-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 26px;
    align-items: start;
}

@media (max-width: 991px) {
    .yba-layout { grid-template-columns: 1fr; }
}

.yba-body {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 24px;
}

.yba-content {
    font-size: 15px;
    line-height: 2;
    color: #333;
}

.yba-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 14px 0;
}

.yba-share {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f2f2f2;
}

.yba-share h5 {
    font-size: 13px;
    font-weight: 800;
    color: var(--yblog-ink);
    margin: 0 0 10px;
}

.yba-about {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 16px;
}

.yba-about p {
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--yblog-muted, #808080);
    margin: 0 0 12px;
}

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

.yba-about__social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f7f7f7;
    color: #444;
    display: grid;
    place-items: center;
    font-size: 13px;
    transition: .2s;
}

/* ===== Skeleton loaders (shimmer base .yidx-skel comes from yidx-home.css) ===== */
.ybc-skel {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ececec;
}

.ybc-skel .ybc-skel__thumb {
    aspect-ratio: 16 / 9;
    border-radius: 0;
}

.ybc-skel .ybc-skel__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ybs-item--skel .ybs-item__img {
    background: transparent;
}

.ybs-item--skel .ybs-item__img .yidx-skel {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.ybs-item--skel .ybs-item__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.yba-hero--skel {
    background: transparent;
}

.yba-hero--skel .yidx-skel {
    width: 100%;
    height: 100%;
    border-radius: 18px;
}

.yba-content--skel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== Pagination (blog listing) ===== */
.yalla-blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.yalla-blog-pagination:empty {
    display: none;
}

.yalla-blog-pagination button {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ececec;
    background: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--yblog-ink, #1c1c1c);
    cursor: pointer;
    transition: .2s;
}

.yalla-blog-pagination button:hover:not(:disabled) {
    border-color: var(--yblog-red, #e51e2a);
    color: var(--yblog-red, #e51e2a);
}

.yalla-blog-pagination button.active {
    background: var(--yblog-red, #e51e2a);
    border-color: var(--yblog-red, #e51e2a);
    color: #fff;
}

.yalla-blog-pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.yba-about__social a:hover {
    background: var(--yblog-red);
    color: #fff;
}

/* ===== yidx-home blog section reuse ===== */
.yidx-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .yidx-blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .yidx-blog-grid { grid-template-columns: 1fr; }
}
