/* ============================================================
   BioPedia World — Homepage Loops CSS
   Upload to: /wp-content/themes/mh-magazine-lite/
   Then enqueue via functions.php (snippet included)
   Color: #D06A5B accent | #b85a4b dark | #fdf1ef pale
   ============================================================ */

:root {
    --bp-accent:      #D06A5B;
    --bp-accent-dark: #b85a4b;
    --bp-accent-pale: #fdf1ef;
    --bp-dark-bg:     #1a1a1a;
    --bp-black:       #111111;
    --bp-mid:         #555555;
    --bp-light:       #888888;
    --bp-border:      #e8e8e8;
    --bp-white:       #ffffff;
    --bp-radius:      10px;
    --bp-font:        'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --bp-font-display:'Playfair Display', Georgia, serif;
    --bp-transition:  0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ══════════════════════════════════════════════════════════
   SHARED: Section header bar
   ══════════════════════════════════════════════════════════ */
.bp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bp-dark-bg);
    padding: 10px 16px;
    border-radius: var(--bp-radius) var(--bp-radius) 0 0;
}

.bp-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--bp-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0;
}

.bp-section-bar {
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--bp-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.bp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--bp-font);
    font-size: 12px;
    font-weight: 500;
    color: var(--bp-accent);
    text-decoration: none;
    transition: color var(--bp-transition);
}
.bp-view-all:hover { color: #ff8875; text-decoration: underline; }

/* ══════════════════════════════════════════════════════════
   LOOP 1 — Featured Biographies
   ══════════════════════════════════════════════════════════ */
.bp-featured-section {
    width: 100%;
    margin-bottom: 36px;
    /* Break out of any parent padding/max-width constraints */
    box-sizing: border-box;
}

.bp-hero-wrap {
    background: var(--bp-white);
    border: 1px solid var(--bp-border);
    border-top: none;
    border-radius: 0 0 var(--bp-radius) var(--bp-radius);
    overflow: hidden;
    width: 100%;
}

/* Grid: hero on left, sidebar on right */
.bp-hero-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    min-height: 380px;
}

/* ── Hero main card ── */
.bp-hero-main {
    position: relative;
    background: #1a2535;
    overflow: hidden;
    min-height: 380px;
}

.bp-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.bp-hero-main:hover .bp-hero-img { transform: scale(1.03); }

.bp-hero-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
}

.bp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.88) 0%,
        rgba(0,0,0,0.35) 50%,
        transparent 100%
    );
    z-index: 1;
}

.bp-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 22px 22px 20px;
    z-index: 2;
}

.bp-hero-cat {
    display: inline-block;
    background: var(--bp-accent);
    color: #ffffff;
    font-family: var(--bp-font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 10px;
    transition: background var(--bp-transition);
}
.bp-hero-cat:hover { background: var(--bp-accent-dark); color: #fff; }

.bp-hero-title {
    font-family: var(--bp-font-display);
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.bp-hero-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--bp-transition);
}
.bp-hero-title a:hover { opacity: 0.88; }

.bp-hero-excerpt {
    font-family: var(--bp-font);
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #ffffff;
    text-decoration: none;
    transition: background var(--bp-transition), border-color var(--bp-transition);
}
.bp-hero-btn:hover {
    background: var(--bp-accent);
    border-color: var(--bp-accent);
}

/* ── Sidebar list ── */
.bp-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--bp-border);
    display: flex;
    flex-direction: column;
}

.bp-sidebar-item { border-bottom: 1px solid var(--bp-border); }
.bp-sidebar-item:last-child { border-bottom: none; }

