/* ==========================================
   KETMarket Expert Profile - Entity Style
   ========================================== */

:root {
    --ketm-blue: #005E86;
    --ketm-blue-dark: #004d6e;
    --ketm-blue-light: #ccf0ff;
    --ketm-border: #dddddd;
    --ketm-text: #333333;
    --ketm-text-soft: #666666;
    --ketm-bg: #f3f3f3;
    --ketm-white: #ffffff;
}

/* WRAPPER */
.ketm-expert-profile {
    width: 100%;
    max-width: 100%;
    margin: 30px auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
    color: var(--ketm-text);
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.ketm-expert-profile__hero-section {
    width: 100%;
    margin-bottom: 0;
    border: 1px solid var(--ketm-border);
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
    padding: 14px;
    margin-bottom: 18px;
}

/* HERO IMAGE */
.ketm-expert-profile__media {
    width: 100%;
    height: 370px;
    background: #eeeeee;
    overflow: hidden;
    border-top: 1px solid var(--ketm-border);
    border-bottom: 1px solid var(--ketm-border);
    border-left: 0;
    border-right: 0;
    margin-bottom: 50px;
}

.ketm-expert-profile__media::after {
    display: none;
}

.ketm-expert-profile__media img,
.ketm-expert-profile__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    transform: none;
}

/* Alten Header nicht verwenden */
.ketm-expert-profile__header {
    display: none;
}

/* Owner actions */
.ketm-expert-profile__owner-actions {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 32px 0;
    box-sizing: border-box;
}

/* MAIN LAYOUT */
.ketm-expert-profile__body {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 32px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 32px;
    align-items: start;
    box-sizing: border-box;
}

