/* Wright Family Web Pages — Final Working CSS */

/* ---------------------------------------
   FONTS
---------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700&family=Raleway:wght@400;700&display=swap');

/* ---------------------------------------
   GLOBAL DEFAULTS
---------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    background-color: white;
    color: black;
    overflow-x: hidden;
}

/* Page padding */
.site {
    display: flex;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    font-family: 'Nunito Sans', 'Raleway', Verdana, Helvetica, Arial, sans-serif;
    padding-left: 20px;
    padding-right: 20px;
}

.site ul, 
.site ol { 
    padding-left: 1.2em; /* small, clean indent */ 
    margin-left: 0; /* remove browser gutter */ 
    list-style-position: inside; /* bullet sits inside the text block */ 
}

@media (max-width: 768px) {
    .site {
        padding-left: 5vw;
        padding-right: 5vw;
    }
}

/* ---------------------------------------
   HEADINGS
---------------------------------------- */
h1 {
    display: block;
    font-size: 2em;
    margin: 0.67em 2em;
    font-weight: bold;
    color: blue;
    text-align: center;
}

h2 {
    display: block;
    font-size: 1.5em;
    margin: 0.83em 2em;
    font-weight: bold;
    color: green;
    text-align: center;
    text-decoration: underline;
}

h3 {
    display: block;
    font-size: 1.17em;
    margin: 1em 0;
    font-weight: bold;
}

/* ---------------------------------------
   PARAGRAPHS & LINKS
---------------------------------------- */
p {
    margin-bottom: 0.50em;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: blue;
}

a:hover {
    text-decoration: underline;
}

/* ---------------------------------------
   TOOLTIP
---------------------------------------- */
.tooltip {
    display: inline;
    position: relative;
}

.tooltip:hover:after {
    background: rgba(0,0,0,.8);
    border-radius: 5px;
    bottom: 26px;
    color: blue;
    content: attr(title);
    left: 20%;
    padding: 5px 15px;
    position: absolute;
    z-index: 98;
    width: 220px;
    font-size: .75em;
}

.tooltip:hover:before {
    border: solid;
    border-color: #333 transparent;
    border-width: 6px 6px 0 6px;
    bottom: 20px;
    content: "";
    left: 50%;
    position: absolute;
    z-index: 99;
}

/* ---------------------------------------
   BUTTONS
---------------------------------------- */
.button {
    height: 3em;
    font-weight: bold;
    text-align: center;
    border: 2px groove;
    border-radius: 5px;
    margin: 5px 15px;
    background-color: lightgrey;
    cursor: pointer;
}

.button:hover {
    background-color: white;
}

/* ---------------------------------------
   TABLES
---------------------------------------- */
table#t001,
table#t002,
table#t003 {
    width: auto;
    font-size: 1em;
    margin: 0 2em;
}

table#t001 th,
table#t001 td,
table#t003 th,
table#t003 td {
    padding: .25em;
    vertical-align: top;
}

table#t002 {
    border: 1px solid black;
    border-collapse: collapse;
}

table#t002 th,
table#t002 td {
    padding: .25em;
    vertical-align: top;
    text-align: left;
    border: 1px solid black;
}

td#td01 {
    background-color: silver;
}

th#th01 {
    background-color: lightslategrey;
}

td#td02 {
    border: 1px solid black;
}

th#th02 {
    border: 1px solid black;
    background-color: silver;
}

/* ---------------------------------------
   SEARCH BOX
---------------------------------------- */
table.search {
    width: auto;
    font-size: 1em;
    vertical-align: middle;
}

table.search th {
    font-size: small;
    font-weight: bold;
}

table.search td {
    font-size: x-small;
}

.rounded {
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 2px 5px;
}

.radio {
    font-size: x-small;
}

#search-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding: 6px 0;
    margin-bottom: 25px;
}

/* ---------------------------------------
   HEADER
---------------------------------------- */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Pushes flags to the top edge */
    width: 100%;
}

/* NZ flag left */
.header-left {
    display: flex;
    align-items: flex-start;
    flex: 0 0 auto;
}