.bp-sidebar-link {
    display: flex;
    gap: 12px;
    padding: 13px 14px;
    text-decoration: none;
    color: inherit;
    transition: background var(--bp-transition);
    align-items: flex-start;
    height: 100%;
}
.bp-sidebar-link:hover { background: #f9f9f9; }

.bp-sidebar-thumb {
    width: 72px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bp-accent-pale);
}
.bp-sidebar-thumb img,
.bp-sidebar-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bp-sidebar-placeholder { background: linear-gradient(135deg, var(--bp-accent-pale), #f0e0dd); }

.bp-sidebar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bp-sidebar-cat {
    font-family: var(--bp-font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bp-accent);
}

.bp-sidebar-title {
    font-family: var(--bp-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--bp-black);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--bp-transition);
}
.bp-sidebar-link:hover .bp-sidebar-title { color: var(--bp-accent); }

.bp-sidebar-meta {
    font-family: var(--bp-font);
    font-size: 11px;
    color: var(--bp-light);
}

/* ══════════════════════════════════════════════════════════
   LOOP 2 — Latest Articles (Editorial List)
   ══════════════════════════════════════════════════════════ */
.bp-editorial-section {
    margin-bottom: 36px;
}

.bp-editorial-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bp-accent);
}

.bp-editorial-title {
    font-family: var(--bp-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--bp-black);
    margin: 0;
    letter-spacing: -0.01em;
}

.bp-editorial-label {
    font-family: var(--bp-font);
    font-size: 12px;
    color: var(--bp-light);
    white-space: nowrap;
}

/* Article rows */
.bp-editorial-list { display: flex; flex-direction: column; }

.bp-editorial-item {
    display: flex;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--bp-border);
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}
.bp-editorial-item:last-child { border-bottom: none; }
.bp-editorial-item:hover .bp-ed-title a { color: var(--bp-accent); }

/* Thumbnail */
.bp-ed-thumb-link { flex-shrink: 0; display: block; }

.bp-ed-thumb {
    width: 130px;
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bp-accent-pale);
    flex-shrink: 0;
}
.bp-ed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.bp-editorial-item:hover .bp-ed-thumb img { transform: scale(1.05); }

.bp-ed-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bp-accent-pale), #f0e0dd);
}

/* Info */
.bp-ed-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bp-ed-cat {
    font-family: var(--bp-font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bp-accent);
    text-decoration: none;
    transition: color var(--bp-transition);
}
.bp-ed-cat:hover { color: var(--bp-accent-dark); }

.bp-ed-title {
    font-family: var(--bp-font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--bp-black);
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.01em;
}
.bp-ed-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--bp-transition);
}
.bp-ed-title a:hover { color: var(--bp-accent); }

.bp-ed-excerpt {
    font-family: var(--bp-font);
    font-size: 13px;
    color: var(--bp-mid);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-ed-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-family: var(--bp-font);
    font-size: 12px;
    color: var(--bp-light);
}

.bp-ed-author {
    font-weight: 500;
    color: var(--bp-mid);
}

.bp-ed-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--bp-light);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════ */
.bp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.bp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border-radius: 8px;
    font-family: var(--bp-font);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--bp-border);
    background: var(--bp-white);
    color: var(--bp-dark-bg);
    text-decoration: none;
    transition: all var(--bp-transition);
    cursor: pointer;
}
.bp-page-btn:hover {
    border-color: var(--bp-accent);
    color: var(--bp-accent);
    background: var(--bp-accent-pale);
}
.bp-page-btn.active {
    background: var(--bp-accent);
    border-color: var(--bp-accent);
    color: #ffffff;
    cursor: default;
}
.bp-page-arrow {
    background: #f5f5f5;
}
.bp-page-dots {
    font-family: var(--bp-font);
    font-size: 13px;
    color: var(--bp-light);
    padding: 0 4px;
    line-height: 36px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .bp-hero-grid { grid-template-columns: 1fr; }
    .bp-sidebar-list { border-left: none; border-top: 1px solid var(--bp-border); }
    .bp-hero-main { min-height: 260px; }
    .bp-hero-title { font-size: 17px; }

    .bp-ed-thumb { width: 100px; height: 72px; }
    .bp-ed-title { font-size: 15px; }
    .bp-ed-excerpt { -webkit-line-clamp: 1; }
}

@media (max-width: 480px) {
    .bp-hero-main { min-height: 220px; }
    .bp-hero-title { font-size: 15px; }
    .bp-hero-excerpt { display: none; }

    .bp-ed-thumb { width: 80px; height: 60px; }
    .bp-ed-title { font-size: 14px; }
    .bp-ed-meta { font-size: 11px; }

    .bp-page-btn { min-width: 32px; height: 32px; font-size: 12px; }
}
