/**
 * ============================================
 * PROFESSIONAL FOOTER - نظام الفوتر الموحد
 * تصميم احترافي وعصري مع تحسينات الأداء
 * ============================================
 */

/* ===== FOOTER PLACEHOLDER ===== */
#footer-placeholder {
    margin: 0;
    padding: 0;
    display: block;
}

/* ===== FOOTER CONTAINER ===== */
.professional-footer {
    background: linear-gradient(135deg, #0a1628 0%, #020815 50%, #0a1628 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    padding: 60px 0 0;
    margin: 0;
    width: 100%;
}

/* Background Glow Animation */
.professional-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    animation: footerGlow 15s ease-in-out infinite;
    pointer-events: none;
    will-change: opacity, transform;
}

@keyframes footerGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Top Border Shine */
.professional-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #00d4ff 20%, 
        #2563eb 50%, 
        #8b5cf6 80%, 
        transparent 100%);
    animation: borderShine 3s ease-in-out infinite;
    will-change: opacity;
}

@keyframes borderShine {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

/* ==================== Footer Top Section ==================== */
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== Footer Columns ==================== */
.footer-column {
    animation: fadeInUp 0.8s ease-out;
}

/* محاذاة الأعمدة حسب الاتجاه */
[dir="rtl"] .footer-column {
    text-align: right;
}

[dir="ltr"] .footer-column {
    text-align: left;
}

.footer-column:nth-child(1) { animation-delay: 0.1s; }
.footer-column:nth-child(2) { animation-delay: 0.2s; }
.footer-column:nth-child(3) { animation-delay: 0.3s; }
.footer-column:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Company Info Column ==================== */
[dir="rtl"] .footer-about {
    padding-right: 20px;
    padding-left: 0;
}

[dir="ltr"] .footer-about {
    padding-left: 20px;
    padding-right: 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 212, 255, 0.3));
    transition: all 0.3s ease;
}

.footer-logo:hover .footer-logo-img {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 6px 20px rgba(0, 212, 255, 0.5));
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-logo-main {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff 0%, #2563eb 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.footer-logo-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 1px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    font-size: 15px;
    margin: 0;
}

/* ==================== Footer Title ==================== */
.footer-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #ffffff;
    position: relative;
    padding-bottom: 12px;
}

/* محاذاة العنوان في RTL */
[dir="rtl"] .footer-title {
    text-align: right;
}

[dir="ltr"] .footer-title {
    text-align: left;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff 0%, #2563eb 100%);
    border-radius: 2px;
}

[dir="rtl"] .footer-title::after {
    right: 0;
    left: auto;
}

[dir="ltr"] .footer-title::after {
    right: auto;
    left: 0;
}

/* ==================== Quick Links ==================== */
.footer-links {
    display: flex;
    flex-direction: column;
}

[dir="rtl"] .footer-links {
    align-items: flex-start;
}

