/* =====================================================================
   Jogos de Hoje na TV — main.css
   Compatible: GeneratePress (free) + LiteSpeed + Cloudflare
   Strategy: Scope mọi rule trong .jdh-* để không xung đột theme
   ===================================================================== */

:root {
    --jdh-bg:        #ffffff;
    --jdh-bg-soft:   #f5f7fc;   /* ám xanh dương nhẹ — nền card/section */
    --jdh-bg-hover:  #eaeffb;   /* hover state */
    --jdh-bar:       #dfe7f7;   /* nền thanh menu + header nhóm giải — đậm hơn, ám xanh để nổi bật */
    --jdh-border:    #dbe2ef;   /* viền hài hoà với primary */
    --jdh-text:      #111827;
    --jdh-muted:     #6b7280;
    --jdh-primary:   #2563eb;   /* azul TV — primary */
    --jdh-primary-dark: #1d4ed8;
    --jdh-danger:    #ef4444;
    --jdh-warning:   #f59e0b;
    --jdh-radius:    8px;
    --jdh-shadow:    0 1px 3px rgba(0, 0, 0, 0.06);
    --jdh-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --jdh-bg:        #0f1219;       /* nền chính, ám navy nhẹ */
        --jdh-bg-soft:   #161b2a;       /* card/section, ám xanh navy */
        --jdh-bg-hover:  #1f2540;       /* hover */
        --jdh-bar:       #252e4d;       /* thanh menu + header nhóm — sáng nổi, ám blue */
        --jdh-border:    #2a324a;       /* viền */
        --jdh-text:      #e5e7eb;
        --jdh-muted:     #9ca3af;
        /* Azul TV ajustado p/ contraste em fundo escuro */
        --jdh-primary:      #3b82f6;
        --jdh-primary-dark: #2563eb;
        --jdh-shadow:    0 1px 3px rgba(0, 0, 0, 0.5);
        --jdh-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
    }
}

.jdh-page {
    color: var(--jdh-text);
    background: var(--jdh-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    min-height: 70vh;
}

/* Auto-suficiência: no dark mode do SO, pinta a ÁREA DE CONTEÚDO do tema
   (não o body/cabeçalho/rodapé) p/ evitar faixas brancas ao redor do plugin
   sem quebrar o cabeçalho claro de temas que não têm dark mode. */
@media (prefers-color-scheme: dark) {
    /* Pinta o viewport inteiro (body) escuro p/ eliminar as faixas brancas
       ao redor da coluna de 600px no modo escuro. */
    body.jdh-fullwidth,
    body.jdh-fullwidth #page,
    body.jdh-fullwidth .site,
    body.jdh-fullwidth #main,
    body.jdh-fullwidth .site-content,
    body.jdh-fullwidth .content-area {
        background: var(--jdh-bg);
    }
}

/* Títulos/links do plugin sempre usam a paleta própria (impede que o tema
   force cores escuras sobre fundo escuro). */
.jdh-page h1,
.jdh-page h2,
.jdh-page h3,
.jdh-page-title { color: var(--jdh-text); }

/* ★ Reset GeneratePress sidebar/grid để plugin chiếm full width */
body .jdh-page .inside-article,
body .jdh-page .site-content,
body .jdh-page .content-area {
    padding: 0 !important;
    margin: 0 !important;
}

body.jdh-fullwidth #primary,
body.jdh-fullwidth #main,
body.jdh-fullwidth .site-content > .content-area,
body.jdh-fullwidth .jdh-page {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.jdh-fullwidth #right-sidebar,
body.jdh-fullwidth #left-sidebar {
    display: none !important;
}

/* Thu header + nav của GeneratePress về cùng khung 600px (căn giữa) cho cân đối với nội dung */
body.jdh-fullwidth .inside-header,
body.jdh-fullwidth .inside-navigation {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.jdh-container {
    max-width: 600px; /* khớp khung 600px của site (content + menu date-tabs + footer) */
    margin: 0 auto;
    padding: 0.85rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

.jdh-page-title {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jdh-page-subtitle {
    margin: 0 0 0.5rem;
    color: var(--jdh-muted);
    font-size: 0.95rem;
}

/* Page head — title + ngày + mô tả SEO */
.jdh-page-head {
    margin-bottom: 0.85rem;
}

.jdh-page-title {
    flex-wrap: wrap;
}

/* Ngày tháng bên cạnh tiêu đề */
.jdh-page-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--jdh-muted);
    text-transform: capitalize;
}
.jdh-page-date::before {
    content: '·';
    margin-right: 0.4rem;
    color: var(--jdh-border);
}

/* Đoạn mô tả từ khóa dưới tiêu đề — full chiều rộng container */
.jdh-page-desc {
    margin: 0.35rem 0 0;
    color: var(--jdh-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Thẻ đỏ báo ngoài match card */
.jdh-card__red {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    margin-left: 0.35rem;
    flex-shrink: 0;
    color: #dc2626;
}
.jdh-card__red-count {
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}
/* Đội khách: badge thẻ đỏ nằm BÊN TRÁI tên (đội nhà giữ bên phải) */
.jdh-card__team--away .jdh-card__red {
    margin-left: 0;
    margin-right: 0.35rem;
}

/* CTA khi trang ao vivo trống → quay về lịch hôm nay */
.jdh-empty-cta {
    text-align: center;
    margin-top: 1rem;
}
.jdh-empty-cta[hidden] { display: none; }
.jdh-btn-link {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--jdh-primary);
    border-radius: 99px;
    color: var(--jdh-primary);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.jdh-btn-link:hover {
    background: var(--jdh-primary);
    color: #fff;
}

/* Wrapper date-tabs toàn cục (render qua wp_body_open) */
.jdh-datetabs-wrap {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0.5rem;
    padding-bottom: 0;
}

/* Legenda dos ícones (trang chi tiết trận) */
.jdh-legend {
    margin: 0 0 1rem;
    background: var(--jdh-bg-soft);
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    padding: 0.5rem 0.9rem;
}
.jdh-legend__title {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--jdh-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    list-style: none;
}
.jdh-legend__title::-webkit-details-marker { display: none; }
.jdh-legend__list {
    list-style: none;
    margin: 0.7rem 0 0.1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
}
.jdh-legend__item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--jdh-text);
}
.jdh-legend__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Legenda de status (1 linha) — explica as abreviações dos cards */
.jdh-status-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    margin: 0 0 1rem;
    padding: 0.5rem 0.9rem;
    background: var(--jdh-bg-soft);
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    font-size: 0.8rem;
    color: var(--jdh-muted);
    line-height: 1.4;
}
.jdh-status-legend__title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.72rem;
}
.jdh-status-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.jdh-status-legend__key {
    font-weight: 700;
    color: var(--jdh-text);
}
.jdh-status-legend__key.jdh-status--live { color: var(--jdh-danger); }
.jdh-status-legend__key.jdh-status--ht   { color: var(--jdh-warning); }

