/* ===============================================
   Site footer
   =============================================== */

html,
body {
    overflow-x: hidden;
}

:root {
    --footer-bg: var(--footer-bg-color, #121a33);
    --footer-text: var(--footer-text-color, #f7f4ea);
    --footer-muted: color-mix(in srgb, var(--footer-text) 72%, transparent);
    --footer-accent: var(--accent-color, #ffee00);
    --footer-line: color-mix(in srgb, var(--footer-text) 14%, transparent);
}

.modern-footer,
.modern-footer *,
.modern-footer *::before,
.modern-footer *::after {
    box-sizing: border-box;
}

.modern-footer {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-top: clamp(3rem, 6vw, 5rem);
    color: var(--footer-text);
    background:
        radial-gradient(70rem 22rem at 100% -10%, color-mix(in srgb, var(--footer-accent) 16%, transparent), transparent 58%),
        linear-gradient(180deg, color-mix(in srgb, var(--footer-bg) 78%, white) 0%, var(--footer-bg) 42%, #0c1224 100%);
    overflow: clip;
}

.modern-footer::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--footer-accent), transparent);
}

.footer-shell {
    width: auto;
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 1.5rem);
    container-type: inline-size;
    container-name: site-footer;
}

.footer-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.75rem, 4cqi, 2.75rem);
    padding-block: clamp(2.5rem, 6cqi, 4.25rem) clamp(1.75rem, 4cqi, 2.5rem);
    min-width: 0;
}

.footer-section,
.footer-menu,
.footer-menu li,
.footer-menu a {
    min-width: 0;
    max-width: 100%;
}

@container site-footer (min-width: 40rem) {
    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container site-footer (min-width: 64rem) {
    .footer-container {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr) minmax(0, 0.95fr) minmax(0, 1.1fr);
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.footer-logo h3 {
    margin: 0;
    font-size: clamp(1.2rem, 2.4cqi, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-description {
    max-width: 38ch;
    margin: 0 0 1.25rem;
    color: var(--footer-muted);
    font-size: 0.95rem;
    line-height: 1.9;
    text-wrap: pretty;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-link {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--footer-line);
    border-radius: 999px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-link svg {
    width: 1.05rem;
    height: 1.05rem;
}

.social-link:hover {
    background: color-mix(in srgb, var(--footer-accent) 18%, transparent);
    border-color: color-mix(in srgb, var(--footer-accent) 55%, transparent);
    transform: translateY(-2px);
}

.footer-title {
    position: relative;
    margin: 0 0 1rem;
    padding-bottom: 0.7rem;
    font-size: 1rem;
    font-weight: 700;
}

.footer-title::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 2.25rem;
    height: 2px;
    border-radius: 999px;
    background: var(--footer-accent);
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.footer-menu a,
.footer-menu span {
    color: var(--footer-muted);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-menu a {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    border-radius: 8px;
    transition: color 0.2s ease;
}

.footer-menu a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid var(--footer-line);
    padding-block: 1.35rem 1.6rem;
}

.footer-bottom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    text-align: center;
}

.copyright {
    margin: 0;
    max-width: 100%;
    color: var(--footer-muted);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 1rem;
}

.footer-bottom-links a {
    color: var(--footer-muted);
    text-decoration: none;
    font-size: 0.84rem;
}

.footer-bottom-links a:hover {
    color: var(--footer-accent);
}

.takbit-link {
    direction: ltr;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.2rem;
    padding: 0.35rem 0.9rem 0.35rem 0.35rem;
    background: #fff;
    color: #12151c;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.takbit-mark {
    width: 1.7rem;
    height: 1.7rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #12151c;
    color: #ffee00;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.takbit-copy {
    color: #3c4454;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
}

.takbit-copy strong {
    color: #12151c;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.takbit-link:hover {
    background: #ffee00;
    color: #12151c;
}

.takbit-link:hover .takbit-copy,
.takbit-link:hover .takbit-copy strong {
    color: #12151c;
}

.footer-enamad {
    display: flex;
    justify-content: center;
}

.footer-enamad a {
    display: inline-flex;
    line-height: 0;
    padding: 0.4rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.footer-enamad img {
    display: block;
    width: auto;
    height: 5.5rem;
}

.footer-menu a:focus-visible,
.footer-bottom-links a:focus-visible,
.social-link:focus-visible,
.takbit-link:focus-visible,
.contact-content a:focus-visible,
.footer-enamad a:focus-visible {
    outline: 2px solid var(--footer-accent);
    outline-offset: 3px;
}

@container site-footer (max-width: 39.99rem) {
    .footer-links .footer-menu,
    .footer-services .footer-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .footer-links .footer-menu a,
    .footer-services .footer-menu a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 2.75rem;
        padding: 0.55rem 0.7rem;
        text-align: center;
        overflow-wrap: anywhere;
        color: var(--footer-text);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--footer-line);
        border-radius: 12px;
    }

    .footer-title {
        text-align: center;
    }

    .footer-title::after {
        inset-inline-start: 50%;
        translate: -50% 0;
    }

    .footer-about {
        text-align: center;
    }

    .footer-logo,
    .footer-social {
        justify-content: center;
    }

    .footer-description {
        margin-inline: auto;
    }
}

@container site-footer (min-width: 40rem) {
    .footer-bottom-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .footer-meta {
        align-items: flex-start;
        width: auto;
        text-align: start;
    }

    .footer-bottom-links {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modern-footer *,
    .modern-footer *::before,
    .modern-footer *::after {
        transition: none !important;
    }
}

@media print {
    .modern-footer {
        background: #fff;
        color: #000;
    }

    .footer-social,
    .footer-bottom-links,
    .footer-enamad,
    .takbit-link {
        display: none;
    }

    .modern-footer::before {
        display: none;
    }
}
