/* =========================================================
   BAM'S WEBSITE BUILDER — SHARED FOOTER FIX
   Load this file after the main website stylesheets.
========================================================= */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
    width: 100%;
}

/* Pages whose main content is not wrapped in <main>. */
body > .hero:first-of-type,
body > .admin-shell {
    flex-shrink: 0;
}

.home-footer {
    flex: 0 0 auto;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #b8b8b8;
    background:
        radial-gradient(
            circle at 12% 0%,
            rgba(212, 166, 55, 0.08),
            transparent 34%
        ),
        #060606;
    border-top: 1px solid rgba(212, 166, 55, 0.25);
    font-size: 0.92rem;
    line-height: 1.65;
}

.home-footer .footer-grid {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.45fr)
        repeat(3, minmax(150px, 0.75fr));
    gap: 34px clamp(28px, 4vw, 58px);
    align-items: start;

    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 54px 0 38px;
}

.home-footer .footer-grid > div {
    min-width: 0;
}

.home-footer h3,
.home-footer h4 {
    margin: 0 0 15px;
    color: #ffffff;
    line-height: 1.25;
}

.home-footer h3 {
    color: #f0c45a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
    letter-spacing: 0.08em;
}

.home-footer h4 {
    font-size: 0.98rem;
}

.home-footer p {
    max-width: 440px;
    margin: 0;
    color: #a9a9a9;
}

.home-footer .footer-links {
    display: grid;
    gap: 9px;
    align-items: start;
}

.home-footer a {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 !important;
    color: #b7b7b7;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.2s ease, transform 0.2s ease;
}

.home-footer a:hover,
.home-footer a:focus-visible {
    color: #f0c45a;
    text-decoration: none;
    transform: translateX(2px);
}

.home-footer .footer-bottom {
    width: 100%;
    margin: 0;
    padding: 19px 20px 21px;
    color: #888888;
    border-top: 0;
    text-align: center;
    font-size: 0.84rem;
}

/* Compact footer used on the protected client portal. */
.client-portal-page > footer:not(.home-footer) {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    margin-top: auto;
    padding: 24px clamp(20px, 5vw, 60px);
    color: #9f9f9f;
    background: #070707;
    border-top: 1px solid rgba(212, 166, 55, 0.2);
}

.client-portal-page > footer:not(.home-footer) p {
    margin: 0;
}

.client-portal-page > footer:not(.home-footer) a {
    color: #f0c45a;
    text-decoration: none;
}

.client-portal-page .portal-social-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 404 page */
.error-page {
    background:
        radial-gradient(
            circle at center,
            rgba(212, 166, 55, 0.12),
            transparent 42%
        ),
        #0a0a0a;
}

.error-page .error-main {
    display: grid;
    place-items: center;
    min-height: calc(100dvh - 310px);
    padding: 80px 20px;
    text-align: center;
}

.error-page .error-card {
    width: min(620px, 100%);
    padding: clamp(34px, 6vw, 60px);
    background: linear-gradient(145deg, #171717, #0d0d0d);
    border: 1px solid rgba(212, 166, 55, 0.28);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.error-page .error-code {
    display: block;
    margin-bottom: 10px;
    color: #f0c45a;
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 900;
    line-height: 1;
}

.error-page .error-card h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(2rem, 6vw, 3.4rem);
}

.error-page .error-card p {
    margin: 0 auto 26px;
    color: #b8b8b8;
    line-height: 1.75;
}

.error-page .error-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 25px;
    color: #111111;
    background: #d4a637;
    border: 2px solid #d4a637;
    border-radius: 9px;
    font-weight: 900;
    text-decoration: none;
}

@media (max-width: 920px) {
    .home-footer .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-footer .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .home-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        width: min(100% - 36px, 560px);
        padding: 42px 0 30px;
    }

    .home-footer .footer-grid > div:first-child {
        grid-column: auto;
    }

    .home-footer .footer-bottom {
        padding: 18px;
        text-align: center;
    }

    .client-portal-page > footer:not(.home-footer) {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
    }
}

.home-footer .bam-social-links {
    display: flex;
    justify-content: center;
    gap: 12px 24px;
    flex-wrap: wrap;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-footer .bam-social-links a {
    color: #b7b7b7;
    text-decoration: none;
    font-weight: 700;
}

.home-footer .bam-social-links a:hover,
.home-footer .bam-social-links a:focus-visible {
    color: #f0c45a;
}
