/* =========================================
   AUTHOR PAGE — Layout & Responsive Styles
   Uses var(--primary-color) from Flatsome
   ========================================= */


/* --------------- HEADER --------------- */

.author-header {
    padding: 30px 0;
}

.author-header__card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 30px;
    position: relative;
}

.author-header__top {
    display: flex;
    align-items: center;
    gap: 24px;
}

.author-header__avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.author-header__name {
    margin: 0 0 6px;
    font-size: 1.6rem;
    line-height: 1.2;
}

.author-header__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.author-header__role {
    font-size: 0.95rem;
}

.author-header__degree-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    line-height: 1.4;
}

.author-header__expertise-bar {
    margin-top: 16px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 4px 4px 0;
    font-size: 0.88rem;
    line-height: 1.5;
}

.author-header__count {
    display: inline-block;
    margin-top: 14px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
}


/* --------------- CONTENT AREA --------------- */

.author-content {
    padding-top: 10px;
    padding-bottom: 40px;
}


/* --------------- SECTION TITLES --------------- */

.author-section-title {
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.author-section-title--accent {
    border-bottom: 3px solid var(--primary-color);
}


/* --------------- ABOUT --------------- */

.author-about {
    margin-bottom: 30px;
}

.author-about__bio {
    font-size: 0.93rem;
    line-height: 1.7;
}


/* --------------- EXPERTISE TAGS --------------- */

.author-expertise {
    margin-bottom: 36px;
}

.author-expertise__heading {
    font-size: 1rem;
    margin-bottom: 12px;
}

.author-expertise__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.author-expertise__tag {
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.82rem;
    line-height: 1.3;
    white-space: nowrap;
}


/* --------------- ARTICLE CARDS --------------- */

.author-article-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 3px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.author-article-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-article-card__thumb {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.author-article-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-article-card__content {
    flex: 1;
    min-width: 0;
}

.author-article-card__title {
    font-size: 1rem;
    margin: 0 0 6px;
    line-height: 1.3;
}

.author-article-card__title a {
    text-decoration: none;
}

.author-article-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.author-article-card__cat {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    font-size: 0.75rem;
    text-decoration: none;
    line-height: 1.4;
}

.author-article-card__excerpt {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.8;
}


/* --------------- PAGINATION --------------- */

.author-pagination {
    margin-top: 30px;
    text-align: center;
}

.author-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.author-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.author-pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.author-pagination .page-numbers.dots {
    border: none;
    width: auto;
}

.author-pagination .page-numbers.prev,
.author-pagination .page-numbers.next {
    width: auto;
    padding: 0 12px;
}


/* --------------- SIDEBAR WIDGETS --------------- */

.author-sidebar .author-widget {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.author-widget__title {
    font-size: 1rem;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}


/* --- Social Icons --- */

.author-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.author-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.author-social__link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}


/* --- Website Link --- */

.author-widget__website {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}


/* --- Contact Form --- */

.author-contact-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
    margin-top: 12px;
}

.author-contact-form label:first-of-type {
    margin-top: 0;
}

.author-contact-form input[type="text"],
.author-contact-form input[type="email"],
.author-contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.author-contact-form input:focus,
.author-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.author-contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.author-contact-form__submit {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}


/* ===========================================
   RESPONSIVE
   =========================================== */


/* Tablet (≤ 849px) */

@media (max-width: 849px) {
    .author-header__card {
        padding: 24px;
    }
    .author-header__top {
        gap: 16px;
    }
    .author-header__avatar img {
        width: 90px;
        height: 90px;
    }
    .author-header__name {
        font-size: 1.3rem;
    }
    .author-main,
    .author-sidebar {
        width: 100% !important;
        flex-basis: 100% !important;
        max-width: 100% !important;
    }
    .author-sidebar {
        margin-top: 30px;
    }
    /* Sidebar widgets in 2-column layout on tablet */
    .author-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .author-sidebar .author-widget {
        margin-bottom: 0;
    }
    /* Contact form spans full width */
    .author-sidebar .author-widget:last-child {
        grid-column: 1 / -1;
    }
}


/* Mobile (≤ 549px) */

@media (max-width: 549px) {
    .author-header__card {
        padding: 20px 16px;
    }
    .author-header__top {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .author-header__meta {
        justify-content: center;
    }
    .author-header__expertise-bar {
        font-size: 0.82rem;
        text-align: center;
        border-left: none;
        border-top: 2px solid var(--primary-color);
        border-radius: 0;
        padding: 10px 12px;
    }
    .author-header__count {
        display: block;
        text-align: center;
        margin-top: 12px;
    }
    .author-header__name {
        font-size: 1.2rem;
    }
    .author-header__avatar img {
        width: 80px;
        height: 80px;
    }
    .author-section-title {
        font-size: 1.1rem;
    }
    .author-expertise__tags {
        justify-content: center;
    }
    .author-article-card {
        flex-direction: column;
        gap: 10px;
        padding: 16px;
    }
    .author-article-card__thumb {
        width: 100%;
        height: 160px;
    }
    .author-sidebar {
        display: block;
    }
    .author-sidebar .author-widget {
        margin-bottom: 16px;
    }
    .author-pagination .page-numbers {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}