.ketm-expert-profile__main {
    padding-right: 32px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.ketm-expert-profile__main,
.ketm-expert-profile__sidebar {
    min-width: 0;
}

.ketm-expert-profile__sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: static;
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

.ketm-expert-sidebar {
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

/* TITLE AREA */
/* HEADLINE LAYOUT */
.ketm-expert-profile__headline-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Avatar links */
.ketm-expert-profile__headline-avatar {
    flex-shrink: 0;
}

.ketm-expert-profile__headline-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
}

/* Text rechts */
.ketm-expert-profile__headline-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Optional: etwas enger */
.ketm-expert-profile__page-title {
    margin: 0;
}

.ketm-expert-profile__subtitle {
    margin-top: 4px;
}

.ketm-expert-profile__page-title {
    margin: 0 0 8px;
    font-size: 40px;
    font-weight: 600;
    color: #000;
}

.ketm-expert-profile__subtitle {
    margin: 0;
    font-size: 20px;
    line-height: 1.5;
    color: var(--ketm-text-soft);
}

/* CONTENT SECTIONS */
.ketm-expert-profile__section,
.ketm-expert-profile__meta-col,
.ketm-expert-profile__sidebar-card {
    background: var(--ketm-white);
    border: 1px solid var(--ketm-border);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

.ketm-expert-profile__section {
    margin-bottom: 18px;
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

.ketm-expert-profile__section h3,
.ketm-expert-profile__meta-col h3 {
    margin: 0;
    padding: 12px 14px;
    font-size: 20px;
    font-weight: 700;
    color: var(--ketm-white);
    background: var(--ketm-blue);
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid var(--ketm-border);
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

.ketm-expert-profile__content {
    padding: 14px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ketm-text);
}

.ketm-expert-profile__content p:first-child {
    margin-top: 0;
}

.ketm-expert-profile__content p:last-child {
    margin-bottom: 0;
}

.ketm-expert-profile__section ul.ketm-expert-profile__list {
    margin: 0;
    padding: 14px 14px 14px 30px;
}

.ketm-expert-profile__section ul.ketm-expert-profile__list li {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 6px;
}

.ketm-expert-profile__section a,
.ketm-expert-profile__content a {
    color: var(--ketm-blue);
    text-decoration: underline;
    font-weight: 400;
}

/* BADGES */
.ketm-expert-profile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
}

.ketm-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 3px;
    background: #f2f8fc;
    border: 1px solid #cfe2ef;
    color: var(--ketm-blue);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
}

/* SIDEBAR PERSON CARD */
.ketm-expert-profile__sidebar-card--person {
    text-align: center;
    padding: 18px 16px;
    background: #ffffff;
    border: 1px solid var(--ketm-border);
}

.ketm-expert-profile__sidebar-avatar {
    padding: 0 0 10px;
}

.ketm-expert-profile__sidebar-avatar .ketm-expert-profile__image {
    width: 96px;
    height: 96px;
    min-width: 96px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: none;
    object-fit: cover;
    background: #ffffff;
}

.ketm-expert-profile__sidebar-name {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    line-height: 1.4;
    padding: 4px 0;
}

.ketm-expert-profile__sidebar-org {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    padding: 0;
}

.ketm-expert-profile__sidebar-org a {
    color: var(--ketm-blue);
    text-decoration: none;
}

/* META ROW */
.ketm-expert-profile__meta-row {
    display: block;
    margin-top: 0;
}

.ketm-expert-profile__meta-col {
    min-width: 0;
}

/* SIDEBAR TABLE */
.ketm-expert-sidebar {
    margin: 0;
    font-family: Arial, sans-serif;
}

.ketm-expert-sidebar-table.funding_sidebar_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    table-layout: fixed;
    background: #ffffff;
    border: 1px solid var(--ketm-border);
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

/* Kopf */
.ketm-expert-sidebar .funding_sidebar_thead th,
.funding_sidebar_thead th {
    background-color: var(--ketm-blue);
    padding: 10px;
    font-size: 16px;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    text-transform: none;
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

/* Icon Abstand */
.ketm-expert-sidebar .funding_sidebar_thead i,
.funding_sidebar_thead i {
    margin-right: 5px;
}

/* Feld-Label */
.ketm-expert-sidebar .funding_sidebar_th,
.funding_sidebar_th {
    padding: 0 10px;
    font-size: 14px;
    font-weight: bold;
    text-transform: none;
    border: 1px solid var(--ketm-border);
    background-color: var(--ketm-blue-light);
    text-align: center;
    line-height: 36px;
}

/* Feld-Wert */
.ketm-expert-sidebar .funding_sidebar_td,
.funding_sidebar_td {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
    text-align: center;
    border: 1px solid var(--ketm-border);
    font-size: 14px;
    /*line-height: 1;*/
    word-break: break-word;
    background: #ffffff;
}

.ketm-expert-sidebar-org-cell {
    text-align: center;
    margin-top: 10px;
}

.ketm-expert-sidebar-org-image {
    max-width: 160px;
    height: auto;
    display: inline-block;
}

/* Links */
.ketm-expert-sidebar a {
    color: var(--ketm-blue);
    text-decoration: underline;
}

.ketm-expert-sidebar a:hover {
    color: #0073aa;
}

/* Badges in Sidebar */
.ketm-expert-sidebar .ketm-expert-profile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 4px 0;
}

.ketm-expert-sidebar .ketm-badge {
    display: inline-block;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 3px;
}

/* MOBILE */
@media (max-width: 980px) {
    .ketm-expert-profile__body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 20px 0;
    }

    .ketm-expert-profile__owner-actions {
        padding: 16px 20px 0;
    }

    .ketm-expert-profile__sidebar {
        order: 2;
    }

    .ketm-expert-profile__main {
        order: 1;
    }
}

@media (max-width: 767px) {
    .ketm-expert-profile {
        margin: 20px auto;
    }

    .ketm-expert-profile__media {
        height: 220px;
    }

    .ketm-expert-profile__page-title {
        font-size: 22px;
    }

    .ketm-expert-profile__subtitle {
        font-size: 13px;
    }

    .ketm-expert-profile__content {
        padding: 14px;
    }

    .ketm-expert-profile__section ul.ketm-expert-profile__list {
        padding: 14px 14px 14px 28px;
    }

    .ketm-expert-profile__sidebar-card--person {
        padding: 16px 14px;
    }
}

