footer {
    background: #f9fafb;
    color: #111827;
    font-family: 'Segoe UI', Arial, sans-serif;
    border-top: 1px solid #e5e7eb;
    overflow-x: auto;
}

.footer-main {
    max-width: 1200px;
    min-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns:
        minmax(100px, 160px)
        minmax(180px, 1fr)
        minmax(120px, 160px)
        minmax(220px, auto);
    gap: 2rem;
    align-items: start;
}

.footer-logo-section { display: flex; align-items: flex-start; padding-top: 0.5rem; }
.footer-logo { width: 120px; flex-shrink: 0; border-radius: 50%; overflow: hidden; }
.footer-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.footer-details { font-size: 0.875rem; color: #111827; line-height: 1.5; padding-top: 0.5rem; min-width: 0; }
.footer-details h3 { margin: 0 0 0.5rem; color: #111827; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.footer-details p { margin: 0.15rem 0; font-size: 0.875rem; color: #4b5563; }
.footer-details-divider { margin: 0.75rem 0; border: none; border-top: 1px solid #e5e7eb; }

.footer-sites-section { margin-top: 1rem; }
.footer-sites-section h4 { color: #111827; margin-bottom: 0.75rem; font-size: 0.875rem; font-weight: 700; }
.footer-site-list { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-site-item .site-name { display: block; color: #6b7280; font-size: 0.813rem; margin-bottom: 0.25rem; }
.footer-site-item a { color: #2563eb; text-decoration: none; font-size: 0.813rem; display: inline-flex; align-items: center; gap: 0.4em; word-break: break-all; }
.footer-site-item a:hover { text-decoration: underline; }

.footer-links-section { font-size: 0.875rem; padding-top: 0.5rem; min-width: 0; }
.footer-links-section h3 { color: #111827; margin-bottom: 0.75rem; font-size: 1rem; font-weight: 700; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a { color: #2563eb; text-decoration: none; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 0.5em; }
.footer-links a:hover { text-decoration: underline; }

.footer-contact-qr-container { display: flex; gap: 1.5rem; align-items: flex-start; padding-top: 0.5rem; min-width: 0; }
.footer-contact-section { font-size: 0.875rem; min-width: 0; flex-shrink: 1; }
.footer-contact-section h3 { color: #111827; margin-bottom: 0.75rem; font-size: 1rem; font-weight: 700; }
.contact-item { margin-bottom: 1rem; }
.contact-label { display: block; color: #111827; font-size: 0.813rem; margin-bottom: 0.4rem; font-weight: 600; text-transform: uppercase; }
.social-icons { display: flex; gap: 0.5rem; }
.footer-social-link { color: #2563eb; text-decoration: none; font-size: 0.813rem; display: inline-flex; align-items: center; gap: 0.5em; }
.footer-social-link i { font-size: 1.2rem; }
.footer-social-link:hover { text-decoration: underline; }

.footer-qr-section { text-align: center; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.qr-label { color: #111827; font-size: 0.75rem; margin-bottom: 0.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.qr-subtitle { color: #111827; font-size: 1.1rem; margin-bottom: 0.75rem; font-weight: 700; }
.qr-code { width: 120px; height: 120px; background: #fff; border: 2px solid #d1d5db; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.5rem; }
.qr-code img { width: 100%; height: 100%; object-fit: contain; }
.qr-or { font-size: 0.8rem; color: #6b7280; margin-bottom: 0.25rem; }
.qr-description { font-size: 0.688rem; color: #6b7280; line-height: 1.3; max-width: 120px; word-break: break-word; }
.qr-description a { color: #2563eb; text-decoration: none; }
.qr-description a:hover { text-decoration: underline; }

.footer-divider { border: none; border-top: 1px solid #e5e7eb; margin: 0; }
.footer-copyright { text-align: center; font-size: 0.813rem; color: #6b7280; padding: 1rem 2rem; line-height: 1.6; position: relative; }
.footer-copyright p { margin: 0; }
.dev-credit { color: #2563eb; font-size: 0.813rem; }
.scroll-top { position: absolute; right: 2rem; bottom: 1.25rem; width: 42px; height: 42px; background: none; border: none; cursor: pointer; opacity: 0.7; transition: opacity 0.2s; padding: 0; }
.scroll-top:hover { opacity: 1; }
.scroll-top img { width: 100%; height: 100%; object-fit: contain; }

@media screen and (max-width: 600px) {
    footer { overflow-x: hidden; }
    .footer-main { min-width: unset; grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 1rem; }
    .footer-logo-section { justify-content: center; }
    .footer-logo { width: 100px; height: 100px; }
    .footer-details, .footer-links-section, .footer-contact-section { text-align: center; }
    .footer-contact-qr-container { flex-direction: column; align-items: center; gap: 1.5rem; }
    .social-icons { justify-content: center; }
    .footer-copyright { padding: 0.75rem 1rem; font-size: 0.75rem; }
    .scroll-top { right: 0.5rem; width: 34px; height: 34px; }
}