/* =====================================================================
   Section
   ===================================================================== */
.jdh-section {
    margin-bottom: 2rem;
}

.jdh-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--jdh-border);
}

.jdh-section__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jdh-section__count {
    background: var(--jdh-bg-soft);
    color: var(--jdh-muted);
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}

.jdh-section--live .jdh-section__count {
    background: var(--jdh-danger);
    color: #fff;
}

.jdh-section__link {
    color: var(--jdh-primary);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
}
.jdh-section__link:hover { text-decoration: underline; }

.jdh-section__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--jdh-danger);
    display: inline-block;
}

.jdh-section__dot--pulse {
    animation: jdh-pulse 1.4s infinite;
}

@keyframes jdh-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* =====================================================================
   Empty / Error states
   ===================================================================== */
.jdh-empty, .jdh-error {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--jdh-muted);
    background: var(--jdh-bg-soft);
    border-radius: var(--jdh-radius);
}
.jdh-error { color: var(--jdh-danger); }

/* =====================================================================
   League group
   ===================================================================== */
.jdh-group {
    margin-bottom: 1.25rem;
    background: var(--jdh-bg);
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    overflow: hidden;
}

.jdh-group__header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline; /* tên giải + vòng đấu cùng đường chân chữ */
    justify-content: flex-start; /* căn TRÁI */
    gap: 0.1rem 0.5rem;
    padding: 0.55rem 0.875rem;
    background: var(--jdh-bar);
    border-bottom: 1px solid var(--jdh-border);
}

/* Tên giải (căn trái) */
.jdh-group__main {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}

.jdh-group__logo {
    object-fit: contain;
    flex-shrink: 0;
}

.jdh-group__title-link, .jdh-group__title {
    color: var(--jdh-text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jdh-group__title-link:hover { color: var(--jdh-primary); text-decoration: underline; }

/* Vòng đấu / giai đoạn — nằm cạnh tên giải, chữ nhỏ hơn */
.jdh-group__round {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--jdh-muted);
}
.jdh-group__round::before { content: '· '; }

.jdh-group__sep { opacity: 0.5; }

.jdh-group__list {
    display: flex;
    flex-direction: column;
}

/* =====================================================================
   Match card
   ===================================================================== */
.jdh-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid var(--jdh-border);
    background: var(--jdh-bg);
    transition: background 0.15s ease;
}
.jdh-card:first-child { border-top: none; }

.jdh-card:hover {
    background: var(--jdh-bg-hover);
    text-decoration: none;
}

.jdh-card--live {
    border-left: 3px solid var(--jdh-danger);
}

.jdh-card--final {
    opacity: 0.85;
}

/* Hàng thẻ trận: [trạng thái | tên 2 đội xếp dọc | tỉ số xếp dọc] */
.jdh-card__row {
    display: grid;
    grid-template-columns: 2.7rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.5rem 1rem;
}

/* Cột trạng thái (trái) — base + bù giờ xếp dọc cho gọn */
.jdh-card__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--jdh-muted);
}
.jdh-card__state-main { display: inline-flex; align-items: center; gap: 0.2rem; white-space: nowrap; }
.jdh-card__state-stop { font-size: 0.66rem; opacity: 0.85; }
.jdh-card__state.jdh-status--live      { color: var(--jdh-danger); }
.jdh-card__state.jdh-status--ht        { color: var(--jdh-warning); }
.jdh-card__state.jdh-status--susp      { color: var(--jdh-warning); }
.jdh-card__state.jdh-status--ft        { color: var(--jdh-muted); }
.jdh-card__state.jdh-status--cancelled { color: var(--jdh-muted); }
.jdh-card__state.jdh-status--ns        { color: var(--jdh-muted); }