/* UK flag and Hamburger alignment */
.header-right {
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: flex-start; /* Aligns hamburger flush with left of flag */
    gap: 5px; /* Spacing between flag and hamburger */
    flex-shrink: 0;
    width: auto;
}

/* Center title fills remaining space */
.headertxt {
    flex: 1;
    text-align: center;
}

/* Flags */
.nzflag,
.ukflag {
    height: 45px;
    width: auto;
    display: block;
}

/* Mobile header padding */
@media (max-width: 768px) {
 .header-container { 
    width: 100vw; 
    max-width: 100vw; 
    margin-left: 50%;
    padding-left: 4vw; 
    padding-right: 4vw;
    transform: translateX(-50%); 
    overflow: visible; 
 }
}

/* ---------------------------------------
   HAMBURGER
---------------------------------------- */
.hamburger {
    display: none; /* Desktop hidden */
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    display: block; 
    width: 28px; 
    height: 3px; 
    background: blue; 
    margin: 4px 0; 
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

/* ---------------------------------------
   NAVIGATION (DESKTOP)
---------------------------------------- */
#navwrapper {
    width: 100%;
    position: relative;
    z-index: 9999;
}

#navbar {
    width: 100%;
    text-align: left;
}
#navigation { 
    list-style: none; 
    display: flex; 
    justify-content: flex-start; 
    align-items: center; 
    background: transparent; 
    text-align: left; 
    padding-left: 0;
}

#navigation li {
    position: relative;
    list-style-position: inside;
    padding-left: 0;
}

.nav_button {
    display: block;
    padding: 6px 12px;
    white-space: nowrap;
    color: blue;
}

/* Desktop dropdowns */
#navigation li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 10001;
}

#navigation li:hover > ul {
    display: block;
}

#navigation li ul li ul {
    left: 100%;
    top: 0;
}

/* ---------------------------------------
   MOBILE NAVIGATION
---------------------------------------- */
@media (max-width: 768px) {

    #navigation {
        display: none;
        flex-direction: column;
        background: white;
        align-items: flex-start;
        padding-bottom: 10px;
        position: relative;
        z-index: 10001;
        width: 100%;
    }

    body.nav-open #navigation {
        display: flex;
    }

    #navigation li .nav_button {
        padding-left: 5vw;
        padding-right: 5vw;
        border-bottom: 1px solid #eee;
        line-height: 1.1;
    }

    #navigation li ul {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: 20px;
        background: #fdfdfd;
        width: 100%;
    }

    #navigation li.open > ul {
        display: block;
    }
}

/* ---------------------------------------
   GENEALOGY
---------------------------------------- */
.male { color: blue !important; }
.female { color: #ff00ff !important; }

.gen_th {
    background: #e0e0e0;
    font-weight: bold;
    text-align: center;
    border: 1px solid #ccc;
    padding: 5px;
}

.gen_td {
    border: 1px solid #ccc;
    padding: 4px;
    vertical-align: middle;
}

.pedigree_container {
    border: 2px solid #333;
    padding: 10px;
    margin-top: 20px;
    background-color: #f9f9f9;
}

.pedigree_table {
    width: 100%;
    border-collapse: collapse;
}

/* ---------------------------------------
   SPEEDTEST
---------------------------------------- */
#speedtest-data {
    width: 98%;
    margin: 10px auto;
    border-collapse: collapse;
}

#speedtest-data th {
    background-color: #f2f2f2;
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#speedtest-data td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.speed-down {
    color: blue;
    font-weight: bold;
}

/* ---------------------------------------
   FOOTER UPDATED TEXT
---------------------------------------- */
.pgupdated {
    font-size: 0.75em;
    text-align: left;
    line-height: 1.4;
    margin-top: 10px;
}

/* ---------------------------------------
   ARROW INDICATORS FOR MOBILE NAV
---------------------------------------- */
.has-arrow {
    position: relative;
    padding-right: 24px;
}

.has-arrow::after {
    content: "▸";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

li.open > .has-arrow::after {
    transform: translateY(-50%) rotate(90deg);
}

/* ---------------------------------------
   Contact Form Success Message
---------------------------------------- */
.success-box {
    background: #dff0d8;
    color: #3c763d;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #b2dba1;
    font-size: 1.1em;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}