/* Footer styles */
.site-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--td-navy, #14438A) 0%, var(--td-navy-deep, #0B2A5B) 100%);
    color: var(--td-white, #fff);
    margin-top: 0;
    font-family: Arial, Helvetica, sans-serif;
    border-top: 4px solid var(--td-yellow);
}

/* Decorative overlays */
.site-footer::before,
.site-footer::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

/* Very faint circuit-line SVG pattern */
.site-footer::before {
    inset: 0;
    background: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22200%22%20height%3D%22200%22%20viewBox%3D%220%200%20200%20200%22%3E%3Cpath%20d%3D%22M0,100%20L200,100%20M100,0%20L100,200%20M20,40%20L40,20%20L60,40%20L80,20%20L100,40%20L120,20%20L140,40%20L160,20%20L180,40%20M20,160%20L40,180%20L60,160%20L80,180%20L100,160%20L120,180%20L140,160%20L160,180%20L180,160%22%20stroke%3D%2523FFFFFF%20stroke-width%3D%221%22%20/%3E%3C/svg%3E');
    opacity: 0.06;
}

/* Soft teal radial glow at bottom-right */
.site-footer::after {
    inset: 0;
    background: radial-gradient(circle at bottom right, var(--td-teal, #2FB3C9) 0%, transparent 70%);
    opacity: 0.18;
}


/* Footer grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr;
    gap: clamp(28px, 4vw, 56px);
    padding-top: clamp(48px, 6vw, 80px);
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* Column headings */
.footer-grid .footer-title {
    color: var(--td-white);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1.25rem;
    position: relative;
}
.footer-grid .footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 36px;
    height: 3px;
    background-color: var(--td-yellow);
}

/* Links and text */
.footer-grid a,
.footer-grid .company-blurb,
.footer-grid address {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
}
.footer-grid .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-grid .footer-links li {
    margin-bottom: 0.6rem;
}
.footer-grid .footer-links a {
    display: inline-block;
    padding-left: 0;
    transition: padding-left 0.2s ease, color 0.2s ease;
}
.footer-grid .footer-links a:hover {
    color: var(--td-yellow);
    padding-left: 4px;
}
.footer-grid .footer-links a:focus-visible {
    color: var(--td-yellow);
    outline: 2px solid var(--td-yellow);
    outline-offset: 3px;
}

/* Logo pill */
.logo-pill {
    display: inline-flex;
    align-items: center;
    background-color: var(--td-white);
    border-radius: 999px;
    padding: 8px 18px;
}
.logo-pill img {
    height: 44px;
    width: auto;
}
.footer-brand .logo-pill { margin-bottom: 1.5rem; }
@media (max-width: 768px) { .footer-brand .logo-pill { margin-bottom: 1.25rem; } }

/* Chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    background: rgba(255,192,0,0.12);
    border: 1px solid rgba(255,192,0,0.5);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--td-white);
}
.chip::before {
    content: "•";
    color: var(--td-yellow);
    margin-right: 4px;
}

/* Contact rows */
.address {
    font-style: normal;
    line-height: 1.7;
}
.contact-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 0.8rem;
}
.contact-row .icon {
    width: 20px;
    height: 20px;
    stroke: var(--td-yellow);
    fill: none;
}

/* Footer bottom */
.footer-bottom {
    background: var(--td-navy-deep, #0B2A5B);
    border-top: 3px solid var(--td-yellow, #FFC000);
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    padding: 18px 0;
}
.footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 24px;
}
.footer-bottom .footer-left,
.footer-bottom .footer-right {
    flex: 1 1 200px;
}
.footer-bottom .footer-left {
    text-align: left;
}
.footer-bottom .footer-right {
    text-align: right;
}
@media (max-width: 576px) {
    .footer-bottom .footer-left,
    .footer-bottom .footer-right {
        text-align: center;
        width: 100%;
        margin: 0.5rem 0;
    }
    /* Ensure back-to-top button doesn't cover text */
    .footer-bottom {
        padding-bottom: 72px;
    }
}

/* Back-to-top button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: var(--td-yellow);
    color: var(--td-black);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 900;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background-color: var(--td-yellow-dark);
    transform: scale(1.1);
}
.back-to-top:focus-visible {
    outline: 2px solid var(--td-yellow);
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    /* Stack footer-brand children vertically: logo, description, chips */
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    .footer-brand > * {
        width: 100%;
    }
    .footer-brand .logo-pill {
        align-self: center;
        width: auto;
    }
    .services {
        display: none;
    }
}
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .site-footer::before,
    .site-footer::after,
    .footer-grid .footer-title::after,
    .logo-pill,
    .chip,
    .back-to-top,
    .footer-grid a,
    .footer-grid .footer-links a {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
.site-footer address, .site-footer address * { font-style: normal; }
