html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #17213c;
    background-color: transparent;
}


/* GLOBAL WIDTH */
.family-container {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

/* ONE continuous background behind page content AND footer. */
.family-page-background {
    width: 100%;
    min-height: calc(100vh - 78px);
    display: flex;
    flex-direction: column;
    background-image: linear-gradient( rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15) ), url("../images/HaefnerFamily-Tree-01.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.family-page-background > main {
        flex: 1 0 auto;
}
.family-footer {
    flex-shrink: 0;
}

/* ENTIRE HOME PAGE BACKGROUND - The tree picture stays behind the Home page content. */
.family-home-background {
    width: 100%;
    box-sizing: border-box;
    padding-top: 30px;
    padding-bottom: 0;
    min-height: 0;
}

/* WELCOME AREA */
.family-home-welcome {
    width: 100%;
    margin: 0 0 30px 0;
    padding: 0;
    min-height: 0;
}
.family-home-welcome-content {
    max-width: 650px;
    padding: 35px;
    color: white;
    background: rgba(8, 43, 89, 0.82);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.30);
}
.family-home-welcome-content h1 {
    margin: 0 0 20px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 48px;
    font-weight: bold;
    line-height: 1.15;
}

.family-home-welcome-content p {
    font-size: 19px;
    line-height: 1.5;
}

.family-home-sections {
    padding-top: 15px;
}
.family-six-card-frame {
    padding: 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.20);
    margin-bottom: 39px;
}

.family-home-card {
    height: 100%;
    padding: 30px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.20);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.22);
}
.family-home-card h2 {
    color: #10264d;
    font-weight: bold;
}
.family-home-card h4 {
    color: #10264d;
    font-weight: 600;
}

/* FAMILY BUTTON - Polished green glass/gradient appearance. */
.btn-family {
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    padding: 9px 15px;
    background: linear-gradient( 180deg, #4f9638 0%, #367825 100% );
    border: 1px solid #2d681f;
    border-radius: 7px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-family:hover {
    color: #ffffff;
    background: linear-gradient( 180deg, #5ca744 0%, #3d842a 100% );
    border-color: #285d1c;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.btn-family:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* RESPONSIVE / MOBILE */
@media (max-width: 767.98px) {
    .family-home-background {
        background-attachment: scroll;
        background-position: center top;
    }
    .family-home-welcome {
        min-height: auto;
        padding: 25px 15px;
    }
    .family-home-welcome-content {
        padding: 25px;
    }

    .family-home-welcome-content h1 {
        font-size: 36px;
    }
}


/* HEADER */
.family-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.family-tree-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    margin-right: 21px;
    flex-shrink: 0;
    transform: scale(1.55);
    transform-origin: center center;
}.family-tree {
    font-size: 46px;
    margin-right: 10px;
}
.family-name {
    display: block;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 34px;
    font-weight: bold;
    color: #10264d;
    line-height: 1;
}
.family-tagline {
    display: block;
    margin-top: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    font-style: italic;
    font-weight: 500;
    line-height: 1.15;
    color: #326024;
    text-align: center;
    white-space: nowrap;
}
.family-logo-text {
    display: block;
    transform: scale(1.40);
    transform-origin: left center;
}



.navbar-nav .nav-link {
    color: #10264d;
    font-weight: 600;
    margin-left: 10px;
    margin-right: 10px;
}
.navbar-nav .nav-link:hover {
    color: #3b7929;
}

/* HERO */
.family-hero {
    max-width: 1500px;
    min-height: 425px;
    margin: 15px auto 0 auto;
    background-image: url("../images/HaefnerFamily-Tree-01.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
}

/* Darkens only the left side so the white wording is readable */
.family-hero-overlay {
    min-height: 425px;
    display: flex;
    align-items: center;
    background: linear-gradient( 90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .50) 28%, rgba(0, 0, 0, .15) 52%, rgba(0, 0, 0, 0) 70% );
}

.family-hero-content {
    max-width: 540px;
    padding: 50px;
    color: white;
}

.family-hero-content h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 50px;
    font-weight: bold;
    line-height: 1.10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .55);
}

.family-hero-content p {
    margin-top: 20px;
    margin-bottom: 25px;
    font-size: 19px;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
}

/* CARDS */
.family-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #dedede;
    border-radius: 9px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

.family-card-header {
    border-bottom: 1px solid #dddddd;
    margin-bottom: 18px;
}

.family-card-header h2,
.family-card h2 {
    color: #10264d;
    font-size: 24px;
    font-weight: 700;
}

.family-card h3 {
    color: #327022;
    font-size: 19px;
    font-weight: bold;
}


/* EVENTS */
.event-row {
    display: flex;
    gap: 18px;
}

.event-image {
    width: 180px;
    height: 140px;
    object-fit: cover;
    border-radius: 7px;
}

.event-row p {
    margin-bottom: 6px;
}


/* PHOTO GALLERY */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.photo-grid img {
    width: 100%;
    height: 125px;
    object-fit: cover;
    border-radius: 5px;
}
/* FAMILY PHOTO GALLERY */
.family-photo-gallery {
    display: grid;
    /* Automatically fit as many thumbnails across as possible. */
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 12px;
}
/* FAMILY PHOTO THUMBNAIL */
.family-photo-thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 7px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
/* FAMILY PHOTO THUMBNAIL HOVER */
.family-photo-thumbnail:hover {
    transform: scale(1.06);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
    z-index: 2;
}
/* FAMILY PHOTO MOUSE-OVER LARGE PREVIEW */
.family-photo-hover-preview {
    display: none;
    position: fixed;
    z-index: 99999;
    padding: 7px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 9px;
    box-shadow: 0 7px 25px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}
.family-photo-hover-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 600px;
    max-height: 500px;
    object-fit: contain;
    border-radius: 5px;
}



