footer {
    background-color: #111;
    color: #b0b0b0;
    font-family: 'Tajawal', sans-serif;
    margin-top: auto;
    border-top: 5px solid var(--primary-gold);
    font-size: .95rem;
    position: relative;
}

.footer-top {
    padding: 70px 0 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    align-items: flex-start;
}

.footer-widget {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.footer-widget h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
    width: fit-content;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 45px;
    height: 3px;
    background-color: var(--primary-gold);
    border-radius: 2px;
    transition: width .3s;
}

.footer-widget:hover h3::after {
    width: 70px;
}

.footer-widget p {
    line-height: 1.8;
    margin-bottom: 25px;
    max-width: 90%;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 42px;
    height: 42px;
    background-color: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: .3s;
    border: 1px solid #333;
    font-size: 1.1rem;
}

.social-link:hover {
    background-color: var(--primary-gold);
    border-color: var(--primary-gold);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, .3);
}

.widget-copyright-block {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.contact-info-list,
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.copyrights-text {
    font-size: .85rem;
    color: #888;
    line-height: 1.6;
}

.dev-badge-small {
    display: inline-flex;
    align-items: stretch;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    font-size: .75rem;
    transition: transform .3s;
    direction: ltr; 
}

.dev-badge-small:hover {
    transform: translateY(-3px);
}

.dev-badge-small .PREFIX {
    background-color: #fff;
    color: #000;
    font-weight: 800;
    padding: 6px 10px;
    font-family: sans-serif;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
}

.dev-badge-small .NAME {
    background-color: var(--primary-gold);
    color: #fff;
    font-weight: 700;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-links li {
    margin-bottom: 12px;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
    transition: .3s;
}

.footer-links li:last-child {
    border-bottom: none;
}

.footer-links a {
    text-decoration: none;
    color: #b0b0b0;
    transition: .3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a i {
    font-size: .8rem;
    color: var(--primary-gold);
    transition: .3s;
}

.footer-links a:hover {
    color: #fff;
    padding-right: 8px;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: .3s;
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-item:hover {
    transform: translateX(-5px);
}

.contact-item .icon-box {
    color: var(--primary-gold);
    font-size: 1.4rem;
    width: 30px;
    margin-top: 2px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    background: 0 0;
    border: none;
}

.text-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.text-box .label {
    font-size: .85rem;
    color: var(--primary-gold);
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: .5px;
}

.text-box .value {
    color: #f0f0f0;
    font-weight: 500;
    font-size: .95rem;
    line-height: 1.7;
    text-align: right;
}

@media (max-width: 768px) {
    footer {
        padding-bottom: 20px;
    }

    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .footer-widget:first-child {
        display: contents; 
    }

    .footer-widget:first-child > :not(.widget-copyright-block) {
        order: 1;
        text-align: center;
        align-items: center;
    }

    .footer-widget:not(:first-child) {
        order: 2;
        width: 100%;
        text-align: right;
        align-items: flex-start;
    }

    .widget-copyright-block {
        order: 3; 
        width: 100%;
        margin-top: 40px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, .1);
        display: flex;
        flex-direction: column;
        align-items: center; 
        text-align: center;
    }

    .footer-widget h3 {
        width: 100%;
        text-align: right;
        margin-bottom: 20px;
    }

    .footer-widget h3::after {
        right: 0;
        transform: none;
    }

    .contact-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: right;
        width: 100%;
        background: transparent;
        padding: 0 0 15px 0;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .contact-item .icon-box {
        margin-left: 15px;
        margin-top: 5px;
    }

    .text-box {
        align-items: flex-start;
    }

    .text-box .value {
        text-align: right;
    }

    .footer-links, .footer-links a {
        width: 100%;
        justify-content: flex-start;
    }

    .social-icons {
        justify-content: center; 
        width: 100%;
        margin: 20px 0;
    }
}