/* ==========================================================================
   1. GLOBAL STYLES & HINTERGRUND
   ========================================================================== */

body {
    margin: 0;
    padding: 0;
    color: black;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hintergrund {
    width: 100vw;
    height: 100vh;
    background-image: url("hintergrund.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
}

/* ==========================================================================
   2. NAVIGATION (DROPDOWN-MENÜ)
   ========================================================================== */

/* 2.1 Container & Auslöser */
.main-nav-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nav-trigger {
    background: white;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.nav-trigger:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: #fcfcfc;
}

/* 2.2 Dropdown-Panel */
.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 0;
    min-width: 260px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
}

/* 2.3 Menü-Elemente & Klick-Flächen */
.menu-level {
    display: none;
    list-style: none;
    margin: 0;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.menu-level.active {
    display: block;
}

.nav-content, 
.menu-link, 
.back-btn {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 18px; 
    min-height: 50px;
    box-sizing: border-box;
    color: #222;
    text-decoration: none;
    font-size: 16px; 
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.menu-level li {
    list-style: none;
    margin-bottom: 2px;
}

.menu-level li:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.menu-level li.has-children .nav-content,
.back-btn {
    cursor: pointer;
}

.back-btn {
    margin-bottom: 2px;
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* 2.4 Animation & Icons */
.item-text {
    text-align: left;
    flex: 1;
    display: inline-block;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.3s ease;
}

.menu-level li:hover .item-text {
    animation: hoverMove 0.6s forwards;
}

@keyframes hoverMove {
    0% { transform: translateX(0px); }
    50% { transform: translateX(9px); }
    100% { transform: translateX(6px); }
}

.arrow {
    color: #bbb;
    font-size: 12px;
    width: 20px; 
    text-align: right;
    display: inline-block;
}

/* ==========================================================================
   3. KARTENKOMPONENTE (PROFILKARTE)
   ========================================================================== */

.karten-container {
    perspective: 1200px;
    position: relative;
    width: 400px;
    height: 500px;
}

.profilkarte {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 2s ease-in-out, box-shadow 1.5s ease-in-out;
    cursor: pointer;
}

.profilkarte.is-flipped {
    transform: rotateY(-180deg);
}

/* Gemeinsame Styles für Vorder- und Rückseite */
.vorderseite,
.rueckseite {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 2rem;
    box-sizing: border-box;
    backface-visibility: hidden;
    border-radius: 20px;
    border: 1px solid black;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s ease;
}

/* --- Vorderseite --- */
.vorderseite {
    z-index: 2;
    justify-content: center;
    background-color: white; 
}

/* --- Rückseite --- */
.rueckseite {
    z-index: 1;
    transform: rotateY(180deg);
    background-color: #f1f1f1;
    justify-content: flex-start;
}

/* Inhalts-Elemente */
.profilbild {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 100%;
    display: block;
    margin-bottom: 1rem;
}

.socials {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 5px;
}

.socials img {
    width: 25px;
    height: 25px;
}

/* ==========================================================================
   4. RECHTLICHES (FOOTER)
   ========================================================================== */

.rechtliches-unten {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 14px;
    color: #d3d3d3;
    z-index: 1000;
}

.rechtliches-unten a {
    color: #c0c0c0;
    text-decoration: none;
    margin: 0 5px;
}

.rechtliches-unten a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1000px) {
    .nav {
        left: 85%;
        transform: translateX(-50%);
        max-width: 90vw;
    }

    .dropdown {
        left: 70% !important;
        transform: translateX(-50%);
        top: 180% !important;
        max-width: 80vw;
    }

    .tooltiptext { 
        display: none; 
    }
}