/* ================================================
   1. GLOBALE EINSTELLUNGEN & FONTS
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'MedievalSharp-Regular';
    src: url('fonts/MedievalSharp-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    visibility: hidden;
    font-family: Arial, sans-serif;
    background: #0f0f0f;
    color: white;
    line-height: 1.6;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6,
.nav-links a,
.mobile-link,
.mobile-dropdown-btn {
    font-family: 'MedievalSharp-Regular', Arial, sans-serif;
}

/* ================================================
   2. LAYOUT & NAVIGATION
   ================================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid #c89b3c;
    z-index: 9999;
    padding: 15px 0;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4%;
}

.navbar .navlink {
    color: white;
    text-decoration: none;
    margin-right: 25px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.navbar .navlink:hover {
    color: #c89b3c;
}

.smallnav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.smallnavicon {
    height: 20px;
    width: auto;
    vertical-align: middle;
    filter: grayscale(1) brightness(0.7);
    transition: all 0.3s ease;
}

a:hover .smallnavicon {
    filter: grayscale(0) brightness(1.2);
    transform: scale(1.1);
}

/* --- Dropdown --- */
.dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
    margin-bottom: -12px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(15, 15, 15, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(200, 155, 60, 0.25);
    border-radius: 6px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow: hidden;
}

/* Sicherheits-Brücke */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 16px;
    background: transparent;
}

/* Pfeil oben */
.dropdown-content::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 20px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(15, 15, 15, 0.96);
}

.dropdown-content a {
    color: #e5e5e5;
    padding: 13px 20px;
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(200, 155, 60, 0.08);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    color: #ffffff;
    background: rgba(200, 155, 60, 0.10);
    padding-left: 26px;
    border-left: 3px solid #c89b3c;
}

.dropdown-content a.active {
    color: #c89b3c;
    font-weight: 600;
}

/* --- Language Switch --- */
.lang-switch {
    display: flex;
    gap: 8px;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(200, 155, 60, 0.4);
    align-items: center;
}

.lang-switch a {
    color: #888;
    text-decoration: none;
    transition: color 0.25s ease;
    font-family: sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
}

.lang-switch a:hover,
.lang-switch a.active {
    color: #c89b3c;
}

.lang-switch span {
    color: #555;
}

/* ================================================
   3. BURGER / MOBILE MENU
   ================================================ */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #c89b3c;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.98);
    border-top: 1px solid rgba(200, 155, 60, 0.2);
    padding: 10px 0 20px;
    max-height: calc(100svh - 60px);
    overflow-y: auto;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(200, 155, 60, 0.08);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    color: #c89b3c;
    padding-left: 30px;
}

.mobile-dropdown-btn {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(200, 155, 60, 0.08);
    color: #e5e5e5;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 24px;
    margin-top: 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.mobile-dropdown-btn:hover {
    color: #c89b3c;
    background: transparent;
}

.mobile-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.mobile-dropdown-btn.open .mobile-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    display: none;
    flex-direction: column;
    background: rgba(200, 155, 60, 0.04);
    border-left: 3px solid #c89b3c;
    margin-left: 24px;
}

.mobile-dropdown-content.open {
    display: flex;
}

.mobile-dropdown-content a {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 11px 20px;
    border-bottom: 1px solid rgba(200, 155, 60, 0.06);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-dropdown-content a:last-child {
    border-bottom: none;
}

.mobile-dropdown-content a:hover {
    color: #c89b3c;
    padding-left: 26px;
}

.mobile-lang {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 16px 24px 8px;
    font-size: 0.85rem;
    font-weight: bold;
}

.mobile-lang a {
    color: #888;
    text-decoration: none;
    transition: color 0.25s ease;
    font-family: sans-serif;
}

.mobile-lang a:hover,
.mobile-lang a.active {
    color: #c89b3c;
}

.mobile-lang span {
    color: #555;
}

/* ================================================
   4. SEKTIONEN & SEITENINHALTE
   ================================================ */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 5% 40px;
    clip-path: polygon(0 20%, 100% 0, 100% 80%, 0 100%);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

header p {
    font-size: 22px;
    opacity: 0.9;
}

.logo {
    width: clamp(200px, 100vw, 900px);
    height: auto;
    position: relative;
}

.logo::before {
    content: "";
    display: block;
    width: 100%;
    padding-top: 40%;
    background-image: url("../ressources/Dom_Logo.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0;
    transform: translateY(30px);
    animation: logoFade 2s ease forwards;
    will-change: opacity, transform;
}

section {
    width: 100%;
    padding: 30px 5%;
    display: block;
}

h2 {
    font-size: 40px;
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    font-size: 30px;
    margin-bottom: 15px;
    text-align: center;
}

.about {
    text-align: center;
    font-size: 18px;
    max-width: 800px;
    margin: auto;
}

/* --- Partner, Stats & Download Grid --- */
.partner-grid,
.stats,
.download-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    width: 100%;
}

.partner-grid .stat {
    min-height: 170px;
    width: 175px;
    flex: 0 1 175px;
}

.partner-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 45px;
}

