/*
 * authors.css
 * Instant Car Fix — Frontend Author Pages
 * Covers: Author Listing (/authors) and Author Profile (/authors/{slug})
 * ─────────────────────────────────────────────────────────────────────────
 * Usage in layout:
 *   <link rel="stylesheet" href="{{ asset('css/authors.css') }}">
 * ─────────────────────────────────────────────────────────────────────────
 */

/* ═══════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════ */
:root {
    --icf-red:          #C0392B;
    --icf-red-light:    #FDECEA;
    --icf-red-dark:     #922B21;
    --icf-red-border:   #F5C6C6;

    --icf-dark:         #1A1A1A;
    --icf-mid:          #3D3D3D;
    --icf-muted:        #6C757D;
    --icf-border:       #E8E8E4;
    --icf-bg:           #F7F6F3;
    --icf-white:        #FFFFFF;

    --icf-success:      #1E8449;
    --icf-success-bg:   #EAFAF1;
    --icf-navy:         #1A3A5C;
    --icf-navy-light:   #EAF3FB;

    --icf-font-head:    'Poppins', sans-serif;
    --icf-font-body:    'Poppins', sans-serif;

    --icf-radius-sm:    6px;
    --icf-radius:       10px;
    --icf-radius-lg:    12px;
    --icf-shadow:       0 2px 8px rgba(0, 0, 0, .06);
    --icf-shadow-hover: 0 10px 30px rgba(0, 0, 0, .10);
}

/* ═══════════════════════════════════════════════════
   BASE RESET (scoped to author pages)
═══════════════════════════════════════════════════ */
.authors-page *,
.authors-page *::before,
.authors-page *::after {
    box-sizing: border-box;
}

.authors-page {
    font-family: var(--icf-font-body);
    color: var(--icf-dark);
    background: var(--icf-bg);
}

.authors-page a {
    text-decoration: none;
    color: inherit;
}


/* ═══════════════════════════════════════════════════
   BREADCRUMB BAR  (shared)
═══════════════════════════════════════════════════ */
.icf-breadcrumb-bar {
    background: var(--icf-white);
    border-bottom: 1px solid var(--icf-border);
    padding: 10px 0;
}

.icf-breadcrumb {
    font-size: 12.5px;
    color: var(--icf-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.icf-breadcrumb a {
    color: var(--icf-muted);
    transition: color .15s;
}

.icf-breadcrumb a:hover {
    color: var(--icf-red);
}

.icf-breadcrumb__sep {
    color: #CCCCCC;
    font-size: 11px;
}

.icf-breadcrumb__current {
    color: var(--icf-dark);
    font-weight: 500;
}


/* ═══════════════════════════════════════════════════
   TRUST PILL  (shared hero element)
═══════════════════════════════════════════════════ */
.icf-trust-row {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.icf-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
}

.icf-trust-icon {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, .08);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════
   META PILL  (shared — hero + profile header)
═══════════════════════════════════════════════════ */
.icf-meta-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.icf-meta-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--icf-bg);
    border: 1px solid var(--icf-border);
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 12.5px;
    color: var(--icf-mid);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.icf-meta-pill:hover {
    border-color: var(--icf-red-border);
    background: var(--icf-red-light);
    color: var(--icf-red-dark);
}

.icf-meta-pill i {
    font-size: 12px;
    color: var(--icf-red);
}


/* ═══════════════════════════════════════════════════
   SECTION CARD  (shared — both pages)
═══════════════════════════════════════════════════ */
.icf-card {
    background: var(--icf-white);
    border: none;
    border-radius: var(--icf-radius-lg);
    box-shadow: var(--icf-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.icf-card__body {
    padding: 28px;
}

.icf-card__body--compact {
    padding: 20px;
}

.icf-section-title {
    font-family: var(--icf-font-head);
    font-size: 22px;
    color: var(--icf-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--icf-red-light);
}

.icf-section-body {
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--icf-mid);
}

.icf-section-body p {
    margin-bottom: 12px;
}

.icf-section-body p:last-child {
    margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════
   LISTING PAGE — HERO
═══════════════════════════════════════════════════ */
.icf-list-hero {
    background: var(--icf-dark);
    padding: 60px 0;
}

.icf-list-hero__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--icf-red);
    margin-bottom: 12px;
}

.icf-list-hero__title {
    font-family: var(--icf-font-head);
    font-size: 46px;
    color: var(--icf-white);
    line-height: 1.1;
    margin-bottom: 14px;
}

.icf-list-hero__desc {
    font-size: 15px;
    color: rgba(255, 255, 255, .6);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════
   LISTING PAGE — SECTION HEADER
═══════════════════════════════════════════════════ */
.icf-list-body {
    background: var(--icf-bg);
    padding: 48px 0;
    min-height: 400px;
}

.icf-section-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
}

.icf-section-row__title {
    font-family: var(--icf-font-head);
    font-size: 26px;
    color: var(--icf-dark);
    margin: 0;
}

.icf-section-row__count {
    font-size: 13px;
    color: var(--icf-muted);
}


/* ═══════════════════════════════════════════════════
   LISTING PAGE — AUTHOR CARD GRID
═══════════════════════════════════════════════════ */
.icf-author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
}

