/*
 * Pro Tennis — modern frontend.
 * Self-contained: no inline styles, no theme bleed expected.
 * Font: Geist (loaded by the plugin via wp_enqueue_style).
 *
 * MULTI-THEME COMPATIBILITY: every plugin container below is wrapped in
 * a defensive reset so themes that style * with weird line-heights, big
 * heading margins or default `display: list-item` etc. don't bleed in.
 * This is the "preventive reset" added 2026-05-03 — see memory file
 * `feedback_dev_multi_theme_compatibility.md` for the rationale.
 */

/* ============================================================
 * Defensive container reset.
 * Applied to every top-level plugin container so the surrounding
 * theme's CSS can't spill into our layout (large h1-h6 margins,
 * forced line-height, list bullets on stray <ul>, etc.).
 * Specific to plugin-owned classes: zero impact on theme content.
 * ============================================================ */
.pro-tennis-bracket,
.pro-tennis-tabs,
.pro-tennis-oop,
.pro-tennis-home,
.pro-tennis-albo,
.pt-torneo,
.pt-news-single,
.pt-news,
.pt-sponsor__grid,
.pt-infoboxes {
    box-sizing: border-box;
    line-height: 1.5;
}
.pro-tennis-bracket *,
.pro-tennis-bracket *::before,
.pro-tennis-bracket *::after,
.pro-tennis-tabs *,
.pro-tennis-tabs *::before,
.pro-tennis-tabs *::after,
.pro-tennis-oop *,
.pro-tennis-oop *::before,
.pro-tennis-oop *::after,
.pro-tennis-home *,
.pro-tennis-home *::before,
.pro-tennis-home *::after,
.pro-tennis-albo *,
.pro-tennis-albo *::before,
.pro-tennis-albo *::after,
.pt-torneo *,
.pt-torneo *::before,
.pt-torneo *::after,
.pt-news-single *,
.pt-news-single *::before,
.pt-news-single *::after,
.pt-news *,
.pt-news *::before,
.pt-news *::after {
    box-sizing: border-box;
}
/* Heading margins normalized inside our containers (themes often use
 * 2em+ margins on h1-h6 which break our compact layouts). The
 * news-single content area is excluded — there we WANT the theme
 * heading rhythm because it's reading-mode prose. */
.pro-tennis-bracket :is(h1,h2,h3,h4,h5,h6),
.pro-tennis-tabs :is(h1,h2,h3,h4,h5,h6),
.pro-tennis-oop :is(h1,h2,h3,h4,h5,h6),
.pro-tennis-home :is(h1,h2,h3,h4,h5,h6),
.pro-tennis-albo :is(h1,h2,h3,h4,h5,h6),
.pt-torneo > :not(.pt-news-single__content) :is(h1,h2,h3,h4,h5,h6) {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.3;
}
/* Lists: themes sometimes set huge padding-left or unusual list-style.
 * Plugin lists are explicit (drinks bullets only when we want them). */
.pro-tennis-bracket ul, .pro-tennis-bracket ol,
.pro-tennis-tabs   ul, .pro-tennis-tabs   ol,
.pro-tennis-oop    ul, .pro-tennis-oop    ol,
.pro-tennis-home   ul, .pro-tennis-home   ol,
.pt-torneo > nav   ul, .pt-torneo > nav   ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
/* Paragraphs reset: themes can set big bottom margins. We default to a
 * comfortable but compact spacing; specific places that need more room
 * override locally. Again: skip news prose, that wants reading rhythm. */
.pro-tennis-bracket p,
.pro-tennis-tabs   p,
.pro-tennis-oop    p,
.pro-tennis-home   p,
.pt-torneo > nav   p {
    margin: 0 0 8px;
}
/* Anchors inside our containers default to plain text-decoration: themes
 * often underline every <a> which clashes with our card layouts and tab
 * indicators. NOTE: we deliberately do NOT touch border-bottom here —
 * the plugin uses border-bottom semantically (round-tab active state,
 * news card hover bottom edge) so killing it caused regressions. */
.pro-tennis-bracket a,
.pro-tennis-tabs   a,
.pro-tennis-oop    a,
.pro-tennis-home   a,
.pro-tennis-albo   a,
.pt-torneo a:not(.pt-news-single__content a) {
    text-decoration: none;
    text-shadow: none;
}

.pro-tennis-bracket {
    --pro-tennis-accent: #b01d1f;
    --pro-tennis-text: #1a1a1a;
    --pro-tennis-text-muted: #9ca3af;
    --pro-tennis-text-loser: #6b7280;
    --pro-tennis-border: #e5e7eb;
    --pro-tennis-bg: #ffffff;
    --pro-tennis-bg-winner: #f7f9f5;
    --pro-tennis-bg-tab: #f3f4f6;

    max-width: 760px;
    margin: 0 auto;
    color: var(--pro-tennis-text);
    font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'tnum' 1, 'lnum' 1, 'cv11' 1;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}
.pro-tennis-bracket *,
.pro-tennis-bracket *::before,
.pro-tennis-bracket *::after { box-sizing: border-box; }

/* -------- Official PDF button -------- */
.pro-tennis-pdf-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 18px;
    margin: 0 0 18px;
    background: #f3f4f6;
    color: var(--pro-tennis-text);
    border: 1px solid var(--pro-tennis-border);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.pro-tennis-pdf-button:hover,
.pro-tennis-pdf-button:focus-visible {
    /* Lighter red than --pro-tennis-accent so the button feels approachable rather
     * than alarming and doesn't compete with the "active round" red below. */
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    text-decoration: none;
}
.pro-tennis-pdf-button:active { transform: translateY(1px); }
.pro-tennis-pdf-button__icon { font-size: 16px; }

/* -------- Tournament tabs (multi-tournament edition shortcode) -------- */
.pro-tennis-tabs {
    --pro-tennis-accent: #b01d1f;
    --pro-tennis-text: #1a1a1a;
    --pro-tennis-text-muted: #9ca3af;
    --pro-tennis-text-loser: #6b7280;
    --pro-tennis-border: #e5e7eb;
    --pro-tennis-bg-tab: #f3f4f6;

    max-width: 760px;
    margin: 0 auto 18px;
    font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--pro-tennis-text);
    letter-spacing: -0.01em;
}
.pro-tennis-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    padding: 6px;
    background: #fafafa;
    border: 1px solid var(--pro-tennis-border);
    border-radius: 999px;
}
.pro-tennis-tabs__tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 9px 18px;
    color: var(--pro-tennis-text-loser);
    background: transparent;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.005em;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.pro-tennis-tabs__tab:hover {
    /* Soft pink tint on hover for inactive tabs (consistent with the OOP PDF
     * button: lighter than the brand red so the label stays readable). */
    background: #fee2e2;
    color: #b01d1f;
    text-decoration: none;
}
.pro-tennis-tabs__tab.is-active {
    background: #fee2e2;
    color: #b01d1f;
    box-shadow: 0 1px 2px rgba(176, 29, 31, 0.08);
}
.pro-tennis-tabs__tab.is-active:hover {
    background: #fecaca;
    color: #b01d1f;
}
.pro-tennis-tabs__panels { /* container */ }
.pro-tennis-tabs__panel[hidden] { display: none; }

@media (max-width: 540px) {
    .pro-tennis-tabs__nav { border-radius: 12px; padding: 4px; }
    .pro-tennis-tabs__tab { font-size: 13px; padding: 8px 12px; flex: 1 1 calc(50% - 6px); }
}

