/* =====================================================================
   footer.css — REDESIGN v4 (Premium / Engineered)
   Namespaced under .site-footer (site-footer__*). Scope: ONLY the site
   footer. Palette unchanged: #016fb9 blue · #01517f deep blue ·
   #f59e0b amber · surface stays white/light like .site-header.

   Echoes the header's single signature motif (duct-flange divider:
   dash + rivet dots) as the column separators, and the header's top
   gradient hairline, so header and footer read as one engineered
   system rather than two unrelated components.
   ===================================================================== */

.site-footer {
    --ftr-blue: #016fb9;
    --ftr-blue-deep: #01517f;
    --ftr-amber: #f59e0b;

    position: relative;
    background-color: #ffffff;
    box-shadow: 0 -1px 0 #eef1f4, 0 -30px 50px -35px rgba(1, 111, 185, 0.18);
}

.site-footer__accent {
    height: 2px;
    background: linear-gradient(90deg, var(--ftr-blue) 0%, var(--ftr-amber) 50%, var(--ftr-blue) 100%);
    opacity: 0.9;
}

/* --- Main content: brand / links / contact -------------------------------- */
.site-footer__main {
    padding: 4rem 0 3rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr 1.3fr;
    gap: 3rem;
}

.site-footer__col { min-width: 0; }

/* Duct-flange divider: a hairline with two small "rivet" dots, echoing
   .site-header__divider instead of a plain grey border. */
.site-footer__col + .site-footer__col {
    position: relative;
    padding-right: 3rem;
}

.site-footer__col + .site-footer__col::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    right: 0;
    width: 1px;
    background-image: repeating-linear-gradient(0deg, #dde3ea 0 6px, transparent 6px 12px);
}

.site-footer__col + .site-footer__col::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -2px;
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background-color: #c7d0db;
    box-shadow: 0 calc(100% + 6px) 0 0 #c7d0db;
}

/* --- Brand lockup ---------------------------------------------------------- */
.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    margin-bottom: 1.15rem;
}

.site-footer__brand-logo-frame {
    position: relative;
    display: flex;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--ftr-blue) 0%, var(--ftr-amber) 100%);
    box-shadow: 0 10px 22px -10px rgba(1, 111, 185, 0.55);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.site-footer__brand:hover .site-footer__brand-logo-frame {
    transform: translateY(-2px) rotate(-2deg);
    box-shadow: 0 14px 28px -10px rgba(1, 111, 185, 0.6);
}

.site-footer__brand-logo {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    background-color: #ffffff;
}

.site-footer__brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.site-footer__brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ftr-blue);
}

.site-footer__brand-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ftr-amber);
    letter-spacing: 0.01em;
    margin-top: 2px;
}

.site-footer__tagline {
    font-size: 0.9rem;
    line-height: 1.9;
    color: #6b7280;
    margin-bottom: 1.6rem;
    max-width: 36ch;
}

.site-footer__socials {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.site-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background-color: #ffffff;
    border: 1px solid #eef1f4;
    color: #6b7280;
    font-size: 1rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
    background-color: var(--ftr-amber);
    border-color: var(--ftr-amber);
    color: #ffffff;
    transform: translateY(-3px);
}

/* --- Headings --- */
.site-footer__heading {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.4rem;
    padding-bottom: 0.7rem;
    position: relative;
    display: inline-block;
}

.site-footer__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 3px;
    border-radius: 3px;
    background-color: var(--ftr-amber);
}

/* --- Quick links --- */
.site-footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.site-footer__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0;
    min-height: 44px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    width: fit-content;
    transition: color 0.25s ease, gap 0.2s ease;
}

.site-footer__link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background-color: #f3f7fb;
    font-size: 0.65rem;
    color: var(--ftr-blue);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s ease;
    flex-shrink: 0;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
    color: var(--ftr-blue);
    gap: 0.8rem;
}

.site-footer__link:hover .site-footer__link-icon,
.site-footer__link:focus-visible .site-footer__link-icon {
    background-color: var(--ftr-amber);
    color: #ffffff;
    transform: rotate(-8deg);
}

/* --- Contact panel ---------------------------------------------------------- */
.site-footer__contact-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* 1. Address — button that opens the shared map modal (also used by the
   header). One map system for the whole site instead of two competing
   ones, so this card always works. */