/* Tên 2 đội xếp dọc — full chiều ngang, không cắt bằng "…" */
.jdh-card__names {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.jdh-card__team-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.jdh-card__team-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4rem; /* khớp chiều cao dòng với tỉ số để 2 cột thẳng hàng */
    overflow-wrap: anywhere;
}

/* Tỉ số xếp dọc tương ứng (NS để trống) */
.jdh-card__scores {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
    min-width: 1.1rem;
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}
.jdh-card__score-line { line-height: 1.4rem; }
.jdh-card__pen { font-size: 0.7rem; color: var(--jdh-muted); font-weight: 600; margin-left: 0.15rem; }

.jdh-card__dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--jdh-danger);
}
.jdh-card__dot--pulse {
    animation: jdh-pulse 1.4s infinite;
}

/* =====================================================================
   Match detail page
   ===================================================================== */
.jdh-breadcrumb {
    font-size: 0.85rem;
    color: var(--jdh-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.jdh-breadcrumb a { color: var(--jdh-muted); text-decoration: none; }
.jdh-breadcrumb a:hover { color: var(--jdh-primary); }

.jdh-match__hero {
    background: var(--jdh-bg);
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.jdh-match__league-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--jdh-muted);
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.jdh-match__round {
    text-transform: none;
}

.jdh-match__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start; /* logo + DÒNG ĐẦU tên 2 đội căn bằng nhau khi tên dài xuống dòng */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.jdh-match__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.jdh-match__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.jdh-match__team-name {
    margin: 0;
    font-size: 1rem;
    text-align: center;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.jdh-match__center {
    text-align: center;
    min-height: 64px; /* canh placar ngang tầm logo (logo top-align) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jdh-match__score-big {
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.jdh-match__score-sep {
    color: var(--jdh-muted);
}

.jdh-match__pen-score {
    font-size: 0.95rem;
    color: var(--jdh-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

.jdh-match__kickoff-big {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--jdh-text);
}

.jdh-match__status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--jdh-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.jdh-match__status.is-live { color: var(--jdh-danger); }

.jdh-match__meta {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--jdh-border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--jdh-muted);
}

.jdh-match__meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.jdh-icon { vertical-align: middle; }

/* =====================================================================
   Events timeline
   ===================================================================== */
.jdh-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--jdh-border);
    margin-left: 1.5rem;
}

.jdh-timeline__item {
    display: grid;
    grid-template-columns: 60px 32px 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0 0.6rem 1rem;
    position: relative;
    margin-left: -2px;
    border-left: 2px solid transparent;
}

.jdh-timeline__item--home {
    border-left-color: var(--jdh-primary);
}

.jdh-timeline__item--away {
    border-left-color: var(--jdh-warning);
}

.jdh-timeline__time {
    font-size: 0.8rem;
    color: var(--jdh-muted);
    font-weight: 600;
    text-align: right;
}

.jdh-timeline__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.jdh-timeline__detail {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.9rem;
}

.jdh-timeline__sub {
    font-size: 0.75rem;
    color: var(--jdh-muted);
}

/* =====================================================================
   Events timeline — phase dividers + 2 cột (home/away) + icon-only
   ===================================================================== */
.jdh-timeline2 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

/* Phase divider (1ª Tempo / Intervalo / 2ª Tempo / Prorrogação / Pênaltis) */
.jdh-tl-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin: 1rem 0 0.5rem;
    background: var(--jdh-bg-soft);
    border: 1px dashed var(--jdh-border);
    border-radius: var(--jdh-radius);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--jdh-muted);
}

.jdh-tl-divider__sub {
    background: var(--jdh-warning);
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
}

/* Tỉ số tại mốc kết thúc hiệp (HT / fim do tempo normal / fim da prorrogação) */
.jdh-tl-divider__score {
    background: var(--jdh-accent, #2563eb);
    color: #fff;
    padding: 0.1rem 0.6rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: none;
}

/* Row 3 cột — home | axis | away */
.jdh-tl-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: stretch;
    min-height: 56px;
}

.jdh-tl-side {
    display: flex;
    align-items: center;
    min-width: 0;
}

.jdh-tl-side--home {
    justify-content: flex-end;
}

.jdh-tl-side--away {
    justify-content: flex-start;
}

/* Event card */
.jdh-tl-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--jdh-bg);
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    padding: 0.6rem 0.85rem;
    box-shadow: var(--jdh-shadow);
    max-width: 100%;
}

.jdh-tl-row.is-home .jdh-tl-card {
    border-left: 3px solid var(--jdh-primary);
}

.jdh-tl-row.is-away .jdh-tl-card {
    border-right: 3px solid var(--jdh-warning);
}

.jdh-tl-row.is-home .jdh-tl-card__text {
    text-align: right;
}

.jdh-tl-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jdh-tl-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    font-size: 0.9rem;
    min-width: 0;
    line-height: 1.25;
}

