/* =====================================================
   PNTV AFRICA – AUTHORS
   Authors Index + Author Profile
   Brand: Navy #05305A | Dark Navy #021F3A
   Accent: Gold #FFCA26 | Orange #FF8C1A
   Font: Montserrat, Arial, sans-serif
   ===================================================== */


/* =====================================================
   AUTHORS INDEX PAGE
   ===================================================== */

.authors-page {
    padding: 1.25rem 0 3rem;
    font-family: 'Montserrat', Arial, sans-serif;
}

.authors-page .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}


/* -----------------------------------------------------
   PAGE HEADER
   ----------------------------------------------------- */

.authors-page .page-header {
    margin: 1.25rem 0 1.5rem;
}

.authors-page .page-title {
    position: relative;
    margin: 0 0 0.45rem;
    padding-left: 0.8rem;
    color: var(--navy, #05305A);
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.authors-page .page-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 4px;
    height: calc(100% - 0.2rem);
    border-radius: 4px;
    background: var(--orange, #FF8C1A);
}

.authors-page .page-description {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}


/* =====================================================
   AUTHORS GRID
   ===================================================== */

.authors-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
}


/* =====================================================
   AUTHOR CARD
   ===================================================== */

.authors-grid .author-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E5E9EE;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(2, 31, 58, 0.07);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.authors-grid .author-card:hover {
    transform: translateY(-3px);
    border-color: rgba(5, 48, 90, 0.2);
    box-shadow: 0 8px 22px rgba(2, 31, 58, 0.12);
}


/* -----------------------------------------------------
   AUTHOR IMAGE
   ----------------------------------------------------- */

.authors-grid .author-card-image,
.authors-grid .author-card-image-link {
    display: block;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #F3F5F7;
}

.authors-grid .author-image,
.authors-grid .author-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.authors-grid .author-card:hover .author-image,
.authors-grid .author-card:hover .author-card-image img {
    transform: scale(1.025);
}


/* -----------------------------------------------------
   AUTHOR CARD CONTENT
   ----------------------------------------------------- */

.authors-grid .author-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem;
}

