/* SGCW Pokalturnier Master 2.0 – ausschließlich auf erkannten Pokalturnier-Seiten geladen. */

body.sgcw-pokal-premium {
    --sgcw-ink: #18251d;
    --sgcw-muted: #657269;
    --sgcw-green: #1f6a43;
    --sgcw-green-dark: #123f2a;
    --sgcw-green-soft: #edf5ef;
    --sgcw-gold: #d2b36b;
    --sgcw-paper: #f6f7f3;
    --sgcw-white: #fff;
    --sgcw-line: rgba(24, 37, 29, 0.12);
}

body.sgcw-pokal-premium main .entry-header,
body.sgcw-pokal-premium main .page-header,
body.sgcw-pokal-premium .entry-title,
body.sgcw-pokal-premium .page-title,
body.sgcw-pokal-premium .post-thumbnail,
body.sgcw-pokal-premium .featured-image,
body.sgcw-pokal-premium .wp-post-image {
    display: none !important;
}

body.sgcw-pokal-premium main img,
body.sgcw-pokal-premium main picture,
body.sgcw-pokal-premium main figure.wp-block-image,
body.sgcw-pokal-premium main .wp-block-gallery,
body.sgcw-pokal-premium main .gallery,
body.sgcw-pokal-premium main .blocks-gallery-grid {
    display: none !important;
}

.sgcw-event,
.sgcw-event * {
    box-sizing: border-box;
}