/* Primary actor (scorer / sub-in) — đậm */
.jdh-tl-card__primary {
    color: var(--jdh-text);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Secondary actor (assist / sub-out) — nhạt */
.jdh-tl-card__secondary {
    color: var(--jdh-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

/* Note (pen / gol contra) — nhỏ hơn, italic */
.jdh-tl-card__note {
    color: var(--jdh-muted);
    font-size: 0.7rem;
    font-style: italic;
    opacity: 0.8;
    text-transform: lowercase;
}

/* Axis trung tâm */
.jdh-tl-axis {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.jdh-tl-axis::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--jdh-border);
    transform: translateX(-50%);
}

.jdh-tl-time {
    position: relative;
    z-index: 2;
    background: var(--jdh-bg);
    border: 2px solid var(--jdh-border);
    border-radius: 99px;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--jdh-muted);
    min-width: 44px;
    text-align: center;
}

@media (max-width: 640px) {
    .jdh-tl-row { gap: 0.4rem; }
    .jdh-tl-card { padding: 0.4rem 0.55rem; gap: 0.45rem; }
    .jdh-tl-card__text { font-size: 0.8rem; }
    .jdh-tl-card__secondary { font-size: 0.7rem; }
    .jdh-tl-axis { min-width: 44px; }
    .jdh-tl-time { font-size: 0.7rem; padding: 0.15rem 0.45rem; min-width: 36px; }
}

/* =====================================================================
   Lineups
   ===================================================================== */
.jdh-lineups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.jdh-lineups__team h4 {
    font-size: 0.85rem;
    color: var(--jdh-muted);
    text-transform: uppercase;
    margin: 1rem 0 0.5rem;
    letter-spacing: 0.4px;
}

.jdh-lineups__header {
    padding: 0.5rem;
    text-align: center;
    background: var(--jdh-bg-soft);
    border-radius: var(--jdh-radius);
    margin-bottom: 1rem;
}

.jdh-lineups__formation {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--jdh-primary);
}

.jdh-lineups__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.jdh-lineups__list li {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: var(--jdh-bg-soft);
    border-radius: 4px;
    font-size: 0.85rem;
}

.jdh-lineups__num {
    font-weight: 700;
    color: var(--jdh-primary);
    text-align: center;
}

.jdh-lineups__name {
    font-weight: 500;
}

.jdh-lineups__pos {
    font-size: 0.75rem;
    color: var(--jdh-muted);
}

.jdh-lineups__list--subs li {
    opacity: 0.75;
}

.jdh-lineups__coach {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--jdh-muted);
}

/* =====================================================================
   Statistics bars
   ===================================================================== */
.jdh-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jdh-stat-row {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: 1rem;
}

.jdh-stat-row__value {
    font-weight: 700;
    font-size: 0.95rem;
}
.jdh-stat-row__value--home { text-align: left; }
.jdh-stat-row__value--away { text-align: right; }

.jdh-stat-row__label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--jdh-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.25rem;
}

.jdh-stat-row__bar {
    display: flex;
    height: 8px;
    background: var(--jdh-bg-soft);
    border-radius: 4px;
    overflow: hidden;
}

.jdh-stat-row__bar-home {
    background: var(--jdh-primary);
}

.jdh-stat-row__bar-away {
    background: var(--jdh-warning);
}

/* =====================================================================
   Prediction
   ===================================================================== */
.jdh-prediction__bar {
    display: flex;
    height: 36px;
    border-radius: var(--jdh-radius);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.jdh-prediction__seg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    transition: width 0.3s ease;
}

.jdh-prediction__seg--home { background: var(--jdh-primary); }
.jdh-prediction__seg--draw { background: var(--jdh-muted); }
.jdh-prediction__seg--away { background: var(--jdh-warning); }

.jdh-prediction__legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--jdh-muted);
    margin-bottom: 1rem;
}

.jdh-prediction__advice {
    padding: 1rem;
    background: var(--jdh-bg-soft);
    border-radius: var(--jdh-radius);
    font-size: 0.95rem;
}

/* =====================================================================
   Tables (standings + topscorers)
   ===================================================================== */
.jdh-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    background: var(--jdh-bg);
}

.jdh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.jdh-table th,
.jdh-table td {
    padding: 0.6rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--jdh-border);
}

.jdh-table th {
    background: var(--jdh-bg-soft);
    font-weight: 600;
    color: var(--jdh-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.4px;
}

.jdh-table tbody tr:hover {
    background: var(--jdh-bg-hover);
}

.jdh-table tr:last-child td { border-bottom: none; }

.jdh-col-team {
    text-align: left !important;
    min-width: 140px;
}
.jdh-col-team img {
    vertical-align: middle;
    margin-right: 0.4rem;
}

.jdh-col-points {
    color: var(--jdh-primary);
}

.jdh-group-subtitle {
    margin: 1.5rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--jdh-muted);
}

/* =====================================================================
   League page header
   ===================================================================== */
.jdh-league-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--jdh-bg);
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    margin-bottom: 2rem;
}

.jdh-league-header__logo {
    flex-shrink: 0;
    object-fit: contain;
}

.jdh-league-header__info {
    flex: 1;
}

/* =====================================================================
   Top nav: Logo + site name (trái) + Ao Vivo badge (phải)
   ===================================================================== */