/* -------- "← Ordini di gioco" breadcrumb -------- */
.pro-tennis-back-link {
    display: inline-block;
    margin: 0 0 12px;
    color: var(--pro-tennis-text-muted, #9ca3af);
    font-family: 'Geist', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: -0.005em;
    transition: color .15s ease;
}
.pro-tennis-back-link:hover {
    color: var(--pro-tennis-accent, #b01d1f);
    text-decoration: none;
}

/* -------- Round tabs -------- */
.pro-tennis-rounds {
    margin: 0 0 18px;
    border-bottom: 1px solid var(--pro-tennis-border);
}
.pro-tennis-rounds ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pro-tennis-rounds li { margin: 0; padding: 0; }
.pro-tennis-rounds a {
    display: block;
    padding: 10px 18px;
    color: var(--pro-tennis-text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.pro-tennis-rounds a:hover,
.pro-tennis-rounds a:focus-visible {
    color: var(--pro-tennis-text);
    background: var(--pro-tennis-bg-tab);
}
.pro-tennis-rounds .is-active a {
    color: var(--pro-tennis-accent);
    border-bottom-color: var(--pro-tennis-accent);
}
.pro-tennis-rounds .is-active a:hover { background: transparent; }

/* -------- Matches list -------- */
.pro-tennis-matches {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pro-tennis-match {
    border-bottom: 1px solid var(--pro-tennis-border);
    padding: 6px 0;
}
.pro-tennis-match:first-child { border-top: 1px solid var(--pro-tennis-border); }

/* -------- Player rows -------- */
.pro-tennis-player {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 36px 36px 36px;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--pro-tennis-text-loser);
    border-radius: 6px;
}
.pro-tennis-player.is-winner {
    color: var(--pro-tennis-text);
    background: var(--pro-tennis-bg-winner);
}

.pro-tennis-flag {
    font-size: 20px;
    line-height: 1;
    text-align: center;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}
.pro-tennis-flag--inline {
    display: inline-block;
    font-size: 1em;
    margin-right: 1px;
    text-align: left;
    width: auto;
}

/* Doubles: hide the dedicated flag column; flags are inline within the name. */
.pro-tennis-bracket[data-doubles="1"] .pro-tennis-player {
    grid-template-columns: minmax(0, 1fr) 36px 36px 36px;
}
.pro-tennis-bracket[data-doubles="1"] .pro-tennis-player > .pro-tennis-flag:not(.pro-tennis-flag--inline) {
    display: none;
}
.pro-tennis-flag-fallback {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--pro-tennis-text-muted);
    border: 1px solid var(--pro-tennis-border);
    padding: 1px 4px;
    border-radius: 3px;
    font-family: inherit;
}

.pro-tennis-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}
.pro-tennis-player.is-winner .pro-tennis-name { font-weight: 600; }

.pro-tennis-seed {
    color: var(--pro-tennis-text-muted);
    font-weight: 500;
    font-size: 0.85em;
    margin-left: 2px;
}
.pro-tennis-empty { color: var(--pro-tennis-text-muted); }

.pro-tennis-tag {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: 1px;
    background: #f3f4f6;
    color: var(--pro-tennis-text-loser);
    border: 1px solid var(--pro-tennis-border);
}
.pro-tennis-tag--ret {
    color: #b45309;
    background: #fef3c7;
    border-color: #fcd34d;
}

.pro-tennis-score--wo {
    color: var(--pro-tennis-accent);
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant: small-caps;
}

.pro-tennis-score {
    text-align: center;
    color: var(--pro-tennis-text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    font-size: 15px;
    position: relative;
}
.pro-tennis-player.is-winner .pro-tennis-score {
    color: var(--pro-tennis-text);
    font-weight: 600;
}
.pro-tennis-score sup {
    font-size: 0.7em;
    font-weight: 500;
    color: var(--pro-tennis-text-muted);
    margin-left: 1px;
    top: -0.5em;
}

/* -------- Mobile -------- */
@media (max-width: 540px) {
    .pro-tennis-bracket { font-size: 14px; }
    .pro-tennis-rounds a { padding: 9px 12px; font-size: 12px; }
    .pro-tennis-player {
        grid-template-columns: 24px minmax(0, 1fr) 30px 30px 30px;
        gap: 6px;
        padding: 7px 8px;
    }
    .pro-tennis-bracket[data-doubles="1"] .pro-tennis-player {
        grid-template-columns: minmax(0, 1fr) 30px 30px 30px;
    }
    .pro-tennis-flag { font-size: 17px; }
    .pro-tennis-score { font-size: 14px; }
}

/* -------- Print -------- */
@media print {
    .pro-tennis-bracket { font-size: 12px; }
    .pro-tennis-player { padding: 4px 6px; }
    .pro-tennis-rounds, .pro-tennis-rounds * { display: none; }
}

/* =====================================================
 * Order of Play (OOP) — frontend
 * =================================================== */

.pro-tennis-oop {
    --pro-tennis-accent: #b01d1f;
    --pro-tennis-text: #1a1a1a;
    --pro-tennis-text-muted: #9ca3af;
    --pro-tennis-text-loser: #6b7280;
    --pro-tennis-border: #e5e7eb;
    --pro-tennis-bg-tab: #f3f4f6;
    --pro-tennis-bg-done: #f3f4f6;
    --pro-tennis-live: #65a30d;
    --pro-tennis-live-bg: #ecfccb;

    max-width: 1100px;
    margin: 0 auto;
    color: var(--pro-tennis-text);
    font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}
.pro-tennis-oop *,
.pro-tennis-oop *::before,
.pro-tennis-oop *::after { box-sizing: border-box; }

/* Defensive resets against theme bleed (link underline, dashed borders). */
.pro-tennis-oop a,
.pro-tennis-oop a:hover,
.pro-tennis-oop a:focus,
.pro-tennis-oop a:visited {
    text-decoration: none;
    border: none;
    box-shadow: none;
}
.pro-tennis-oop .pro-tennis-oop__match,
.pro-tennis-oop .pro-tennis-pdf-button {
    /* Theme often draws dashed underlines on inline links — kill it. */
    background-image: none !important;
    text-decoration: none !important;
}

.pro-tennis-oop--empty { padding: 24px; text-align: center; color: var(--pro-tennis-text-muted); }

/* Header / date picker */
.pro-tennis-oop__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    flex-wrap: wrap;
}
.pro-tennis-oop__date-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.pro-tennis-oop__nav,
.pro-tennis-oop__nav:link,
.pro-tennis-oop__nav:visited,
.pro-tennis-oop__nav:hover,
.pro-tennis-oop__nav:focus,
.pro-tennis-oop__nav:active { text-decoration: none !important; border-bottom: 0 !important; box-shadow: none !important; }
.pro-tennis-oop__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--pro-tennis-bg-tab);
    color: var(--pro-tennis-text);
    font-size: 22px;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
}
.pro-tennis-oop__nav:hover { background: var(--pro-tennis-accent); color: #fff; }
.pro-tennis-oop__nav--disabled { opacity: 0.35; pointer-events: none; }
.pro-tennis-oop__date-select {
    flex: 1;
    text-align: center;
    text-align-last: center;
    border: 1px solid var(--pro-tennis-border);
    border-radius: 8px;
    padding: 10px 32px 10px 14px;
    background: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: var(--pro-tennis-text);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%236b7280' d='M3 4.5l3 3 3-3z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    text-transform: capitalize;
    letter-spacing: -0.01em;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pro-tennis-oop__date-select:hover { border-color: var(--pro-tennis-accent); }
.pro-tennis-oop__date-select:focus { outline: none; border-color: var(--pro-tennis-accent); box-shadow: 0 0 0 3px rgba(176, 29, 31, .12); }
.pro-tennis-oop__generated {
    font-size: 12px;
    color: var(--pro-tennis-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================
 * Tournament home ([pro-tennis-tournament-home])
 * Three landing tiles + LIVE banner with three states. Designed
 * to share the brand palette already used by the rest of the
 * frontend so the shortcode blends in without theme tweaks.
 * ============================================================ */
.pro-tennis-home { font-family: 'Geist', system-ui, sans-serif; max-width: 1100px; margin: 0 auto; }
body .pro-tennis-home > h3.pro-tennis-home__title,
body .pro-tennis-home h3.pro-tennis-home__title {
    text-align: left !important;
    color: #b01d1f !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    margin: 0 0 28px !important;
    padding: 0 0 18px !important;
    border-bottom: 0 !important;
}

/* Match block (live/today/tomorrow/upcoming): heading + 4-card grid */
.pro-tennis-home__matchblock { margin: 0 0 28px; }
.pro-tennis-home__matchblock-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 12px; font-size: 17px; letter-spacing: 0.01em;
    color: var(--pro-tennis-text);
}
.pro-tennis-home__matchblock-title { font-weight: 700; }
.pro-tennis-home__matchblock-icon { font-size: 18px; line-height: 1; }
.pro-tennis-home__matchblock-sub { font-size: 13px; color: #6b7280; font-weight: 500; }
.pro-tennis-home__live-dot {
    display: inline-block; width: 10px; height: 10px;
    background: #16a34a; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
    animation: pro-tennis-home-pulse 1.4s infinite;
}
@keyframes pro-tennis-home-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.pro-tennis-home__matchcards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.pro-tennis-home__matchcards .pro-tennis-oop__match { min-height: 150px; }
.pro-tennis-home__matchblock-cta {
    display: inline-block; margin-top: 12px;
    font-size: 13px; font-weight: 600;
    color: var(--pro-tennis-accent); text-decoration: none;
    border-bottom: 1px dashed currentColor; padding-bottom: 1px;
}
.pro-tennis-home__matchblock-cta:hover { opacity: 0.85; text-decoration: none; }
@media (max-width: 980px) {
    .pro-tennis-home__matchcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
    .pro-tennis-home__matchcards { grid-template-columns: 1fr; }
}

/* Text-only banner (pending/waiting/concluded info row) */
.pro-tennis-home__banner {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px 20px; border-radius: 14px; margin: 0 0 22px;
    border: 1px solid transparent;
}
.pro-tennis-home__banner.is-state-pause {
    background: #f8fafc; border-color: #e2e8f0; color: #334155;
}
.pro-tennis-home__banner-head {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; letter-spacing: 0.01em;
}
.pro-tennis-home__banner-icon { font-size: 20px; line-height: 1; }
.pro-tennis-home__banner-sub { font-size: 14px; opacity: 0.85; }
.pro-tennis-home__banner-cta {
    display: inline-block; align-self: flex-start;
    margin-top: 6px; font-size: 13px; font-weight: 600;
    color: inherit; text-decoration: none; opacity: 0.85;
    border-bottom: 1px dashed currentColor; padding-bottom: 1px;
}
.pro-tennis-home__banner-cta:hover { opacity: 1; text-decoration: none; }

/* Concluded — winners podium (4 cards, one per main category) */
.pro-tennis-home__winnersblock { margin: 0 0 28px; }
.pro-tennis-home__winnersblock-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: linear-gradient(180deg, #fefce8 0%, #fef3c7 100%);
    border: 1px solid #fbbf24; color: #78350f;
    padding: 12px 16px; border-radius: 12px;
    font-size: 16px; margin-bottom: 14px;
}
.pro-tennis-home__winnersblock-icon { font-size: 22px; line-height: 1; }
.pro-tennis-home__winnersblock-sub { font-size: 13px; opacity: 0.8; font-weight: 500; }
.pro-tennis-home__podium {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.pro-tennis-home__podium-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 16px 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    display: flex; flex-direction: column; gap: 10px;
}
.pro-tennis-home__podium-cat {
    font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: #92400e;
}
.pro-tennis-home__podium-winner {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 16px; font-weight: 700; color: #1e293b;
}
.pro-tennis-home__podium-trophy { font-size: 18px; line-height: 1; }
.pro-tennis-home__podium-flag { font-size: 18px; line-height: 1; }
.pro-tennis-home__podium-flag-sm { font-size: 14px; line-height: 1; }
.pro-tennis-home__podium-name { word-break: break-word; }
.pro-tennis-home__podium-score {
    font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
    color: #b45309; padding-top: 2px; border-top: 1px dashed #fde68a; padding-top: 8px;
}
.pro-tennis-home__podium-runner {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 12.5px; color: #64748b; margin-top: -2px;
}
.pro-tennis-home__podium-runner-name { font-weight: 500; }
.pro-tennis-home__podium-runner-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
@media (max-width: 980px) {
    .pro-tennis-home__podium { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
    .pro-tennis-home__podium { grid-template-columns: 1fr; }
}

/* Tiles */
.pro-tennis-home__tiles {
    display: grid; gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pro-tennis-home__tile {
    background: #f9fafb;
    border: 1px solid var(--pro-tennis-border);
    border-radius: 14px;
    padding: 28px 18px;
    text-align: center;
    text-decoration: none !important;
    color: var(--pro-tennis-text);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}
.pro-tennis-home__tile,
.pro-tennis-home__tile:hover,
.pro-tennis-home__tile:focus,
.pro-tennis-home__tile:active,
.pro-tennis-home__tile *,
.pro-tennis-home__tile:hover * { text-decoration: none !important; border-bottom: 0; }
.pro-tennis-home__tile.is-clickable { cursor: pointer; }
.pro-tennis-home__tile.is-clickable:hover {
    transform: translateY(-2px);
    border-color: var(--pro-tennis-accent);
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(176, 29, 31, 0.10), 0 2px 6px rgba(15, 23, 42, 0.06);
    color: var(--pro-tennis-text);
}
.pro-tennis-home__tile-icon {
    width: 140px; height: 140px;
    display: flex; align-items: center; justify-content: center;
}
.pro-tennis-home__tile-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pro-tennis-home__tile-emoji { font-size: 88px; line-height: 1; }
.pro-tennis-home__tile-label {
    font-size: 16px; font-weight: 700; letter-spacing: -0.005em;
    text-transform: uppercase; color: var(--pro-tennis-text);
}

@media (max-width: 720px) {
    .pro-tennis-home__tiles { grid-template-columns: 1fr; }
    .pro-tennis-home__tile { padding: 22px 14px; }
    .pro-tennis-home__tile-icon { width: 110px; height: 110px; }
    .pro-tennis-home__tile-emoji { font-size: 72px; }
}

/* ============================================================
 * Albo d'oro ([pro-tennis-albo-oro])
 * Tabbed view of historical winners + auto-derived rows from
 * the tournaments managed by this plugin. Visual style mirrors
 * the brackets tabs so the page feels coherent across sections.
 * ============================================================ */
.pro-tennis-albo { font-family: 'Geist', system-ui, sans-serif; max-width: 900px; margin: 0 auto; }
.pro-tennis-albo__tabs {
    display: flex; flex-wrap: wrap; gap: 6px;
    background: #fafafa; border: 1px solid var(--pro-tennis-border);
    border-radius: 999px; padding: 6px; margin: 0 0 18px;
}
.pro-tennis-albo__tab {
    flex: 1 1 auto; min-width: 0; text-align: center;
    background: transparent; border: 0; cursor: pointer;
    padding: 9px 16px; border-radius: 999px;
    font-family: inherit; font-weight: 600; font-size: 14px;
    color: var(--pro-tennis-text-loser);
    transition: background-color .15s ease, color .15s ease;
}
.pro-tennis-albo__tab:hover { background: #fee2e2; color: #b01d1f; }
.pro-tennis-albo__tab.is-active { background: #fee2e2; color: #b01d1f; box-shadow: 0 1px 2px rgba(176, 29, 31, 0.08); }
.pro-tennis-albo__panel[hidden] { display: none; }
.pro-tennis-albo__table {
    width: 100%; border-collapse: collapse; font-size: 14px;
    table-layout: fixed;
}
.pro-tennis-albo__table thead th {
    text-align: left; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--pro-tennis-text-muted);
    padding: 10px 12px; border-bottom: 2px solid #cbd5e1;
}
.pro-tennis-albo__table thead th:first-child { width: 80px; }
.pro-tennis-albo__table thead th:nth-child(2),
.pro-tennis-albo__table thead th:nth-child(3) { width: calc((100% - 80px) / 2); }
.pro-tennis-albo__table tbody td {
    padding: 10px 12px; border-bottom: 1px solid #d1d5db;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.pro-tennis-albo__table tbody tr:hover td { background: #fafafa; }
.pro-tennis-albo__year { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--pro-tennis-text); }
.pro-tennis-albo__winner strong { color: var(--pro-tennis-text); }
.pro-tennis-albo__runner { color: var(--pro-tennis-text-loser); }
.pro-tennis-albo__note { color: var(--pro-tennis-text-muted); font-size: 12px; font-style: italic; margin-left: 4px; }
@media (max-width: 540px) {
    .pro-tennis-albo__tabs { border-radius: 12px; }
    .pro-tennis-albo__tab { font-size: 13px; padding: 8px 12px; flex: 1 1 calc(50% - 6px); }
    .pro-tennis-albo__table { font-size: 13px; }
    .pro-tennis-albo__table thead th, .pro-tennis-albo__table tbody td { padding: 8px; }
}

/* Live indicator pulse dot — kept for the per-card LIVE badge after the
 * "Adesso in campo" header banner was removed (the badge is enough). */
.pro-tennis-oop__live-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #65a30d;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 0 rgba(101, 163, 13, 0.7);
    animation: pro-tennis-oop-pulse 1.6s infinite;
}
@keyframes pro-tennis-oop-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(101, 163, 13, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(101, 163, 13, 0); }
    100% { box-shadow: 0 0 0 0 rgba(101, 163, 13, 0); }
}

/* Filters */
.pro-tennis-oop__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
}
.pro-tennis-oop__filter {
    border: 1px solid var(--pro-tennis-border);
    background: #fff;
    color: var(--pro-tennis-text-loser);
    padding: 6px 14px;
    border-radius: 99px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pro-tennis-oop__filter:hover { background: var(--pro-tennis-bg-tab); }
.pro-tennis-oop__filter.is-active {
    background: var(--pro-tennis-accent);
    color: #fff;
    border-color: var(--pro-tennis-accent);
}

/* Grid: column-major flow so every "row" is a slot index. Each court contributes
 * its header + N slot cells via display:contents, which lets grid-auto-rows
 * align cards across courts at equal heights (the tallest card on a row sets
 * the row height for all the others). The PHP renderer passes
 * grid-template-rows inline ("auto" for the header row, then N x 1fr for
 * slot rows) so this is robust regardless of slot count. */
.pro-tennis-oop__grid {
    display: grid;
    gap: 12px;
    grid-auto-flow: column;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pro-tennis-oop__grid[data-courts="1"] { grid-template-columns: 1fr; }
.pro-tennis-oop__grid[data-courts="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pro-tennis-oop__grid[data-courts="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pro-tennis-oop__grid[data-courts="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pro-tennis-oop__grid[data-courts="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pro-tennis-oop__grid[data-courts="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.pro-tennis-oop__court {
    display: contents;
    min-width: 0;
}
.pro-tennis-oop__court-name {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 0;
    background: var(--pro-tennis-bg-tab);
    border-radius: 6px;
    color: var(--pro-tennis-text-loser);
}
.pro-tennis-oop__empty { min-height: 60px; height: 100%; }

/* Match cards: 4-corner layout with centered players in the middle.
 * height:100% lets grid stretch every card on a row to the same height as the
 * tallest one (so doubles names + "or X" alternative don't make neighbors look
 * misaligned). */
.pro-tennis-oop .pro-tennis-oop__match {
    display: flex;
    flex-direction: column;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    min-height: 130px;
    height: 100%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.03) !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
    position: relative;
}
.pro-tennis-oop__match.is-clickable { cursor: pointer; }
a.pro-tennis-oop .pro-tennis-oop__match:hover,
.pro-tennis-oop a.pro-tennis-oop__match:hover {
    border-color: var(--pro-tennis-accent) !important;
    box-shadow: 0 2px 10px rgba(176, 29, 31, 0.12), 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}
a.pro-tennis-oop__match:active { transform: translateY(1px); }

/* Top corners: time tag (left) + round code badge (right) */
.pro-tennis-oop__match-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pro-tennis-text-muted);
}
.pro-tennis-oop__time {
    font-variant-numeric: tabular-nums;
}
.pro-tennis-oop__time--scheduled {
    color: var(--pro-tennis-text);
    font-weight: 700;
}
.pro-tennis-oop__code {
    background: var(--pro-tennis-bg-tab);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--pro-tennis-text-loser);
    font-size: 10.5px;
}

/* Center stack: players + thin separator */
.pro-tennis-oop__players {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 4px;
    gap: 4px;
}
.pro-tennis-oop__player {
    font-size: 14px;
    line-height: 1.35;
    width: 100%;
    color: var(--pro-tennis-text-loser);
    overflow-wrap: anywhere;
}
.pro-tennis-oop__player.is-winner {
    color: var(--pro-tennis-text);
    font-weight: 700;
}
.pro-tennis-oop__player .pro-tennis-oop__name {
    display: block;
}
.pro-tennis-oop__player .pro-tennis-oop__alt {
    display: block;
    color: var(--pro-tennis-text-muted);
    font-size: 11.5px;
    font-style: italic;
    font-weight: 400;
}
.pro-tennis-oop__separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 4px 0;
    color: var(--pro-tennis-text-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pro-tennis-oop__separator::before,
.pro-tennis-oop__separator::after {
    content: '';
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: var(--pro-tennis-border);
}

/* Final score line for completed matches (after the players block).
 * Small bold tabular numbers with the tiebreak as superscript. */
.pro-tennis-oop__score-line {
    margin-top: 6px;
    text-align: center;
    font-size: 12px;
    color: var(--pro-tennis-text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.pro-tennis-oop__score {
    font-weight: 700;
    letter-spacing: 0.02em;
}
.pro-tennis-oop__score sup {
    font-size: 0.7em;
    margin-left: 1px;
    vertical-align: super;
    font-weight: 600;
}
.pro-tennis-oop__score-flag {
    font-weight: 500;
    color: var(--pro-tennis-text-muted);
    margin-left: 4px;
    font-size: 0.9em;
}

.pro-tennis-oop__flag {
    display: inline-block;
    margin-right: 4px;
    font-size: 1em;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    vertical-align: -1px;
}
.pro-tennis-oop__flag--text {
    font-size: 9px;
    font-weight: 700;
    color: var(--pro-tennis-text-muted);
    border: 1px solid var(--pro-tennis-border);
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 4px;
    font-family: inherit;
    vertical-align: 1px;
}
.pro-tennis-oop__seed {
    color: var(--pro-tennis-text-muted);
    font-weight: 500;
    font-size: 0.82em;
    margin-left: 3px;
}

/* Bottom corners: state badge (left) + click-through CTA (right) */
.pro-tennis-oop__match-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-height: 18px;
}
.pro-tennis-oop__state { display: inline-flex; align-items: center; }
.pro-tennis-oop__cta {
    color: var(--pro-tennis-text-muted);
    font-size: 14px;
    line-height: 1;
    transition: color .15s ease, transform .15s ease;
}
a.pro-tennis-oop__match:hover .pro-tennis-oop__cta {
    color: var(--pro-tennis-accent);
    transform: translate(2px, -2px);
}

.pro-tennis-oop__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 99px;
}
.pro-tennis-oop__badge--live {
    background: var(--pro-tennis-live-bg);
    color: #365314;
}
.pro-tennis-oop__badge--live .pro-tennis-oop__live-dot {
    width: 6px; height: 6px; margin: 0;
    background: var(--pro-tennis-live);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(101, 163, 13, 0.7);
    animation: pro-tennis-oop-pulse 1.6s infinite;
}
.pro-tennis-oop__badge--done {
    background: var(--pro-tennis-bg-tab);
    color: var(--pro-tennis-text-loser);
}

/* Card states */
.pro-tennis-oop__match.is-state-live {
    border-color: var(--pro-tennis-live);
    box-shadow: 0 0 0 1px var(--pro-tennis-live) inset, 0 1px 2px rgba(0,0,0,0.04);
}
.pro-tennis-oop__match.is-state-completed {
    background: var(--pro-tennis-bg-done);
    border-color: var(--pro-tennis-border);
}
.pro-tennis-oop__match.is-state-completed .pro-tennis-oop__player {
    color: var(--pro-tennis-text-loser);
}
.pro-tennis-oop__match.is-state-completed .pro-tennis-oop__time,
.pro-tennis-oop__match.is-state-completed .pro-tennis-oop__code {
    opacity: 0.7;
}

/* Filter hidden state */
.pro-tennis-oop__match.is-filtered-out {
    opacity: 0.15;
    pointer-events: none;
}

/* Mobile: stack courts vertically; full-width cards. Restore the per-court
 * flex column (cancel display:contents) so each court collapses to one stack. */
@media (max-width: 720px) {
    .pro-tennis-oop__grid,
    .pro-tennis-oop__grid[data-courts] {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        grid-template-rows: none !important;
    }
    .pro-tennis-oop__court {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .pro-tennis-oop__empty { display: none; }
    .pro-tennis-oop__current-date { font-size: 16px; }
}

/* ============================================================
 * Tournament router shell — [pro-tennis-torneo]
 * Two-column layout: vertical sidebar on the left + content on
 * the right. Mobile collapses the sidebar behind a hamburger
 * overlay. The active menu item gets the brand red as background
 * with white text (per accessibility note in feedback memory).
 * ============================================================ */
.pt-torneo {
    font-family: 'Geist', system-ui, sans-serif;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}
.pt-torneo__topbar { display: none; }

/* Sidebar — sticky on every view except home. On the home view the
 * sidebar holds info-boxes underneath the menu (which can be quite tall),
 * so we let it scroll naturally with the page; sticky there would clip
 * the info-boxes. On every other view the sidebar is just the menu —
 * sticky keeps it always reachable while scrolling brackets / OOP. */
.pt-torneo__sidebar {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}
.pt-torneo[data-view="home"] .pt-torneo__sidebar {
    position: static;
    max-height: none;
    overflow: visible;
}
.pt-torneo__menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pt-torneo__menu-item a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    background: var(--tcsc-accent, #b01d1f);
    color: #fff !important;
    text-decoration: none !important;
    border: 0; border-radius: 6px;
    font-size: 14px; font-weight: 600;
    letter-spacing: 0.005em;
    transition: background-color .15s ease, transform .1s ease;
}
.pt-torneo__menu-item a:hover {
    background: #8a1518; /* darker red on hover */
    transform: translateX(2px);
    color: #fff !important;
}
.pt-torneo__menu-emoji { flex: 0 0 auto; font-size: 16px; line-height: 1; }
.pt-torneo__menu-label { flex: 1; }
.pt-torneo__menu-item.is-active a {
    /* Active = darker red + white (still readable, key contrast rule) */
    background: #6f0f12;
    color: #fff !important;
    box-shadow: inset 3px 0 0 #fff;
    cursor: default;
}
.pt-torneo__menu-item.is-active a:hover {
    background: #6f0f12;
    transform: none;
}
.pt-torneo__menu-item.is-external a::after {
    content: '↗';
    margin-left: auto;
    font-size: 12px;
    opacity: 0.85;
}

/* Main content area */
.pt-torneo__main {
    min-width: 0; /* prevent grid blowout from wide tables */
}
.pt-torneo__placeholder {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    color: #4b5563;
}
.pt-torneo__placeholder p { margin: 6px 0; }

/* Storia view */
.pt-torneo__storia-body { font-size: 16px; line-height: 1.65; color: #1f2937; max-width: 760px; }
.pt-torneo__storia-body p { margin: 0 0 14px; }
.pt-torneo__storia-albo { margin-top: 36px; padding-top: 28px; border-top: 1px solid #e5e7eb; }

/* Sponsor grid */
.pt-sponsor__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.pt-sponsor__cell {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.03);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pt-sponsor__cell img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter .2s ease;
}
/* Same soft red-tinted shadow as the OOP match cards. Applies to every cell
 * (even non-clickable ones) since the user found that hover lift pleasant. */
.pt-sponsor__cell:hover {
    border-color: var(--tcsc-accent, #b01d1f);
    box-shadow: 0 2px 10px rgba(176, 29, 31, 0.12), 0 1px 4px rgba(15, 23, 42, 0.06);
}
.pt-sponsor__cell:hover img { filter: grayscale(0%); }
/* Clickable variant adds a subtle lift; non-link cells stay in place. */
.pt-sponsor__cell--link { cursor: pointer; }
.pt-sponsor__cell--link:hover { transform: translateY(-1px); }
.pt-sponsor__cell--link:active { transform: translateY(1px); }

/* News grid */
.pt-news { font-family: 'Geist', system-ui, sans-serif; }
.pt-news__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.pt-news__card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pt-news__card:hover {
    transform: translateY(-2px);
    border-color: var(--tcsc-accent, #b01d1f);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.pt-news__card-link { color: inherit !important; text-decoration: none !important; display: flex; flex-direction: column; height: 100%; }
.pt-news__card-link:hover { color: inherit !important; text-decoration: none !important; }
.pt-news__card-media {
    width: 100%; aspect-ratio: 16 / 9; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pt-news__card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-news__card-placeholder { font-size: 56px; opacity: 0.4; }
.pt-news__card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pt-news__card-cat {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
    color: var(--tcsc-accent, #b01d1f);
}
.pt-news__card-title { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0; color: #111827; }
.pt-news__card-excerpt { font-size: 13.5px; color: #4b5563; line-height: 1.55; margin: 0; }
.pt-news__card-date { font-size: 11px; color: #9ca3af; margin-top: auto; }
.pt-news__pagination { margin-top: 32px; display: flex; justify-content: center; }
.pt-news__pagination ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pt-news__pagination a, .pt-news__pagination span {
    display: inline-block; padding: 8px 14px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 4px;
    font-size: 13px; color: #4b5563; text-decoration: none !important;
}
.pt-news__pagination a:hover { background: #f3f4f6; }
.pt-news__pagination span.current { background: var(--tcsc-accent, #b01d1f); color: #fff !important; border-color: var(--tcsc-accent, #b01d1f); }

/* Mobile: hamburger overlay */
@media (max-width: 820px) {
    .pt-torneo {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .pt-torneo__topbar {
        display: flex; align-items: center; gap: 12px;
        background: var(--tcsc-accent, #b01d1f);
        color: #fff;
        padding: 12px 16px;
        border-radius: 6px;
        margin: 0 0 4px;
    }
    .pt-torneo__hamburger {
        background: rgba(255,255,255,0.12);
        color: #fff;
        border: 1px solid rgba(255,255,255,0.25);
        padding: 6px 12px;
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
        font-size: 13px;
    }
    .pt-torneo__hamburger:hover { background: rgba(255,255,255,0.22); }
    .pt-torneo__current { font-weight: 600; font-size: 14px; }

    .pt-torneo__sidebar {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.92);
        z-index: 9999;
        padding: 60px 24px 24px;
        display: none;
        overflow-y: auto;
    }
    .pt-torneo__sidebar.is-open { display: block; }
    .pt-torneo__sidebar::before {
        content: '✕';
        position: absolute;
        top: 16px; right: 22px;
        color: #fff;
        font-size: 22px;
        cursor: pointer;
    }
    .pt-torneo__menu-item a {
        font-size: 16px;
        padding: 14px 18px;
    }
    .pt-news__grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * Tournament home — date strip, countdown, info+news row,
 * sponsor strip. Sits inside [pro-tennis-tournament-home] which
 * is rendered both standalone and via the router shell.
 * ============================================================ */
/* Date + countdown row: date a sinistra, countdown a destra (stessa riga) */
.pt-home__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin: -36px 0 28px;
}
.pt-home__dates {
    font-size: 18px;
    font-weight: 700;
    color: var(--tcsc-text, #1a1a1a);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pt-home__countdown {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 1px 3px rgba(180, 83, 9, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.pt-home__countdown-label {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pt-home__countdown-units {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}
.pt-home__countdown-unit {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.pt-home__countdown-unit b {
    font-size: 18px;
    font-weight: 800;
    color: #92400e;
}
.pt-home__countdown-unit span {
    font-size: 9px;
    font-weight: 600;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}
.pt-home__countdown-sep { color: #d97706; opacity: 0.5; }
@media (max-width: 540px) {
    .pt-home__countdown-unit b { font-size: 16px; }
}

.pt-home__section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tcsc-text, #1a1a1a);
    margin: 0 0 14px;
    padding-bottom: 0;
    border-bottom: 0;
}

.pt-home__news-section { margin: 36px 0 0; }

/* Info-box card (in left column) */
.pt-infoboxes { display: flex; flex-direction: column; gap: 14px; }
.pt-infobox {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.03);
}
.pt-infobox.is-clickable { cursor: pointer; }
.pt-infobox:hover {
    border-color: var(--tcsc-accent, #b01d1f);
    box-shadow: 0 2px 10px rgba(176, 29, 31, 0.12), 0 1px 4px rgba(15, 23, 42, 0.06);
}
.pt-infobox.is-clickable:hover { transform: translateY(-2px); }
.pt-infobox__img {
    width: 100%; aspect-ratio: 4 / 3; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pt-infobox__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-infobox__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.pt-infobox__title {
    margin: 0; font-size: 16px; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
    color: #111827;
}
.pt-infobox__emoji { font-size: 20px; line-height: 1; }
.pt-infobox__desc { margin: 0; font-size: 13.5px; color: #4b5563; line-height: 1.5; }
.pt-infobox__btn {
    align-self: flex-start;
    background: var(--tcsc-accent, #b01d1f);
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color .15s ease;
    margin-top: 4px;
}
.pt-infobox__btn:hover { background: #8a1518; color: #fff !important; }

/* News preview in home — 3 columns by default (info-boxes moved to sidebar
 * so the news now have the full main column to themselves). */
.pt-home__news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 820px) { .pt-home__news-grid { grid-template-columns: 1fr; } }
.pt-home__news-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.03);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pt-home__news-card:hover {
    transform: translateY(-2px);
    border-color: var(--tcsc-accent, #b01d1f);
    box-shadow: 0 6px 18px rgba(176, 29, 31, 0.10);
}
.pt-home__news-media {
    width: 100%; aspect-ratio: 16 / 10; background: #f3f4f6;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pt-home__news-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-home__news-placeholder { font-size: 36px; opacity: 0.4; }
.pt-home__news-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pt-home__news-title { font-size: 14px; font-weight: 700; line-height: 1.35; margin: 0; color: #111827; }
.pt-home__news-date { font-size: 11px; color: #9ca3af; margin-top: auto; }
.pt-home__news-all, .pt-home__sponsor-all {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px; font-weight: 600;
    color: var(--tcsc-accent, #b01d1f);
    text-decoration: none !important;
    border-bottom: 1px dashed currentColor;
    padding-bottom: 1px;
}
.pt-home__news-all:hover, .pt-home__sponsor-all:hover { opacity: 0.85; }

/* Sponsor strip in home (4 random) */
.pt-home__sponsor-strip { margin: 36px 0 0; padding-top: 24px; border-top: 1px dashed #e5e7eb; text-align: center; }
.pt-home__sponsor-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 12px;
}
.pt-home__sponsor-cell {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    display: flex; align-items: center; justify-content: center;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color .15s ease, box-shadow .15s ease;
    text-decoration: none !important;
}
.pt-home__sponsor-cell:hover {
    border-color: var(--tcsc-accent, #b01d1f);
    box-shadow: 0 2px 10px rgba(176, 29, 31, 0.12);
}
.pt-home__sponsor-cell img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter .2s ease;
}
.pt-home__sponsor-cell:hover img { filter: grayscale(0%); }

/* ============================================================
 * Router sidebar additions — social icons + live score states
 * ============================================================ */
.pt-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
    justify-content: center;
}
.pt-socials__icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    transition: background-color .15s ease, color .15s ease, transform .1s ease;
    text-decoration: none !important;
}
.pt-socials__icon svg { width: 18px; height: 18px; }
.pt-socials__icon:hover { transform: scale(1.08); color: #fff; }
.pt-socials__icon--instagram:hover { background: #E1306C; }
.pt-socials__icon--facebook:hover  { background: #1877F2; }
.pt-socials__icon--x:hover         { background: #0f0f0f; }
.pt-socials__icon--youtube:hover   { background: #FF0000; }
.pt-socials__icon--tiktok:hover    { background: #000000; }
.pt-socials__icon--linkedin:hover  { background: #0A66C2; }
.pt-socials__icon--threads:hover   { background: #000000; }
.pt-socials__icon--telegram:hover  { background: #229ED9; }
.pt-socials__icon--whatsapp:hover  { background: #25D366; }

/* Live score disabled state — keeps the exact same red box as the other
 * menu items but lighter/desaturated so it visibly reads as "not yet
 * active". The <a> stays an <a> (so all base styles apply) but click is
 * blocked via pointer-events while the surrounding <li> remains hoverable
 * to trigger the custom tooltip. */
.pt-torneo__menu-item.is-live-off > a {
    background: #d97a7c !important; /* lightened brand red */
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.85;
    pointer-events: none; /* clicks blocked, hover still bubbles to the <li> */
    box-shadow: none !important;
}
.pt-torneo__menu-item.is-live-off:hover > a {
    background: #d97a7c !important;
    transform: none !important;
}

/* Custom comic-bubble tooltip on the <li> wrapper. */
.pt-torneo__menu-item { position: relative; }
.pt-torneo__menu-item.is-disabled[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) scale(0.96);
    transform-origin: left center;
    background: #1f2937;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    width: 220px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.10);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 100;
}
.pt-torneo__menu-item.is-disabled[data-tooltip]::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #1f2937;
    opacity: 0;
    transition: opacity .18s ease;
    z-index: 101;
    pointer-events: none;
}
.pt-torneo__menu-item.is-disabled[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
.pt-torneo__menu-item.is-disabled[data-tooltip]:hover::before {
    opacity: 1;
}
@media (max-width: 820px) {
    .pt-torneo__menu-item.is-disabled[data-tooltip]::after,
    .pt-torneo__menu-item.is-disabled[data-tooltip]::before { display: none; }
}

/* Info boxes inside the sidebar (under the socials, on home view only) */
.pt-torneo__sidebar-info {
    margin-top: 22px;
    padding-top: 0;
    border-top: 0; /* invisible divider as requested */
}
.pt-torneo__sidebar-info-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0 0 10px;
    padding: 0;
}
.pt-torneo__sidebar-info .pt-infoboxes { gap: 10px; }
.pt-torneo__sidebar-info .pt-infobox { font-size: 13px; }
.pt-torneo__sidebar-info .pt-infobox__title { font-size: var(--pt-infobox-title-size, 14px); }
.pt-torneo__sidebar-info .pt-infobox__title--top { padding: 12px 12px 8px; margin: 0; }
.pt-torneo__sidebar-info .pt-infobox__body { padding: 12px 14px; gap: 6px; }
.pt-torneo__sidebar-info .pt-infobox__desc { font-size: var(--pt-infobox-desc-size, 12px); }
.pt-torneo__sidebar-info .pt-infobox__desc--rich { font-size: var(--pt-infobox-desc-size, 12px); }
.pt-torneo__sidebar-info .pt-infobox__desc--rich p { margin: 0 0 4px; font-size: var(--pt-infobox-desc-size, 12px); line-height: 1.5; }
.pt-torneo__sidebar-info .pt-infobox__desc--rich p:last-child { margin: 0; }
.pt-torneo__sidebar-info .pt-infobox__btn {
    /* Full-width per request — lo spazio sidebar è limitato e un CTA pieno
     * è più leggibile di uno piccolo allineato a sinistra. */
    display: block;
    width: auto;
    text-align: center;
    align-self: stretch;
    font-size: 13px;
    padding: 8px 12px;
    margin: 10px 12px 12px;
}
.pt-torneo__sidebar-info .pt-infobox.has-image .pt-infobox__btn { margin: 12px 14px 14px; }

/* Image-style infobox: title above, wide image, formatted text below */
.pt-infobox.has-image .pt-infobox__title--top {
    padding: 14px 16px 10px;
    margin: 0;
    color: #84cc16; /* brand-adjacent green per request */
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.pt-infobox.has-image .pt-infobox__img { aspect-ratio: auto; }
.pt-infobox.has-image .pt-infobox__img img { height: auto; max-height: none; }
.pt-infobox.has-image .pt-infobox__desc {
    padding: 14px 16px 0;
}
.pt-infobox.has-image .pt-infobox__desc--rich em { font-style: italic; color: #6b7280; }
.pt-infobox.has-image .pt-infobox__btn { margin: 12px 16px 16px; }
.pt-torneo__sidebar-info .pt-infobox.has-image .pt-infobox__title--top { font-size: 13px; padding: 10px 12px 6px; }
.pt-torneo__sidebar-info .pt-infobox.has-image .pt-infobox__desc { padding: 10px 12px 0; font-size: 12px; }

/* Hamburger sticky on mobile (so it stays reachable when scrolling). */
@media (max-width: 820px) {
    .pt-torneo__topbar {
        position: sticky;
        top: 0;
        z-index: 50;
    }
    .pt-home__sponsor-strip-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 540px) {
    .pt-home__sponsor-strip-grid { grid-template-columns: 1fr; }
}

/* Mobile: bracket tabs + OOP filters scroll horizontally instead of wrapping. */
@media (max-width: 720px) {
    .pro-tennis-tabs__nav {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .pro-tennis-tabs__nav::-webkit-scrollbar { display: none; }
    .pro-tennis-tabs__tab { flex: 0 0 auto; white-space: nowrap; }

    .pro-tennis-oop__filters {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .pro-tennis-oop__filters::-webkit-scrollbar { display: none; }
    .pro-tennis-oop__filter,
    .pro-tennis-oop__filter-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* ============================================================
 * Single news view — rendered inside the router shell when
 * ?pro_tennis_view=news&post=<id>. Read-friendly typography,
 * back link top + bottom for navigation.
 * ============================================================ */
.pt-news-single { font-family: 'Geist', system-ui, sans-serif; max-width: 760px; }
.pt-news-single__back {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tcsc-accent, #b01d1f);
    text-decoration: none !important;
    margin-bottom: 16px;
}
.pt-news-single__back:hover { opacity: 0.85; }
.pt-news-single__back--bottom { margin: 36px 0 0; }
.pt-news-single__cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pt-news-single__cat {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--tcsc-accent, #b01d1f);
    background: rgba(176, 29, 31, 0.08);
    padding: 3px 9px;
    border-radius: 99px;
}
.pt-news-single__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.pt-news-single__meta { color: #9ca3af; font-size: 13px; margin-bottom: 22px; }
.pt-news-single__media {
    width: 100%;
    margin: 0 0 24px;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
}
.pt-news-single__media img { display: block; width: 100%; height: auto; }
.pt-news-single__content {
    color: #1f2937;
    font-size: 16px;
    line-height: 1.7;
}
.pt-news-single__content p { margin: 0 0 16px; }
.pt-news-single__content h2 { font-size: 22px; margin: 28px 0 12px; color: #111827; }
.pt-news-single__content h3 { font-size: 18px; margin: 22px 0 10px; color: #111827; }
.pt-news-single__content a { color: var(--tcsc-accent, #b01d1f); }
.pt-news-single__content img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.pt-news-single__content ul, .pt-news-single__content ol { padding-left: 22px; margin: 0 0 16px; }
.pt-news-single__content blockquote {
    margin: 16px 0;
    padding: 12px 18px;
    border-left: 3px solid var(--tcsc-accent, #b01d1f);
    background: #f9fafb;
    color: #4b5563;
    font-style: italic;
}

/* ============================================================
 * Page-builder gallery normalization. Containers are tagged at
 * render-time with the `pt-news-gallery` class (see PHP fixer in
 * router.php) so we can apply a strict grid layout regardless of
 * what builder emitted them (Themify / Elementor / Divi / WP core).
 * Highest priority: this comes before the generic .gallery rules. */
.pt-news-single .pt-news-single__content .pt-news-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 1fr !important;
    gap: 12px !important;
    margin: 18px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    /* Reset any flex/float the source markup may have set */
    flex: none !important;
    float: none !important;
}
/* Adapt column count to the actual number of children: 1 → 1 col, 2 → 2 col,
 * 3+ → 3 col (default). Uses :has() (Chromium 105+, Safari 15.4+, Firefox
 * 121+ — fine for modern browsers). */
.pt-news-single .pt-news-single__content .pt-news-gallery:has(> :only-child) {
    grid-template-columns: 1fr !important;
}
.pt-news-single .pt-news-single__content .pt-news-gallery:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
/* Direct children of our wrapper are extracted <a> / <figure> / <img>
 * tags (the page-builder's outer divs are gone). Apply uniform aspect-
 * ratio cells with object-fit cropping. */
.pt-news-single .pt-news-single__content .pt-news-gallery > a,
.pt-news-single .pt-news-single__content .pt-news-gallery > figure,
.pt-news-single .pt-news-single__content .pt-news-gallery > img,
.pt-news-single .pt-news-single__content .pt-news-gallery > div {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    float: none !important;
    aspect-ratio: 4 / 3 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background-color: #f3f4f6 !important;
    background-image: none !important;
    display: block !important;
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: none !important;
}
.pt-news-single .pt-news-single__content .pt-news-gallery img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: block !important;
    aspect-ratio: auto !important;
    max-width: none !important;
    max-height: none !important;
}
/* Bare <a> needs to fill its grid cell so the click area covers the photo. */
.pt-news-single .pt-news-single__content .pt-news-gallery > a {
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}
.pt-news-single .pt-news-single__content .pt-news-gallery > a > img,
.pt-news-single .pt-news-single__content .pt-news-gallery > figure > img {
    flex: 1 1 100% !important;
}
@media (max-width: 720px) {
    .pt-news-single .pt-news-single__content .pt-news-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 420px) {
    .pt-news-single .pt-news-single__content .pt-news-gallery {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
 * Gallery override — AGGRESSIVE (legacy, kept as backup for
 * standard WP markup that doesn't trigger the PHP tagger above).
 * WordPress galleries come in 3 markup flavors:
 *   1. [gallery] shortcode → <div class="gallery"><dl class="gallery-item">
 *   2. Gutenberg block (legacy) → <ul class="wp-block-gallery blocks-gallery-grid">
 *   3. Gutenberg block (current) → <figure class="wp-block-gallery has-nested-images">
 * Each uses different float/flex layouts that break with mixed aspect
 * ratios (tall portrait next to short landscape). We force every variant
 * onto a strict CSS grid so the "row" never collapses.
 *
 * High specificity + !important is intentional: the host theme often has
 * its own .wp-block-gallery rules with high specificity that we must beat.
 * ============================================================ */
.pt-news-single .pt-news-single__content .gallery,
.pt-news-single .pt-news-single__content .wp-block-gallery,
.pt-news-single .pt-news-single__content figure.wp-block-gallery,
.pt-news-single .pt-news-single__content .blocks-gallery-grid,
.pt-news-single .pt-news-single__content ul.blocks-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: 1fr !important;
    gap: 12px !important;
    margin: 18px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    align-items: stretch !important;
    justify-items: stretch !important;
}
/* Honor user-chosen column counts when present. */
.pt-news-single .pt-news-single__content .gallery-columns-1,
.pt-news-single .pt-news-single__content .wp-block-gallery.columns-1 { grid-template-columns: 1fr !important; }
.pt-news-single .pt-news-single__content .gallery-columns-2,
.pt-news-single .pt-news-single__content .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.pt-news-single .pt-news-single__content .gallery-columns-3,
.pt-news-single .pt-news-single__content .wp-block-gallery.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.pt-news-single .pt-news-single__content .gallery-columns-4,
.pt-news-single .pt-news-single__content .wp-block-gallery.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.pt-news-single .pt-news-single__content .gallery-columns-5,
.pt-news-single .pt-news-single__content .wp-block-gallery.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.pt-news-single .pt-news-single__content .gallery-columns-6,
.pt-news-single .pt-news-single__content .wp-block-gallery.columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }

/* Direct children of every gallery variant: kill float / max-width / flex. */
.pt-news-single .pt-news-single__content .gallery > *,
.pt-news-single .pt-news-single__content .wp-block-gallery > *,
.pt-news-single .pt-news-single__content .blocks-gallery-grid > *,
.pt-news-single .pt-news-single__content figure.wp-block-gallery > *,
.pt-news-single .pt-news-single__content .gallery .gallery-item,
.pt-news-single .pt-news-single__content .wp-block-gallery .blocks-gallery-item,
.pt-news-single .pt-news-single__content .wp-block-gallery .wp-block-image,
.pt-news-single .pt-news-single__content figure.wp-block-gallery figure {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    float: none !important;
    aspect-ratio: 4 / 3 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: #f3f4f6 !important;
}
/* Image inside any gallery item: always fill the cell, cropped for uniformity. */
.pt-news-single .pt-news-single__content .gallery img,
.pt-news-single .pt-news-single__content .wp-block-gallery img,
.pt-news-single .pt-news-single__content .blocks-gallery-grid img,
.pt-news-single .pt-news-single__content figure.wp-block-gallery img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: block !important;
    aspect-ratio: auto !important;
}
.pt-news-single .pt-news-single__content .gallery .gallery-caption,
.pt-news-single .pt-news-single__content .wp-block-gallery figcaption {
    display: none !important; /* drop captions inside the grid: they break the cell aspect ratio */
}
/* WordPress inserts <br style="clear:both"> between gallery rows; we don't need them. */
.pt-news-single .pt-news-single__content .gallery br,
.pt-news-single .pt-news-single__content .wp-block-gallery br { display: none !important; }

@media (max-width: 720px) {
    .pt-news-single .pt-news-single__content .gallery,
    .pt-news-single .pt-news-single__content .wp-block-gallery,
    .pt-news-single .pt-news-single__content .blocks-gallery-grid,
    .pt-news-single .pt-news-single__content .gallery-columns-3,
    .pt-news-single .pt-news-single__content .gallery-columns-4,
    .pt-news-single .pt-news-single__content .gallery-columns-5,
    .pt-news-single .pt-news-single__content .gallery-columns-6,
    .pt-news-single .pt-news-single__content .wp-block-gallery.columns-3,
    .pt-news-single .pt-news-single__content .wp-block-gallery.columns-4,
    .pt-news-single .pt-news-single__content .wp-block-gallery.columns-5,
    .pt-news-single .pt-news-single__content .wp-block-gallery.columns-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 420px) {
    .pt-news-single .pt-news-single__content .gallery,
    .pt-news-single .pt-news-single__content .wp-block-gallery,
    .pt-news-single .pt-news-single__content .blocks-gallery-grid,
    .pt-news-single .pt-news-single__content [class*="gallery-columns-"],
    .pt-news-single .pt-news-single__content [class*="wp-block-gallery"][class*="columns-"] {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 720px) {
    .pt-news-single__title { font-size: 19px; }
    .pt-news-single__content { font-size: 15px; }
}
