                                /* =========================
   RESET & BODY
========================= */
body {
    font-family: Arial, sans-serif;
    background: #0e5758;
    margin: 0;
    padding: 0;
}

/* =========================
   HEADER
========================= */
.header {
    background: #14524f;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

/* =========================
   BUTTONS
========================= */
.btn {
    background: #3498db;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.btn:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* =========================
   CARD
========================= */
.card {
    background: #f5f5f5;
    color: #000;
    padding: 15px;
    border-radius: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    text-align: center;
}

.card h2,
.card h3,
.card p,
.card b,
.card div,
.card a {
    color: #000;
    text-decoration: none;
}

/* =========================
   CENTER PAGE
========================= */
.center-page {
    display: flex;
    justify-content: center;
    padding: 30px 10px;
}

/* =========================
   FORM BOX
========================= */
.form-box {
    width: 95%;
    max-width: 420px;
    background: #fff;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-box input,
.form-box textarea,
.form-box select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    color: #000;
}

/* =========================
   FAMILY GRID
========================= */
.family-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    padding: 20px;
    max-width: 1100px;
    margin: auto;
}

.family-card {
    text-align: center;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    transition: 0.3s;
}

.family-card:hover {
    transform: scale(1.05);
}

.family-card img {
    width: 70px;
    height: 70px;
    border-radius: 10%;
}

/* =========================
   🔍 SEARCH
========================= */
.top-bar {
    display: flex;
    justify-content: center;
    padding: 15px;
}

.search-box {
    width: 350px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 30px;
    border: 1px solid #ccc;
}

.search-results {
    position: absolute;
    background: #fff;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.search-item:hover {
    background: #f5f5f5;
}

.search-item img {
    width: 35px;
    height: 35px;
    min-width: 35px;
    max-width: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.search-item {
    text-decoration: none;
}

.search-item:hover {
    text-decoration: none;
}

/* =========================
   TREE CONTAINER
========================= */
.tree-container {
    overflow-x: auto;
    padding: 30px;
}

/* ROOT TREE */
.ancestry-tree ul {
    padding-left: 40px;
    position: relative;
}

/* EACH NODE */
.ancestry-tree li {
    list-style: none;
    position: relative;
    padding: 20px 0 20px 40px;
}

/* VERTICAL LINE (PARENT SPINE) */
.ancestry-tree li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-left: 2px solid #bbb;
    height: 100%;
}

/* HORIZONTAL CONNECTOR */
.ancestry-tree li::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    width: 40px;
    border-top: 2px solid #bbb;
}

/* REMOVE EXTRA LINES */
.ancestry-tree li:last-child::before {
    height: 30px;
}

/* PERSON ROW */
.person-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* CARD */
.nodeCard {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    width: 100px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.nodeCard img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
}

.nodeCard .name {
    font-size: 12px;
    font-weight: bold;
}

/* SPOUSE */
.nodeCard.spouse {
    border: 2px solid #ff6b6b;
    background: #fff0f0;
}

/* MOBILE */
@media (max-width: 768px) {
    .ancestry-tree li {
        padding-left: 20px;
    }
}

/* =========================
   EXPAND / COLLAPSE
========================= */

.tree-node > ul {
    transition: all 0.3s ease;
}

.tree-node.collapsed > ul {
    display: none;
}

/* clickable */
.toggle-node {
    cursor: pointer;
}

/* small visual hint */
.toggle-node:hover {
    opacity: 0.85;
}

/* export fix */
.ancestry-tree {
    display: inline-block;
}   

.childRow{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
}

.childRow input,
.childRow select{
    padding:10px;
}


    