/**
 * CAGS Footer Styles
 * Footer design with Quick Links and Resources menus
 */

/* Footer Widget Area */
.cags-footer-widget-area {
    background-color:rgba(23, 46, 74, 1);
    padding: 60px 0 40px;
    color: #FFFFFF;
}

.footer-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Left side - Logo and Description */
.footer-about {
    flex: 0 0 auto;
    max-width: 400px;
}

/* Right side - Menu columns grouped together */
.footer-menus-wrapper {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.footer-quick-links,
.footer-resources,
.footer-contact {
    flex: 0 0 auto;
    min-width: 140px;
}

/* Footer Columns */
.footer-column {
    display: flex;
    flex-direction: column;
}

/* Logo and Description */
.footer-about .footer-logo {
    margin-bottom: 20px;
    text-align: left;
}

.footer-about .footer-logo a {
    display: inline-block;
}

.footer-about .footer-logo img {
    max-width: 150px;
    height: auto;
    display: block;
}

.footer-description p {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #FFFFFF;
    margin: 0;
    width: 90%;
}

/* Footer Titles */
.footer-title {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 20px;
    margin-top: 0;
}

.footer-address-title {
    margin-top: 30px;
}

/* Footer Menus */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 20px;
}

.footer-menu li a {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #ffffffc4;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-menu li a:hover {
    color: #0080ff;
    text-decoration: none;
}

/* Active/Current Page State - Highlight current page in footer */
.footer-menu li.current-menu-item > a,
.footer-menu li.current_page_item > a,
.footer-menu li.current-menu-ancestor > a,
.footer-menu li.current-page-ancestor > a,
.footer-menu li.current-post-ancestor > a,
.footer-menu li.current_page_parent > a {
    color: #0080ff;
    font-weight: 600;
}

/* Keep active state on hover */
.footer-menu li.current-menu-item > a:hover,
.footer-menu li.current_page_item > a:hover,
.footer-menu li.current-menu-ancestor > a:hover,
.footer-menu li.current-page-ancestor > a:hover,
.footer-menu li.current-post-ancestor > a:hover,
.footer-menu li.current_page_parent > a:hover {
    color: #0080ff;
}

/* Social Icons */
.footer-socials {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-socials a {
    color: #FFFFFF;
    font-size: 24px;
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: #0080ff;
}

/* Address */
.footer-address {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.footer-address i {
    font-size: 18px;
    color: #FFFFFF;
    margin-top: 2px;
}

.footer-address p,
.footer-address a {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #FFFFFF;
    margin: 0;
    flex: 1;
    max-width: 170px;
}

.footer-address a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-address a:hover {
    color: #0080ff;
}

/* Footer Bottom */
.cags-footer-bottom {
    background-color: #1F3A4F;
    padding: 20px 0;
    color: #FFFFFF;
}

.footer-bottom-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-left p {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #FFFFFF;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1px;
}

/* Footer Bottom Menu */
.footer-bottom-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 5px;
}

.footer-bottom-menu li {
    display: inline-flex;
    align-items: center;
}

.footer-bottom-menu li:not(:last-child)::after {
    content: "|";
    margin-left: 5px;
    color: #FFFFFF;
}

.footer-bottom-menu li a {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-menu li a:hover {
    color: #5AB9EA;
    text-decoration: none;
}

/* DoMedia Link */
.footer-left .domedia-link {
    color: #FFFFFF;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
    vertical-align: middle;
}

.footer-left .domedia-link:hover {
    color: #5AB9EA;
}

.footer-left .domedia-link img {
    vertical-align: middle;
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content-wrapper {
        flex-wrap: wrap;
        gap: 40px;
    }

    .footer-about {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .footer-menus-wrapper {
        flex: 0 0 100%;
        gap: 40px;
        justify-content: space-between;
    }

    .footer-quick-links,
    .footer-resources,
    .footer-contact {
        flex: 1 1 auto;
        min-width: auto;
    }
}

@media (max-width: 767px) {
    .cags-footer-widget-area {
        padding: 40px 0 30px;
    }

    .footer-content-wrapper {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        text-align: center;
    }

    .footer-about {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .footer-about .footer-logo {
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-about .footer-logo img {
        margin: 0 auto;
    }

    .footer-description {
        display: none;
    }

    .footer-menus-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 40px;
        width: 100%;
        align-items: flex-start;
        justify-content: center;
    }

    /* Quick Links and Resources side by side */
    .footer-quick-links,
    .footer-resources {
        flex: 0 0 calc(50% - 20px);
        min-width: auto;
    }

    .footer-quick-links {
        text-align: left;
        padding-left: 20px;
    }

    .footer-resources {
        text-align: left;
        padding-left: 20px;
    }

    /* Contact section full width below */
    .footer-contact {
        flex: 0 0 100%;
        min-width: auto;
        text-align: center;
    }

    /* Reorder footer contact elements - Address section before Follow Us section */
    .footer-contact {
        display: flex;
        flex-direction: column;
    }

    .footer-contact > .footer-title:first-child {
        order: 3;
    }

    .footer-socials {
        order: 4;
        justify-content: center;
        margin-bottom: 0;
    }

    .footer-address-title {
        order: 1;
        margin-top: 0;
        margin-bottom: 20px;
    }

    .footer-address {
        order: 2;
        justify-content: center;
        text-align: center;
        margin-bottom: 40px;
    }

    .footer-title {
        font-size: 20px;
        margin-bottom: 20px;
        text-align: center;
        font-weight: 700;
    }

    /* Quick Links - align left */
    .footer-quick-links .footer-title {
        text-align: left;
    }

    .footer-quick-links .footer-menu {
        text-align: left;
    }

    /* Resources - align left */
    .footer-resources .footer-title {
        text-align: left;
    }

    .footer-resources .footer-menu {
        text-align: left;
    }

    .footer-menu {
        text-align: center;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-menu li {
        margin-bottom: 15px;
    }

    .footer-menu li a {
        font-size: 15px;
        display: inline-block;
    }

    .footer-bottom-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-left {
        text-align: center;
        order: 2;
    }

    .footer-left p {
        justify-content: center;
        text-align: center;
        line-height: 1.6;
    }

    /* Force "Solution by DoMedia" wrapper to new line on mobile */
    .footer-left .solution-by-wrapper {
        display: block;
        margin-top: 8px;
    }

    .footer-left .domedia-link {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        vertical-align: middle;
    }

    .footer-left .domedia-link img {
        vertical-align: middle;
    }

    .footer-bottom-menu-wrapper {
        order: 1;
    }

    .footer-bottom-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}
