/* =====================================================
   Footer Elements (phone first)
===================================================== */

.site-footer {
    background: #2d2d44;
    color: #ffffff;
    padding: 28px 18px;
    font-size: 14px;
}

.footer-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}


/* =====================================================
   Company Logo
===================================================== */

.footer-logo img {
    width: 56px;
    height: auto;
    display: block;
}


/* =====================================================
   Contact Block
===================================================== */

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.site-footer .contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.site-footer .contact-item img {
    width: 26px;
    height: 26px;
    display: block;
}

.site-footer .phones {
    display: flex;
    flex-direction: column;
    text-align: center;
    line-height: 1.2;
}


/* =====================================================
   Footer Links
===================================================== */

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-links a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;

    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-links a:hover,
.footer-links a:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #cfe3ff;
}


/* =====================================================
   Social Media
===================================================== */

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.footer-social a:hover,
.footer-social a:focus{
    background: rgba(255, 255, 255, 0.08);
}

.footer-social img {
    width: 26px;
    height: 26px;
    display: block;
}


/* =====================================================
   Link Styles and Copyright
===================================================== */

.site-footer a,
.site-footer a:visited,
.site-footer a:active {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #cfe3ff;
}

.footer-copy {
    opacity: 0.85;
    text-align: center;
}


/* =====================================================
   Media Queries
===================================================== */

/* Desktop optimization */
@media (min-width: 900px) {
    .site-footer {
        padding: 20px 30px;
    }

    .footer-stack {
        max-width: 1600px;
        margin: 0 auto;

        display: grid;
        grid-template-columns: auto 1fr auto; /* Three-column layout */
        column-gap: 20px;
        row-gap: 5px;
        align-items: center;
    }

    /* Left: Logo and Contact Phone Numbers */
    .footer-logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;
    }

    .footer-contact {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;

        margin-left: 85px;
        align-items: flex-start;
        gap: 0;
    }

    .site-footer .contact-item {
        justify-content: flex-start;
    }

    .site-footer .phones {
        text-align: left;
    }

    /* Center: Footer Links */
    .footer-links {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        align-self: center;

        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px 18px;
    }

    .footer-links a {
        padding: 0;
        border-radius: 0;
        background: none;
        font-weight: 500;
    }

    .footer-links a:hover {
        background: none;
        text-decoration: underline;
    }

    /* Right: Social Media */
    .footer-social {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    /* Bottom Row: Copyright */
    .footer-copy {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        text-align: center;
        margin-top: 10px;
    }
}
