/* =========================================================
   PREMIUM FOOTER
========================================================= */

.site-footer {
    position: relative;

    margin-top: 80px;

    background: var(--bg);
    border-top: 1px solid var(--border);

    color: var(--text);
}


/* =========================================================
   FOOTER CONTAINER
========================================================= */

.site-footer .container {
    width: 100%;
}


/* =========================================================
   FOOTER GRID
========================================================= */

.footer-grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 1.6fr)
        minmax(150px, 1fr)
        minmax(170px, 1fr)
        minmax(210px, 1.1fr);

    gap: 50px;

    padding: 70px 0 60px;
}


/* =========================================================
   FOOTER BRAND
========================================================= */

.footer-brand {
    max-width: 390px;
}

.footer-logo {
    display: inline-block;

    margin-bottom: 18px;

    color: var(--text);

    font-size: 25px;
    font-weight: 800;

    letter-spacing: -0.045em;

    text-decoration: none;
}

.footer-logo span {
    color: var(--accent);
}


.footer-brand > p {
    margin: 0;

    max-width: 370px;

    color: var(--text-faint);

    font-size: 14px;
    line-height: 1.8;
}


/* =========================================================
   SOCIAL LINKS
========================================================= */

.footer-social-links {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 25px;
}


.footer-social-links a {
    width: 40px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--surface);

    color: var(--text-faint);

    font-size: 15px;

    text-decoration: none;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


.footer-social-links a:hover {
    color: #ffffff;

    background: var(--accent);
    border-color: var(--accent);

    transform: translateY(-3px);
}


/* =========================================================
   FOOTER HEADINGS
========================================================= */

.footer-links h3,
.footer-contact h3 {
    margin: 3px 0 20px;

    color: var(--text);

    font-size: 15px;
    font-weight: 700;

    letter-spacing: -0.01em;
}


/* =========================================================
   FOOTER LISTS
========================================================= */

.footer-links ul {
    display: flex;
    flex-direction: column;

    gap: 11px;

    margin: 0;
    padding: 0;

    list-style: none;
}


.footer-links li {
    margin: 0;
    padding: 0;
}


.footer-links a {
    display: inline-flex;
    align-items: center;

    color: var(--text-faint);

    font-size: 14px;
    line-height: 1.5;

    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.footer-links a:hover {
    color: var(--accent);

    transform: translateX(4px);
}


/* =========================================================
   CONTACT
========================================================= */

.footer-contact {
    display: flex;
    flex-direction: column;
}


.footer-contact > a {
    display: flex;
    align-items: center;

    width: fit-content;

    gap: 10px;

    margin-bottom: 13px;

    color: var(--text-faint);

    font-size: 14px;
    line-height: 1.5;

    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.footer-contact > a i {
    width: 18px;

    text-align: center;

    font-size: 15px;
}


/* WhatsApp */

.footer-contact > a:first-of-type i {
    color: #25D366;
}


.footer-contact > a:first-of-type:hover {
    color: #25D366;
}


/* Email */

.footer-contact > a:nth-of-type(2) i {
    color: var(--accent);
}


.footer-contact > a:nth-of-type(2):hover {
    color: var(--accent);
}


.footer-contact > a:hover {
    transform: translateX(3px);
}


/* =========================================================
   AVAILABILITY
========================================================= */

.footer-availability {
    display: flex;
    align-items: center;

    gap: 9px;

    margin: 12px 0 0;

    color: var(--text-faint);

    font-size: 13px;
    line-height: 1.5;
}


.footer-availability i {
    color: #22c55e;

    font-size: 8px;

    animation: availabilityPulse 2s ease-in-out infinite;
}


@keyframes availabilityPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

}


/* =========================================================
   FOOTER BOTTOM
========================================================= */

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 0 25px;

    border-top: 1px solid var(--border);
}


.footer-bottom p {
    margin: 0;

    color: var(--text-faint);

    font-size: 12px;
    line-height: 1.6;
}


.footer-bottom p:last-child {
    text-align: right;
}


.footer-bottom i {
    color: #ef4444;

    margin: 0 2px;
}


/* =========================================================
   BACK TO TOP
========================================================= */

.back-to-top {
    position: fixed;

    right: 24px;
    bottom: 24px;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface);
    color: var(--text);

    font-size: 15px;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transform: translateY(12px);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.10);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;

    z-index: 999;
}