/* ========================================================================================================================================================================
   Expert Archive
   ======================================================================================================================================================================== */
.ketm-expert-archive {
    max-width: 1200px;
    margin: 48px auto;
    overflow: visible;
}

/* =========================
   HERO (FULL WIDTH)
========================= */
.ketm-expert-archive__hero {
    position: relative;
    min-height: 360px;
    margin-bottom: 0;

    /* FULL WIDTH BREAKOUT */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    overflow: hidden;
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
}

.ketm-expert-archive__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.35) 0%,
        rgba(15, 23, 42, 0.65) 100%
    );
}

.ketm-expert-archive__hero-inner {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    color: #fff;
    box-sizing: border-box;
}

.ketm-expert-archive__hero-title {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.ketm-expert-archive__hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* =========================
   INTRO
========================= */
.ketm-expert-archive__intro {
    padding: 40px 24px 44px;
    background: #f8fafc;
    border: 1px solid var(--ketm-border);
    border-top: 0;
    margin-bottom: 32px;
}

.ketm-expert-archive__intro-inner {
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.ketm-expert-archive__intro-text {
    color: var(--ketm-text-soft);
    font-size: 1.05rem;
    line-height: 1.85;
}

.ketm-expert-archive__intro-text p {
    margin: 0;
}

.ketm-expert-archive__intro-action {
    margin-top: 28px;
}

.ketm-expert-archive__hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;

    background: var(--ketm-accent);
    border: 1px solid var(--ketm-accent);
    color: #fff;

    text-decoration: none !important;
    font-size: 0.98rem;
    font-weight: 700;

    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    transition: all 0.18s ease;
}

.ketm-expert-archive__hero-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
    color: #fff !important;
}

/* =========================
   GRID
========================= */
.ketm-expert-archive__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    align-items: stretch;
}

/* Owner Actions*/
.ketm-expert-profile__owner-actions .gd-author-actions.text-white {
    display: flex !important;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.ketm-expert-profile__owner-actions .gd-author-actions.text-white > * {
    margin: 0 !important;
    width: auto !important;
}

/* =========================
   CARD
========================= */
.ketm-expert-archive__card {
    width: 100%;
    max-width: 320px;
    justify-self: center;

    display: flex;
    height: 100%; 

    background: var(--ketm-surface);
    border: 1px solid var(--ketm-border);
    border-radius: var(--ketm-radius-md);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: all 0.18s ease;
}

.ketm-expert-archive__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    border-color: rgba(0, 149, 204, 0.35);
}

.ketm-expert-archive__card-link {
    display: flex;
    flex-direction: column;
    justify-self: center;
    padding: 22px;
    color: inherit;
    text-decoration: none !important;
    width: 100%; 
    height: 100%;

    justify-content: center;   /* vertikal */
    align-items: start;       /* horizontal */
}

.ketm-expert-archive__card-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ketm-expert-archive__avatar {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.10);
    background: #fff;
}

.ketm-expert-archive__avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ketm-primary), var(--ketm-accent));
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
}

.ketm-expert-archive__head {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ketm-expert-archive__name {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none !important;

    display: -webkit-box;
    -webkit-line-clamp: 2;   /* max 2 Zeilen */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ketm-expert-archive__title {
    font-size: 0.96rem;
    color: var(--ketm-text-soft);
    margin-bottom: 6px;

    display: -webkit-box;
    -webkit-line-clamp: 2;   /* max 2 Zeilen */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ketm-expert-archive__org,
.ketm-expert-archive__org a {
    font-size: 0.92rem;
    color: var(--ketm-accent);
    font-weight: 600;
    text-decoration: none;
}

/* =========================
   FOOTER / TAGS
========================= */
.ketm-expert-archive__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}

.ketm-expert-archive__pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 174, 239, 0.10);
    border: 1px solid rgba(0, 174, 239, 0.16);
    font-size: 0.8rem;
    font-weight: 700;
}

