/* -------------------------------------------------------
   GLOBAL STYLES
------------------------------------------------------- */

body {
    font-family: "Georgia", serif;
    background: #fdfcf8;
    color: #222;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

h1, h2, h3, h4 {
    font-family: "Merriweather", serif;
    color: #333;
    margin-top: 20px;
}

a {
    color: #003366;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Center main page content */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

/* -------------------------------------------------------
   HEADER + FOOTER
------------------------------------------------------- */

header {
    background: #d5d1c1;
    border-bottom: 1px solid #b7b3a6;
    padding: 25px 0;
}

header h1 {
    text-align: center;
    font-size: 32px;
    color: #2a2a2a;
}

footer {
    background: #d5d1c1;
    border-top: 1px solid #b7b3a6;
    padding: 10px;
    text-align: center;
    margin-top: 40px;
    color: #444;
}

/* -------------------------------------------------------
   RESULT LISTS (search results)
------------------------------------------------------- */

.result-item {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.result-item a {
    font-size: 18px;
    font-weight: bold;
}

.result-item small {
    color: #666;
}

/* -------------------------------------------------------
   INDIVIDUAL PAGE
------------------------------------------------------- */

.individual-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.individual-header img {
    border: 1px solid #999;
    padding: 4px;
    background: white;
    max-width: 180px;
}

.details-list {
    list-style: none;
    padding: 0;
}

.details-list li {
    padding: 4px 0;
}

.section-title {
    margin-top: 40px;
    font-size: 22px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 6px;
}

/* -------------------------------------------------------
   PEDIGREE CHART
------------------------------------------------------- */

.pedgrid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin: 30px 0;
}

.box {
    border: 1px solid #666;
    background: #fffdfa;
    padding: 8px;
    text-align: center;
    border-radius: 5px;
    font-size: 13px;
    min-height: 45px;
    box-shadow: 1px 1px 3px #ccc;
}

.box:hover {
    background: #f0ede5;
}

.blank {
    background: #e9e7df;
    color: #b0aca2;
    border: 1px dashed #aaa;
}

/* -------------------------------------------------------
   CHILDREN LIST
------------------------------------------------------- */

.children-list li,
.spouse-list li,
.documents-list li {
    padding: 4px 0;
}

/* -------------------------------------------------------
   DOCUMENTS
------------------------------------------------------- */

.documents-list a {
    color: #004488;
    font-weight: bold;
}

/* -------------------------------------------------------
   RESPONSIVE DESIGN
------------------------------------------------------- */

@media (max-width: 900px) {

    .pedgrid {
        grid-template-columns: repeat(4, 1fr);
    }

    .individual-header {
        flex-direction: column;
        text-align: center;
    }

    .individual-header img {
        max-width: 60%;
    }
}

@media (max-width: 600px) {
    .pedgrid {
        grid-template-columns: repeat(2, 1fr);
    }
}
