/*
 * Wunda Contact Us — Option 1: Representative cards
 * Original site rules remain in css/stylesheet.css.
 * Colours match the territory maps supplied for James, Zach, Tony and Paul.
 */

:root {
    --ink: #0f2145;
    --navy: #00184b;
    --line: #dce4ef;
}

/* Page background and original Wunda header */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(#001442, #002c60 200px, #00267e 202px);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
    color: var(--ink);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #ffb000;
    outline-offset: 3px;
}

.container {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

#top {
    height: 180px;
    display: grid;
    grid-template-columns: 275px 1fr;
    grid-template-rows: 132px 48px;
    align-items: center;
}

#top h1.top-logo {
    position: static;
    display: block;
    width: 260px;
    height: auto;
    margin-top: 0;
}

#top .top-logo img {
    display: block;
    width: 260px;
    max-height: 156px;
    object-fit: contain;
}

#top div.text {
    float: none;
    margin: 0 5px 0 0;
    text-align: right;
}

#top h2.top-name {
    font-size: 31px;
    line-height: 1.15;
    margin: 0;
}

#top h2.top-inc {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 12px;
}

#top nav {
    grid-column: 1 / -1;
    grid-row: 2;
}

#top #nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0 6px 0 0;
}

#top #nav li {
    float: none;
    padding: 0;
}

#top #nav li a {
    font-size: 14px;
    font-weight: bold;
    padding: 7px 12px;
    border-radius: 6px;
}

#top #nav li a:hover {
    background: #15447a;
}

#top #nav a.active {
    background: #c9d7e8;
    color: #092458;
}

/* Contact page body: preserves the original #body ID */
div#body {
    margin-top: 20px;
    margin-bottom: 48px;
    padding: 28px 34px 52px;
    background: #fff;
    box-shadow: 0 7px 28px #183c6d13;
}

div#body h1 {
    font-size: 30px;
    margin: 0 0 18px;
    color: #061c49;
}

div#body p {
    font-size: 14px;
    margin-bottom: 0;
}

/* Office address and phone information */
.office-block {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid #e3eaf3;
    border-radius: 13px;
    padding: 21px 24px;
    margin-bottom: 30px;
    background: #f6f8fb;
}

.office-copy h2,
div#body .office-copy h2 {
    margin: 3px 0 10px;
    font-size: 15px;
    color: #061b49;
}

.office-copy p,
div#body .office-copy p {
    margin: 4px 0;
}

.office-copy .muted,
div#body .office-copy .muted {
    color: #53627b;
    font-size: 13px;
}

.office-copy .eyebrow,
div#body .office-copy .eyebrow {
    color: #52709c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.office-phone {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 28px;
}

.office-phone div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.office-phone span,
.office-phone small {
    color: #62718a;
    font-size: 12px;
}

.office-phone a {
    color: #092b62 !important;
    font-weight: 800;
    font-size: 19px;
    text-decoration: none;
}

.office-phone a:hover,
.tel:hover {
    text-decoration: underline;
}

/* Territory colours: change these four values to adjust the scheme */
.rep-james { --accent: #d28b0b; }
.rep-zach  { --accent: #008e74; }
.rep-tony  { --accent: #d52d30; }
.rep-paul  { --accent: #8c4bc1; }

/* Sales representative cards */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 15px;
    margin-bottom: 16px;
}

div#body .section-heading h2 {
    font-size: 22px;
    margin: 0;
    color: #071f4d;
}

div#body .section-heading p {
    font-size: 13px;
    color: #6c7889;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px;
}

.rep-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid #dfe6f0;
    border-top: 4px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 4px 16px #1324470a;
}

.rep-top {
    display: flex;
    align-items: center;
    min-height: 108px;
    gap: 16px;
    margin-bottom: 14px;
}

.rep-top .portrait {
    width: 86px;
    height: 106px;
    flex-shrink: 0;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    background: #e9edf4;
}

.portrait-placeholder {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px dashed #bdc9d9;
    color: #8090a9;
    text-align: center;
}

.portrait-placeholder span {
    width: 36px;
    height: 36px;
    border: 2px solid #a5b6cf;
    border-radius: 50%;
    font-size: 31px;
    line-height: 28px;
    color: #aab8cf;
}

.portrait-placeholder small {
    font-size: 11px;
    line-height: 1.22;
}

.rep-name,
div#body .rep-name {
    font-size: 19px;
    margin: 0 0 5px;
    color: #00184b;
}

