/* ============================================
   Hund Stammbaum - Modern & Professional
   Frontend Styles
   ============================================ */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   STAMMBAUM WRAPPER & CONTAINER
   ============================================ */

.stammbaum-wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px 20px;
    border-radius: 12px;
    margin: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.stammbaum-wrapper::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #e74c3c, #27ae60);
    border-radius: 12px 12px 0 0;
}

.stammbaum-container {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    overflow-x: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
}

@media (max-width: 1200px) {
    .stammbaum-container {
        flex-direction: column;
        gap: 40px;
    }
}

/* ============================================
   GENERATION STYLES
   ============================================ */

.generation {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.generation-heading {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary-color);
    position: relative;
    margin-bottom: 10px;
}

.generation-heading::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ============================================
   PARENT CARD STYLES
   ============================================ */

.parent-box {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.parent-box:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--secondary-color);
}

.parent-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.parent-box:hover::before {
    transform: scaleX(1);
}

.parent {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   PARENT NAME & DETAILS
   ============================================ */

.parent-name {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-color);
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.parent-name::before {
    content: attr(data-icon);
    font-size: 1.3em;
}

.parent-titel {
    font-size: 0.95em;
    color: var(--text-light);
    font-style: italic;
    padding: 8px 12px;
    background: var(--light-bg);
    border-left: 3px solid var(--secondary-color);
    border-radius: 4px;
    line-height: 1.4;
}

.parent-titel u {
    color: var(--accent-color);
    font-weight: 600;
}

.parent-untersuchungen {
    font-size: 0.9em;
    color: var(--text-light);
    padding: 12px;
    background: #fef5e7;
    border-left: 3px solid var(--warning-color);
    border-radius: 4px;
    line-height: 1.5;
    text-align: left;
    margin-top: 8px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.stammbaum-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 1.1em;
}

.stammbaum-empty::before {
    content: '🐾';
    display: block;
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ============================================
   STATUS STYLING
   ============================================ */

.parent-box.status-verstorben {
    opacity: 0.7;
    border-left: 3px solid var(--accent-color);
}

.parent-box.status-inaktiv {
    background-color: #f5f5f5;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.status-badge.status-aktiv {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-inaktiv {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-badge.status-verstorben {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .stammbaum-wrapper {
        padding: 30px 15px;
        margin: 20px 0;
    }

    .stammbaum-container {
        flex-direction: column;
        gap: 30px;
    }

    .generation {
        min-width: 100%;
    }

    .generation-heading {
        font-size: 1.3em;
    }

    .parent-box {
        padding: 15px;
    }

    .parent-name {
        font-size: 1.1em;
    }

    .parent-titel,
    .parent-untersuchungen {
        font-size: 0.85em;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .stammbaum-wrapper {
        padding: 20px 10px;
    }

    .generation-heading {
        font-size: 1.1em;
    }

    .parent-box {
        padding: 12px;
    }

    .parent-name {
        font-size: 1em;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.generation {
    animation: fadeInUp 0.6s ease-out;
}

.generation:nth-child(1) {
    animation-delay: 0.1s;
}

.generation:nth-child(2) {
    animation-delay: 0.2s;
}

.generation:nth-child(3) {
    animation-delay: 0.3s;
}

.parent-box {
    animation: fadeInUp 0.5s ease-out backwards;
}

.parent-box:nth-child(1) { animation-delay: 0.4s; }
.parent-box:nth-child(2) { animation-delay: 0.5s; }
.parent-box:nth-child(3) { animation-delay: 0.6s; }
.parent-box:nth-child(4) { animation-delay: 0.7s; }

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .stammbaum-wrapper {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

    .parent-box:hover {
        box-shadow: none;
        transform: none;
    }
}
