:root {
    --darkblue: #002b6f;
    --textblue: #003b8e;
    --headerH: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =====================
   GRUNDLAYOUT
===================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: var(--textblue);
}

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    padding-top: var(--headerH);
    padding-bottom: 70px;
}

/* =====================
   HEADER (FIXIERT)
===================== */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--darkblue);
    color: #ffffff;
    height: 80px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    z-index: 1000;
}

.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    min-width: 160px;
    position: relative;
}

.header-center {
    flex: 1;
    justify-content: center;
    text-align: center;
}

.header-right {
    min-width: 130px;
    justify-content: flex-end;
    gap: 8px;
    font-size: 14px;
}

/* =====================
   STORY-MENÜ
===================== */

.story-menu-toggle {
    color: #ffffff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.story-dropdown {
    position: absolute;
    top: 70px;
    left: 0;
    min-width: 320px;
    max-width: 420px;
    background: #ffffff;
    border: 2px solid var(--darkblue);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

/* Aufzählungspunkt */
.story-dropdown a {
    position: relative;
    padding-left: 18px;
    color: var(--darkblue);
    text-decoration: none;
    font-size: 15px;
    text-align: left;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    cursor: pointer;
}

.story-dropdown a::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0.2em;
    font-size: 18px;
    line-height: 1;
    color: var(--darkblue);
}

.story-dropdown a:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* =====================
   LOGO & TITEL
===================== */

.logo-title-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
}

.logo-title-link img {
    height: 48px;
}

.site-title {
    font-weight: 900;
    text-transform: uppercase;
    text-shadow:
        1px 1px 0 #87a,
        2px 2px 0 #769,
        3px 3px 0 #658;
}

.site-title-main {
    font-size: clamp(22px, 4vw, 32px);
    letter-spacing: 2px;
}

.site-title-separator {
    margin: 0 4px;
}

.site-title-story {
    font-size: clamp(16px, 2.5vw, 22px);
    font-family: "Brush Script MT", "Segoe Script", "Comic Sans MS", cursive;
    font-weight: 400;
}

/* =====================
   HAUPTBEREICH
===================== */

main {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - var(--headerH) - 70px);
}

.main-left,
.main-right {
    width: 15%;
    min-width: 150px;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    border: 2px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.main-center {
    flex: 1;
}

#storyContainer p {
    margin-bottom: 12px;
    line-height: 1.55;
}

/* =====================
   STORY-NAVIGATION
===================== */

.story-header-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 0;
    height: 0;
}

.nav-triangle-left {
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-right: 32px solid var(--darkblue);
}

.nav-triangle-right {
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 32px solid var(--darkblue);
}

/* =====================
   FOOTER
===================== */

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--darkblue);
    color: #ffffff;
    height: 70px;
    padding: 12px 20px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
}

.footer-left {
    display: flex;
    gap: 14px;
}

.language-select a,
.footer-right a {
    color: #ffffff;
    text-decoration: none;
}

.language-select a.active-lang {
    font-weight: bold;
    text-decoration: underline;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 600px) {
    header {
        flex-direction: column;
        height: auto;
        gap: 10px;
        text-align: center;
    }

    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        justify-content: center;
    }

    .story-dropdown {
        left: 50%;
        transform: translateX(-50%);
        top: 100%;
    }

    main {
        flex-direction: column;
    }

    .main-left,
    .main-right {
        width: 100%;
        min-height: 120px;
    }

    footer {
        flex-direction: column;
        height: auto;
        gap: 8px;
    }

    .footer-left {
        justify-content: center;
    }
}

/* =====================
   NEU: LANDING + TOOLS UI
===================== */

.landing-wrap {
    padding: 10px 0;
}

.landing-title {
    margin-bottom: 16px;
    font-size: 22px;
}

.landing-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0 12px 0;
}

.landing-card {
    display: block;
    border: 2px solid var(--darkblue);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: var(--darkblue);
    background: #fff;
}

.landing-card:hover {
    text-decoration: underline;
}

.landing-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.landing-card-subtitle {
    font-size: 14px;
    color: var(--textblue);
}

.landing-note {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.tools-intro h2 {
    margin-bottom: 8px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.tool-card {
    border: 2px solid var(--darkblue);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
}

.tool-card h3 {
    margin-bottom: 6px;
    font-size: 16px;
}

.tool-card p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.tool-card a {
    color: var(--darkblue);
    font-weight: bold;
    text-decoration: underline;
}

.tool-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.tool-row {
    display: grid;
    gap: 6px;
}

.tool-row label {
    font-weight: bold;
}

.tool-row input,
.tool-row select,
.tool-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font: inherit;
}

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--darkblue);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

.btn-secondary {
    background: #fff;
    color: var(--darkblue);
    border: 2px solid var(--darkblue);
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

.output-box {
    border: 2px solid #bbb;
    border-radius: 10px;
    padding: 12px;
    margin-top: 14px;
    background: #fafafa;
}

.output-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.output-item button {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .landing-cards,
    .tools-grid {
        grid-template-columns: 1fr;
    }
}
/* ===========================
   LANDING STARTSEITE
=========================== */

.landing-wrap {
    padding: 10px 0;
}

.landing-title {
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 700;
}

.landing-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0 12px 0;
}

.landing-card {
    display: block;
    border: 2px solid var(--darkblue);
    border-radius: 10px;
    padding: 16px;
    color: var(--darkblue);
    background: #ffffff;
}

.landing-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.landing-card-subtitle {
    font-size: 14px;
    color: var(--textblue);
}

.landing-current-links{
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.landing-current-link{
    color: var(--darkblue);
    font-weight: 700;
    text-decoration: underline;
}

.landing-current-link:hover{
    opacity: 0.85;
}

.landing-note {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.9;
}

/* Responsive Anpassung */
@media (max-width: 768px) {

    .landing-cards {
        grid-template-columns: 1fr;
    }

}
/* ===== Startseite: Kacheln NICHT unterstreichen bei Hover ===== */
.landing-card,
.landing-card:hover {
  text-decoration: none !important;
}

.landing-card .landing-card-title,
.landing-card .landing-card-subtitle {
  text-decoration: none !important;
}

/* Nur der aktuelle Link darf unterstreichen */
.landing-current-link {
  text-decoration: none;
}

.landing-current-link:hover {
  text-decoration: underline;
}
/* Titel in den Kacheln zentrieren */
.landing-card-title {
  text-align: center;
}

/* Erklärungstext wieder linksbündig */
.landing-card-subtitle {
  text-align: left;
}

/* Aktuelle Story/Problem Links zentrieren */
.landing-current-links {
  text-align: center;
}

/* Zweizeilige Darstellung in Kacheln */
.landing-current-link {
  display: block;
  text-decoration: none;
}

/* Erste Zeile links */
.landing-link-label {
  display: block;
  text-align: left;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Zweite Zeile mittig */
.landing-link-title {
  display: block;
  text-align: center;
  font-weight: 700;
}

/* Link in den Kacheln deutlicher darstellen */
.landing-current-link {
  text-decoration: none;
  color: inherit;
}

/* Nur die zweite Zeile (Titel) soll wie ein echter Link wirken */
.landing-link-title {
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}

/* Hover-Effekt */
.landing-current-link:hover .landing-link-title {
  color: #003a99;
  text-decoration: underline;
}

/* Label normal */
.landing-link-label {
  font-weight: 600;
}