.back-to-top.show {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}


.back-to-top:hover {
    color: #ffffff;

    background: var(--accent);
    border-color: var(--accent);

    transform: translateY(-3px);
}


/* =========================================================
   TABLET
   769px - 1024px
========================================================= */

@media (max-width: 1024px) {

    .site-footer {
        margin-top: 70px;
    }


    .footer-grid {
        grid-template-columns:
            1.4fr
            1fr
            1fr;

        gap: 45px 35px;

        padding: 60px 0 50px;
    }


    .footer-brand {
        max-width: 100%;
    }


    .footer-contact {
        grid-column: 1 / -1;

        padding-top: 5px;
    }


    .footer-contact h3 {
        margin-bottom: 16px;
    }


    .footer-contact > a {
        display: inline-flex;

        margin-right: 25px;
    }


    .footer-availability {
        margin-top: 8px;
    }

}


/* =========================================================
   MOBILE FOOTER
   Brand first, then 3 footer columns
========================================================= */

@media (max-width: 768px) {

    .site-footer {
        margin-top: 60px;
    }

    .site-footer > .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* -----------------------------------------------------
       MAIN FOOTER GRID
    ----------------------------------------------------- */

    .footer-grid {
        display: grid;

        /* 
           3 columns for the footer links/contact.
           The brand will span all 3 columns.
        */
        grid-template-columns: repeat(3, minmax(0, 1fr));

        column-gap: 20px;
        row-gap: 40px;

        padding: 50px 0 40px;
    }


    /* -----------------------------------------------------
       BRAND
       Full width above the 3 columns
    ----------------------------------------------------- */

    .footer-brand {
        grid-column: 1 / -1;

        width: 100%;
        max-width: none;
    }

    .footer-logo {
        display: inline-block;

        margin-bottom: 14px;

        font-size: 23px;
    }

    .footer-brand > p {
        width: 100%;
        max-width: 650px;

        margin: 0;

        font-size: 14px;
        line-height: 1.75;
    }


    /* -----------------------------------------------------
       SOCIAL ICONS
    ----------------------------------------------------- */

    .footer-social-links {
        display: flex;
        align-items: center;

        gap: 10px;

        margin-top: 20px;
    }

    .footer-social-links a {
        width: 42px;
        height: 42px;

        flex-shrink: 0;
    }


    /* -----------------------------------------------------
       QUICK LINKS
       MY SERVICES
       GET IN TOUCH
    ----------------------------------------------------- */

    .footer-links,
    .footer-contact {
        width: 100%;
        min-width: 0;
    }


    .footer-links h3,
    .footer-contact h3 {
        margin: 0 0 15px;

        font-size: 14px;
        font-weight: 700;

        line-height: 1.3;
    }


    /* -----------------------------------------------------
       FOOTER LINK LISTS
    ----------------------------------------------------- */

    .footer-links ul {
        display: flex;
        flex-direction: column;

        gap: 10px;

        margin: 0;
        padding: 0;

        list-style: none;
    }

    .footer-links a {
        display: inline-block;

        max-width: 100%;

        color: var(--text-faint);

        font-size: 13px;
        line-height: 1.45;

        text-decoration: none;

        overflow-wrap: break-word;
    }


    /* -----------------------------------------------------
       CONTACT LINKS
    ----------------------------------------------------- */

    .footer-contact {
        display: flex;
        flex-direction: column;
    }

    .footer-contact > a {
        display: flex;
        align-items: flex-start;

        width: 100%;

        gap: 7px;

        margin-bottom: 12px;

        color: var(--text-faint);

        font-size: 13px;
        line-height: 1.45;

        text-decoration: none;
    }

    .footer-contact > a i {
        width: 16px;

        flex-shrink: 0;

        margin-top: 2px;

        font-size: 13px;
    }


    /* -----------------------------------------------------
       AVAILABILITY
    ----------------------------------------------------- */

    .footer-availability {
        display: flex;
        align-items: flex-start;

        gap: 7px;

        margin: 8px 0 0;

        font-size: 12px;
        line-height: 1.45;
    }

    .footer-availability i {
        flex-shrink: 0;

        margin-top: 5px;
    }


    /* -----------------------------------------------------
       FOOTER BOTTOM
    ----------------------------------------------------- */

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

        gap: 8px;

        padding: 20px 0 24px;
    }

    .footer-bottom p {
        margin: 0;

        font-size: 12px;
        line-height: 1.6;
    }

    .footer-bottom p:last-child {
        text-align: left;
    }


    /* -----------------------------------------------------
       BACK TO TOP
    ----------------------------------------------------- */

    .back-to-top {
        right: 16px;
        bottom: 16px;

        width: 42px;
        height: 42px;

        border-radius: 9px;
    }
}


