/* ============================================
   Vier Elemente – gemeinsames Basis-Stylesheet
   A09 Musterlösung
   ============================================ */

/* ---- Grundlayout ---- */
body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.7;
    max-width: 720px;
    margin: 0 auto;
    padding: 1em 2em;
    color: #222;
    background-color: #fafaf8;
}

/* ---- Überschriften ---- */
h1 {
    font-size: 2em;
    margin-bottom: 0.3em;
    border-bottom: 2px solid currentColor;
    padding-bottom: 0.3em;
}

h2 {
    margin-top: 1.5em;
    font-size: 1.35em;
}

h3 {
    margin-top: 1.2em;
    font-size: 1.1em;
}

/* ---- Links ---- */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---- Navigation ---- */
nav {
    margin-bottom: 1.5em;
    padding: 0.5em 0;
    border-bottom: 1px solid #ccc;
}

nav a {
    margin-right: 0.3em;
}

/* ---- Bilder ---- */
img {
    max-width: 100%;
    height: auto;
}

figure {
    margin: 1.5em 0;
}

figcaption {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    margin-top: 0.3em;
}

/* ---- Tabellen ---- */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

th, td {
    padding: 0.4em 0.8em;
    border: 1px solid #ccc;
    text-align: left;
}

th {
    font-weight: bold;
    background-color: #444;
    color: #fff;
}

tr:nth-child(even) td {
    background-color: #f0f0f0;
}

tr:hover td {
    background-color: #e8f0f8;
}

/* ---- Listen ---- */
ul, ol {
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.3em;
}

/* ---- Definitionslisten ---- */
dt {
    font-weight: bold;
    margin-top: 0.8em;
}

dd {
    margin-left: 1.5em;
    color: #444;
}

/* ---- Formulare ---- */
label {
    display: block;
    margin-top: 1em;
    margin-bottom: 0.3em;
    font-weight: bold;
}

input, select, textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5em 0.7em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41,128,185,0.15);
}

button[type="submit"] {
    margin-top: 1.5em;
    padding: 0.6em 2em;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover {
    background: #111;
}