.partner-icon img {
    height: 45px;
    width: auto;
    filter: grayscale(1) brightness(0.7);
    transition: all 0.3s ease;
}

.stat:hover .partner-icon img {
    filter: grayscale(0) brightness(1.2);
    transform: scale(1.1);
}

.stat {
    background: #1a1a1a;
    padding: 20px 10px;
    border-radius: 10px;
    border: 1px solid rgba(200, 155, 60, 0.33);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width: 200px;
    flex: 0 1 200px;
}

.stat h3 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    color: #c89b3c;
    margin-bottom: 15px;
    line-height: 1.2;
}

.stat:hover {
    transform: translateY(-5px);
    border-color: rgba(200, 155, 60, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.download-grid .stat {
    min-height: 180px;
    width: 200px;
    flex: 0 1 200px;
    cursor: pointer;
}

.download-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
}

.download-icon img {
    height: 65px;
    width: auto;
    filter: grayscale(1) brightness(0.7);
    transition: all 0.3s ease;
}

.stat:hover .download-icon img {
    filter: grayscale(0) brightness(1.2);
    transform: scale(1.1);
}

/* --- Buttons --- */
button,
.cta-button-link {
    background: #c89b3c;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    color: black;
    font-weight: bold;
}

button:hover,
.cta-button-link:hover {
    background: #e0b24d;
}

.forum-button {
    background: transparent;
    color: #c89b3c;
    border: 1px solid #c89b3c;
    padding: 15px 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
}

.forum-button:hover {
    background: #c89b3c;
    color: #000;
}

/* --- Sonstige Sektionen (CTA, Spenden) --- */
.cta {
    text-align: center;
    background: #161616;
    padding: 80px 20px;
}

.donation-section {
    text-align: center;
    padding-bottom: 60px;
}

.donation-section button {
    display: inline-block;
    margin-top: 30px;
}

.support-section {
    text-align: center;
}

.centered-image {
    display: block;
    margin: 0 auto;
    max-width: 200px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(54, 54, 54, 0.3));
}

.forum-link-wrapper {
    text-align: center;
    margin-top: 40px;
}

/* ================================================
   5. GALERIE & LIGHTBOX
   ================================================ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px 24px;
    margin: 40px auto 60px;
    padding: 0 10px;
    max-width: 1600px;
}

.gallery img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    border: 1px solid rgba(200, 155, 60, 0.18);
    background: #111;
    transition: all 0.32s ease;
    cursor: zoom-in;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.gallery img:hover {
    transform: translateY(-10px);
    border-color: #c89b3c;
    box-shadow: 0 16px 40px rgba(200, 155, 60, 0.05);
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    background-color: rgba(0, 0, 0, 0.96);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border: 2px solid #c89b3c;
    box-shadow: 0 0 40px rgba(200, 155, 60, 0.2);
    z-index: 10002;
}

#caption {
    color: #c89b3c;
    font-size: 1.2rem;
    margin-top: 15px;
    text-align: center;
    max-width: 90%;
    padding: 0 10px;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #c89b3c;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 10003;
    transition: color 0.3s ease;
}

.close:hover {
    color: #fff;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 20px;
    margin-top: -50px;
    color: #c89b3c;
    font-weight: bold;
    font-size: 60px;
    transition: 0.4s;
    user-select: none;
}

.next {
    right: 0;
}

.prev {
    left: 0;
}

.prev:hover,
.next:hover {
    color: white;
}

/* ================================================
   6. VIDEO
   ================================================ */
.video-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 10px auto;
    aspect-ratio: 16 / 9;
    border: 2px solid #c89b3c;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.video-container lite-youtube {
    width: 100%;
    height: 100%;
}

