/* ==========================================================================
   WPS247 Author Box — Frontend Styles
   ========================================================================== */

/* ── Base Box ──────────────────────────────────────────────────────────── */
.wps247-author-box {
    background-color: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    font-size: 15px;
    line-height: 1.6;
    /* box-shadow: 0 2px 8px rgba(0,0,0,.06); */
    transition: box-shadow .25s;
}

/* .wps247-author-box:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
} */

/* ── Inner Layout ──────────────────────────────────────────────────────── */
.wps247-author-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* ── Avatar Positions ──────────────────────────────────────────────────── */

/* Trái */
.wps247-avatar-left .wps247-author-inner {
    flex-direction: row;
    align-items: flex-start;
}

/* Phải */
.wps247-avatar-right .wps247-author-inner {
    flex-direction: row-reverse;
    align-items: flex-start;
}

/* Trên: avatar nằm trong .wps247-avatar-wrap riêng biệt (block), content là block riêng */
.wps247-avatar-top .wps247-avatar-wrap {
    display: block;
    width: 100%;
    /* margin-bottom: 12px; */
}

/* Vị trí avatar trong layout top — dùng class wps247-avatar-pos-* độc lập,
   KHÔNG liên quan đến căn lề nội dung (alignment) */
.wps247-avatar-top.wps247-avatar-pos-left .wps247-avatar-wrap {
    text-align: left;
}

.wps247-avatar-top.wps247-avatar-pos-center .wps247-avatar-wrap {
    text-align: center;
}

.wps247-avatar-top.wps247-avatar-pos-right .wps247-avatar-wrap {
    text-align: right;
}

/* Fallback: nếu không có class pos, mặc định căn giữa */
.wps247-avatar-top:not(.wps247-avatar-pos-left):not(.wps247-avatar-pos-right) .wps247-avatar-wrap {
    text-align: center;
}

/* Avatar inline-block để text-align của wrap có tác dụng */
.wps247-avatar-top .wps247-avatar-wrap .wps247-avatar {
    display: inline-block;
}

.wps247-avatar-top .wps247-avatar-wrap .wps247-avatar-img {
    display: inline-block;
}

/* ── Avatar ────────────────────────────────────────────────────────────── */
.wps247-avatar {
    flex-shrink: 0;
}

/* ── Alignment ──────────────────────────────────────────────────────────── */
.wps247-align-left .wps247-author-content {
    text-align: left;
}

.wps247-align-center .wps247-author-content {
    text-align: center;
}

.wps247-align-right .wps247-author-content {
    text-align: right;
}

.wps247-align-left .wps247-social-links {
    justify-content: flex-start;
}

.wps247-align-center .wps247-social-links {
    justify-content: center;
}

.wps247-align-right .wps247-social-links {
    justify-content: flex-end;
}

/* Top layout: content full width tự nhiên vì là block element */

.wps247-avatar-img {
    width: 88px !important;
    height: 88px !important;
    border-radius: 50%;
    /* default circle; overridden by inline CSS via avatar_shape */
    display: block;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: transform .2s, border-radius .2s;
    object-fit: cover;
}

/* Avatar shapes */
.wps247-avatar-shape-circle .wps247-avatar-img {
    border-radius: 50% !important;
}

.wps247-avatar-shape-square .wps247-avatar-img {
    border-radius: 6px !important;
}

.wps247-avatar a:hover .wps247-avatar-img {
    transform: scale(1.04);
}

/* ── Author Content ────────────────────────────────────────────────────── */
.wps247-author-content {
    flex: 1;
    min-width: 0;
}



/* ── Name ──────────────────────────────────────────────────────────────── */
.wps247-author-name {
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    border: none !important;
}

.wps247-author-name a {
    color: inherit !important;
    text-decoration: none !important;
}

.wps247-author-name a:hover {
    opacity: .85;
}

/* ── Bio ───────────────────────────────────────────────────────────────── */
.wps247-author-bio {
    margin: 0 0 14px !important;
    opacity: .82;
    line-height: 1.65;
}

.wps247-author-bio p:last-child {
    margin-bottom: 0;
}

/* ── Social Links ──────────────────────────────────────────────────────── */
.wps247-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.wps247-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .06);
    color: currentColor;
    text-decoration: none;
    transition: all .2s;
}

.wps247-social-link:hover {
    background: rgba(0, 0, 0, .14);
    transform: translateY(-2px);
}

.wps247-social-link svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* Branded social colours on hover */
.wps247-social-twitter:hover {
    background: #000;
    color: #fff;
}

.wps247-social-facebook:hover {
    background: #1877f2;
    color: #fff;
}

.wps247-social-instagram:hover {
    background: #e1306c;
    color: #fff;
}

.wps247-social-linkedin:hover {
    background: #0077b5;
    color: #fff;
}

.wps247-social-website:hover {
    background: #2563eb;
    color: #fff;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .wps247-author-box {
        padding: 18px;
        margin: 24px 0;
    }

    .wps247-avatar-left .wps247-author-inner,
    .wps247-avatar-right .wps247-author-inner {
        flex-direction: column;
    }

    .wps247-avatar-img {
        width: 70px !important;
        height: 70px !important;
    }
}

/* wps247-author-info */
.wps247-author-info-wrapper{
    display:flex;
    align-items:flex-start;
    gap:48px;
    margin:40px 0;
}

.wps247-author-info-content{
    width: 60%;
}

.wps247-author-info-image{
    width: 40%;
}

.wps247-author-info-image img{
    width:100%;
    height:auto;
    display:block;
    border-radius:12px;
    object-fit:cover;
}

.wps247-author-info-position{
    color:#f59e0b;
    font-size:18px;
    font-weight:600;
    line-height:1.4;
    margin-bottom:10px;
}

.wps247-author-info-name{
    margin:0 0 24px;
    font-size:42px;
    font-weight:700;
    line-height:1.2;
}

.wps247-author-info-description{
    font-size:18px;
    line-height:1.8;
    color:#333;
}

.wps247-author-info-description p{
    margin:0 0 20px;
}

.wps247-author-info-socials{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:32px;
}

.wps247-author-info-socials a{
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
}

.wps247-author-info-socials .wps247-social-links{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

@media (max-width: 768px){

    .wps247-author-info-wrapper{
        flex-direction:column-reverse;
        gap:24px;
    }

    .wps247-author-info-content,
    .wps247-author-info-image{
        width:100%;
        flex:0 0 100%;
    }

    .wps247-author-info-name{
        font-size:32px;
    }

    .wps247-author-info-description{
        font-size:16px;
    }
}