/* =========================================================
   FOOTER CONTAINER PADDING
========================================================= */

.site-footer > .container {
    width: 100%;
    max-width: 1200px;

    margin-left: auto;
    margin-right: auto;

    padding-left: 32px;
    padding-right: 32px;

    box-sizing: border-box;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    .site-footer > .container {
        padding-left: 24px;
        padding-right: 24px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .site-footer > .container {
        padding-left: 20px;
        padding-right: 20px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .site-footer > .container {
        padding-left: 16px;
        padding-right: 16px;
    }

}

/* =========================================================
   FINAL RESPONSIVE FOOTER LAYOUT
========================================================= */


/* ---------------------------------------------------------
   TABLET
   Brand full width
   3 footer sections underneath
--------------------------------------------------------- */

@media (min-width: 769px) and (max-width: 1024px) {

    .footer-grid {
        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 40px 30px !important;

        padding: 60px 0 50px !important;
    }

    /* Brand takes the entire first row */
    .footer-brand {
        grid-column: 1 / -1 !important;
        max-width: 100% !important;
    }

    /* These MUST each occupy their own column */
    .footer-links,
    .footer-contact {
        grid-column: auto !important;
        width: 100% !important;
        padding: 0 !important;
    }
}


/* ---------------------------------------------------------
   MOBILE
   Brand full width
   3 footer sections underneath
--------------------------------------------------------- */

@media (max-width: 768px) {

    .footer-grid {
        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        column-gap: 18px !important;
        row-gap: 38px !important;

        padding: 50px 0 40px !important;
    }


    /* -------------------------
       BRAND
    ------------------------- */

    .footer-brand {
        grid-column: 1 / -1 !important;

        width: 100% !important;
        max-width: none !important;
    }


    /* -------------------------
       THREE COLUMNS
    ------------------------- */

    .footer-links,
    .footer-contact {
        grid-column: auto !important;

        width: 100% !important;
        min-width: 0 !important;

        padding: 0 !important;
        margin: 0 !important;
    }


    /* Make sure contact does NOT span a row */
    .footer-contact {
        display: flex !important;
        flex-direction: column !important;
    }


    /* -------------------------
       HEADINGS
    ------------------------- */

    .footer-links h3,
    .footer-contact h3 {
        margin: 0 0 14px;

        font-size: 14px;
        line-height: 1.3;
    }


    /* -------------------------
       LISTS
    ------------------------- */

    .footer-links ul {
        display: flex;
        flex-direction: column;

        gap: 9px;

        margin: 0;
        padding: 0;

        list-style: none;
    }


    .footer-links a {
        display: inline-block;

        font-size: 13px;
        line-height: 1.45;

        max-width: 100%;
    }


    /* -------------------------
       CONTACT LINKS
    ------------------------- */

    .footer-contact > a {
        display: flex !important;
        align-items: flex-start;

        width: 100%;

        margin: 0 0 12px !important;

        font-size: 13px;
        line-height: 1.45;
    }


    .footer-contact > a i {
        flex-shrink: 0;
    }


    /* -------------------------
       AVAILABILITY
    ------------------------- */

    .footer-availability {
        margin-top: 5px;
    }


    /* -------------------------
       FOOTER BOTTOM
    ------------------------- */

    .footer-bottom {
        display: flex;

        flex-direction: column;

        align-items: flex-start;

        gap: 8px;

        padding: 20px 0 24px;
    }

}


/* ---------------------------------------------------------
   SMALL PHONES
--------------------------------------------------------- */

@media (max-width: 420px) {

    .footer-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        column-gap: 10px !important;

        row-gap: 32px !important;
    }


    .footer-links h3,
    .footer-contact h3 {
        font-size: 12px;
    }


    .footer-links a,
    .footer-contact > a {
        font-size: 11px;
    }


    .footer-contact > a {
        gap: 5px;
    }


    .footer-contact > a i {
        width: 13px;
        font-size: 11px;
    }


    .footer-availability {
        font-size: 10px;
    }

}