/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #fdfdfd;
    padding-top: 60px; /* space for fixed header */
}

/* Header and navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #c94e2a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.title {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Details-basiertes Navigationsmenü in der Kopfzeile */
.nav-details {
    margin-left: auto;
    position: relative;
}
.nav-details summary {
    background-color: #c94e2a;
    color: #fff;
    border: 1px solid #fff;
    padding: 0.35rem 0.6rem;
    font-size: 1rem;
    border-radius: 3px;
    cursor: pointer;
    list-style: none;
}
.nav-details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.nav-details nav {
    background-color: #c94e2a;
    border: 1px solid #fff;
    border-top: none;
    position: absolute;
    right: 0;
    width: 220px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 999;
}
.nav-details nav ul {
    list-style: none;
}
.nav-details nav li {
    border-top: 1px solid rgba(255,255,255,0.2);
}
.nav-details nav a {
    display: block;
    padding: 0.6rem 0.8rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}
.nav-details nav a:hover,
.nav-details nav a:focus {
    background-color: rgba(0,0,0,0.1);
}

/* Navigation */
.nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #c94e2a;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    /* Ensure the mobile menu can scroll if there are many items */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}
.nav.open {
    transform: translateY(0);
}
.nav ul {
    list-style: none;
}
.nav li {
    border-top: 1px solid rgba(255,255,255,0.2);
}
.nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
}
.nav a:hover,
.nav a:focus {
    background-color: rgba(0,0,0,0.1);
}

/* Remove desktop override: the navigation is always controlled by the menu button and appears as an overlay */

/* Main content styling */
main {
    /* In the iframe layout the content can use the full width */
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

/* Iframe for rulebook content */
iframe#contentFrame {
    width: 100%;
    /* Account for fixed header and footer height to avoid internal scrollbars */
    min-height: calc(100vh - 100px);
    border: none;
}

/* Provide margin for section tags if still used elsewhere */
section {
    margin-bottom: 2rem;
}
h2 {
    margin-bottom: 0.5rem;
    color: #c94e2a;
}
h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #b63e1e;
}
ol, ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
table.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
table.size-table th,
table.size-table td {
    border: 1px solid #ccc;
    padding: 0.5rem;
    text-align: left;
}
table.size-table th {
    background-color: #f3f3f3;
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #f3f3f3;
    color: #666;
    font-size: 0.9rem;
}