/* ============================================================
   JAMMUADS TOP 5 — COMPACT TABLE (Fits without scroll)
   ============================================================ */

/* ---- Hide theme's duplicate author box ---- */
.single-top5 .author-box,
.single-top5 .entry-author,
.single-top5 .post-author,
.single-top5 .author-bio,
.single-top5 .about-author,
.single-top5 .byline,
.single-top5 .author-profile,
.single-top5 .wp-block-post-author,
.single-top5 [class*="author-box"],
.single-top5 [class*="post-author"] {
    display: none !important;
}

/* ---- Full-width layout ---- */
.single-top5 #secondary,
.single-top5 .sidebar,
.single-top5 aside.widget-area,
.single-top5 .col-md-4.sidebar,
.single-top5 #sidebar,
.single-top5 .widget-area,
.single-top5 .site-sidebar,
.single-top5 .entry-sidebar,
.single-top5 .sidebar-primary,
.single-top5 .sidebar-secondary,
.single-top5 .left-sidebar,
.single-top5 .right-sidebar,
.single-top5 [class*="sidebar"] {
    display: none !important;
}

.single-top5 #primary,
.single-top5 .content-area,
.single-top5 .col-md-8,
.single-top5 main.site-main,
.single-top5 .entry-content,
.single-top5 .site-content,
.single-top5 #content,
.single-top5 [class*="content-area"],
.single-top5 article.type-top5 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ---- Table: Fixed layout, always fits ---- */
.j5-table-wrapper {
    margin: 20px 0;
    width: 100%;
    overflow-x: visible;
}

.j5-comparison-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

/* Column widths — total fits in ~650px */
.j5-th-rank,    .j5-td-rank    { width: 45px; }
.j5-th-business,.j5-td-business{ width: auto; }
.j5-th-rating,  .j5-td-rating  { width: 65px; }
.j5-th-reviews, .j5-td-reviews { width: 55px; }
.j5-th-features,.j5-td-features{ width: 16%; }
.j5-th-contact, .j5-td-contact { width: 14%; }
.j5-th-action,  .j5-td-action  { width: 55px; }

.j5-comparison-table thead {
    background: #fafafa;
}

.j5-comparison-table th {
    padding: 10px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
    overflow: hidden;
}

.j5-comparison-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    overflow: hidden;
}

.j5-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.j5-comparison-table tbody tr:hover {
    background: #fafafa;
}

/* Rank Circle */
.j5-rank-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.j5-gold   { background: #fff3e0; color: #e65100; }
.j5-silver { background: #f5f5f5; color: #616161; }
.j5-bronze { background: #fff8e1; color: #f57f17; }
.j5-normal { background: #fafafa; color: #9e9e9e; border: 1px solid #e0e0e0; }

/* Business Cell — truncated to fit */
.j5-biz-title {
    margin-bottom: 4px;
    overflow: hidden;
}

.j5-biz-link {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.j5-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 4px;
    vertical-align: middle;
}

.j5-tag-sponsored { background: #e3f2fd; color: #1565c0; }
.j5-tag-verified  { background: #e8f5e9; color: #2e7d32; }

/* J-Score Bar — compact */
.j5-jscore-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.j5-jscore-track {
    width: 50px;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.j5-jscore-fill {
    height: 100%;
    background: #111;
    border-radius: 2px;
}

.j5-jscore-text {
    font-size: 10px;
    color: #888;
    font-weight: 500;
}

/* Rating */
.j5-stars {
    color: #ff9800;
    font-size: 12px;
    letter-spacing: 0.5px;
    line-height: 1;
}

.j5-rating-num {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    margin-top: 2px;
}

/* Reviews */
.j5-td-reviews {
    font-variant-numeric: tabular-nums;
    color: #555;
    font-size: 12px;
}

/* Features — smaller chips */
.j5-feature-chip {
    display: inline-block;
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 10px;
    color: #555;
    margin: 1px 2px 1px 0;
    white-space: nowrap;
}

.j5-feature-muted {
    background: #fafafa;
    color: #aaa;
}

/* Contact */
.j5-phone-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
    font-size: 11px;
    white-space: nowrap;
}

.j5-phone-link:hover {
    text-decoration: underline;
}

.j5-phone-link svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.j5-no-phone {
    color: #bbb;
    font-size: 11px;
}

/* Action Button — compact, always visible */
.j5-btn-sm {
    display: inline-block;
    padding: 5px 10px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s;
    text-align: center;
}

.j5-btn-sm:hover {
    opacity: 0.85;
}

/* Updated Badge */
.j5-updated-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    margin: 12px 0;
    font-weight: 500;
}

.j5-pulse {
    width: 7px;
    height: 7px;
    background: #2e7d32;
    border-radius: 50%;
    display: inline-block;
    animation: j5-pulse 2s infinite;
}

@keyframes j5-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

/* ============================================================
   ANIMATED REGION HUB BUTTONS
   ============================================================ */
.j5-hub-section {
    margin: 32px 0;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

.j5-hub-heading {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.j5-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.j5-hub-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--hub-bg, #e3f2fd);
    border: 2px solid var(--hub-border, #1565c0);
    border-radius: 10px;
    text-decoration: none;
    color: var(--hub-text, #1565c0);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.j5-hub-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.j5-hub-btn:hover::before {
    left: 100%;
}

.j5-hub-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: var(--hub-hover, #bbdefb);
}

.j5-hub-icon {
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.j5-hub-btn:hover .j5-hub-icon {
    transform: rotate(-10deg) scale(1.2);
}

.j5-hub-text {
    flex: 1;
    line-height: 1.3;
}

.j5-hub-arrow {
    font-size: 16px;
    opacity: 0.6;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.j5-hub-btn:hover .j5-hub-arrow {
    opacity: 1;
    transform: translateX(5px);
}

/* ============================================================
   AUTHOR BOX
   ============================================================ */
.j5-author-box {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-top: 28px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.j5-author-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.j5-author-info {
    flex: 1;
}

.j5-author-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}

.j5-author-bio {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
}

.j5-author-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
}

.j5-verified-date {
    color: #2e7d32;
    font-weight: 500;
}

.j5-report-link {
    color: #888;
    text-decoration: none;
}

.j5-report-link:hover {
    color: #111;
    text-decoration: underline;
}

/* ============================================================
   MOBILE: Card Layout
   ============================================================ */
@media (max-width: 640px) {
    .j5-comparison-table,
    .j5-comparison-table thead,
    .j5-comparison-table tbody,
    .j5-comparison-table th,
    .j5-comparison-table td,
    .j5-comparison-table tr {
        display: block;
        width: 100% !important;
    }

    .j5-comparison-table thead {
        display: none;
    }

    .j5-comparison-table tbody tr {
        margin-bottom: 12px;
        border: 1px solid #e8e8e8;
        border-radius: 10px;
        padding: 14px;
        background: #fff;
    }

    .j5-comparison-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .j5-td-rank {
        justify-content: flex-start !important;
        gap: 10px;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        margin-bottom: 6px;
    }

    .j5-td-business {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 6px;
    }

    .j5-td-business::before,
    .j5-td-action::before {
        display: none;
    }

    .j5-td-action {
        padding-top: 10px !important;
        border-top: 1px solid #f0f0f0 !important;
        margin-top: 6px;
        justify-content: flex-end;
    }

    .j5-jscore-track {
        width: 80px;
    }

    .j5-author-box {
        flex-direction: column;
        text-align: center;
    }

    .j5-author-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .j5-hub-grid {
        grid-template-columns: 1fr;
    }
}