/**
 * Footer Styles
 * Project: Al-Azhar Cooperative Society
 */

:root {
    --primary-green: #198754;
    --text-main: #212529;
    --radius-pill: 50px;
    --transition-speed: 0.3s;
}

.main-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* --- Brand & Description --- */
.footer-text-wrapper {
    display: flex;
    flex-direction: column;
}

.footer-description {
    max-width: 100%;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: normal;
    /* Forces text to wrap onto new lines */
    display: block;
}

/* --- Titles & Decorative Elements --- */
.custom-title_footer {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.custom-title_footer::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    /* Default RTL position */
    width: 40px;
    height: 4px;
    background-color: var(--primary-green);
    border-radius: var(--radius-pill);
}

/* --- Navigation Links --- */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    transition: color var(--transition-speed) ease;
    text-decoration: none;
    color: #444;
}

.footer-links a:hover {
    color: var(--primary-green);
}

/* --- Contact Information --- */
.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: var(--text-main);
    margin-bottom: 15px;
}

.contact-icon {
    width: 35px;
    height: 35px;
    background: #fff;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-left: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed) ease;
}

.contact-icon:hover {
    background: var(--primary-green);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* --- Social Media --- */
.social-link {
    margin: 0 5px;
    padding: 10px;
    font-size: 1.5rem;
    color: var(--primary-green);
    transition: transform var(--transition-speed) ease;
    display: inline-block;
}

.social-link:hover {
    transform: translateY(-3px);
}

/* --- Copyright & Divider --- */
.main-footer hr {
    border-color: #dee2e6;
    opacity: 0.3;
}

.main-footer .copyright-text {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #6c757d !important;
    margin-top: 10px;
}

/* --- Mobile Responsiveness (Mobile First / Under 768px) --- */
@media (max-width: 768px) {

    /* Brand & Layout Adjustments */
    .navbar-brand {
        display: flex !important;
        flex-direction: column;
        /* Stacks Logo and Text */
        align-items: center;
        width: 100%;
        text-align: center;
    }

    .footer-text-wrapper {
        width: 100%;
        max-width: 320px;
        /* Prevents text from touching screen edges */
        margin-top: 15px;
        padding: 0 10px;
    }

    .footer-description {
        max-width: 100%;
        width: 100%;
    }

    .footer-description p {
        white-space: normal !important;
        /* Forces wrapping */
        word-wrap: break-word;
        /* Breaks long strings */
        overflow-wrap: break-word;
        line-height: 1.6;
        /* Better readability for Arabic */
    }

    /* Ensure the navbar-brand doesn't push the screen width */
    .navbar-brand {
        max-width: 100%;
        white-space: normal;
    }

    .nav-logo {
        height: 50px;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Centering Titles and Contacts */
    .custom-title_footer::after {
        right: 50%;
        transform: translateX(50%);
    }

    .contact-list {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        flex-direction: row-reverse;
        justify-content: center;
    }

    .contact-icon {
        margin-left: 0;
        margin-right: 12px;
    }

    /* Spacing for Copyright */
    .main-footer hr {
        margin-top: 2rem !important;
        margin-bottom: 1.5rem !important;
    }
}