.jdh-topnav {
    max-width: 600px;       /* barra inteira no mesmo quadro de 600px */
    margin: 0 auto;
    background: var(--jdh-bg);
    border: 1px solid var(--jdh-border);
    border-radius: 0 0 var(--jdh-radius) var(--jdh-radius);
    box-shadow: var(--jdh-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.jdh-topnav__inner {
    max-width: 600px; /* khớp khung 600px của site */
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.jdh-topnav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    color: var(--jdh-text);
    font-weight: 700;
    font-size: 1.05rem;
}

.jdh-topnav__brand:hover { color: var(--jdh-primary); }

.jdh-topnav__brand-icon {
    display: inline-flex;
    align-items: center;
    color: var(--jdh-primary);
}

.jdh-topnav__brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
}

.jdh-topnav__live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    color: var(--jdh-danger) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem;
    border-radius: 99px;
    border: 1.5px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.jdh-topnav__live:hover,
.jdh-topnav__live.is-active {
    border-color: var(--jdh-danger);
    background: rgba(239, 68, 68, 0.06);
}

.jdh-topnav__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.jdh-topnav__tg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #229ED2;
    text-decoration: none !important;
    border: 1.5px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.jdh-topnav__tg:hover {
    border-color: #229ED2;
    background: rgba(34, 158, 210, 0.08);
}

.jdh-topnav__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--jdh-danger);
    animation: jdh-pulse 1.4s infinite;
}

.jdh-topnav__count {
    background: var(--jdh-danger);
    color: #fff;
    padding: 0.05rem 0.55rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

@media (max-width: 640px) {
    .jdh-topnav__brand-name { font-size: 0.95rem; }
    .jdh-topnav__live-label { display: none; } /* Mobile: chỉ icon + count */
}

/* =====================================================================
   Date tabs (3 link Ontem/Hoje/Amanhã, segment control trước H1)
   ===================================================================== */
.jdh-datetabs {
    display: flex;
    gap: 0;
    background: var(--jdh-bar);
    border: 1px solid var(--jdh-border);
    border-radius: 99px;
    padding: 4px;
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.jdh-datetabs__tab {
    flex: 1;
    text-align: center;
    padding: 0.7rem 1rem;
    text-decoration: none !important;
    color: var(--jdh-muted);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 99px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.jdh-datetabs__tab:hover {
    color: var(--jdh-text);
}

.jdh-datetabs__tab.is-active {
    background: var(--jdh-primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.3);
}

@media (max-width: 640px) {
    .jdh-datetabs__tab {
        font-size: 0.85rem;
        padding: 0.6rem 0.5rem;
    }
}

/* =====================================================================
   Nav menu enhancement (inject vào theme nav nếu có)
   ===================================================================== */
.jdh-nav-live a {
    color: var(--jdh-danger) !important;
    font-weight: 700;
}

.jdh-nav-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--jdh-danger);
    margin-right: 0.3rem;
    animation: jdh-pulse 1.4s infinite;
}

.jdh-nav-live-count {
    background: var(--jdh-danger);
    color: #fff;
    padding: 0.05rem 0.4rem;
    border-radius: 99px;
    font-size: 0.75rem;
    margin-left: 0.3rem;
    font-weight: 700;
}

/* =====================================================================
   Floating live button (bottom-right)
   ===================================================================== */
.jdh-float-live {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--jdh-danger);
    color: #fff !important;
    border-radius: 99px;
    box-shadow: var(--jdh-shadow-md);
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.jdh-float-live:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.4);
    color: #fff !important;
}

.jdh-float-live__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #fff;
    animation: jdh-pulse 1.4s infinite;
}

.jdh-float-live__count {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.05rem 0.5rem;
    border-radius: 99px;
    font-size: 0.8rem;
}

/* =====================================================================
   Home live banner (clickable Ao Vivo header)
   ===================================================================== */
.jdh-live-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(90deg, rgba(239,68,68,0.08), transparent);
    border-left: 3px solid var(--jdh-danger);
    border-radius: var(--jdh-radius);
    text-decoration: none !important;
    color: var(--jdh-text) !important;
    margin-bottom: 1rem;
    transition: background 0.15s ease;
}
.jdh-live-banner:hover {
    background: linear-gradient(90deg, rgba(239,68,68,0.16), rgba(239,68,68,0.04));
}

.jdh-live-banner__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--jdh-danger);
}

