/* Footer container */
footer {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-xl);
    background-color: var(--primary-bg);
}

/* Footer row 1: Contains footer wrappers */
.footer-row.row-1 {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

/* Footer row 2: Signature row */
.footer-row.row-2 {
    display: flex;
    justify-content: center;
}

/* Optional: Style for signature text if present in footer_signature.html */
.signature-text {
    margin: 0;
}

/* Footer wrapper blocks */
.footer-wrapper {
    flex: 1;
    min-width: 200px;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Footer Sections */
.footer-section {
    flex: 1 1 160px;
    min-width: 200px;
}

.footer-section h3 {
    font-size: var(--font-size-xl);
    color: var(--text-color-default);
    margin-bottom: var(--spacing-xs);
    text-align: center;
    font-weight: var(--heading-font-weight);
}

.footer-section ul {
    list-style-type: none;
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--text-muted);
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin: var(--gap-sm) 0;
}

.footer-section ul li a {
    padding: var(--spacing-sm) var(--spacing-sm);
    background-color: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: background-color 0.3s ease;
    color: var(--text-color-default);
    text-decoration: none;
    display: inline-block;
}

/* Hover Animation */
.footer-section ul li a:hover {
    box-shadow: var(--shadow-primary-hover);
    background-color: var(--primary-hover);
}

/* Logo alignment */
.footer-section-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg) 0;
}

/* Logo Styling */
.footer-section-logo img {
    max-width: 100%;
    height: auto;
    border-radius: 100%;
    margin: 0;
}

/* Social links layout */
.footer-section-social-heading{
    margin-top: var(--gap-md);
}

.footer-section-social-links li {
    display: flex; /* Ensure the <a> fills the <li> */
    justify-content: center; /* Center the <a> inside the <li> */
}

.footer-section-social-links li a {
    display: block; /* Make <a> fill the <li> */
    width: 160px; /* Fill the parent <li> */
    box-sizing: border-box; /* Include padding in dimensions */
    text-align: center; /* Center text */
}

.footer-section-quick-links li {
    display: flex; /* Ensure the <a> fills the <li> */
    justify-content: center; /* Center the <a> inside the <li> */
}

.footer-section-quick-links li a {
    display: block; /* Make <a> fill the <li> */
    width: 160px; /* Fill the parent <li> */
    box-sizing: border-box; /* Include padding in dimensions */
    text-align: center; /* Center text */
}

/* Address block centered on mobile */
.footer-section-address {
    display: block;
    padding-left: var(--spacing-sm);
}

.footer-section-address li {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--text-color-default);
}

/* DESKTOP: Ensure row layout */
@media (min-width: 768px) {
    .footer-row.row-1 {
        flex-direction: row;
        justify-content: space-between;
    }

    .footer-wrapper--logo-slogan {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: start;
        flex-wrap: wrap;
    }

    .footer-wrapper {
        flex: 1;
        min-width: 200px;
        margin: 0;
    }

    .footer-section-social-links {
        display: flex;
        flex-direction: row;       /* Horizontal layout */
        flex-wrap: wrap;           /* Wrap to next line if needed */
        justify-content: center;   /* Center items horizontally */
        align-items: center;
        gap: var(--spacing-xs);    /* Optional: spacing between items */
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .footer-section-social-links li {
        margin: 0;                 /* No vertical margin needed */
        min-width: 85px;           /* Consistent width */
        display: flex;
        justify-content: center;
    }
    
    .footer-section-social-links li a {
        display: block;
        font-size: var(--font-size-lg);
        padding: var(--spacing-xs);     /* Minimal padding */
        height: 48px;                   /* Uniform height */
        line-height: 22px;              /* Vertical text alignment */
        text-align: center;
        box-sizing: border-box;
        width: 100%;                    /* Fill the li */
    }


    .footer-section-quick-links li {
        min-width: 112px; /* Match the largest link ("Instagram") */
    }

    .footer-section-quick-links li a {
        height: 48px; /* Match the largest link's height */
        line-height: 22px; /* Center text vertically (height - padding) */
    }
    
    .footer-section-address {
        padding-left: var(--spacing-sm);
    }
}

/* MOBILE overrides */
@media (max-width: 767.98px) {
    .footer-row.row-1 {
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        flex: 1 1 80px;
        min-width: 200px;
    }

    .footer-wrapper {
        width: calc(100% - 2 * var(--gap-sm));
        margin: 0 var(--gap-sm);
    }

    .footer-section-logo img {
        margin: 0 auto;
        display: block;
    }
    
    .footer-section-social-links {
        flex-direction: column; 
        align-items: center;
    }

    .footer-section-social-links li {
        margin: 0; /* Remove vertical margin for horizontal layout */
        min-width: 85px; /* Match the largest link ("Instagram") */
    }

    .footer-section-social-links li a {
        font-size: var(--font-size-md);
        padding: var(--spacing-xs); /* Minimal padding for social links on mobile */
        height: 38px; /* Match the largest link's height */
        line-height: 22px; /* Center text vertically (height - padding) */
    } 

    .footer-section-quick-links-header {
        margin-top: var(--gap-xl);
    }

    .footer-section-quick-links {
        flex-direction: column; 
        align-items: center;
    }

    .footer-section-quick-links li {
        margin: 0; /* Remove vertical margin for horizontal layout */
        min-width: 85px; /* Match the largest link ("Instagram") */
    }

    .footer-section-quick-links li a {
        font-size: var(--font-size-md);
        padding: var(--spacing-xs); /* Minimal padding for social links on mobile */
        height: 38px; /* Match the largest link's height */
        line-height: 22px; /* Center text vertically (height - padding) */
    }

    .footer-section-address-heading{
        margin-top: var(--gap-xl);
    }

    .footer-section-address {
        text-align: center;
        padding-left: 0;
    }

    .footer-section-address li {
        font-size: var(--font-size-md);
    }
}