.authors-grid .author-card-name {
    margin: 0 0 0.3rem;
    color: var(--navy, #05305A);
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 800;
}

.authors-grid .author-card-name a {
    color: inherit;
    text-decoration: none;
}

.authors-grid .author-card-name a:hover {
    color: var(--orange, #FF8C1A);
}

.authors-grid .author-card-role {
    margin: 0 0 0.6rem;
    color: var(--orange, #FF8C1A);
    font-size: 0.72rem;
    line-height: 1.4;
    font-weight: 700;
}

.authors-grid .author-card-bio {
    margin: 0;
    color: #666;
    font-size: 0.78rem;
    line-height: 1.55;
}

.authors-grid .author-card-meta {
    margin-top: auto;
    padding-top: 0.8rem;
    color: #777;
    font-size: 0.72rem;
    line-height: 1.4;
}

.authors-grid .author-card-social {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.authors-grid .author-card-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #F3F5F7;
    color: var(--navy, #05305A);
    text-decoration: none;
    font-size: 0.8rem;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.authors-grid .author-card-social a:hover {
    background: var(--navy, #05305A);
    color: #FFFFFF;
}


/* =====================================================
   AUTHOR PROFILE PAGE
   ===================================================== */

.author-profile-page {
    padding: 1.25rem 0 3rem;
    font-family: 'Montserrat', Arial, sans-serif;
}

.author-profile-page .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}


/* =====================================================
   AUTHOR PROFILE HEADER
   ===================================================== */

.author-profile {
    width: 100%;
}

.author-profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1.25rem 0 2rem;
    padding: 1.35rem;
    background: #FFFFFF;
    border: 1px solid #E5E9EE;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(2, 31, 58, 0.06);
}

.author-profile-image {
    display: block;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #F1F4F7;
    background: #F3F5F7;
}

.author-profile-info {
    min-width: 0;
    flex: 1;
}

.author-profile-name {
    margin: 0 0 0.35rem;
    color: var(--navy, #05305A);
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.author-profile-role {
    margin: 0 0 0.7rem;
    color: var(--orange, #FF8C1A);
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 700;
}

.author-profile-bio {
    margin: 0;
    max-width: 850px;
    color: #666;
    font-size: 0.82rem;
    line-height: 1.65;
}

.author-profile-bio p {
    margin: 0 0 0.45rem;
}

.author-profile-bio p:last-child {
    margin-bottom: 0;
}


/* -----------------------------------------------------
   PROFILE STATS
   ----------------------------------------------------- */

.author-profile-stats {
    display: flex;
    align-items: center;
    margin-top: 0.8rem;
}

.author-profile-stats .stat-item {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 5px;
    background: #F2F5F8;
    color: var(--navy, #05305A);
    font-size: 0.7rem;
    font-weight: 700;
}


/* -----------------------------------------------------
   PROFILE SOCIAL
   ----------------------------------------------------- */

.author-profile-social {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.author-profile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--navy, #05305A);
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.78rem;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.author-profile-social a:hover {
    background: var(--orange, #FF8C1A);
    transform: translateY(-2px);
}


/* =====================================================
   AUTHOR ARTICLES
   ===================================================== */

.author-articles {
    width: 100%;
}

.author-articles .section-title {
    position: relative;
    margin: 0 0 1.1rem;
    padding-left: 0.8rem;
    color: var(--navy, #05305A);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.3;
    font-weight: 800;
}

.author-articles .section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 4px;
    height: calc(100% - 0.2rem);
    border-radius: 4px;
    background: var(--orange, #FF8C1A);
}


/* =====================================================
   AUTHOR ARTICLE GRID
   ===================================================== */

.author-articles .articles-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
}


/* =====================================================
   ARTICLE CARD
   ===================================================== */

.author-articles .article-list-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--navy, #05305A);
    border: 1px solid rgba(5, 48, 90, 0.12);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(2, 31, 58, 0.1);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.author-articles .article-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(2, 31, 58, 0.16);
}


/* -----------------------------------------------------
   ARTICLE IMAGE
   ----------------------------------------------------- */

.author-articles .article-image-link {
    display: block;
    width: 100%;
    height: 175px;
    overflow: hidden;
    flex-shrink: 0;
    background: #E9EDF1;
}

.author-articles .article-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.author-articles .article-list-item:hover .article-thumb {
    transform: scale(1.025);
}


/* =====================================================
   ARTICLE CARD CONTENT
   ===================================================== */

.author-articles .article-list-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 145px;
    padding: 1rem;
    background: var(--navy, #05305A);
    color: #FFFFFF;
}


/* -----------------------------------------------------
   ARTICLE TITLE
   ----------------------------------------------------- */

.author-articles .article-list-title {
    display: block;
    margin: 0 0 0.9rem;
    padding: 0;
    color: #FFFFFF !important;
    font-size: 0.92rem;
    line-height: 1.45;
    font-weight: 700;
}

.author-articles .article-list-title a {
    display: block;
    color: #FFFFFF !important;
    text-decoration: none;
}

.author-articles .article-list-title a:visited {
    color: #FFFFFF !important;
}

.author-articles .article-list-title a:hover {
    color: var(--gold, #FFCA26) !important;
}


/* -----------------------------------------------------
   ARTICLE DATE
   ----------------------------------------------------- */

.author-articles .article-list-meta {
    margin-top: auto;
    padding-top: 0.5rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.68rem;
    line-height: 1.4;
}

.author-articles .article-list-meta time {
    color: inherit;
}


/* =====================================================
   EMPTY STATE
   ===================================================== */

.author-profile-page .empty-state,
.authors-page .empty-state {
    padding: 2rem 1rem;
    text-align: center;
    border: 1px solid #E5E9EE;
    border-radius: 10px;
    background: #FFFFFF;
    color: #666;
}


/* =====================================================
   TABLET — 3 COLUMNS
   ===================================================== */

@media (max-width: 1100px) {

    .authors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .author-articles .articles-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .authors-grid .author-card-image,
    .authors-grid .author-card-image-link {
        height: 195px;
    }
}


/* =====================================================
   SMALL TABLET — 2 COLUMNS
   ===================================================== */

@media (max-width: 800px) {

    .authors-page,
    .author-profile-page {
        padding-top: 1rem;
    }

    .authors-page .container,
    .author-profile-page .container {
        padding: 0 1rem;
    }

    .authors-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .author-articles .articles-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .authors-grid .author-card-image,
    .authors-grid .author-card-image-link {
        height: 185px;
    }

    .author-profile-header {
        gap: 1.1rem;
        padding: 1.1rem;
    }

    .author-profile-image {
        flex-basis: 100px;
        width: 100px;
        height: 100px;
    }

    .author-articles .article-image-link {
        height: 165px;
    }
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 600px) {

    .authors-page,
    .author-profile-page {
        padding-bottom: 2rem;
    }

    .authors-page .container,
    .author-profile-page .container {
        padding: 0 0.85rem;
    }


    /* -------------------------------------------------
       AUTHORS INDEX
       ------------------------------------------------- */

    .authors-page .page-header {
        margin: 1rem 0 1.1rem;
    }

    .authors-page .page-title {
        font-size: 1.35rem;
    }

    .authors-page .page-description {
        font-size: 0.78rem;
    }

    .authors-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .authors-grid .author-card {
        flex-direction: row;
        align-items: stretch;
    }

    .authors-grid .author-card-image,
    .authors-grid .author-card-image-link {
        flex: 0 0 105px;
        width: 105px;
        height: 115px;
    }

    .authors-grid .author-card-content {
        padding: 0.8rem;
    }

    .authors-grid .author-card-name {
        font-size: 0.88rem;
    }

    .authors-grid .author-card-role {
        font-size: 0.68rem;
    }

    .authors-grid .author-card-bio {
        font-size: 0.7rem;
        line-height: 1.45;
    }


    /* -------------------------------------------------
       PROFILE HEADER
       ------------------------------------------------- */

    .author-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .author-profile-image {
        flex: 0 0 auto;
        width: 95px;
        height: 95px;
    }

    .author-profile-name {
        font-size: 1.35rem;
    }

    .author-profile-role {
        font-size: 0.72rem;
    }

    .author-profile-bio {
        font-size: 0.75rem;
        line-height: 1.55;
    }

    .author-profile-stats,
    .author-profile-social {
        justify-content: center;
    }


    /* -------------------------------------------------
       ARTICLES
       ------------------------------------------------- */

    .author-articles .section-title {
        font-size: 1.15rem;
        margin-bottom: 0.9rem;
    }

    .author-articles .articles-list {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .author-articles .article-list-item {
        display: flex;
        flex-direction: row;
        min-height: 120px;
    }

    .author-articles .article-image-link {
        flex: 0 0 125px;
        width: 125px;
        height: auto;
        min-height: 120px;
    }

    .author-articles .article-list-content {
        flex: 1;
        min-width: 0;
        min-height: 120px;
        padding: 0.8rem;
    }

    .author-articles .article-list-title {
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .author-articles .article-list-meta {
        font-size: 0.62rem;
    }
}


/* =====================================================
   VERY SMALL PHONES
   ===================================================== */

@media (max-width: 400px) {

    .authors-page .container,
    .author-profile-page .container {
        padding: 0 0.7rem;
    }

    .authors-grid .author-card-image,
    .authors-grid .author-card-image-link {
        flex-basis: 90px;
        width: 90px;
        height: 105px;
    }

    .authors-grid .author-card-content {
        padding: 0.7rem;
    }

    .authors-grid .author-card-name {
        font-size: 0.82rem;
    }

    .authors-grid .author-card-bio {
        font-size: 0.66rem;
    }

    .author-articles .article-image-link {
        flex-basis: 110px;
        width: 110px;
    }

    .author-articles .article-list-content {
        padding: 0.7rem;
    }

    .author-articles .article-list-title {
        font-size: 0.74rem;
    }
}


/* =====================================================
   ACCESSIBILITY
   ===================================================== */

.authors-grid .author-card a:focus-visible,
.author-profile-page .article-list-item a:focus-visible,
.author-profile-social a:focus-visible {
    outline: 2px solid var(--orange, #FF8C1A);
    outline-offset: 3px;
}


/* =====================================================
   REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {

    .authors-grid .author-card,
    .authors-grid .author-image,
    .authors-grid .author-card-image img,
    .author-profile-social a,
    .author-articles .article-list-item,
    .author-articles .article-thumb {
        transition: none;
    }

    .authors-grid .author-card:hover,
    .author-articles .article-list-item:hover {
        transform: none;
    }

    .authors-grid .author-card:hover .author-image,
    .authors-grid .author-card:hover .author-card-image img,
    .author-articles .article-list-item:hover .article-thumb {
        transform: none;
    }
}