/* Footer */

.site-footer {
    background: linear-gradient(135deg, #050b1b, #0f172a 55%, #210c2d);
    color: #f8fafc;
    /* remove extra top margin so sections that directly precede footer
       (like Contact) align visually without a large gap */
    margin-top: 0;
    padding-top: 3rem;
}

.footer-main.container {
    display: grid;
    gap: 2.5rem;
    padding-bottom: 3rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: flex-start;
}

.footer-links a,
.footer-bottom a,
.footer-copy a {
    color: rgba(248, 250, 252, 0.9);
}

.footer-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.footer-icon svg {
    width: 18px;
    height: 18px;
}

.footer-icon-phone svg,
.footer-icon-email svg {
    width: 16px;
    height: 16px;
}

.footer-logo-image {
    height: 56px;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand p {
    color: rgba(248, 250, 252, 0.85);
    margin-bottom: 2rem;
    max-width: 360px;
    white-space: nowrap;
}


.footer-certification {
    border: 1px solid rgba(248, 250, 252, 0.6);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    max-width: 180px;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    background: rgba(248, 250, 252, 0.04);
    margin-bottom: 1.5rem;
}

.footer-cert-title {
    display: block;
    font-weight: 700;
    color: #f97316;
}

.footer-cert-subtitle {
    display: block;
    font-size: 0.65rem;
    color: rgba(248, 250, 252, 0.8);
    margin-top: 0.1rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column h4 {
    margin: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.8);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-column li {
    font-size: 0.95rem;
    color: rgba(248, 250, 252, 0.75);
}

.footer-column a {
    color: rgba(248, 250, 252, 0.9);
}

.footer-column a:hover {
    color: #f97316;
}

.footer-links-column a:hover,
.footer-links a:hover,
.footer-bottom a:hover,
.footer-copy a:hover {
    color: #f97316;
}

.location-list {
    gap: 1rem;
}

.location-entry {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.location-label {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    color: rgba(248, 250, 252, 0.85);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.location-label,
.location-entry svg {
    transition: color 200ms ease;
}

.location-map {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(248, 250, 252, 0.9);
    text-decoration: none;
}

.location-map .location-label {
    color: inherit;
}

.location-map:hover {
    color: #f97316;
}

.location-link {
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.location-link.email-link {
    margin-top: 0.25rem;
}

.location-link:hover {
    color: #f97316;
}

@media (min-width: 900px) {
    .footer-main.container {
        grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    }

    .footer-brand {
        padding-right: 1rem;
    }
}

.footer-bottom {
    border-top: 1px solid rgba(248, 250, 252, 0.15);
    padding: 0.9rem 0 1rem;
}

.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: rgba(248, 250, 252, 0.65);
    font-size: 0.8rem;
}

.footer-bottom a {
    color: rgba(248, 250, 252, 0.85);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #f97316;
}

@media (min-width: 900px) {
    .footer-bottom-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.footer-links a {
    opacity: 0.85;
}

.footer-links a:hover {
    opacity: 1;
}

/* Mobile adjustments for footer bottom */
@media (max-width: 899px) {
    .footer-bottom-inner {
        text-align: center;
        align-items: center;
    }

    .footer-links {
        justify-content: center;
    }

    /* Force "Patient Rights and Advocacy" to a new line on mobile */
    .footer-links a[href*="patient-rights"] {
        width: 100%;
        margin-top: 0.25rem;
    }

    .footer-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        margin-top: 0.5rem;
    }

    /* Hide the pipe before "Developed by" on mobile */
    .footer-pipe.dev-pipe {
        display: none;
    }
    
    /* Ensure the first pipe remains visible between copyright and rights reserved if desired, 
       or we can hide it too if it looks crowded. The user specifically mentioned the one before "Developed by".
       But let's keep the first one inline. */
}

/* Mobile adjustments for footer brand section */
@media (max-width: 899px) {
    .footer-brand {
        /* Already flex/centered from global rule, but we can keep this if needed for specificity or overrides */
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
        white-space: nowrap; /* Ensure single line on mobile too */
        font-size: 0.9rem; /* Slightly smaller if needed to fit */
        max-width: 100%; /* Allow full width */
    }

    /* Reduce font weight for list items and links on mobile to emphasize headers */
    .footer-column li,
    .footer-column a,
    .location-link,
    .location-map {
        font-weight: 300; /* Light weight */
        opacity: 0.85; /* Slightly more transparent */
    }
    
    /* Ensure headers stay bold/uppercase */
    .footer-column h4 {
        font-weight: 700;
        opacity: 1;
    }
}
