/* Basic layout styles for SV Raitersaich conversion */
body {
    margin: 0;
    background: #000;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 136px;
    background: #000;
    padding: 0;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw; /* prevent header from growing wider than viewport */
    overflow-x: hidden; /* hide any horizontal overflow inside header */
}

.header-left {
    padding-left: 12px;
    width: auto;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
}

.header-left .hamburger-btn { margin-left: 0; }

.header-left img.crest-left { height: 100px; display:block; }

.header-center {
    /* Center the title between left and right areas (crest and hamburger)
       Works when there's one or two crests or a hamburger at the right */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    text-align: center;
    flex: 1 1 auto;
    min-width: 0; /* allow flex child to shrink so right crest remains visible */
}

.header-right {
    padding-right: 20px;
    width: 100px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
}

.header-right img {
    height: 100px;
    display: block;
}

.header .svraitersaich {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 60px;
    color: #FFFF00;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout { display: flex; min-height: calc(100vh - 136px); }

nav {
    width: 152px;
    background: #000;
    color: #fff;
    /* move menu slightly down and right to match original placement */
    padding: 6px 0 0 10px;
    margin: 0;
    box-sizing: border-box;
}

nav table.menu-table {
    width: 100%;
    border: 0;
    margin: 0;
    padding: 0;
}

nav .menu,
nav .menu:visited {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    display: inline; /* compact inline flow like original table links */
    padding: 0;
    line-height: 18px; /* match original row height */
}

nav .menu:hover {
    color: #FFFF00;
    text-decoration: none;
    font-weight: bold;
}

@media (max-width: 800px) {
    .layout { flex-direction: column; }
    /* hide the sidebar nav on narrow screens and rely on the drawer */
    nav { display: none; }
    /* show hamburger already on medium-small devices */
    .hamburger-btn { display:inline-block; }
}

/* Header responsive tweaks: when narrow show only left icon, smaller name and wappen */
@media (max-width: 520px) {
    .header {
        height: 72px;
        align-items: center;
        padding: 0 8px;
    }
    .header-left { width: 72px; padding-left: 8px; }
    .header-left img { height: 56px; }
    /* keep header-right visible so the hamburger button can appear; hide only the crest image */
    .header-right { width: auto; }
    .header-center {
        position: static;
        transform: none;
        margin-left: 8px;
        text-align: left;
    }
    .header .svraitersaich {
        font-size: 18px;
        white-space: normal;
        line-height: 1.1;
    }

    /* Make page headings smaller on small devices for better fit */
    h1.seitenueberschrift, .seitenueberschrift {
        font-size: 18px !important;
        line-height: 1.1;
        white-space: normal;
        overflow: visible;
    }

    /* other heading classes used across templates */
    .contentUeberschrift, div.contentUeberschrift, .contentUeberschriftKlein {
        font-size: 16px !important;
        line-height: 1.15;
    }

    .ueberschrift, .ueberschriftSpielerportrait, h2.spieleSpielerportrait {
        font-size: 16px !important;
        line-height: 1.15;
    }
}

/* Drawer & Hamburger */
.hamburger-btn { display:none; border:0; background:rgba(255,255,255,0.06); color:#fff; font-size:26px; line-height:1; cursor:pointer; padding:6px 10px; border-radius:4px; }
.hamburger-btn:focus { outline:2px solid rgba(255,255,255,0.18); outline-offset:2px; }
.drawer-close { border:0; background:transparent; font-size:20px; padding:12px; cursor:pointer; }
.site-drawer { position:fixed; top:0; left:0; height:100%; width:0; max-width:320px; background:#fff; box-shadow:2px 0 8px rgba(0,0,0,.2); overflow:auto; transition:width .22s ease; z-index:1200; }
.site-drawer.open { width:80%; }
.drawer-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:opacity .18s; z-index:1100; }
.drawer-backdrop.open { opacity:1; pointer-events:auto; }
.site-drawer .menu-list { list-style:none; margin:0; padding:8px 0; text-align:left; }
.site-drawer .menu-list a { display:block; padding:8px 12px; color:#222; text-decoration:none; }
.site-drawer .menu-list a.active { background:#f0f8ff; border-left:4px solid #006; padding-left:12px; }

/* Ensure drawer uses dark link color even when later rules set .menu-table-list links to white */
.site-drawer .menu-table-list a { color: #222 !important; }
.site-drawer .menu-table-list .menu-group-toggle { color: #222 !important; }

/* Drawer: support menu-table-list markup (render_menu uses this class) */
.site-drawer .menu-table-list { list-style:none; margin:0; padding:8px 0; text-align:left; }
.site-drawer .menu-table-list a { display:block; padding:8px 12px; color:#222; text-decoration:none; }
.site-drawer .menu-table-list .menu-group-toggle { display:block; padding:8px 12px; text-align:left; width:100%; background:transparent; border:0; }

/* Accordion submenu styles */
.submenu { display:none; padding-left:0; margin:0; }
.submenu.open { display:block; }
.menu-group-toggle { display:inline-block; text-align:left; padding:2px 0 2px 8px; background:transparent; border:0; color:inherit; cursor:pointer; }
.menu-table-list, .site-drawer .menu-list { list-style:none; margin:0; padding:0; }
.menu-table-list > li { border-bottom:1px solid rgba(255,255,255,0.03); }
.menu-table-list a { color:#fff; text-decoration:none; display:inline-block; padding:0 6px; line-height:18px; }
.site-drawer .menu-list a { color:#222; text-decoration:none; display:block; padding:8px 12px; }
.site-drawer .menu-group-toggle { display:block; padding:8px 12px; text-align:left; width:100%; background:transparent; border:0; }
.menu-table-list .submenu-item a { padding-left:24px; }
.menu-table-list .submenu .submenu-item a { padding-left:28px; }

/* Ensure nested group toggles in sidebar inherit link spacing */
nav .submenu .menu-group-toggle { padding:2px 0 2px 24px; display:inline-block; }

/* Drawer: nested submenu spacing */
.site-drawer .submenu .submenu-item a { padding-left:28px; }
.site-drawer .submenu .menu-group-toggle { display:block; padding:8px 12px 8px 24px; text-align:left; }

/* Desktop sidebar tweaks to resemble previous compact look */
nav .menu-table-list { background:#000; }
nav .menu-table-list a { color:#fff; padding:2px 0 2px 8px; font-size:12px; line-height:18px; }
nav .menu-group-toggle { color:#fff; font-weight:bold; padding:2px 0 2px 8px; display:inline-block; }
nav .submenu { background:rgba(255,255,255,0.02); }

/* Show hamburger on narrow screens and keep right crest visible */
@media (max-width:520px){
    .hamburger-btn { display:inline-block; }
    .header-right img { display:block; height:56px; width:auto; }
}

/* Ensure hamburger is always visible on small viewports even when page content
   causes horizontal overflow: pin it to the viewport instead of the header. */
@media (max-width: 800px) {
    .hamburger-btn {
        position: fixed;
        left: 12px;
        top: calc(12px + env(safe-area-inset-top, 0px));
        z-index: 9999;
        box-shadow: 0 1px 4px rgba(0,0,0,0.18);
        background: rgba(255,255,255,0.06);
    }
}

/* Ensure hamburger cannot be clipped by transformed parents: place in its own stacking context */
.hamburger-btn {
    will-change: transform;
}

/* Content styles for migrated fragments */
/* Fragment-specific styles intentionally omitted here so original fragment
   CSS controls presentation exactly as before. */

/* Centralized fragment wrapper and white message box */
.container {
    max-width: 980px;
    margin: 20px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.seitenueberschrift {
    font-size: 28px;
    margin: 0 0 12px 0;
    color: #000;
}

.contentNachricht {
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    border-radius: 4px;
    color: #000;
    text-align: justify;
}

/* Make the white content box expand to near-full width while keeping padding */
.contentNachricht {
    width: auto;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (min-width: 1400px) {
    .container { max-width: 1400px; }
}

/* Hide left crest on small screens to avoid duplicate crests */
@media (max-width:520px){
    .header-left img.crest-left { display:none; }
}

/* Mobile: make the white content box nearly full-width with small padding */
@media (max-width: 520px) {
    .container { max-width: 100%; padding: 0 8px; }
    .contentNachricht {
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        margin-left: auto;
        margin-right: auto;
        padding: 8px !important;
    }
}

/* Spielübersicht responsive behavior removed (restored previous version) */

/* Mobile cards removed - restoring table-only mobile view */