/* FAMILY DONATIONS */
.family-donation-strip {
    width: 100%;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.20);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.22);
    color: #17213c;
}
.family-donation-title {
    color: #10264d;
    font-size: 23px;
    font-weight: 700;
}
.family-donation-equation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.donation-equation-item {
    min-width: 67px;
    text-align: center;
    line-height: 1.15;
}
.donation-equation-item span {
    display: block;
    font-size: 23px;
    font-weight: 600;
    color: #10264d;
}
.donation-equation-item strong {
    display: block;
    margin-top: 3px;
    font-size: 17px;
}
.donation-equation-symbol {
    color: #10264d;
    font-size: 23px;
    font-weight: 800;
}
.donation-received strong {
    color: #28751f;
}
.donation-balance strong {
    color: #c62828;
}




/* FOOTER */
.family-footer {
    background: rgba(255, 255, 255, 0.50);
    color: #10264d;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.65);
}

/* MOBILE */
@media (max-width: 991.98px) {
    .family-hero-content {
        padding: 30px;
    }
    .family-hero-content h1 {
        font-size: 38px;
    }
    .event-row {
        flex-direction: column;
    }
    .event-image {
        width: 100%;
        height: 220px;
    }
}


/* FAMILY HEADER */
.family-header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}



/* FAMILY EVENT INFORMATION - Spacing for Directions, Contact and Party Info cards. */
.family-home-info {
    padding-top: 24px;
    padding-bottom: 24px;
}

/* FEATURED FAMILY PHOTO - Home page Family Photos card. */
.family-featured-photo {
    width: 100%;
    height: 230px;
    object-fit: cover;
    object-position: center center;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.20);
    margin-bottom: 8px;
}