.jdh-live-banner__label {
    font-weight: 700;
    color: var(--jdh-danger);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jdh-live-banner__count {
    background: var(--jdh-danger);
    color: #fff;
    padding: 0.1rem 0.6rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.85rem;
}

.jdh-live-banner__arrow {
    margin-left: auto;
    color: var(--jdh-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* =====================================================================
   Tabs (match detail)
   ===================================================================== */
.jdh-tabs {
    margin-top: 1.5rem;
}

.jdh-tabs__nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--jdh-border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.jdh-tabs__btn {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.65rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--jdh-muted);
    cursor: pointer;
    margin-bottom: -2px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.jdh-tabs__btn:hover {
    color: var(--jdh-text);
}

.jdh-tabs__btn.is-active {
    color: var(--jdh-primary);
    border-bottom-color: var(--jdh-primary);
}

.jdh-tabs__count {
    background: var(--jdh-bg-soft);
    color: var(--jdh-muted);
    padding: 0.05rem 0.45rem;
    border-radius: 99px;
    font-size: 0.75rem;
}

.jdh-tabs__btn.is-active .jdh-tabs__count {
    background: var(--jdh-primary);
    color: #fff;
}

.jdh-tabs__panels {
    min-height: 100px;
}

.jdh-tabs__panel {
    display: none;
}

.jdh-tabs__panel.is-active {
    display: block;
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 768px) {
    .jdh-container { padding: 1rem 0.75rem; }
    .jdh-page-title { font-size: 1.4rem; }
    .jdh-match__teams { gap: 0.75rem; }
    .jdh-match__logo { width: 48px; height: 48px; }
    .jdh-match__center { min-height: 48px; }
    .jdh-match__team-name { font-size: 0.85rem; }
    .jdh-match__score-big { font-size: 2rem; }
    .jdh-lineups { grid-template-columns: 1fr; gap: 1rem; }
    .jdh-card__row { grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: 0.35rem 0.5rem; padding: 0.5rem 0.75rem; }
    .jdh-card__state { font-size: 0.68rem; }
    .jdh-card__team-name { font-size: 0.92rem; }
    .jdh-card__scores { font-size: 1rem; }
    .jdh-float-live {
        bottom: 16px;
        right: 16px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .jdh-page-title { font-size: 1.2rem; }
    .jdh-stat-row { grid-template-columns: 40px 1fr 40px; gap: 0.5rem; }
    .jdh-stat-row__value { font-size: 0.85rem; }
    .jdh-timeline__item { grid-template-columns: 50px 28px 1fr; }
}


/* =====================================================================
   Palpites (trang dự đoán)
   ===================================================================== */
.jdh-palpites { display: flex; flex-direction: column; gap: 0.85rem; }

.jdh-palpite {
    background: var(--jdh-bg);
    border: 1px solid var(--jdh-border);
    border-radius: var(--jdh-radius);
    box-shadow: var(--jdh-shadow);
    padding: 0.85rem 1rem;
}
.jdh-palpite__league {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; color: var(--jdh-muted);
    text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 0.6rem;
}
.jdh-palpite__time { margin-left: auto; font-weight: 700; }

.jdh-palpite__teams {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 0.6rem; text-decoration: none; color: var(--jdh-text); margin-bottom: 0.75rem;
}
.jdh-palpite__team { display: flex; align-items: center; gap: 0.45rem; font-weight: 600; min-width: 0; }
.jdh-palpite__team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jdh-palpite__team--away { justify-content: flex-end; text-align: right; }
.jdh-palpite__vs { color: var(--jdh-muted); font-size: 0.8rem; }
.jdh-palpite__teams:hover .jdh-palpite__team span { color: var(--jdh-primary); }

.jdh-palpite__more { margin-top: 0.6rem; border-top: 1px dashed var(--jdh-border); padding-top: 0.5rem; }
.jdh-palpite__more summary {
    cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--jdh-primary);
    list-style: none;
}
.jdh-palpite__more summary::-webkit-details-marker { display: none; }
.jdh-palpite__more summary::before { content: '▸ '; }
.jdh-palpite__more[open] summary::before { content: '▾ '; }
.jdh-palpite__detail { margin-top: 0.6rem; font-size: 0.88rem; }
.jdh-palpite__detail p { margin: 0.25rem 0; }
.jdh-palpite__winner-note { color: var(--jdh-muted); font-style: italic; }

.jdh-cmp { margin-top: 0.6rem; }
.jdh-cmp__head { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--jdh-muted); margin-bottom: 0.3rem; }
.jdh-cmp__row { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; margin-top: 0.45rem; }
.jdh-cmp__label { color: var(--jdh-muted); text-transform: uppercase; letter-spacing: 0.4px; font-size: 0.68rem; }
.jdh-cmp__val { font-weight: 700; min-width: 2.6em; }
.jdh-cmp__val:last-child { text-align: right; }
.jdh-cmp__bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--jdh-bg-soft); margin-top: 2px; }
.jdh-cmp__seg--home { background: var(--jdh-primary); }
.jdh-cmp__seg--away { background: #94a3b8; }

.jdh-palpite__link {
    display: inline-block; margin-top: 0.7rem; font-size: 0.85rem; font-weight: 600;
    color: var(--jdh-primary); text-decoration: none;
}
.jdh-palpite__link:hover { text-decoration: underline; }


/* =====================================================================
   Futebol na TV (trang lịch chiếu TV)
   ===================================================================== */
.jdh-tv { display: flex; flex-direction: column; }
.jdh-tv__group {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--jdh-border);
}
.jdh-tv__time { font-weight: 800; color: var(--jdh-primary); font-size: 0.95rem; padding-top: 0.15rem; }
.jdh-tv__list { display: flex; flex-direction: column; gap: 0.7rem; }
.jdh-tv__teams { font-weight: 600; }
.jdh-tv__x { color: var(--jdh-muted); font-weight: 400; margin: 0 0.25rem; }
.jdh-tv__league { font-size: 0.78rem; color: var(--jdh-muted); margin-top: 1px; }
.jdh-tv__channels { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.jdh-tv__channel {
    background: var(--jdh-bg-soft);
    border: 1px solid var(--jdh-border);
    border-radius: 99px;
    padding: 0.12rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.jdh-tv__channels--none { color: var(--jdh-muted); font-size: 0.75rem; font-style: italic; }
@media (max-width: 640px) {
    .jdh-tv__group { grid-template-columns: 48px 1fr; gap: 0.5rem; }

    /* Legenda de status — grade de 2 colunas alinhada no mobile */
    .jdh-status-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }
    .jdh-status-legend__title {
        grid-column: 1 / -1;
        margin-bottom: 0.1rem;
    }
    .jdh-status-legend__item {
        white-space: normal;
    }
}

/* =====================================================================
   Shell 2 cột: sidebar điều hướng league (trái) + nội dung (phải)
   Item 3 — hiển thị trên mọi trang plugin.
   ===================================================================== */
.jdh-shell {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: start;
}
/* Khi tắt sidebar trong settings → nội dung chiếm full chiều rộng */
.jdh-shell--no-side {
    grid-template-columns: minmax(0, 1fr);
}
.jdh-shell__main { min-width: 0; }
.jdh-shell__side {
    position: sticky;
    top: 8px;
    align-self: start;
    max-height: calc(100vh - 16px);
    overflow: auto;
    padding: 1.25rem 0 1.25rem 0.75rem;
}

.jdh-leaguenav__group { margin-bottom: 1rem; }
.jdh-leaguenav__title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jdh-muted);
    margin: 0 0 0.4rem;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.jdh-leaguenav__star { color: var(--jdh-warning); flex-shrink: 0; }