.sgcw-event {
    width: min(760px, calc(100% - 2rem));
    max-width: 760px !important;
    margin: clamp(1.1rem, 3vw, 2.4rem) auto clamp(2.5rem, 6vw, 5rem) !important;
    color: var(--sgcw-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sgcw-event__hero {
    position: relative;
    padding: clamp(1.45rem, 3.5vw, 2.35rem);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, var(--sgcw-green-dark), var(--sgcw-green));
    box-shadow: 0 16px 40px rgba(18, 63, 42, 0.15);
    color: var(--sgcw-white);
}

.sgcw-event__hero::after {
    position: absolute;
    right: -4rem;
    bottom: -7rem;
    width: 17rem;
    height: 17rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.sgcw-event__eyebrow,
.sgcw-event__section-label {
    margin: 0 0 0.55rem;
    color: #edd99f;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.4;
    text-transform: uppercase;
}

.sgcw-event__title {
    max-width: none;
    margin: 0;
    color: var(--sgcw-white);
    font-size: clamp(2.15rem, 6vw, 3.65rem);
    font-weight: 800;
    letter-spacing: -0.052em;
    line-height: 1;
}

.sgcw-event__title span {
    color: #e9cf8b;
    font-weight: 450;
}

.sgcw-event__intro {
    max-width: 540px;
    margin: 0.8rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.94rem, 2vw, 1.04rem);
    line-height: 1.55;
}

.sgcw-event__facts {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.sgcw-event__fact {
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.075);
}

.sgcw-event__fact span {
    display: block;
    margin-bottom: 0.22rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sgcw-event__fact strong {
    display: block;
    color: var(--sgcw-white);
    font-size: 0.86rem;
    line-height: 1.35;
}

.sgcw-results {
    margin-top: 0.85rem;
    padding: clamp(1.1rem, 3vw, 1.75rem);
    border: 1px solid var(--sgcw-line);
    border-radius: 1.2rem;
    background: var(--sgcw-white);
    box-shadow: 0 12px 34px rgba(24, 37, 29, 0.075);
}

.sgcw-results__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.sgcw-results__heading .sgcw-event__section-label {
    color: var(--sgcw-green);
}

.sgcw-results h2 {
    margin: 0;
    color: var(--sgcw-ink);
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.sgcw-event__button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.55rem;
    padding: 0.64rem 0.9rem;
    border: 1px solid rgba(31, 106, 67, 0.18);
    border-radius: 999px;
    background: var(--sgcw-green-soft);
    color: var(--sgcw-green-dark);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease;
}

.sgcw-event__button:hover,
.sgcw-event__button:focus-visible {
    background: #e1eee5;
    color: var(--sgcw-green-dark);
    transform: translateY(-1px);
}

.sgcw-event__source-warning {
    margin: 0 0 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(176, 118, 23, 0.24);
    border-radius: 0.8rem;
    background: #fff8e8;
    color: #684d1d;
    font-size: 0.82rem;
    line-height: 1.55;
}

.sgcw-event__source-warning strong {
    color: #4d3713;
}

.sgcw-event__historical-content {
    max-width: 100%;
    overflow-x: auto;
    color: var(--sgcw-ink);
    font-size: 0.9rem;
    line-height: 1.65;
}

.sgcw-event__historical-content > :first-child {
    margin-top: 0;
}

.sgcw-event__historical-content > :last-child {
    margin-bottom: 0;
}

.sgcw-event__historical-content h2,
.sgcw-event__historical-content h3,
.sgcw-event__historical-content h4,
.sgcw-result-card h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.5rem 0 0.65rem;
    color: var(--sgcw-ink);
    font-size: 1.13rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.sgcw-event__historical-content h2:first-child,
.sgcw-event__historical-content h3:first-child,
.sgcw-event__historical-content h4:first-child,
.sgcw-result-card:first-child h3 {
    margin-top: 0;
}

.sgcw-event__historical-content h2::before,
.sgcw-event__historical-content h3::before,
.sgcw-event__historical-content h4::before,
.sgcw-result-card h3::before {
    flex: 0 0 auto;
    width: 0.3rem;
    height: 1.05rem;
    border-radius: 999px;
    background: var(--sgcw-gold);
    content: "";
}

.sgcw-result-card + .sgcw-result-card {
    margin-top: 1.4rem;
}

.sgcw-result-table-wrap {
    max-width: 100%;
    margin: 0.55rem 0 1.2rem;
    overflow-x: auto;
    border: 1px solid var(--sgcw-line);
    border-radius: 0.9rem;
    background: var(--sgcw-white);
    -webkit-overflow-scrolling: touch;
}

.sgcw-result-table,
.sgcw-event__historical-content table {
    width: 100% !important;
    min-width: 600px;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse !important;
    table-layout: auto;
    background: var(--sgcw-white);
    font-size: 0.78rem;
    line-height: 1.35;
}

.sgcw-result-table th,
.sgcw-result-table td,
.sgcw-event__historical-content table th,
.sgcw-event__historical-content table td {
    min-width: 0 !important;
    padding: 0.6rem 0.48rem !important;
    border: 0 !important;
    border-bottom: 1px solid var(--sgcw-line) !important;
    background-image: none !important;
    color: var(--sgcw-ink) !important;
    text-align: left;
    vertical-align: middle;
    white-space: normal;
}

.sgcw-result-table th,
.sgcw-event__historical-content table th {
    background: var(--sgcw-green-soft) !important;
    color: var(--sgcw-green-dark) !important;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sgcw-result-table tbody tr:first-child td {
    background: #fffaf0 !important;
}

.sgcw-result-table tbody tr:nth-child(even):not(:first-child) td {
    background: #fafbf9 !important;
}

.sgcw-result-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.sgcw-event__historical-content p {
    margin: 0.55rem 0;
}

.sgcw-event__historical-content hr {
    margin: 1.4rem 0;
    border: 0;
    border-top: 1px solid var(--sgcw-line);
}

.sgcw-event__empty {
    margin: 0;
    padding: 1rem;
    border-radius: 0.8rem;
    background: var(--sgcw-paper);
    color: var(--sgcw-muted);
}

.sgcw-event__year-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.sgcw-event__year-nav a {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.7rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--sgcw-line);
    border-radius: 0.95rem;
    background: var(--sgcw-paper);
    color: var(--sgcw-green-dark);
    text-decoration: none;
}

.sgcw-event__year-nav a > span {
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 1.15rem;
}

.sgcw-event__year-nav small {
    color: var(--sgcw-muted);
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sgcw-event__year-nav strong {
    font-size: 1rem;
}

.sgcw-event__year-nav-next {
    grid-template-columns: 1fr auto !important;
    text-align: right;
}

.sgcw-event__year-nav-next > span {
    grid-column: 2;
}

@media (max-width: 680px) {
    .sgcw-event {
        width: min(100% - 0.8rem, 760px);
        margin-top: 0.6rem !important;
    }

    .sgcw-event__hero {
        padding: 1.35rem 1rem;
        border-radius: 1.05rem;
    }

    .sgcw-event__facts {
        grid-template-columns: 1fr;
    }

    .sgcw-results {
        padding: 1rem;
        border-radius: 1.05rem;
    }

    .sgcw-results__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sgcw-result-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .sgcw-result-table.sgcw-result-table--cards,
    .sgcw-result-table.sgcw-result-table--cards tbody,
    .sgcw-result-table.sgcw-result-table--cards tr,
    .sgcw-result-table.sgcw-result-table--cards td {
        display: block;
        width: 100% !important;
        min-width: 0;
    }

    .sgcw-result-table.sgcw-result-table--cards thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .sgcw-result-table.sgcw-result-table--cards tbody {
        display: grid;
        gap: 0.65rem;
    }

    .sgcw-result-table.sgcw-result-table--cards tr {
        overflow: hidden;
        border: 1px solid var(--sgcw-line);
        border-radius: 0.8rem;
        background: var(--sgcw-white);
    }

    .sgcw-result-table.sgcw-result-table--cards td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.52rem 0.7rem !important;
        border-bottom: 1px solid var(--sgcw-line) !important;
        background: transparent !important;
        text-align: right !important;
    }

    .sgcw-result-table.sgcw-result-table--cards td::before {
        flex: 0 0 44%;
        color: var(--sgcw-muted);
        content: attr(data-label);
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.035em;
        text-align: left;
        text-transform: uppercase;
    }

    .sgcw-result-table.sgcw-result-table--cards td:first-child {
        background: var(--sgcw-green-soft) !important;
        color: var(--sgcw-green-dark) !important;
        font-weight: 850;
    }

    .sgcw-result-table.sgcw-result-table--cards td:last-child {
        border-bottom: 0 !important;
    }

    .sgcw-event__year-nav {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgcw-event__button {
        transition: none;
    }
}
