/* أنماط أساسية */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #4CAF50;
    --dark-color: #333;
    --light-color: #f9f9f9;
    --text-color: #333;
    --text-light: #777;
    --bg-color: #fff;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
    --transition: all 0.3s ease;
}

/* أنماط الوضع الليلي */
.dark-mode {
    --text-color: #f0f0f0;
    --text-light: #bbb;
    --bg-color: #121212;
    --footer-bg: #1a1a1a;
    --footer-text: #e0e0e0;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

body {
    background-color: #f0f0f0 !important;
}

/* تصميم الفوتر الرئيسي */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    position: relative;
    overflow: hidden;
    padding-top: 60px;
    margin-top: 80px;
}

.footer-waves {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    background-repeat: repeat no-repeat;
    background-position: 0 bottom;
    transform-origin: center bottom;
}

.wave-1 {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%234CAF50" opacity=".25"/></svg>');
    animation: wave 8s linear infinite;
}

.wave-2 {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="%234CAF50" opacity=".5"/></svg>');
    animation: wave 10s linear -2s infinite;
}

.wave-3 {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%234CAF50"/></svg>');
    animation: wave 12s linear -4s infinite;
}

@keyframes wave {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }

    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.8);
    }

    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

/* ========== التعديلات الرئيسية ========== */
.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 أعمدة متساوية */
    gap: 40px; /* زيادة المسافة بين الأعمدة */
    max-width: 1400px; /* زيادة العرض الأقصى */
    margin: 0 auto;
    padding: 0 30px; /* زيادة المسافة الجانبية */
    width: 100%;
    box-sizing: border-box;
}

.footer-section {
    margin-bottom: 30px;
    min-height: 300px; /* ارتفاع أدنى لتوحيد المظهر */
    display: flex;
    flex-direction: column;
}

/* توسيع قسم معلومات الشركة ليشمل مساحة أكبر */
.company-info {
    grid-column: span 1;
}

.section-title {
    color: var(--secondary-color);
    font-size: 1.5rem; /* زيادة حجم الخط */
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    text-align: right;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 70px; /* زيادة العرض */
    height: 3px; /* زيادة السمك */
    background-color: var(--primary-color);
}

/* قسم معلومات الشركة */
.company-info .logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.footer-logo {
    width: 60px; /* زيادة الحجم */
    height: 60px;
    margin-left: 15px;
    border-radius: 50%;
    object-fit: contain;
}

.company-info h3 {
    font-size: 1.5rem; /* زيادة حجم الخط */
    color: var(--secondary-color);
    margin: 0;
}

.company-description {
    font-size: 1rem; /* زيادة حجم الخط */
    line-height: 1.7;
    color: var(--footer-text);
    margin-bottom: 25px;
    text-align: right;
    flex-grow: 1;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
    width: 100%;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: bold;
}

.newsletter-form button:hover {
    background-color: #3e8e41;
    transform: translateY(-2px);
}

/* روابط سريعة */
.quick-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.quick-links li {
    margin-bottom: 12px;
}

.quick-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 8px 0;
    position: relative;
    font-size: 1.05rem;
}

.quick-links a::before {
    content: '←';
    position: absolute;
    right: -25px;
    opacity: 0;
    transition: var(--transition);
    font-size: 1.1rem;
}

.quick-links a:hover {
    color: var(--secondary-color);
    padding-right: 25px;
    transform: translateX(-5px);
}

.quick-links a:hover::before {
    opacity: 1;
    right: 0;
}

/* معلومات الاتصال */
.contact-info {
    text-align: right;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    text-align: right;
}

.contact-item i {
    margin-left: 12px;
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
    margin-top: 2px;
}

.contact-item span {
    flex: 1;
    line-height: 1.6;
    font-size: 1.05rem;
}

.working-hours {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    text-align: right;
}

.working-hours i {
    margin-left: 10px;
    color: var(--secondary-color);
}

/* وسائل التواصل الاجتماعي */
.social-media {
    margin-top: 25px;
}

.social-icons {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* منصات بألوانها الرسمية */
.social-icon.facebook {
    background-color: #3b5998;
}

.social-icon.twitter {
    background-color: #000000;
}

.social-icon.whatsapp {
    background-color: #25D366;
}

.social-icon.linkedin {
    background-color: #0077b5;
}

.social-icon.instagram {
    background: radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf);
}

.social-icon.youtube {
    background-color: #ff0000;
}

.social-icon.tiktok {
    background-color: #000000;
}