.media-item {
    width: 90%;
    max-width: 800px;
    margin: 0 auto 20px auto;
    padding-bottom: 40px;
    border-bottom: 3px solid rgba(200, 155, 60, 0.2);
    text-align: center;
}

.media-item:last-child {
    border-bottom: none;
    margin-bottom: 40px;
}

.channel-name {
    font-size: 1.5rem;
    margin-bottom: 0;
}

/* ================================================
   7. POPUP / MODAL
   ================================================ */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.popup.active {
    display: block;
}

.popup .overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.content-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #151515;
    border: 2px solid #c89b3c;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    color: #eee;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    color: #c89b3c;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: white;
}

/* ================================================
   8. UTILITIES & ERWEITERUNGEN (Back to Top / Info)
   ================================================ */
#backToTop {
    display: none;
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border: 2px solid #c89b3c;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

#backToTop::before {
    content: '';
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 12px;
    height: 12px;
    border-top: 3px solid #c89b3c;
    border-right: 3px solid #c89b3c;
}

#backToTop:hover {
    background-color: #c89b3c;
    transform: translateY(-5px);
}

#backToTop:hover::before {
    border-color: black;
}

/* --- Fortschrittsseiten --- */
.progress-page {
    padding: 30px 4%;
    width: 100%;
}

.prog-intro {
    text-align: center;
    margin-bottom: 30px;
}

.prog-intro h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.location-container {
    background: #0f0f0f;
    border: 1px solid #333;
    border-top: 2px solid #c89b3c;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    margin-bottom: 50px;
    position: relative;
}

.location-header {
    background: #1a1a1a;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(200, 155, 60, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-header h3 {
    margin: 0;
    color: #c89b3c;
    font-size: 1.5rem;
}

.status-badge {
    padding: 4px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-radius: 2px;
}

.status-badge.done {
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.status-badge.wip {
    color: #c89b3c;
    border: 1px solid #c89b3c;
}

.location-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.prog-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.sub-item {
    margin-left: 40px;
    margin-top: 10px;
    padding-left: 15px;
    border-left: 1px solid #333;
}

.sub-item-row {
    display: grid;
    /* Erstellt automatisch 2 Spalten, solange Platz ist; wenn es zu eng wird, bricht es um */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px 40px;
    margin-left: 40px;
    margin-top: 12px;
    padding-left: 15px;
    border-left: 2px solid #333;
}

.sub-item-row .prog-item {
    width: 100%;
}

.prog-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.0rem;
    letter-spacing: 0.5px;
    gap: 20px;
    width: 100%;
}

.prog-info span {
    white-space: nowrap;
    display: inline-block;
}

.status-done {
    color: #2ecc71 !important;
}

.status-processing {
    color: #c89b3c !important;
}

.rail-bg {
    background: #000;
    height: 10px;
    border: 1px solid #222;
    padding: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 4px;
}

.rail-fill {
    height: 100%;
    width: 0;
    background-color: #e74c3c;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
}

/* --- Charaktere & Charakter Popup --- */
.characters-stats {
    position: relative;
    z-index: 99;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    width: 100%;
}

.characters-stats .characters-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    padding: 0;
    min-height: 320px;
    width: 260px;
    flex: 0 1 260px;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    z-index: 100;
    border: 0.5px solid rgba(200, 155, 60, 0.25);
    background: #0d0d0d;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.characters-stats .characters-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(200, 155, 60, 0.4);
}

.characters-stats .characters-stat .characters-scalexy {
    position: absolute;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: calc(100% - 58px);
    max-width: 90%;
    object-fit: contain;
    object-position: bottom center;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.characters-stats .characters-stat:hover .characters-scalexy {
    transform: translateX(-50%) scale(1.04);
    filter: brightness(1.1) drop-shadow(0 0 10px rgba(200, 155, 60, 0.5));
}

.characters-stats .characters-stat h3 {
    position: relative;
    z-index: 2;
    pointer-events: none;
    margin: 0;
    width: 100%;
    padding: 56px 0 14px;
    font-size: 1.15rem;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 55%);
}

.characters-popup-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.characters-popup-backdrop.open {
    display: flex;
}

.characters-popup-box {
    position: relative;
    background: #1a1a1a;
    border: 1.5px solid #c89b3c;
    box-shadow: 0 0 40px rgba(200, 155, 60, 0.25);
    color: #e0e0e0;
    width: 92%;
    max-width: 800px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 6px;
}