.territory-tag {
    display: table;
    padding: 5px 8px;
    margin: 0 0 8px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent) 12%, white);
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
}

.tel,
div#body a.tel {
    display: inline-block;
    color: #06275a;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.card-lbl,
div#body p.card-lbl {
    margin: 7px 0 9px;
    color: #7b879a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

/* Territory maps (click to enlarge) */
.rep-maps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
}

.rep-maps.solo {
    grid-template-columns: 1fr;
}

.map-frame {
    position: relative;
    display: block;
    min-width: 0;
    height: 212px;
    overflow: hidden;
    border: 1px solid #e2e9f2;
    border-radius: 9px;
    background: white;
    cursor: zoom-in;
}

/*
 * Map previews have their own image files, cropped around the shaded territory.
 * The original images (linked by the HTML <a href>) are NEVER cropped or altered.
 * There is deliberately no transform/translate/scale that might cut off a boundary.
 */
.map-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 150ms ease;
}

.map-frame:hover img {
    filter: saturate(1.08);
}

/* Tony has a wider southern-state region, so avoid forcing it into a very wide tile. */
.rep-tony .rep-maps.solo {
    display: flex;
    justify-content: center;
}

.rep-tony .rep-maps.solo .map-frame {
    width: min(100%, 328px);
    height: 212px;
}

.map-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 3px 8px;
    border: 1px solid #e7e9ef;
    border-radius: 4px;
    background: #fffffff0;
    color: #29476b;
    font-size: 10px;
    font-weight: bold;
}

.zoom-icon {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 2px 7px;
    border-radius: 5px;
    background: #fffffff0;
    color: #26496d;
    font-size: 16px;
}

div#body p.footer-note {
    margin-top: 18px;
    color: #7c8795;
    font-size: 12px;
}

/* Enlarged map overlay: no jQuery or FancyBox necessary */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 2vw 2vw;
    background: #020c22e8;
}

.lightbox.is-open {
    display: flex;
}

.lightbox figure {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    max-width: 96vw;
    max-height: 91vh;
}

.lightbox img {
    max-width: 96vw;
    max-height: calc(91vh - 28px);
    object-fit: contain;
    background: #fff;
}

.lightbox figcaption {
    color: #fff;
    text-align: center;
    font-size: 14px;
}

.lightbox button {
    position: absolute;
    right: 20px;
    top: 14px;
    width: 45px;
    height: 45px;
    border: 1px solid #ffffff88;
    border-radius: 7px;
    background: #162c50;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* Smaller screens */
@media (max-width: 820px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .map-frame {
        height: 230px;
    }
}

@media (max-width: 780px) {
    .container {
        width: 100%;
    }

    #top {
        grid-template-columns: 142px 1fr;
        grid-template-rows: 110px auto;
        height: auto;
        padding: 10px 14px;
    }

    #top h1.top-logo,
    #top .top-logo img {
        width: 140px;
    }

    #top .top-logo img {
        max-height: 90px;
    }

    #top h2.top-name {
        font-size: 19px;
    }

    #top h2.top-inc {
        font-size: 10px;
        margin-top: 6px;
    }

    #top #nav {
        justify-content: center;
        gap: 3px;
        padding: 0;
    }

    #top #nav li a {
        font-size: 11px;
        padding: 6px 8px;
    }

    div#body {
        margin-top: 0;
        padding: 18px 14px 40px;
    }

    .office-block {
        display: block;
        padding: 16px;
        margin-bottom: 24px;
    }

    .office-phone {
        flex-wrap: wrap;
        margin-top: 18px;
        gap: 24px;
    }

    .office-phone a {
        font-size: 16px;
    }

    .section-heading {
        display: block;
    }

    .section-heading p {
        margin-top: 5px;
    }
}

@media (max-width: 450px) {
    #top {
        grid-template-columns: 119px 1fr;
    }

    #top h1.top-logo,
    #top .top-logo img {
        width: 117px;
    }

    #top h2.top-name {
        font-size: 17px;
    }

    #top h2.top-inc {
        font-size: 9px;
    }

    .rep-top {
        gap: 12px;
    }

    .rep-top .portrait {
        width: 76px;
        height: 93px;
    }

    .rep-name,
    div#body .rep-name {
        font-size: 17px;
    }

    .territory-tag {
        font-size: 11px;
    }

    .map-frame {
        height: 170px;
    }
}



/* Keep the longer SE Queensland territory label readable on narrow screens. */
.territory-tag { max-width: 100%; }
.rep-top > div:last-child { min-width: 0; }