.icf-author-card {
    background: var(--icf-white);
    border: 1px solid var(--icf-border);
    border-radius: var(--icf-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    text-decoration: none;
    color: inherit;
}

.icf-author-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--icf-shadow-hover);
    border-color: #D8D8D4;
    color: inherit;
}

/* Photo area */
.icf-author-card__photo {
    aspect-ratio: 1 / 1;
    background: linear-gradient(145deg, #EEE8DF, #E2DDD4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--icf-font-head);
    font-size: 52px;
    color: #9E9891;
    position: relative;
    overflow: hidden;
}

.icf-author-card__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card body */
.icf-author-card__body {
    padding: 18px 18px 12px;
    flex: 1;
}

.icf-author-card__name {
    font-family: var(--icf-font-head);
    font-size: 18px;
    color: var(--icf-dark);
    margin-bottom: 3px;
    line-height: 1.2;
}

.icf-author-card__title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--icf-red);
    margin-bottom: 10px;
}

.icf-author-card__bio {
    font-size: 13px;
    color: var(--icf-muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Card footer */
.icf-author-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 16px;
    border-top: 1px solid var(--icf-border);
    margin-top: 12px;
}

.icf-author-card__meta {
    font-size: 12px;
    color: var(--icf-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.icf-author-card__meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icf-author-card__meta-item i {
    font-size: 11px;
}

.icf-author-card__link {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--icf-red);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.icf-author-card__link i {
    font-size: 11px;
}

/* Empty state */
.icf-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--icf-muted);
}

.icf-empty-state i {
    font-size: 36px;
    color: #DDD;
    display: block;
    margin-bottom: 12px;
}

.icf-empty-state p {
    font-size: 14px;
    margin: 0;
}


/* ═══════════════════════════════════════════════════
   PROFILE PAGE — HERO
═══════════════════════════════════════════════════ */
.icf-profile-hero {
    background: var(--icf-white);
    border-bottom: 1px solid var(--icf-border);
    padding: 40px 0 0;
}

.icf-profile-hero__inner {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    flex-wrap: wrap;
}

/* Photo */
.icf-profile-photo {
    width: 120px;
    height: 120px;
    border-radius: var(--icf-radius-lg);
    background: linear-gradient(145deg, #EEE8DF, #E2DDD4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--icf-font-head);
    font-size: 48px;
    color: #9E9891;
    flex-shrink: 0;
    overflow: hidden;
    margin-bottom: -1px;
}

.icf-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Intro block */
.icf-profile-intro {
    flex: 1;
    padding-bottom: 28px;
    min-width: 200px;
}

.icf-profile-intro__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--icf-red);
    margin-bottom: 8px;
}

.icf-profile-intro__name {
    font-family: var(--icf-font-head);
    font-size: 38px;
    color: var(--icf-dark);
    line-height: 1.1;
    margin-bottom: 6px;
}

.icf-profile-intro__jobtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--icf-muted);
    margin-bottom: 12px;
}

.icf-profile-intro__shortbio {
    font-size: 15px;
    color: var(--icf-mid);
    line-height: 1.75;
    max-width: 600px;
    margin-bottom: 0;
}

/* Tab bar */
.icf-profile-tabs {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--icf-border);
    margin-top: 20px;
}

.icf-profile-tab {
    padding: 13px 22px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--icf-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
    user-select: none;
}

.icf-profile-tab:hover {
    color: var(--icf-dark);
}

.icf-profile-tab.is-active {
    color: var(--icf-dark);
    border-bottom-color: var(--icf-red);
}