.characters-popup-banner-wrap {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-bottom: 1.5px solid #c89b3c;
    background: #0d0d0d;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.characters-popup-banner-wrap img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
}

.characters-popup-body {
    padding: 24px 30px 32px;
}

.characters-popup-body h1 {
    color: #c89b3c;
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(200, 155, 60, 0.3);
}

.characters-popup-section {
    margin-bottom: 20px;
}

.characters-popup-section:last-child {
    margin-bottom: 0;
}

.characters-popup-section h4 {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #c89b3c;
    margin: 0 0 7px;
}

.characters-popup-section p {
    font-size: 0.97rem;
    line-height: 1.75;
    color: #ccc;
    margin: 0;
}

.characters-popup-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 30px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    transition: color 0.2s ease;
}

.characters-popup-close:hover {
    color: #c89b3c;
}

/* ================================================
   9. FOOTER
   ================================================ */
footer {
    width: 100%;
    background: black;
    font-size: 14px;
    border-top: 1px solid #1a1a1a;
    padding: 20px 0;
}

.footer-container {
    width: 100%;
    padding: 0 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.footer-logo img {
    height: 80px;
    width: auto;
    display: block;
}

.footer-info {
    flex: 2;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-legal-left,
.footer-legal-right {
    font-size: 11px;
    color: #666;
    text-align: center;
    max-width: 220px;
    line-height: 1.4;
}

.footer-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
}

.footer-center-content p {
    margin: 4px 0;
}

.footer-info a {
    color: #c89b3c;
    text-decoration: none;
    transition: 0.3s;
    margin: 0 5px;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-socials {
    flex: 1;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ================================================
   10. ANIMATIONEN & RESPONSIVE ACCESSIBILITY
   ================================================ */
@keyframes logoFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #c89b3c;
    outline-offset: 3px;
}

/* ================================================
   11. MULTILANGUAGE CLASSES (Sprach-Wechsel Logik)
   ================================================ */
.lang-en,
.lang-pl,
.lang-ru {
    display: none !important;
}

html[lang="en"] .lang-de {
    display: none !important;
}

html[lang="en"] .lang-en {
    display: flex !important;
}

html[lang="pl"] .lang-de {
    display: none !important;
}

html[lang="pl"] .lang-pl {
    display: flex !important;
}

html[lang="ru"] .lang-de {
    display: none !important;
}

html[lang="ru"] .lang-ru {
    display: flex !important;
}

/* ================================================
   12. MOBILE GERÄTE
   ================================================ */
@media (max-width: 960px) {

    /* Layout & Nav */
    .main-nav {
        position: fixed !important; /* Bleibt beim Scrollen am oberen Rand fixiert */
        top: 0;
        left: 0;
        width: 100%;
    }

    .navbar,
    .smallnav .lang-switch {
        display: none;
    }

    .nav-container {
        flex-direction: row !important; /* FIXED: Bleibt nebeneinander, damit die Leiste schmal bleibt */
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .smallnav {
        display: flex;
        width: 100%; /* Nutzt die volle Breite der Navigationsleiste aus */
        justify-content: space-between;
        align-items: center;
        gap: 15px; /* Abstand zwischen den Social-Icons */
    }

    .burger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        margin-top: 2px; /* optische Mitte */
        order: -1; /* Hält den Burger-Button ganz links */
        background: transparent;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    /* Alle direkten Link-Kinder (Social Icons) rücken nach rechts auf */
    .smallnav > a:not(.burger) {
        order: 1;
    }

    /* Das erste Social-Icon stößt sich vom Burger ab und schiebt alle nachfolgenden Icons nach rechts */
    .smallnav > a:not(.burger):first-of-type {
        margin-left: auto;
    }

    /* Verhindert, dass das ausgeklappte mobile Menü hinter dem Header verschwindet */
    .mobile-menu {
        position: fixed;
        top: 60px; /* Höhe der Navigationsleiste */
        left: 0;
        width: 100%;
        z-index: 9998;
    }

    /* Header */
    header {
        /* Ändert das Verhalten, sodass das Bild immer komplett reinpasst */
        background-size: contain;

        /* Hebt die erzwungene volle Bildschirmhöhe auf */
        min-height: auto;

        /* Berechnet eine proportionale Höhe im typischen Querformat (z.B. 16:9) */
        aspect-ratio: 16 / 9;

        /* Reduziert das Padding massiv, damit Inhalt und Burger Platz haben */
        padding: 20px 4% 10px !important;

        clip-path: none !important; /* Schaltet die Schräge ab */
        
        /* WICHTIG: Schiebt den Header exakt unter die fixierte Navigationsleiste beim Laden */
        margin-top: 60px !important; 
        
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Verringert die Abstände zwischen Logo und Text auf Mobilgeräten */
    .header-content {
        gap: 8px !important;
        width: 100%;
    }

    /* Sorgt dafür, dass sich das Logo-Viereck mobil sauber verkleinert */
    .logo::before {
        transform: translateY(0) !important; /* Verhindert Animations-Verschiebungen */
        padding-top: 35% !important; 
    }

    /* Da der Header nun flacher ist, wird die Schrift dynamisch verkleinert */
    header p {
        font-size: clamp(11px, 3.5vw, 15px) !important;
        margin: 0;
        padding: 0 10px;
    }

    /* --- Team-Liste (Fluid von Tablet bis Smartphone) --- */
    .team-container {
        padding: 25px 4%;
    }

    .section-title {
        font-size: clamp(1.6rem, 5vw, 2rem);
        margin-bottom: 25px;
    }

    .team-item {
        display: flex;
        flex-direction: row; 
        justify-content: flex-start;
        align-items: center; /* Zentriert die Zeileninhalte auf Tablets */
        padding: 16px 12px;
        gap: clamp(12px, 3vw, 20px);
    }

    .member-info {
        display: flex;
        flex-direction: row; /* Nebeneinander auf Tablets */
        align-items: center;
        gap: 15px;
        flex-shrink: 0;
        min-width: 180px; /* Garantiert festen Raum für Name und Avatar */
    }

    .team-avatar {
        width: clamp(55px, 8vw, 75px);
        height: clamp(55px, 8vw, 75px);
    }

    .team-name {
        font-size: clamp(1rem, 2vw, 1.2rem);
    }

    .team-roles {
        justify-content: flex-end; /* Schiebt Badges auf größeren Displays nach rechts */
        flex-grow: 1;
        gap: 6px;
    }

    .role-badge {
        font-size: clamp(0.7rem, 1.5vw, 0.8rem);
        padding: 3px 8px;
    }

    .sub-item-row {
        margin-left: 15px;  /* Weniger Einzug auf Mobilgeräten */
        padding-left: 10px;
        grid-template-columns: 1fr; /* Erzwingt eine einspaltige Liste auf Smartphones */
        gap: 12px;
    }

    /* Spezifisches Verhalten für Smartphones (unter 520px Breite) */
    @media (max-width: 520px) {
        .team-item {
            align-items: flex-start; /* Oben ausrichten bei Zeilenumbruch */
        }
        
        .member-info {
            flex-direction: column; /* Name rückt unter den Avatar */
            text-align: center;
            min-width: 75px; /* Kompakte Breite für das Profil */
            gap: 6px;
        }
        
        .team-name {
            font-size: 0.9rem;
            word-break: break-word;
            line-height: 1.2;
        }

        .team-roles {
            justify-content: flex-start; /* Badges füllen linksbündig den Rest des Screens */
            padding-top: 2px;
        }
        
        .role-badge {
            white-space: normal; /* Verhindert Clipping bei langen Badge-Namen */
            text-align: center;
        }
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 28px;
        padding: 0 4vw;
    }

    .footer-logo,
    .footer-info,
    .footer-socials {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .footer-logo img {
        height: 80px;
        max-width: 80%;
    }

    .footer-socials {
        order: 2;
        gap: 24px;
        flex-wrap: wrap;
    }

    .footer-socials img.smallnavicon {
        height: 24px;
    }

    /* Footer Info – Trademark oben/mitte/unten */
    .footer-info {
        order: 3;
        line-height: 1.5;
        font-size: 0.95rem;
        flex-direction: column; /* alles untereinander */
        align-items: center; /* zentriert */
        gap: 18px; /* schöner Abstand */
        text-align: center;
    }

    .footer-legal-left {
        order: 1; /* Trademark oben */
    }

    .footer-center-content {
        order: 2; /* Impressum + Datenschutz in der Mitte */
    }

    .footer-legal-right {
        order: 3; /* Trademark unten */
    }
}
