/* ═══════════════════════════════════════════════════════
   MAS Agency — Responsive Enhancements & Partner Grid
   ═══════════════════════════════════════════════════════ */

/* Partners Grid Overrides */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 40px;
    direction: rtl;
}

.partners-grid .client-item {
    width: 100%;
    margin: 0;
}

/* Responsive for Partners Grid */
@media (max-width: 992px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

/* Shared footer fixes for standalone article pages */
footer#contact {
    position: relative;
    margin-top: 56px;
    padding: 56px 0 24px;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(900px 360px at 100% 0%, rgba(18, 108, 188, 0.16), transparent 60%),
        radial-gradient(700px 320px at 0% 100%, rgba(0, 212, 255, 0.10), transparent 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
        rgba(4, 10, 22, 0.92);
}

footer#contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(180px, 30vw);
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(18, 108, 188, 0), rgba(0, 212, 255, 0.9), rgba(18, 108, 188, 0));
    border-radius: 999px;
}

footer#contact .container {
    width: min(var(--max, 1120px), calc(100% - 36px));
    margin: 0 auto;
    padding: 0 18px;
}

footer#contact .footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(220px, 1fr));
    gap: clamp(24px, 4vw, 42px);
    align-items: start;
    margin-bottom: 32px;
}

footer#contact .footer-logo {
    min-width: 0;
}

footer#contact .footer-logo-img {
    display: block;
    width: min(220px, 100%);
    height: auto;
    margin-bottom: 14px;
    object-fit: contain;
}

footer#contact .footer-logo p {
    max-width: 280px;
    color: var(--muted, rgba(255, 255, 255, 0.72));
    font-size: 0.98rem;
    line-height: 1.8;
}

footer#contact .social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

footer#contact .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text, #fff);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

footer#contact .social-icons a:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.45);
    background: rgba(18, 108, 188, 0.18);
    color: #fff;
}

footer#contact .x-fallback-icon {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

footer#contact .footer-links h3,
footer#contact .footer-contact h3 {
    position: relative;
    margin: 0 0 22px;
    padding-bottom: 12px;
    color: var(--text, #fff);
    font-size: 1.05rem;
    font-weight: 700;
}

footer#contact .footer-links h3::after,
footer#contact .footer-contact h3::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 42px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 1), rgba(18, 108, 188, 0.65));
}

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

footer#contact .footer-links li + li {
    margin-top: 12px;
}

footer#contact .footer-links a,
footer#contact .footer-contact a {
    color: var(--muted, rgba(255, 255, 255, 0.72));
    text-decoration: none;
    transition: color 0.2s ease;
}

footer#contact .footer-links a:hover,
footer#contact .footer-contact a:hover {
    color: var(--text, #fff);
}

footer#contact .footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--muted, rgba(255, 255, 255, 0.72));
    line-height: 1.8;
}

footer#contact .footer-contact p i,
footer#contact .footer-contact p .fab {
    flex: 0 0 18px;
    margin-top: 4px;
    color: var(--accent, #7dd3fc);
    text-align: center;
}

footer#contact .footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted, rgba(255, 255, 255, 0.66));
    text-align: center;
    font-size: 0.9rem;
}

html[dir="ltr"] footer#contact .footer-links h3::after,
html[dir="ltr"] footer#contact .footer-contact h3::after {
    right: auto;
    left: 0;
}

@media (max-width: 900px) {
    footer#contact {
        padding-top: 48px;
    }

    footer#contact .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    footer#contact .footer-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    footer#contact .footer-logo p {
        max-width: none;
    }

    footer#contact .social-icons {
        justify-content: center;
    }

    footer#contact .footer-links h3::after,
    footer#contact .footer-contact h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    html[dir="ltr"] footer#contact .footer-links h3::after,
    html[dir="ltr"] footer#contact .footer-contact h3::after {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    footer#contact .footer-contact p {
        justify-content: center;
        text-align: center;
    }
}
