@charset "utf-8";
/*
 * Island Realty Group header (partials/irg/header). Loaded only on pages
 * that include partials/irg-theme. (The footer is the shared
 * partials/footer, styled by site-footer.css.)
 *
 * Values come from the reference markup and styles.css in
 * public/islandrealtygroup (identical to square1server.com/islandrealtygroup):
 *   Montserrat, menu .size18 a.darkbluelink (#0A1932, hover #2E6DA4),
 *   logo 567x107, photo band 275px, footer navy #002966, contact bar
 *   #D9DFE8 (858px), link columns 1000px wide in .size16 .smallspacing
 *   with a.whitelink (#E6EBF2, hover #FFF), copyright .size15 .gray6.
 *
 * The reference is a fixed 1620px layout with no mobile design, so the
 * breakpoints below are our own: the menu collapses at 1024px (matching
 * the Atlantis nav's lg breakpoint) and the footer stacks below 768px.
 *
 * Unlayered on purpose: app.css is Tailwind v4 (utilities in a cascade
 * layer), so these rules win over any utility/base styles without
 * !important. Elements avoid <p> because layouts/app forces
 * `p { line-height: 40px !important }`.
 */

.irg-header {
    font-family: "Montserrat", sans-serif;
    -webkit-text-size-adjust: none;
}

.irg-header ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------------------------------------------------------------- *
 * Header
 * ---------------------------------------------------------------- */
.irg-header {
    position: relative;
    z-index: 30;
    background: #ffffff;
}

.irg-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-right: 25px;
}

.irg-header-logo {
    flex: 0 1 567px;
    min-width: 0;
}

.irg-header-logo img {
    display: block;
    width: 100%;
    max-width: 567px;
    height: auto;
}

.irg-header-nav {
    padding-top: 10px; /* reference: 10px spacer row above the menu */
}

.irg-header-menu {
    display: flex;
    align-items: center;
    gap: 36px; /* reference: 8 x &nbsp; between items */
}

.irg-header-cat {
    position: relative;
}

.irg-header-cat-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 18px;
    color: #0a1932;
    text-transform: uppercase; /* tbl_dropdown names are mixed case */
    white-space: nowrap;
    cursor: default;
}

.irg-header-cat-label img {
    display: block;
    width: 20px;
    height: 16px;
}

.irg-header-cat:hover > .irg-header-cat-label,
.irg-header-cat:focus-within > .irg-header-cat-label {
    color: #2e6da4;
}

.irg-header-cat-label:focus-visible {
    outline: 2px solid #2e6da4;
    outline-offset: 2px;
}

/* Same show/hide timing as .nav-dropdown in app.css, repeated here
   because the CP layout (cp/header/topcontent) doesn't load app.css. */
.irg-header-dropdown {
    visibility: hidden;
    opacity: 0;
    transition: opacity 200ms ease, visibility 0s 200ms;
}

.irg-header-cat:hover > .irg-header-dropdown,
.irg-header-cat:focus-within > .irg-header-dropdown {
    visibility: visible;
    opacity: 1;
    transition: opacity 150ms ease, visibility 0s;
}

.irg-header-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    min-width: 230px;
    padding: 8px 0;
    border-top: 3px solid #002966;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(10, 25, 50, 0.18);
}

/* Right-most panel opens leftward so it stays inside the window. */
.irg-header-cat:last-child > .irg-header-dropdown {
    left: auto;
    right: 0;
}

.irg-header-dropdown a {
    display: block;
    padding: 8px 18px;
    font-size: 16px;
    line-height: 1.5;
    color: #333333;
    white-space: nowrap;
    text-decoration: none;
}

.irg-header-dropdown a:hover,
.irg-header-dropdown a:focus-visible {
    color: #2e6da4;
    background: #eef1f6;
}

/* Photo band: reference random1.jpg row, background centered top. */
.irg-header-band {
    height: 275px;
    background-color: #d9dfe8;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Mobile menu (hidden on desktop). */
.irg-header-mobile {
    display: none;
}

.irg-header-mobile > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #0a1932;
    list-style: none;
    cursor: pointer;
}

.irg-header-mobile > summary::-webkit-details-marker {
    display: none;
}

.irg-header-mobile > summary:focus-visible {
    outline: 2px solid #2e6da4;
    outline-offset: 2px;
}

.irg-header-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.irg-header-burger > span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: #002966;
}

.irg-header-mobile-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px 30px;
    padding: 20px 16px 24px;
    border-top: 3px solid #002966;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(10, 25, 50, 0.18);
}

.irg-header-mobile-cat > div {
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 700;
    color: #002966;
    text-transform: uppercase;
}

.irg-header-mobile-cat a {
    display: block;
    padding: 6px 0;
    font-size: 16px;
    color: #333333;
    text-decoration: none;
}

.irg-header-mobile-cat a:hover {
    color: #2e6da4;
}

@media (max-width: 1279px) {
    .irg-header-menu {
        gap: 24px;
    }

    .irg-header-cat-label {
        font-size: 16px;
    }
}

