:root {
    --footer-bg: #0f172a;
    --footer-surface: #111c33;
    --footer-border: rgba(148, 163, 184, 0.22);
    --footer-title: #f8fafc;
    --footer-text: #cbd5e1;
    --footer-muted: #94a3b8;
    --footer-accent: #22d3ee;
    --footer-accent-dark: #0891b2;
    --footer-bottom-bg: #0b1223;
    --footer-shadow: 0 20px 45px rgba(2, 6, 23, 0.4);
}

.main-footer {
    position: relative;
    margin-top: 80px;
    background:
        radial-gradient(80% 120% at 0% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
        radial-gradient(70% 100% at 100% 100%, rgba(14, 165, 233, 0.08), transparent 50%),
        var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid var(--footer-border);
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 70px 70px;
    pointer-events: none;
}

.footer-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 76px 40px 56px;
    display: grid;
    grid-template-columns: minmax(260px, 2fr) 1fr 1fr minmax(280px, 1.4fr);
    gap: 42px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 22px;
}

.footer-logo-image {
    max-height: 56px;
    width: auto;
    filter: brightness(1.06);
}

.footer-desc {
    font-size: 15px;
    line-height: 1.85;
    max-width: 420px;
    color: var(--footer-text);
    margin-bottom: 26px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--footer-title);
    transition: all 0.25s ease;
}

.social-icon:hover {
    background: var(--footer-accent);
    color: #082f49;
    border-color: transparent;
    transform: translateY(-2px);
}

.footer-title {
    margin: 0 0 20px;
    color: var(--footer-title);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    font-weight: 700;
}

.footer-links,
.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--footer-text);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.footer-links a i {
    color: var(--footer-accent);
    font-size: 11px;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(2px);
}

.contact-list li {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: start;
    gap: 12px;
    margin-bottom: 14px;
}

.contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(2, 6, 23, 0.35);
    color: var(--footer-accent);
    font-size: 14px;
}

.contact-text {
    margin-top: 6px;
    color: var(--footer-text);
    font-size: 14px;
    line-height: 1.65;
}

.contact-text a {
    color: var(--footer-text);
}

.contact-text a:hover {
    color: #fff;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    background: var(--footer-bottom-bg);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px 0;
}

.footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer-bottom p {
    margin: 0;
    color: var(--footer-muted);
    font-size: 13px;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-legal a {
    color: var(--footer-muted);
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--footer-title);
}

.footer-legal .divider {
    color: rgba(148, 163, 184, 0.5);
}

.back-to-top {
    position: absolute;
    top: -24px;
    right: 40px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--footer-accent), #38bdf8);
    color: #042f4d;
    box-shadow: var(--footer-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.25s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #67e8f9, var(--footer-accent));
    transform: translateY(-2px);
}

@media (max-width: 1100px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 36px 28px;
    }
}

@media (max-width: 768px) {
    .main-footer {
        margin-top: 56px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        padding: 56px 20px 44px;
        gap: 30px;
    }

    .footer-bottom-container {
        padding: 0 20px;
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        right: 20px;
    }
}