.jdh-leaguenav__list { display: flex; flex-direction: column; gap: 1px; }
.jdh-leaguenav__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--jdh-radius);
    text-decoration: none !important;
    color: var(--jdh-text);
    font-size: 0.85rem;
    line-height: 1.2;
}
.jdh-leaguenav__item:hover { background: var(--jdh-bg-hover); }
.jdh-leaguenav__item.is-current {
    background: rgba(22, 163, 74, 0.10);
    color: var(--jdh-primary);
    font-weight: 700;
}
.jdh-leaguenav__group--hot .jdh-leaguenav__item {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--jdh-warning);
    border-radius: 0 var(--jdh-radius) var(--jdh-radius) 0;
    font-weight: 700;
}
.jdh-leaguenav__group--hot .jdh-leaguenav__item:hover {
    background: rgba(245, 158, 11, 0.16);
}
.jdh-leaguenav__group--hot .jdh-leaguenav__item.is-current {
    border-left-color: var(--jdh-primary);
}
.jdh-leaguenav__logo {
    width: 20px; height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.jdh-leaguenav__logo--ph {
    border-radius: 50%;
    background: var(--jdh-border);
}
.jdh-leaguenav__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Phần còn lại gom theo quốc gia — khối thu gọn (collapsible) */
.jdh-leaguenav__country { border-bottom: 1px solid var(--jdh-border); }
.jdh-leaguenav__country:last-child { border-bottom: none; }
.jdh-leaguenav__country-sum {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--jdh-text);
    list-style: none;
    border-radius: var(--jdh-radius);
}
.jdh-leaguenav__country-sum::-webkit-details-marker { display: none; }
.jdh-leaguenav__country-sum:hover { background: var(--jdh-bg-hover); }
.jdh-leaguenav__country-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jdh-leaguenav__country-count {
    font-size: 0.7rem;
    color: var(--jdh-muted);
    background: var(--jdh-bg-soft);
    border-radius: 99px;
    padding: 0.05rem 0.45rem;
}
.jdh-leaguenav__country-sum::after {
    content: '';
    width: 7px; height: 7px;
    border-right: 2px solid var(--jdh-muted);
    border-bottom: 2px solid var(--jdh-muted);
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.jdh-leaguenav__country[open] > .jdh-leaguenav__country-sum::after { transform: rotate(45deg); }
.jdh-leaguenav__list--sub { padding-left: 0.5rem; }
.jdh-leaguenav__list--sub .jdh-leaguenav__item { font-size: 0.82rem; padding: 0.3rem 0.5rem; }

/* Dropdown chọn league: ẩn trên desktop, chỉ hiện ở mobile */
.jdh-leaguenav__select { display: none; }
.jdh-leaguenav__countries { display: block; }

/* =====================================================================
   SEO content section — chỉ render trên 6 trang chính, ngay trước footer.
   Style nhẹ, font nhỏ hơn h1 chính, tách khỏi list match bằng background mềm.
   ===================================================================== */
.jdh-seo-content {
    margin-top: 2rem;
    padding: 1.5rem 0 1.75rem;
    background: var(--jdh-bg-soft);
    border-top: 1px solid var(--jdh-border);
    border-bottom: 1px solid var(--jdh-border);
    color: var(--jdh-text);
}
.jdh-seo-content h2 {
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 0 0 0.75rem;
    font-weight: 800;
    color: var(--jdh-text);
}
.jdh-seo-content h3 {
    font-size: 1rem;
    line-height: 1.35;
    margin: 1.1rem 0 0.5rem;
    font-weight: 700;
    color: var(--jdh-text);
}
.jdh-seo-content p {
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 0.6rem;
    color: var(--jdh-text);
    opacity: 0.92;
}
.jdh-seo-content p:last-child { margin-bottom: 0; }

/* Khi SEO content đứng ngay trên page-footer, gap đã có sẵn → giảm margin-top của footer */
.jdh-seo-content + .jdh-page-footer {
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .jdh-seo-content {
        padding: 1.25rem 0 1.5rem;
    }
    .jdh-seo-content h2 { font-size: 1.1rem; }
    .jdh-seo-content h3 { font-size: 0.98rem; }
    .jdh-seo-content p  { font-size: 0.9rem; }
    .jdh-seo-content + .jdh-page-footer {
        margin-top: 1.25rem;
    }
}

/* =====================================================================
   Section Footer + Social — tách khỏi content chính bằng margin-top cố định
   Không sticky: natural flow, content ngắn thì footer cận sau (không dán đáy viewport),
   content dài thì footer tự đẩy xuống theo dòng chảy.
   Wrapper có padding-top riêng để bg-soft nổi rõ TRƯỚC band footer, kể cả khi
   social không bật (giúp section luôn có visual presence).
   ===================================================================== */
.jdh-page-footer {
    margin-top: 4rem;            /* 64px desktop — khoảng cách cố định với content */
    padding-top: 1rem;           /* bg-soft band rõ trước footer */
    border-top: 1px solid var(--jdh-border);
    background: var(--jdh-bg-soft);
}
@media (max-width: 768px) {
    .jdh-page-footer {
        margin-top: 2.5rem;      /* 40px mobile */
        padding-top: 0.75rem;
    }
}

/* =====================================================================
   Khối mạng xã hội cuối trang
   ===================================================================== */
.jdh-social {
    padding: 0.5rem 0 1.25rem;
}

/* Footer plugin — link About/Termos/Privacidade + copyright */
.jdh-footer {
    margin-top: 1rem;
    border-top: 1px solid var(--jdh-border);
    background: var(--jdh-bar);
    padding: 1.1rem 0;
}
.jdh-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}
.jdh-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.2rem;
}
.jdh-footer__link {
    color: var(--jdh-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}
.jdh-footer__link:hover { color: var(--jdh-primary); text-decoration: underline; }
.jdh-footer__copy {
    margin: 0;
    font-size: 0.82rem;
    color: var(--jdh-muted);
}
.jdh-social__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
    text-align: center;
}
.jdh-social__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.jdh-social__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 99px;
    background: var(--jdh-bg);
    border: 1px solid var(--jdh-border);
    color: var(--jdh-text);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.jdh-social__link:hover { transform: translateY(-1px); }
