/* Sticky footer: main content grows, footer sits at viewport bottom on short pages */
html {
    height: 100%;
}

body.directory-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background-color: #1f1f1f;
}

body.directory-body .directory-main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    background-color: #f6f6f6;
    width: 100%;
}

/*
 * .max-w-content includes margin-left/right: auto. As a flex item under
 * .directory-main, those auto margins cancel align-items:stretch and
 * shrink-wrap the block — a single result card ends up ~half of a tiny
 * column (Issue 3). Force full width; max-width + auto margins still center.
 */
body.directory-body .directory-main > .max-w-content {
    width: 100%;
    box-sizing: border-box;
}

body.directory-body .directory-site-footer {
    flex-shrink: 0;
    margin: 0;
    width: 100%;
}

/* Dark band: logo + phone; red triangle matches this block's height */
.directory-footer-dark {
    position: relative;
    overflow: hidden;
    background-color: #1f1f1f;
}

.directory-footer-dark::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: min(28vw, 260px);
    height: 100%;
    background-color: #c50a1d;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    pointer-events: none;
    z-index: 1;
}

.directory-footer-logo img {
    display: block;
    width: 164px;
    height: auto;
}

.directory-footer-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 0 2rem;
}

.directory-footer-top .directory-footer-phone {
    flex: 1;
    text-align: center;
}

.directory-footer-top .directory-footer-phone a {
    color: #fff;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.directory-footer-top .directory-footer-phone a:hover {
    color: #c50a1d;
}

/* Balance logo width so phone stays visually centered */
.directory-footer-top .directory-footer-spacer {
    flex-shrink: 0;
    width: 164px;
}

.directory-footer-bar {
    position: relative;
    z-index: 2;
}

@media (max-width: 767px) {
    .directory-footer-top {
        flex-direction: column;
        padding: 2rem 0 1.5rem;
    }

    .directory-footer-top .directory-footer-spacer {
        display: none;
    }

    .directory-footer-top .directory-footer-phone {
        width: 100%;
    }

    .directory-footer-logo img {
        width: 229px;
        margin: 0 auto;
    }

    .directory-footer-dark::after {
        width: min(40vw, 180px);
    }
}

@media (min-width: 1024px) {
    .directory-footer-dark::after {
        display: block;
    }
}

@media (max-width: 1023px) {
    .directory-footer-dark::after {
        display: none;
    }
}