/* Caption directly below featured photograph. */
.family-photo-caption {
    margin-bottom: 15px;
    color: #10264d;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}




/* MODAL GLASS WRAPPING FRAME -Gives Directions and Contact modals the same transparent framed/glass appearance used around the Home page card groups. */
.family-modal-glass {
    width: 100%;
    /* NEW: Space between clear outer frame and actual modal. */
    padding: 14px;
    /* NEW: Transparent glass appearance. */
    background: rgba(255, 255, 255, 0.12);
    /* NEW: Light glass border. */
    border: 2px solid rgba(255, 255, 255, 0.70);
    border-radius: 16px;
    /* NEW: Gives glass frame some separation from background. */
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.30);
    /* NEW: Actual glass/frosted effect. */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* : MODAL CONTENT - Keep the inside readable while allowing some transparency. */
.family-modal-content {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    overflow: hidden;
}
.family-modal-content .modal-title {
    color: #10264d;
    font-weight: 700;
}
.family-modal-content .modal-header,
.family-modal-content .modal-footer {
    background: rgba(255, 255, 255, 0.55);
}




/* DIRECTIONS MODAL */
.directions-modal-content {
    border-radius: 10px;
    border: 1px solid #cfcfcf;
}
/* FUTURE GOOGLE MAP AREA */
.directions-map-placeholder {
    min-height: 330px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f5f5f5;
    border: 2px dashed #a9a9a9;
    border-radius: 10px;
    padding: 30px;
}
.directions-map-icon {
    font-size: 60px;
    margin-bottom: 10px;
}
.directions-map-placeholder h3 {
    color: #10264d;
    font-weight: 700;
}




/* HAEFNER CHRISTMAS PARTY - Landscape Christmas invitation/card */

/* OUTER CHRISTMAS FRAME */
.family-christmas-frame {
    width: 100%;
    padding: 18px;
    position: relative;
    background: transparent;
    border: 3px solid #ffffff;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.75);
}
.family-christmas-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: repeating-linear-gradient( 45deg, rgba(167, 25, 31, 0.95) 0px, rgba(167, 25, 31, 0.95) 14px, rgba(255, 255, 255, 0.40) 14px, rgba(255, 255, 255, 0.40) 28px, rgba(40, 107, 56, 0.95) 28px, rgba(40, 107, 56, 0.95) 42px, rgba(255, 255,255, 0.40) 42px, rgba(255, 255, 255, 0.40) 56px );
    border-radius: 13px;
    padding: 18px;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Keep the actual Christmas content above the striped border */
.family-christmas-frame > .row {
    position: relative;
    z-index: 1;
}


/* LEFT CHRISTMAS INVITATION */
.family-christmas-invitation {
    position: relative;
    width: 100%;
    min-height: 475px;
    padding: 32px 55px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    border: 5px solid rgba(255, 255, 255, 0.90);
    border-radius: 8px;
    outline: 2px solid #a7191f;
    outline-offset: -11px;
    box-shadow: inset 0 0 25px rgba(58, 91, 42, 0.14), 0 4px 14px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* GREEN INNER BORDER */
.family-christmas-invitation::before {
    content: "";
    position: absolute;
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;
    border: 2px solid #3d702e;
    border-radius: 4px;
    pointer-events: none;
}


/* DTS FIX 2026-09-23:
Completely remove the old interior Christmas pattern. */
.family-christmas-invitation::after {
    content: none;
}

/* GREEN INNER BORDER */
.family-christmas-invitation::before {
    content: "";
    position: absolute;
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;
    border: 2px solid #3d702e;
    border-radius: 4px;
    pointer-events: none;
}
.family-christmas-invitation::after {
    content: none;
}

/* INVITATION WORDING */
.family-christmas-invitation-content {
    position: relative;
    z-index: 2;
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* PLEASE JOIN US */
.christmas-small-heading {
    margin-bottom: 5px;
    color: #3f6e34;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
}

/* MAIN CHRISTMAS TITLE */
.family-christmas-invitation h1 {
    margin: 3px 0 4px 0;
    color: #a7191f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 43px;
    font-weight: 700;
    line-height: 1.02;
}

/* Put Christmas Party on its own line */
.family-christmas-invitation h1 span {
    display: block;
    margin-top: 5px;
    font-size: 49px;
    font-style: italic;
}

/* DECORATIVE DIVIDER */
.christmas-holly-divider {
    margin: 5px 0 9px 0;
    color: #3d702e;
    font-size: 19px;
    letter-spacing: 5px;
}

/* DATE */
.family-christmas-invitation h2 {
    margin: 0;
    color: #244d2a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 700;
}

/* TIME */
.family-christmas-invitation h3 {
    margin: 3px 0 10px 0;
    color: #a7191f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
    font-weight: 700;
}

/* Keep introduction bold, centered, and on one line. */
.christmas-intro {
    width: auto;
    max-width: none;
    margin: 4px auto 13px auto;
    color: #181818;
    font-weight: 700;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.80px;
}

/* PARTY DETAILS */
.family-christmas-details {
    max-width: 700px;
    margin: 0 auto;
    color: #181818;
    font-weight: 500;
    text-align: left;
    font-size: 18px;
}

.family-christmas-details p {
    margin-bottom: 6px;
}


.family-christmas-details strong {
    color: #8e171c;
}

/* BOTTOM DECORATION */
.christmas-holly-divider-bottom {
    margin-top: 7px;
    margin-bottom: 8px;
}

/* CHRISTMAS BUTTON */
.btn-christmas {
    align-self: center;
    background-color: #a7191f;
    border: 2px solid #8a1318;
    color: #ffffff;
    font-weight: 700;
    padding: 8px 22px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}

.btn-christmas:hover {
    background-color: #3d702e;
    border-color: #315b26;
    color: #ffffff;
}


/* CHRISTMAS CORNER DECORATIONS */
.christmas-corner {
    position: absolute;
    z-index: 3;
    font-size: 40px;
    line-height: 1;
    opacity: 0.95;
}

.christmas-corner-top-left {
    top: 23px;
    left: 26px;
    transform: rotate(-18deg);
}

.christmas-corner-top-right {
    top: 23px;
    right: 26px;
    transform: rotate(18deg);
}

.christmas-corner-bottom-left {
    bottom: 34px;
    left: 27px;
    transform: rotate(-12deg);
}

.christmas-corner-bottom-right {
    right: 27px;
    bottom: 34px;
    transform: rotate(12deg);
}

/* RIGHT SANTA PHOTO */
.family-christmas-photo-frame {
    padding: 7px;
    background: rgba(255, 255, 255, 0.35);
    border: 3px solid #a7191f;
    border-radius: 9px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.family-christmas-photo {
    width: 100%;
    height: 100%;
    min-height: 475px;
    object-fit: cover;
    object-position: 5% center;
    display: block;
    border: 2px solid #3d702e;
    border-radius: 5px;
}


/* MOBILE */
@media (max-width: 991.98px) {
    .family-christmas-invitation {
        min-height: auto;
        padding: 45px 35px;
    }
    .family-christmas-invitation h1 {
        font-size: 34px;
    }
    .family-christmas-invitation h1 span {
        font-size: 39px;
    }
    .family-christmas-invitation h2 {
        font-size: 24px;
    }
    .family-christmas-photo {
        min-height: 350px;
    }
    .christmas-intro {
        white-space: normal;
    }
}

@media (max-width: 575.98px) {
    .family-christmas-frame {
        padding: 10px;
    }
    .family-christmas-invitation {
        padding: 48px 25px 35px 25px;
    }
    .christmas-small-heading {
        font-size: 12px;
        letter-spacing: 2px;
    }
    .family-christmas-invitation h1 {
        font-size: 29px;
    }
    .family-christmas-invitation h1 span {
        font-size: 34px;
    }
    .christmas-corner {
        font-size: 28px;
    }
    .family-christmas-details {
        font-size: 14px;
    }
}





/* DONATION MODAL - PROGRESS BAR CONTRAST                        */
#DonationModal .family-donation-progress-track {
    background-color: #c5cbd3 !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Strong blue donation progress fill. */
#DonationModal .family-donation-progress-fill {
    background: #0d6efd !important;
    border-radius: 10px 0 0 10px;
    opacity: 1 !important;
}

/* Keep amount and percentage clearly readable. */
#DonationModal .family-donation-modal-progress {
    color: #17213c;
}






/* FAMILY TREE - Full webpage. */
.family-tree-page {
    padding-top: 22px;
    padding-bottom: 25px;
}

.family-tree-title {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.20);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

    .family-tree-title h1 {
        color: #10264d;
    }

.family-tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid #c4cec4;
    border-radius: 9px;
}

.family-tree-instructions {
    font-size: 14px;
    color: #425843;
    font-weight: 600;
}

.family-tree-viewport {
    position: relative;
    width: 100%;
    height: calc(100vh - 280px);
    min-height: 450px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    border: 2px solid #64896a;
    border-radius: 10px;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

    .family-tree-viewport:active {
        cursor: grabbing;
    }

#FamilyTreeSvg {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

.family-tree-node {
    cursor: pointer;
}

    .family-tree-node:hover rect:first-child {
        stroke: #267b30;
        stroke-width: 3;
    }

.family-tree-tooltip {
    position: absolute;
    z-index: 100;
    min-width: 180px;
    max-width: 300px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #628d64;
    border-radius: 8px;
    color: #10264d;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.family-tree-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #10264d;
    font-size: 18px;
    font-weight: 600;
    pointer-events: none;
}

/* NEW: Mobile family tree layout. */
@media (max-width: 767.98px) {

    .family-tree-toolbar {
        justify-content: center;
    }

    .family-tree-viewport {
        height: 70vh;
        min-height: 400px;
    }

    .family-tree-instructions {
        text-align: center;
        width: 100%;
    }
}

/* ============================================================ */
/* NEW: FAMILY TREE - TRANSPARENT COMBINED HEADER               */
/* ============================================================ */

.family-tree-header-strip {
    width: calc(100% - 24px);
    margin: 15px auto 10px auto;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.20);
}


/* NEW: Title and instructions on one row. */

.family-tree-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.family-tree-header-title {
    flex: 1;
    text-align: center;
}

    .family-tree-header-title h1 {
        margin: 0;
        color: #10264d;
        font-size: 30px;
        font-weight: 700;
    }

    .family-tree-header-title p {
        margin: 2px 0 0 0;
        font-size: 13px;
        color: #326024;
        font-style: italic;
    }

.family-tree-header-instructions {
    font-size: 12px;
    color: #415241;
    white-space: nowrap;
}


/* NEW: Search and zoom controls. */

.family-tree-header-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

    .family-tree-header-controls .form-control {
        width: 230px;
        max-width: 100%;
        height: 37px;
    }

    .family-tree-header-controls .btn {
        font-size: 14px;
        padding: 7px 13px;
        white-space: nowrap;
    }

/* TRANSPARENT FAMILY TREE VIEWPORT */
/* Apply this class to your existing tree viewport container. */
.family-tree-transparent-viewport {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    overflow: hidden;
}

.family-tree-transparent-viewport svg {
    background: transparent !important;
}

/* MOBILE */
@media (max-width: 767.98px) {
    .family-tree-header-strip {
        padding: 12px;
    }
    .family-tree-header-title h1 {
        font-size: 24px;
    }
    .family-tree-header-instructions {
        width: 100%;
        text-align: center;
        white-space: normal;
    }
    .family-tree-header-controls .form-control {
        width: 100%;
    }
}



/* ============================================================ */
/* FAMILY TREE - THIN SINGLE-ROW HEADER                          */
/* ============================================================ */

.family-tree-page {
    background: transparent !important;
    padding-top: 10px;
    padding-bottom: 20px;
}

    /* Three-column horizontal layout. */
    .family-tree-page .family-tree-combined-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 18px;
        background: rgba(255, 255, 255, 0.75) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 2px solid rgba(255, 255, 255, 0.75);
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        padding: 6px 12px;
        margin-bottom: 10px;
    }

    /* ============================================================ */
    /* LEFT: SEARCH AND BUTTONS                                      */
    /* ============================================================ */

    .family-tree-page .family-tree-header-controls {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 6px;
        margin-top: 0;
        min-width: 0;
    }
    .family-tree-page .family-tree-header-controls .form-control {
        width: 205px;
        max-width: 100%;
        height: 32px;
        font-size: 12px;
        flex-shrink: 1;
    }

    .family-tree-page .family-tree-header-controls .btn {
        font-size: 12px;
        padding: 5px 9px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ============================================================ */
    /* CENTER: HAEFNER FAMILY TREE BRANDING                          */
    /* ============================================================ */

    .family-tree-page .family-tree-header-title {
        text-align: center;
        white-space: nowrap;
        min-width: 0;
    }
    .family-tree-page .family-tree-header-title h1 {
        color: #10264d;
        font-size: 23px;
        font-weight: 700;
        line-height: 1.15;
        margin: 0;
    }
    .family-tree-page .family-tree-header-title p {
        font-size: 11px;
        color: #326024;
        font-style: italic;
        margin: 2px 0 0 0;
    }

    /* ============================================================ */
    /* RIGHT: INSTRUCTIONS                                          */
    /* ============================================================ */
    .family-tree-page .family-tree-instructions {
        justify-self: end;
        margin-left: 0;
        font-size: 11px;
        font-weight: 500;
        color: #415241;
        white-space: nowrap;
        text-align: right;
    }

    /* ============================================================ */
    /* TRANSPARENT FAMILY TREE VIEWPORT                             */
    /* ============================================================ */
    .family-tree-page .family-tree-transparent-viewport {
        background: rgba(255, 255, 255, 0.20) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 2px solid rgba(99, 142, 104, 0.85);
        border-radius: 10px;
        overflow: hidden;
        position: relative;
    }

    .family-tree-page #FamilyTreeSvg {
        background: transparent !important;
    }

/* ============================================================ */
/* RESPONSIVE: WRAP ONLY ON SMALLER SCREENS                     */
/* ============================================================ */
@media (max-width: 1350px) {

    .family-tree-page .family-tree-combined-header {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }

    .family-tree-page .family-tree-header-title {
        grid-row: 1;
    }

    .family-tree-page .family-tree-header-controls {
        grid-row: 2;
        justify-content: center;
        flex-wrap: wrap;
    }

    .family-tree-page .family-tree-instructions {
        grid-row: 3;
        justify-self: center;
        text-align: center;
        white-space: normal;
    }
}

@media (max-width: 767.98px) {
    .family-tree-page .family-tree-header-controls .form-control {
        width: 100%;
    }
    .family-tree-page .family-tree-header-title h1 {
        font-size: 21px;
    }
}



/* ============================================================ */
/* NEW: FAMILY TREE - UNDER CONSTRUCTION ICONS                  */
/* ============================================================ */
.family-tree-title-with-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.family-tree-construction-icon {
    font-size: 30px;
    line-height: 1;
    cursor: help;
}