.ketm-expert-archive__more {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ketm-accent);
}

/* =========================
   PAGINATION
========================= */
.ketm-expert-archive__pagination {
    margin-top: 32px;
}

.ketm-expert-archive__pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.ketm-expert-archive__pagination a,
.ketm-expert-archive__pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ketm-border);
    border-radius: var(--ketm-radius-md);
    background: #fff;
}

.ketm-expert-archive__pagination .current {
    background: var(--ketm-accent);
    color: #fff;
}

/* =========================
   PAGINATION
========================= */
.ketm-expert-archive__pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.ketm-expert-archive__pagination ul {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ketm-expert-archive__pagination li {
    margin: 0;
    padding: 0;
}

.ketm-expert-archive__pagination a,
.ketm-expert-archive__pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 14px;
    box-sizing: border-box;

    border: 1px solid var(--ketm-border);
    border-radius: var(--ketm-radius-md) !important;
    background: #fff;
    color: var(--ketm-primary);

    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;

}

.ketm-expert-archive__pagination a:hover,
.ketm-expert-archive__pagination a:focus {
    transform: translateY(-1px);
    border-color: var(--ketm-accent);
    color: var(--ketm-accent);
    background: #f8fbfd;
    outline: none;
}

.ketm-expert-archive__pagination .current {
    background-color: var(--ketm-accent) !important;
    border-color: var(--ketm-accent);
    color: #fff !important
}

.ketm-expert-archive__pagination .dots {
    min-width: auto;
    width: auto;
    padding: 0 6px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ketm-text-soft);
}

.ketm-expert-archive__pagination .prev,
.ketm-expert-archive__pagination .next {
    padding: 0 16px;
    min-width: 35px;
}

.ketm-expert-archive__upsell {
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid var(--ketm-border);
    border-radius: var(--ketm-radius-md);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    text-align: center;
}

.ketm-expert-archive__upsell-text {
    margin: 0 0 12px;
    color: var(--ketm-text-soft);
    font-size: 0.98rem;
    line-height: 1.6;
}

.ketm-expert-archive__upsell-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--ketm-accent);
    background: #fff;
    color: var(--ketm-accent);
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.18s ease;
}

.ketm-expert-archive__upsell-link:hover {
    background: var(--ketm-accent);
    color: #fff;
    border-color: var(--ketm-accent);
}

/* =========================
   MOBILE
========================= */
@media (max-width: 767px) {
    .ketm-expert-archive {
        margin: 32px auto;
    }

    .ketm-expert-archive__hero {
        min-height: 240px;
    }

    .ketm-expert-archive__hero-inner {
        padding: 32px 16px;
    }

    .ketm-expert-archive__hero-title {
        font-size: 2rem;
    }

    .ketm-expert-archive__intro {
        padding: 28px 18px 32px;
    }

    .ketm-expert-archive__intro-text {
        font-size: 0.98rem;
    }

    .ketm-expert-archive__avatar {
        width: 64px;
        height: 64px;
        min-width: 64px;
    }
}

@media (max-width: 767px) {
    .ketm-expert-archive__pagination {
        margin-top: 28px;
    }

    .ketm-expert-archive__pagination ul {
        gap: 8px;
    }

    .ketm-expert-archive__pagination a,
    .ketm-expert-archive__pagination span {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 13px;
    }

    .ketm-expert-archive__pagination .prev,
    .ketm-expert-archive__pagination .next {
        padding: 0 12px;
    }
}

@media (max-width: 980px) {
    .ketm-expert-profile__body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 20px 0;
    }

    .ketm-expert-profile__sidebar {
        order: 2;
    }

    .ketm-expert-profile__main {
        order: 1;
    }
}