.jdh-social__link--facebook:hover  { border-color: #1877F2; color: #1877F2; }
.jdh-social__link--instagram:hover { border-color: #E1306C; color: #E1306C; }
.jdh-social__link--x:hover         { border-color: var(--jdh-text); }
.jdh-social__link--youtube:hover   { border-color: #FF0000; color: #FF0000; }
.jdh-social__link--telegram:hover  { border-color: #229ED2; color: #229ED2; }

/* ===== Social + footer trên trang WP tĩnh (Sobre/Termos/Privacidade) =====
   Render qua hook (ngoài .entry-content) nên cần tự canh khung 600px.
   Wrapper .jdh-page-footer bên trong tự lo margin-top + background. */
.jdh-static-chrome {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ===== Responsive: mobile → sidebar thành dải chip cuộn ngang trên đầu ===== */
@media (max-width: 900px) {
    .jdh-shell { display: block; }
    .jdh-shell__side {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0.75rem;
    }
    .jdh-leaguenav__group { margin-bottom: 0.5rem; }
    /* Chỉ nhóm "Em destaque" cuộn ngang dạng chip; các quốc gia vẫn list dọc */
    .jdh-leaguenav__group--hot .jdh-leaguenav__list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.4rem;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }
    .jdh-leaguenav__group--hot .jdh-leaguenav__item {
        flex: 0 0 auto;
        padding: 0.35rem 0.7rem;
    }
    .jdh-leaguenav__name { max-width: 160px; }

    /* Mobile: phần không-hot dùng dropdown cho gọn, ẩn list quốc gia */
    .jdh-leaguenav__select {
        display: block;
        width: 100%;
        padding: 0.55rem 0.7rem;
        font-size: 0.9rem;
        color: var(--jdh-text);
        background: var(--jdh-bg);
        border: 1px solid var(--jdh-border);
        border-radius: var(--jdh-radius);
        box-sizing: border-box;
    }
    .jdh-leaguenav__countries { display: none; }
}

/* =====================================================================
   League fixtures list — gom nhóm theo ngày (tab Próximos / Resultados)
   ===================================================================== */
.jdh-datelist__group { margin-bottom: 1.25rem; }
.jdh-datelist__date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--jdh-muted);
    text-transform: capitalize;
    margin: 0 0 0.5rem;
    padding: 0.35rem 0.6rem;
    background: var(--jdh-bg-soft);
    border-radius: var(--jdh-radius);
}
.jdh-datelist__items { display: flex; flex-direction: column; gap: 0.4rem; }
