
/* =========================================
   High5 Agent Profile
   Dark Header & Footer / Responsive Layout
   ========================================= */

.h5ad-agent-profile {
    --h5ad-section-gap: 32px;
    --h5ad-accent: #2271b1;
    --h5ad-navy: #10233f;
    --h5ad-ink: #111827;
    --h5ad-muted: #64748b;
    --h5ad-line: #e5eaf1;

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 32px 12% 0;
    color: var(--h5ad-ink);
    font-family: inherit;
    line-height: 1.65;
}

.h5ad-agent-profile *,
.h5ad-agent-profile *::before,
.h5ad-agent-profile *::after {
    box-sizing: border-box;
}

/* =========================================
   HEADER / AGENT HERO
   ========================================= */

.h5ad-agent-profile .h5ad-profile-hero {
    display: flex;
    align-items: center;
    gap: clamp(24px, 3vw, 40px);
    margin-bottom: var(--h5ad-section-gap);
    padding: 36px;
    color: #ffffff;
    background-color: #10233f;
    border: 1px solid #10233f;
    border-radius: 22px;
    box-shadow: 0 8px 30px rgb(15 23 42 / 12%);
}

.h5ad-agent-profile .h5ad-profile-photo-wrap {
    flex: 0 0 180px;
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 50%;
    background: #eaf1f8;
    border: 5px solid #ffffff;
    box-shadow:
        0 0 0 1px rgb(255 255 255 / 25%),
        0 10px 24px rgb(0 0 0 / 20%);
}

.h5ad-agent-profile .h5ad-profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.h5ad-agent-profile .h5ad-profile-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--h5ad-accent);
    font-size: 64px;
    font-weight: 700;
}

.h5ad-agent-profile .h5ad-profile-intro {
    flex: 1 1 auto;
    min-width: 0;
    color: #ffffff;
}

.h5ad-agent-profile .h5ad-profile-eyebrow,
.h5ad-agent-profile .h5ad-profile-section-kicker,
.h5ad-agent-profile .h5ad-profile-cta-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #a9d3f5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1.5;
}

.h5ad-agent-profile .h5ad-profile-intro h1 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}

.h5ad-agent-profile .h5ad-profile-title {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

/* =========================================
   HEADER CONTACT INFORMATION
   ========================================= */

.h5ad-agent-profile .h5ad-profile-contact-list {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 18px 24px;
    width: 100%;
    margin-top: 22px;
    padding: 0;
    text-align: left;
}

.h5ad-agent-profile .h5ad-profile-contact {
    display: flex;
    flex: 0 1 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
}

.h5ad-agent-profile .h5ad-profile-contact > div {
    flex: 0 1 auto;
    min-width: 0;
    text-align: left;
}

.h5ad-agent-profile .h5ad-profile-icon {
    display: flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    color: #ffffff;
    background: #203b5f;
    border: 1px solid #385475;
    border-radius: 11px;
}

.h5ad-agent-profile .h5ad-profile-icon svg {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    margin: 0;
    padding: 0;
    stroke: currentColor;
    stroke-width: 1.8;
}

.h5ad-agent-profile .h5ad-profile-contact-label {
    display: block;
    margin: 0 0 3px;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.h5ad-agent-profile .h5ad-profile-contact a,
.h5ad-agent-profile .h5ad-profile-address {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: normal;
}

.h5ad-agent-profile .h5ad-profile-contact a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.h5ad-agent-profile .h5ad-profile-contact a:hover,
.h5ad-agent-profile .h5ad-profile-intro a:hover {
    color: #bfdbfe;
}

.h5ad-agent-profile .h5ad-profile-address {
    font-style: normal;
}

.h5ad-agent-profile .h5ad-profile-intro a,
.h5ad-agent-profile .h5ad-profile-staff-card a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.h5ad-agent-profile .h5ad-profile-staff-card a:hover {
    color: var(--h5ad-accent);
}

/* =========================================
   CONTENT CARDS
   ========================================= */

.h5ad-agent-profile .h5ad-profile-about,
.h5ad-agent-profile .h5ad-profile-licenses,
.h5ad-agent-profile .h5ad-profile-map,
.h5ad-agent-profile .h5ad-profile-staff {
    margin-bottom: var(--h5ad-section-gap);
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid var(--h5ad-line);
    border-radius: 18px;
    box-shadow: 0 6px 24px rgb(15 23 42 / 3%);
}

.h5ad-agent-profile .h5ad-profile-about h2,
.h5ad-agent-profile .h5ad-profile-licenses h2,
.h5ad-agent-profile .h5ad-profile-map h2,
.h5ad-agent-profile .h5ad-profile-staff h2 {
    margin: 0 0 14px;
    color: var(--h5ad-ink);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.4px;
}

.h5ad-agent-profile .h5ad-profile-about p {
    margin: 0;
    color: #475569;
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.h5ad-agent-profile .h5ad-profile-section-heading {
    margin-bottom: 20px;
}

.h5ad-agent-profile .h5ad-profile-section-heading .h5ad-profile-section-kicker {
    margin-bottom: 5px;
    color: var(--h5ad-accent);
}

.h5ad-agent-profile .h5ad-profile-section-heading h2 {
    margin-bottom: 6px;
}

.h5ad-agent-profile .h5ad-profile-section-heading p {
    margin: 0;
    color: var(--h5ad-muted);
    font-size: 14px;
}

/* =========================================
   LICENSED STATE BADGES
   ========================================= */

.h5ad-agent-profile .h5ad-profile-state-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.h5ad-agent-profile .h5ad-profile-state-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 8px;
    color: #1e4d78;
    background: #edf5fc;
    border: 1px solid #d7e8f8;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.h5ad-agent-profile .h5ad-profile-state-badge svg {
    display: block;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
}

/* =========================================
   OFFICE MAP
   ========================================= */

.h5ad-agent-profile .h5ad-profile-map iframe {
    display: block;
    width: 100%;
    min-height: 300px;
    border: 0;
    border-radius: 12px;
}

/* =========================================
   SUPPORTING STAFF
   ========================================= */

.h5ad-agent-profile .h5ad-profile-staff-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 230px), 1fr)
    );
    gap: 20px;
}