/* ═══════════════════════════════════════════════════
   PROFILE PAGE — BODY GRID
═══════════════════════════════════════════════════ */
.icf-profile-body {
    background: var(--icf-bg);
    padding: 40px 0;
}


/* ═══════════════════════════════════════════════════
   PROFILE PAGE — EXPERTISE CHIPS
═══════════════════════════════════════════════════ */
.icf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icf-chip {
    background: var(--icf-bg);
    border: 1px solid var(--icf-border);
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 13.5px;
    color: var(--icf-mid);
}


/* ═══════════════════════════════════════════════════
   PROFILE PAGE — CREDENTIALS LIST
═══════════════════════════════════════════════════ */
.icf-creds-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.icf-creds-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #F2F2EE;
    font-size: 14px;
    color: var(--icf-mid);
}

.icf-creds-item:last-child {
    border-bottom: none;
}

.icf-creds-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.icf-creds-check--green {
    background: var(--icf-success-bg);
}

.icf-creds-check--blue {
    background: var(--icf-navy-light);
}

.icf-creds-check i {
    font-size: 9px;
}

.icf-creds-check--green i {
    color: var(--icf-success);
}

.icf-creds-check--blue i {
    color: var(--icf-navy);
}


/* ═══════════════════════════════════════════════════
   PROFILE PAGE — ARTICLE LIST
═══════════════════════════════════════════════════ */
.icf-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.icf-article-item {
    padding: 11px 0;
    border-bottom: 1px solid #F5F5F0;
}

.icf-article-item:last-child {
    border-bottom: none;
}

.icf-article-item__link {
    font-size: 14px;
    color: var(--icf-dark);
    font-weight: 500;
    line-height: 1.5;
    display: block;
    transition: color .15s;
}

.icf-article-item__link:hover {
    color: var(--icf-red);
}

.icf-article-item__date {
    font-size: 11.5px;
    color: var(--icf-muted);
    margin-top: 3px;
}


/* ═══════════════════════════════════════════════════
   PROFILE PAGE — SIDEBAR CARDS
═══════════════════════════════════════════════════ */
.icf-sidebar-card {
    background: var(--icf-white);
    border: none;
    border-radius: var(--icf-radius-lg);
    box-shadow: var(--icf-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.icf-sidebar-card__title {
    font-family: var(--icf-font-head);
    font-size: 17px;
    color: var(--icf-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--icf-border);
}

/* Quick facts table inside sidebar */
.icf-facts-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.icf-facts-table td {
    padding: 7px 0;
    vertical-align: top;
}

.icf-facts-table td:first-child {
    color: var(--icf-muted);
    width: 50%;
}

.icf-facts-table td:last-child {
    font-weight: 600;
    color: var(--icf-dark);
}

/* View-all button inside sidebar */
.icf-btn-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--icf-red);
    border: 1px solid var(--icf-red-border);
    border-radius: var(--icf-radius-sm);
    margin-top: 12px;
    transition: background .15s;
    text-decoration: none;
}

.icf-btn-view-all:hover {
    background: var(--icf-red-light);
    color: var(--icf-red-dark);
}


/* ═══════════════════════════════════════════════════
   SCHEMA BOX  (shared — sidebar on both pages)
═══════════════════════════════════════════════════ */
.icf-schema-box {
    background: #1A2535;
    color: #7EC8E3;
    font-size: 10.5px;
    font-family: 'Courier New', 'Courier', monospace;
    border-radius: var(--icf-radius-sm);
    padding: 14px;
    overflow-x: auto;
    line-height: 1.65;
    margin: 0;
}

.icf-schema-valid {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--icf-success);
    margin-top: 10px;
}

.icf-schema-valid i {
    font-size: 12px;
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .icf-list-hero__title {
        font-size: 36px;
    }

    .icf-profile-intro__name {
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .icf-list-hero {
        padding: 40px 0;
    }

    .icf-list-hero__title {
        font-size: 28px;
    }

    .icf-author-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .icf-profile-hero__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .icf-profile-photo {
        width: 90px;
        height: 90px;
        font-size: 36px;
    }

    .icf-profile-intro__name {
        font-size: 26px;
    }

    .icf-profile-intro__shortbio {
        font-size: 14px;
    }

    .icf-card__body {
        padding: 20px;
    }

    .icf-trust-row {
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .icf-author-grid {
        grid-template-columns: 1fr;
    }

    .icf-list-hero__title {
        font-size: 24px;
    }

    .icf-profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}