/* ==========================================================================
   Writer page
   يعتمد على المتغيرات الموجودة بـ css/base/_variables.css
   ========================================================================== */



/* ---------- Hero ---------- */
.writer-hero {
    position: relative;
    margin-block: 24px;
    overflow: hidden;

    background-image: url(../../images/background/hero-baner-bg.png);
    background-size: cover;
    background-position: center;
    padding: 24px;
    border-radius: 24px 24px 24px 0;
    height: 168px;
}

.writer-hero:after{
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;

    background: linear-gradient(90deg, rgba(255, 255, 255, 0.00) 0%, rgba(196, 207, 198, 0.00) 20.71%, var(--Mapping-Surfaces-Specialty-Surfaces-surface-dark-section, #19421F) 80.97%);

}
.writer-content {
    width: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #fff;
    position: relative;
}
/* بالـ RTL أول عنصر يمين: الصورة ثم المعلومات */
.writer-hero__avatar {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(90deg, var(--Brand-Lemon-Lime-400, #CEDE47) 0%, var(--Brand-Clover-Green-400, #54A65F) 100%);


}

.writer-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.writer-hero__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.writer-hero__name {
    margin: 0;
    font-size: 24px;
    line-height: 40px;
    font-weight: 700;
    color: #fff;
}

.writer-hero__meta {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.writer-hero__count,
.writer-hero__social {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 12px;
    list-style: none;
    border-radius: 12px 12px 12px 0;
    border: 1px solid var(--Mapping-Borders-Structural-Borders-border-on-dark-10, rgba(255, 255, 255, 0.10));
    background: var(--Mapping-Surfaces-Specialty-Surfaces-surface-dark-footer-outer, #0E2212);
}

.writer-hero__count strong {
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    color: #fff;
}

.writer-hero__count span {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--Brand-Lemon-Lime-400, #CEDE47);
}

.writer-hero__social {
    gap: 12px;
    padding: 8px 16px;
}

.writer-hero__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    transition: background-color .2s;
}

.writer-hero__social a:hover {
    background: var(--Brand-Lemon-Lime-400, #CEDE47);
}

/* الأيقونات SVG بيضاء، فنستخدمها كـ mask لنتحكم بلونها */
.writer-hero__icon {
    display: block;
    width: 19.2px;
    height: 19.2px;
    background-color: #0E2212;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

body.writer-template-default .section-header-component {
    margin-bottom: 24px !important;
}
/* ---------- Layout ---------- */
/* The grid (top / main + sidebar / bottom) is in css/components/page-zones.css, like the player page. */

/* Space between the sections of a zone (the blocks the client puts in the editor). */
.writer-content > * + * {
    margin-top: 24px;
}

.writer-hero__info{
    margin-top: 0 !important;
}
.writer-articles-section{
        width: 100%;
}
/* ---------- Articles ---------- */
.writer-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.writer-articles__empty {
    margin: 0;
    padding: 24px;
    text-align: center;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #E0E3E1;
   
}

.writer-article {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #E0E7DB;
    background: #fff;
}

.writer-article__media {
    flex: 0 0 auto;
    width: 213px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #CFD6CB;
}
.writer-article__media .writer-article__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 120px; 
    border-radius: 8px;
    background: var(--Mapping-Surfaces-Specialty-Surfaces-surface-highlight, #CFD5CB);
}
.writer-article__media img,
.writer-article__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.writer-article__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.writer-article__cat {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
    text-decoration: none;
    color: #336844;
    border-radius: 4px;
    background: #D2E7D5;
}

.writer-article__title {
    margin: 0;
}

.writer-article__title a {
    color: var(--Mapping-Text-Heading-text-heading-secondary, #19421F);
    text-decoration: none;
    font-size: 14px;
    line-height: 22px;
    font-weight: 700;
}

.writer-article__title a:hover {
    text-decoration: underline;
}

.writer-article__excerpt {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    color: #4F5A4C;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.writer-article__date {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--Mapping-Text-Body-Text-text-body-muted, #6B7A6F);
}

/* ---------- زر "للمزيد" ---------- */
.writer-more {
    margin-top: 24px;
}

.writer-more__link {
    display: inline-block;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #126436;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.writer-more__link.is-loading {
    opacity: .5;
    pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .writer-hero{
        height: 144px;
    }
        .writer-hero__avatar {
        width: 80px;
        height: 80px;
    }

    .writer-hero__name {
        font-size: 20px;
        line-height: 32px;
        font-weight: 600 !important;
    }
    .writer-hero {
    position: relative;
    background-image: url(../../images/background/HeroHeader-mob.png) !important;
}
.writer-hero__count strong{
    font-size: 17px !important;
    font-weight: 600;
    line-height: 22px !important;
}
.writer-hero__info {
    gap:16px !important
}
.writer-article__media{
    width: 180px;
    height: 110px;
}
.writer-articles{
    gap: 16px !important;
}
.writer-article__excerpt{
    display: none !important;
}
.writer-article__title a{
   display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important; 
}
}