.h5ad-agent-profile .h5ad-profile-staff-card {
    min-width: 0;
    padding: 24px;
    background-color: #f8fafc;
    border: 1px solid var(--h5ad-line);
    border-radius: 16px;
    text-align: center;
    overflow-wrap: anywhere;
}

.h5ad-agent-profile .h5ad-profile-staff-card img {
    display: block;
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    object-fit: cover;
    border-radius: 50%;
    background: #eaf1f8;
}

.h5ad-agent-profile .h5ad-profile-staff-card h3 {
    margin: 0 0 12px;
    color: var(--h5ad-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.h5ad-agent-profile .h5ad-profile-staff-card p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
}

/* =========================================
   CALL TO ACTION
   ========================================= */

.h5ad-agent-profile .h5ad-profile-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: var(--h5ad-section-gap);
    padding: clamp(28px, 4vw, 44px);
    color: #ffffff;
    background: #10233f;
    border-radius: 20px;
    box-shadow: 0 14px 35px rgb(16 35 63 / 15%);
}

.h5ad-agent-profile .h5ad-profile-cta-copy {
    flex: 1 1 360px;
    min-width: 0;
}

.h5ad-agent-profile .h5ad-profile-cta-kicker {
    color: #a9d3f5;
}

.h5ad-agent-profile .h5ad-profile-cta h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.h5ad-agent-profile .h5ad-profile-cta p {
    max-width: 520px;
    margin: 0;
    color: #d3deeb;
    font-size: 14px;
    line-height: 1.8;
}

.h5ad-agent-profile .h5ad-profile-cta-actions {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 12px;
}

/* Both Call Agent and Request Appointment
   use the same button design. */