.social-icon:hover {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* زر تحميل التطبيق */
.download-app {
    margin-top: 25px;
}

.download-app p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.app-buttons {
    display: flex;
    gap: 10px;
}

.app-store,
.play-store {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.app-store {
    background-color: #000;
}

.play-store {
    background-color: #0F9D58;
}

.app-store i,
.play-store i {
    margin-left: 5px;
    font-size: 1.2rem;
}

.app-store:hover,
.play-store:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* قسم حقوق النشر */
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 25px 0;
    margin-top: 50px;
    width: 100%;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--footer-text);
    flex: 1;
    text-align: center;
}

.separator {
    margin: 0 10px;
    color: var(--secondary-color);
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
    order: -1;
}

.legal-links a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 5px 0;
}

.legal-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* زر الوضع الليلي */
.dark-mode-btn {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    margin-top: 0;
}

.dark-mode-btn i {
    margin-left: 8px;
}

.dark-mode-btn:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
}

/* زر العودة للأعلى */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px) scale(1.1);
}

/* نافذة الإشعارات */
.notification-popup {
    position: fixed;
    bottom: 20px;
    right: -300px;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    opacity: 0;
    transition: right 0.5s ease, opacity 0.3s ease;
}

.notification-popup.show {
    right: 20px;
    opacity: 1;
}

.notification-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: transform 0.2s ease;
}

.notification-close-btn:hover {
    transform: scale(1.2);
}

/* تنسيق نافذة الإشعارات */
.alert-box {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(135, 206, 250, 0.95);
    color: #333;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    width: 300px;
    height: 100px;
    max-width: 85%;
    max-height: 90%;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    font-size: 24px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* زر الإغلاق */
.alert-box button {
    margin-top: 12px;
    padding: 10px 18px;
    background: #ff5722;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 18px;
}

.alert-box button:hover {
    background: #e64a19;
}

.alert-box.show {
    display: block;
    opacity: 1;
}

/* ========== الوسائط الاستعلامية ========== */

@media (max-width: 1200px) {
    .footer-container {
        grid-template-columns: 1fr 1fr; /* عمودين للشاشات المتوسطة */
        gap: 30px;
        max-width: 1000px;
    }
    
    .company-info {
        grid-column: span 2; /* قسم الشركة يشغل العمودين */
        text-align: center;
    }
    
    .company-info .logo-container {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr; /* عمود واحد للهواتف */
        gap: 25px;
        padding: 0 20px;
    }
    
    .company-info {
        grid-column: span 1;
    }

    .footer-section {
        text-align: center;
        min-height: auto;
    }

    .section-title::after {
        right: 50%;
        transform: translateX(50%);
    }

    .company-info .logo-container {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .contact-item i {
        margin-left: 8px;
        margin-right: 8px;
    }

    .newsletter-form {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .quick-links ul {
        text-align: center;
    }
    
    .quick-links a::before {
        display: none; /* إخفاء السهم على الهواتف */
    }
    
    .quick-links a:hover {
        padding-right: 0;
        transform: none;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .legal-links {
        order: 0;
    }
    
    .copyright {
        order: 1;
    }
    
    .dark-mode-btn {
        order: 2;
    }

    .scroll-top-btn {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* تحسينات خاصة للوضع الأفقي على الشاشات الصغيرة */
@media (max-width: 768px) and (orientation: landscape) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .company-info {
        grid-column: span 2;
    }
    
    .footer-section {
        margin-bottom: 20px;
        text-align: right;
        min-height: 250px;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .company-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .contact-item, .quick-links a {
        font-size: 0.9rem;
    }
    
    .social-icons {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .newsletter-form {
        flex-direction: row;
        max-width: 100%;
    }
    
    .newsletter-form input {
        border-radius: 5px 0 0 5px;
        margin-bottom: 0;
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .newsletter-form button {
        border-radius: 0 5px 5px 0;
        padding: 10px 15px;
    }
    
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
        align-items: center;
    }
    
    .copyright {
        margin-bottom: 0;
        font-size: 0.8rem;
        order: 0;
        flex: none;
    }
    
    .legal-links {
        margin-bottom: 0;
        gap: 10px;
        order: 1;
        width: auto;
    }
    
    .legal-links a {
        font-size: 0.8rem;
    }
    
    .dark-mode-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
        margin-top: 0;
        order: 2;
    }
}

/* تحسينات للشاشات الكبيرة جداً */
@media (min-width: 1600px) {
    .footer-container {
        max-width: 1600px;
        gap: 50px;
    }
    
    .footer-section {
        min-height: 350px;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
    
    .company-description {
        font-size: 1.1rem;
    }
    
    .quick-links a,
    .contact-item span {
        font-size: 1.1rem;
    }
}