:root {
    --nav-color: var(--color-primary-dark);
    --text-color-footer: rgba(255, 255, 255, 0.78);
    --highlight: var(--color-primary);
    --highlight1: rgba(255, 255, 255, 0.86);
    --logo-color: var(--color-accent);
    --font-color: var(--color-warm);
    --font-family: var(--font-base);
    --font-size: clamp(14px, 1vw, 16px);
    --font-size-title: clamp(18px, 1.2vw, 22px);
    --line-height: 1.5;
}

.footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #041c31 0%, var(--nav-color) 58%, #08304f 100%);
    color: var(--text-color-footer);
    padding: clamp(42px, 4vw, 56px) 0 0;
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: var(--line-height);
}

.footer::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--highlight), var(--color-accent), var(--highlight));
    content: "";
}

.footer-container {
    display: grid;
    grid-template-columns: 1.15fr 1.15fr 1.25fr 1fr;
    gap: clamp(28px, 3vw, 40px);
    width: min(100% - 40px, var(--container));
    max-width: var(--container);
    margin: 0 auto;
    align-items: start;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    width: clamp(150px, 14vw, 190px);
    height: auto;
    margin-bottom: 18px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    object-fit: contain;
}

.footer-section.about p {
    max-width: 340px;
    margin: 0;
    line-height: 1.7;
}

.footer-section h3 {
    font-size: var(--font-size-title);
    font-weight: 750;
    margin: 0 0 20px;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.footer-section h3::after {
    content: "";
    width: 42px;
    height: 3px;
    background: var(--highlight);
    display: block;
    margin-top: 8px;
    border-radius: 999px;
}

.footer-section .links-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-color-footer);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-section a:hover {
    color: #ffffff;
    text-decoration: none;
}

.footer-section.links li a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.footer-section.links li a::before {
    color: var(--highlight);
    content: "›";
    font-size: 1.1em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.footer-section.links li a:hover::before {
    transform: translateX(3px);
}

.footer-section.contact {
    font-style: normal;
}

.footer-section.contact p {
    margin: 0;
    line-height: 1.9;
}

.footer-section.contact i {
    width: 22px;
    color: #67b9df;
    font-size: 1.08em;
    text-align: center;
}

.footer-section.contact a {
    white-space: nowrap;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 44px);
    gap: 8px;
    margin: 0;
}

.footer-section.social {
    min-width: 96px;
    justify-self: end;
}

.social-links a {
    width: 44px;
    height: 44px;
    padding: 0;
    color: #ffffff;
    background: rgba(11, 111, 159, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.social-links a:hover {
    color: #ffffff;
    background: #0d85bd;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.social-links a[aria-label="Instagram"]:hover {
    background: linear-gradient(135deg, #833ab4, #e1306c, #f77737);
}

.social-links a:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.72);
    outline-offset: 3px;
}

.footer > hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    width: min(100% - 40px, var(--container));
    margin: clamp(28px, 3vw, 38px) auto 0;
}

.footer-bottom {
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.08);
    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 500;
}

.footer-bottom p {
    margin: 0;
    text-wrap: balance;
}

.footer-bottom a {
    color: var(--highlight);
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    color: var(--font-color);
    text-decoration: underline;
}

@media (max-width: 1050px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 38px 48px;
        text-align: left;
    }

    .footer-section {
        align-items: flex-start;
    }

    .footer-section.social {
        justify-self: start;
    }
}

@media (max-width: 650px) {
    .footer {
        padding-top: 42px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
        width: min(100% - 32px, var(--container));
    }

    .footer > hr {
        width: min(100% - 32px, var(--container));
    }

    .social-links {
        justify-content: start;
    }

    .footer-section .links-container {
        width: 100%;
        gap: 40px;
    }

    .footer-logo {
        width: 170px;
    }
}