.site-footer__contact-card {
    width: 100%;
    text-align: right;
    padding: 1rem;
    border-radius: 16px;
    background-color: #f8fafc;
    border: 1px solid #eef1f4;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-footer__contact-card:hover,
.site-footer__contact-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.5);
    background-color: #fffaf0;
    box-shadow: 0 16px 30px -16px rgba(245, 158, 11, 0.35);
}

.site-footer__contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 13px;
    background-color: #fff7ec;
    border: 1px solid #fde8c4;
    color: var(--ftr-amber);
    font-size: 1rem;
    box-shadow: 0 4px 10px -4px rgba(245, 158, 11, 0.35);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.site-footer__contact-card:hover .site-footer__contact-icon {
    background-color: var(--ftr-amber);
    color: #ffffff;
    transform: rotate(-6deg) scale(1.05);
}

.site-footer__contact-body {
    min-width: 0;
    flex: 1 1 auto;
}

.site-footer__contact-toprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.15rem;
}

.site-footer__contact-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: none;
    letter-spacing: 0.01em;
}

.site-footer__contact-pill {
    font-size: 0.65rem;
    font-weight: 700;
    color: #b45309;
    background-color: #fef3d9;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-footer__contact-card:hover .site-footer__contact-pill {
    background-color: var(--ftr-amber);
    color: #ffffff;
}

.site-footer__contact-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.site-footer__contact-card:hover .site-footer__contact-value {
    color: #b45309;
}

/* 2 & 3. Phone / email links share the same card treatment but with a
   blue icon so the address card (amber) reads as the primary action. */
.site-footer__contact-card--link .site-footer__contact-icon {
    background-color: #eef6fd;
    border-color: #d7ebfa;
    color: var(--ftr-blue);
    box-shadow: 0 4px 10px -4px rgba(1, 111, 185, 0.35);
}

.site-footer__contact-card--link:hover,
.site-footer__contact-card--link:focus-visible {
    border-color: rgba(1, 111, 185, 0.45);
    background-color: #f3f9ff;
    box-shadow: 0 16px 30px -16px rgba(1, 111, 185, 0.3);
}

.site-footer__contact-card--link:hover .site-footer__contact-icon {
    background-color: var(--ftr-blue);
    color: #ffffff;
}

.site-footer__contact-card--link:hover .site-footer__contact-value {
    color: var(--ftr-blue);
}

.site-footer__contact-value--mono {
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.02em;
    font-size: 1rem;
}

/* --- Bottom / legal bar ------------------------------------------------------ */
.site-footer__bottom {
    background-color: #f7f9fb;
    border-top: 1px solid #eef1f4;
}

.site-footer__bottom-inner {
    padding: 1.25rem 0;
    text-align: center;
}

.site-footer__copyright {
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.7;
}

/* --- Map modal trigger note: this footer no longer owns its own modal.
   The address card calls the single shared window.openMapModal() that
   also powers the header's map dialog. --- */

/* --- Focus states ---- */
.site-footer a:focus-visible,
.site-footer button:focus-visible {
    outline: 2px solid var(--ftr-blue);
    outline-offset: 3px;
    border-radius: 8px;
}

/* --- Tablet ----------------------------------------------------------------- */
@media (max-width: 1024px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        row-gap: 2.5rem;
    }
    .site-footer__col--contact {
        grid-column: 1 / -1;
    }
    .site-footer__col--contact::before,
    .site-footer__col--contact::after,
    .site-footer__col--links::before,
    .site-footer__col--links::after {
        display: none;
    }
    .site-footer__col--contact { padding-right: 0; }
}

@media (max-width: 640px) {
    .site-footer__main { padding: 2.9rem 0 2.25rem; }
    .site-footer__grid { grid-template-columns: 1fr; row-gap: 2.25rem; }
    .site-footer__col {
        padding-right: 0 !important;
        padding-bottom: 2rem;
        border-bottom: 1px solid #eef1f4;
    }
    .site-footer__col::before,
    .site-footer__col::after { display: none; }
    .site-footer__col--contact { border-bottom: none; padding-bottom: 0; }
    .site-footer__tagline { max-width: 100%; }
    .site-footer__social-link { width: 44px; height: 44px; font-size: 1.1rem; }
    .site-footer__link { min-height: 46px; }
}

@media (max-width: 360px) {
    .site-footer__brand-name { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer,
    .site-footer * {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}