@media (max-width: 1023px) {
    .irg-header-bar {
        position: relative;
        padding: 10px 16px;
    }

    .irg-header-logo {
        flex-basis: 340px;
    }

    .irg-header-nav {
        position: static;
        padding-top: 0;
    }

    .irg-header-menu {
        display: none;
    }

    .irg-header-mobile {
        display: block;
    }

    .irg-header-band {
        height: 200px;
    }
}

@media (max-width: 639px) {
    .irg-header-logo {
        flex-basis: 230px;
    }

    .irg-header-mobile > summary > span:last-child {
        display: none; /* icon only on phones */
    }

    .irg-header-band {
        height: 140px;
    }
}

/* Desktop: Esc closes an open dropdown (public/js/irg-header.js adds
   .is-dismissed) even while it's still hovered/focused — WCAG 1.4.13. */
@media (min-width: 1025px) {
    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-cat.is-dismissed > .irg-tpl-dropdown {
        visibility: hidden;
        opacity: 0;
    }
}

/* ---------------------------------------------------------------- *
 * Mobile / tablet header (1024px and below)
 *
 * Restyles the CP "Site Template > Header" HTML (.irg-tpl-*) inside
 * [data-irg-header]: one white row with the logo on the left and the
 * call + menu buttons (.irg-header-controls) on the right; the CP menu
 * becomes the full-width hamburger panel, each category an accordion
 * (public/js/irg-header.js toggles .is-open / .is-expanded).
 *
 * That HTML carries its own <style> block, which comes later in the
 * page than this file, so every rule here is prefixed with
 * .irg-header[data-irg-header] to out-rank it on specificity. Nothing
 * above 1024px changes.
 * ---------------------------------------------------------------- */
.irg-header-controls {
    display: none;
}

@media (max-width: 1024px) {
    .irg-header[data-irg-header] {
        --irg-mbar-height: 76px;
        --irg-mbar-blue: #1d5bb5;
        position: relative;
    }

    .irg-header[data-irg-header] .irg-tpl-bar {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
        height: var(--irg-mbar-height);
        /* Room on the right for the two 48px buttons, so they can never
           sit on top of the logo. */
        padding: 0 120px 0 16px;
    }

    /* 60% of the screen (225px at 375px), never wider than the space
       left of the buttons (100vw minus their 136px), capped at 340px on
       tablets so the row stays 76px tall. */
    .irg-header[data-irg-header] .irg-tpl-logo {
        flex: 0 0 auto;
        width: min(60vw, calc(100vw - 136px), 340px);
        max-width: none;
        padding: 0;
    }

    .irg-header[data-irg-header] .irg-tpl-logo img {
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 0;
    }

    .irg-header[data-irg-header] .irg-header-controls {
        position: absolute;
        top: 0;
        right: 8px;
        z-index: 31;
        display: flex;
        align-items: center;
        gap: 4px;
        height: var(--irg-mbar-height);
    }

    .irg-header[data-irg-header] .irg-header-call,
    .irg-header[data-irg-header] .irg-header-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        border-radius: 6px;
        color: var(--irg-mbar-blue);
        background: none;
        cursor: pointer;
    }

    .irg-header[data-irg-header] .irg-header-call:focus-visible,
    .irg-header[data-irg-header] .irg-header-toggle:focus-visible {
        outline: 2px solid var(--irg-mbar-blue);
        outline-offset: 2px;
    }

    .irg-header[data-irg-header] .irg-header-toggle-close,
    .irg-header[data-irg-header].is-open .irg-header-toggle-open {
        display: none;
    }

    .irg-header[data-irg-header].is-open .irg-header-toggle-close {
        display: block;
    }

    /* Menu panel: hidden until the hamburger opens it, then full width
       directly below the header row, over the photo band. */
    .irg-header[data-irg-header] .irg-tpl-bar .irg-tpl-menu {
        position: absolute;
        top: var(--irg-mbar-height);
        left: 0;
        right: 0;
        display: none;
        width: auto;
        max-height: calc(100vh - var(--irg-mbar-height));
        margin: 0;
        padding: 0;
        overflow-y: auto;
        background: #ffffff;
        border-top: 1px solid #e1e5ec;
        box-shadow: 0 8px 18px rgba(10, 25, 50, 0.18);
    }

    .irg-header[data-irg-header].is-open .irg-tpl-bar .irg-tpl-menu {
        display: block;
    }

    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-cat {
        position: static;
        border-right: 0;
        border-bottom: 1px solid #e1e5ec;
        text-align: left;
    }

    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 0 16px;
        font-size: 16px;
    }

    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-label img {
        transition: transform 0.2s ease;
    }

    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-cat.is-expanded > .irg-tpl-label img {
        transform: rotate(180deg);
    }

    /* Accordion: sub-links stay in the flow under their category, shown
       only while it's expanded (not on hover/focus as on desktop). */
    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-cat .irg-tpl-dropdown {
        position: static;
        display: none;
        visibility: visible;
        opacity: 1;
        min-width: 0;
        margin: 0;
        padding: 0 0 8px;
        border-top: 0;
        box-shadow: none;
        background: #f5f7fa;
        transition: none;
    }

    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-cat.is-expanded > .irg-tpl-dropdown {
        display: block;
    }

    .irg-header[data-irg-header] .irg-tpl-menu .irg-tpl-dropdown a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 32px;
        white-space: normal;
    }
}