[dir="ltr"] .footer-links {
    align-items: flex-start;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.footer-menu li {
    margin-bottom: 12px;
    width: 100%;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 8px 0;
    width: auto;
}

/* محاذاة الروابط - الأيقونة دائماً قبل النص */
.footer-menu a {
    flex-direction: row;
}

[dir="rtl"] .footer-menu a {
    text-align: right;
}

[dir="ltr"] .footer-menu a {
    text-align: left;
}

.footer-menu a i {
    font-size: 14px;
    width: 20px;
    min-width: 20px;
    transition: all 0.3s ease;
    text-align: center;
    order: 1;
}

.footer-menu a span {
    order: 2;
}

[dir="rtl"] .footer-menu a i {
    margin-left: 10px;
    margin-right: 0;
}

[dir="ltr"] .footer-menu a i {
    margin-right: 10px;
    margin-left: 0;
}

.footer-menu a:hover {
    color: #00d4ff;
}

[dir="rtl"] .footer-menu a:hover {
    transform: translateX(-5px);
}

[dir="ltr"] .footer-menu a:hover {
    transform: translateX(5px);
}

.footer-menu a:hover i {
    color: #2563eb;
    transform: scale(1.2);
}

/* ==================== Contact Info ==================== */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.footer-contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.footer-contact-item > i {
    font-size: 18px;
    color: #00d4ff;
    margin-top: 2px;
    min-width: 20px;
    text-align: center;
}

.footer-contact-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.footer-contact-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.footer-contact-value {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

a.footer-contact-value:hover {
    color: #00d4ff;
}

/* ==================== Social Media ==================== */
.footer-social-column {
    text-align: center;
}

.footer-social-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.footer-social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* إصلاح أيقونات Font Awesome في الفوتر */
.footer-social-link i[class*="fa-"] {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    display: inline-block !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.footer-social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.footer-social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--social-color, #00d4ff);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.footer-social-link i {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    border-color: var(--social-color, #00d4ff);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.footer-social-link:hover::before {
    opacity: 1;
}

.footer-social-link:hover i {
    color: #ffffff;
    transform: scale(1.2) rotate(5deg);
}

/* ==================== Footer Bottom ==================== */
.footer-bottom {
    padding: 30px 0;
    margin-top: 40px;
}

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

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-bottom-links span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #00d4ff;
}

.footer-design-link {
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.footer-design-link:hover {
    background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* ==================== Scroll to Top Button ==================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00d4ff 0%, #2563eb 100%);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

[dir="ltr"] .scroll-to-top {
    left: auto;
    right: 30px;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #2563eb 0%, #8b5cf6 100%);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1200px) {
    .footer-top {
        grid-template-columns: 2fr 1.5fr 1.5fr;
        gap: 40px;
    }
    
    .footer-social-column {
        grid-column: 1 / -1;
        text-align: center;
        margin-top: 20px;
        padding-top: 40px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ==================== Mobile Responsive Enhancements ==================== */
@media (max-width: 768px) {
    /* Center all footer columns text */
    .footer-column {
        text-align: center !important;
    }
    
    /* Center footer titles */
    .footer-title {
        text-align: center !important;
    }
    
    .footer-title::after {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
    
    /* Center footer logo */
    .footer-logo {
        justify-content: center !important;
    }
    
    /* Center footer menu links */
    .footer-menu a {
        justify-content: center !important;
    }
    
    /* Center contact items */
    .footer-contact-item {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .footer-contact-item > i {
        text-align: center !important;
    }
    
    /* Center social text and links */
    .footer-social-text {
        text-align: center !important;
    }
    
    .footer-social-links {
        justify-content: center !important;
    }
    
    /* Center footer bottom content */
    .footer-bottom-content {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }
    
    .footer-bottom-links {
        justify-content: center !important;
        flex-direction: column !important;
        align-items: center !important;
    }
}

@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-about {
        grid-column: 1 / -1;
        text-align: center;
        padding-right: 0;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    [dir="ltr"] .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .professional-footer {
        padding: 40px 0 0;
        margin-top: 0;
    }
    
    .footer-container {
        padding: 0 20px;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-menu a {
        justify-content: center;
    }
    
    .footer-contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .scroll-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    [dir="ltr"] .scroll-to-top {
        left: auto;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .footer-logo-img {
        width: 50px;
        height: 50px;
    }
    
    .footer-logo-main {
        font-size: 20px;
    }
    
    .footer-logo-sub {
        font-size: 11px;
    }
    
    .footer-title {
        font-size: 18px;
    }
    
    .footer-social-links {
        gap: 10px;
    }
    
    .footer-social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ==================== RTL Support ==================== */
/* تم نقل جميع تنسيقات RTL إلى أقسامها المناسبة أعلاه */

/* ==================== Print Styles ==================== */
@media print {
    .professional-footer {
        background: #ffffff;
        color: #000000;
    }
    
    .scroll-to-top {
        display: none;
    }
    
    .footer-social-links {
        display: none;
    }
}