.h5ad-agent-profile .h5ad-profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 13px 19px;
    color: #ffffff;
    background-color: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.h5ad-agent-profile .h5ad-profile-button:hover {
    color: #ffffff;
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.h5ad-agent-profile .h5ad-profile-button svg {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
}

/* =========================================
   DARK FOOTER
   ========================================= */

.h5ad-agent-profile .h5ad-profile-footer {
    position: relative;
    left: auto;
    width: 100%;
    max-width: 100%;
    margin: 40px 0 0;
    padding: 24px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    box-sizing: border-box;
    color: #ffffff;
    background: #10233f;
    border: 1px solid #10233f;
    border-radius: 0;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}

.h5ad-agent-profile .h5ad-profile-footer strong,
.h5ad-agent-profile .h5ad-profile-footer span,
.h5ad-agent-profile .h5ad-profile-footer a {
    color: #ffffff;
}

.h5ad-agent-profile .h5ad-profile-footer strong {
    font-size: 15px;
    font-weight: 700;
}

.h5ad-agent-profile .h5ad-profile-footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.h5ad-agent-profile .h5ad-profile-footer a:hover {
    color: #bfdbfe;
}

/* =========================================
   NOTICE
   ========================================= */

.h5ad-agent-profile .h5ad-profile-notice {
    padding: 18px 20px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
 
 
/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1024px) {
    .h5ad-agent-profile {
        --h5ad-section-gap: 26px;
    }

    .h5ad-agent-profile .h5ad-profile-hero {
        gap: 26px;
        padding: 30px;
    }

    /* Agent photo */
    .h5ad-agent-profile .h5ad-profile-photo-wrap {
        flex: 0 0 150px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        overflow: hidden;
    }

    .h5ad-agent-profile .h5ad-profile-photo-wrap img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .h5ad-agent-profile .h5ad-profile-intro h1 {
        font-size: 32px;
    }

    .h5ad-agent-profile .h5ad-profile-contact-list {
        gap: 16px 14px;
    }

    .h5ad-agent-profile .h5ad-profile-contact {
        gap: 8px;
    }

    .h5ad-agent-profile .h5ad-profile-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .h5ad-agent-profile .h5ad-profile-icon svg {
        flex-basis: 17px;
        width: 17px;
        height: 17px;
    }
}


/* =========================================
   PHONE NUMBER ALIGNMENT
   ========================================= */

.h5ad-agent-profile .h5ad-profile-phone a {
    display: inline;
    white-space: nowrap;
}

.h5ad-agent-profile .h5ad-profile-phone > div {
    min-width: 0;
}

.h5ad-agent-profile .h5ad-profile-phone > div a + a::before {
    content: "   ";
    white-space: pre;
}


/* =========================================
   MOBILE — Agent Profile
   ========================================= */

@media (max-width: 767px) {

    .h5ad-agent-profile {
        --h5ad-section-gap: 22px;
        padding: 20px 5px 0;
    }

    /* Header layout */
    .h5ad-agent-profile .h5ad-profile-hero {
        flex-direction: column;
        align-items: center;
        gap: 22px;
        padding: 26px 20px;
        text-align: center;
    }

    /* Agent photo — circular */
    .h5ad-agent-profile .h5ad-profile-photo-wrap {
        flex: 0 0 150px;
        align-self: center;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        overflow: hidden;
    }

    .h5ad-agent-profile .h5ad-profile-photo-wrap img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .h5ad-agent-profile .h5ad-profile-photo-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 46px;
    }

    /* Center agent name and position */
    .h5ad-agent-profile .h5ad-profile-intro {
        align-self: stretch;
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .h5ad-agent-profile .h5ad-profile-intro h1 {
        margin-right: auto;
        margin-left: auto;
        font-size: 30px;
        letter-spacing: -0.6px;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .h5ad-agent-profile .h5ad-profile-title {
        text-align: center;
    }

    /* =====================================
       CONTACT INFORMATION
       ===================================== */

    .h5ad-agent-profile .h5ad-profile-contact-list {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 18px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 22px 0 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }

    /* Each contact occupies a separate row */
    .h5ad-agent-profile .h5ad-profile-contact-list > .h5ad-profile-contact {
        display: flex !important;
        flex: 0 0 auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }

    /* Contact icon */
    .h5ad-agent-profile .h5ad-profile-contact-list .h5ad-profile-icon {
        display: flex;
        flex: 0 0 38px !important;
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        align-items: center;
        justify-content: center;
    }

    .h5ad-agent-profile .h5ad-profile-contact-list .h5ad-profile-icon svg {
        display: block;
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
    }

    /* Text wrapper beside the icon */
    .h5ad-agent-profile .h5ad-profile-contact-list > .h5ad-profile-contact > div {
        flex: 1 1 0% !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    /* Contact labels */
    .h5ad-agent-profile .h5ad-profile-contact-label {
        display: block;
        margin: 0 0 3px;
        font-size: 11px;
        line-height: 1.4;
    }

    /* Default contact values */
    .h5ad-agent-profile .h5ad-profile-contact-list a,
    .h5ad-agent-profile .h5ad-profile-contact-list .h5ad-profile-address {
        display: block;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        font-size: 14px;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
    }

    /* Multiple phone numbers — keep links inline */
    .h5ad-agent-profile .h5ad-profile-phone > div {
        display: block;
        min-width: 0;
    }

    .h5ad-agent-profile .h5ad-profile-phone a {
        display: inline !important;
        width: auto !important;
        max-width: none !important;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    .h5ad-agent-profile .h5ad-profile-phone > div a + a::before {
        content: "   ";
        white-space: pre;
    }

    /* Content cards */
    .h5ad-agent-profile .h5ad-profile-about,
    .h5ad-agent-profile .h5ad-profile-licenses,
    .h5ad-agent-profile .h5ad-profile-map,
    .h5ad-agent-profile .h5ad-profile-staff {
        padding: 23px 20px;
    }

    .h5ad-agent-profile .h5ad-profile-about h2,
    .h5ad-agent-profile .h5ad-profile-licenses h2,
    .h5ad-agent-profile .h5ad-profile-map h2,
    .h5ad-agent-profile .h5ad-profile-staff h2 {
        font-size: 22px;
    }

    /* Supporting staff */
    .h5ad-agent-profile .h5ad-profile-staff-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Call to action */
    .h5ad-agent-profile .h5ad-profile-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 28px 22px;
    }

    .h5ad-agent-profile .h5ad-profile-cta-copy {
        flex: 0 1 auto;
        margin-bottom: 0;
    }

    .h5ad-agent-profile .h5ad-profile-cta p {
        margin-bottom: 0;
    }

    .h5ad-agent-profile .h5ad-profile-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .h5ad-agent-profile .h5ad-profile-button {
        width: 100%;
    }

    /* Map */
    .h5ad-agent-profile .h5ad-profile-map iframe {
        min-height: 240px;
    }

    /* Footer */
    .h5ad-agent-profile .h5ad-profile-footer {
        position: relative;
        left: auto;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin-top: 28px;
        padding: 20px 16px;
        text-align: center;
        overflow-wrap: anywhere;
    }
}
