/* متغيرات الفوتر */
:root {
    --footer-bg: #2B2825;
    --footer-text: #FAF3EB;
    --footer-heading: #97755b;
    --footer-link-hover: #97755b;
    --footer-border: rgba(255, 255, 255, 0.1);
    --footer-copyright-bg: #1A1715;
    --footer-input-bg: rgba(255, 255, 255, 0.05);
    --footer-input-border: rgba(255, 255, 255, 0.1);
    --footer-input-focus: rgba(232, 143, 42, 0.3);
}

/* أنماط الفوتر الرئيسية */
.bawasi-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    font-family: 'Tajawal', sans-serif;
    position: relative;
    line-height: 1.6;
}

.footer-top {
    padding: 4rem 0 3rem;
}

.container {
    max-width: 1305px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* قسم معلومات الشركة */
.footer-about {
    padding-right: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

/* تغيير الترتيب للشاشات الكبيرة والهواتف */
@media (min-width: 768px) {
    .footer-logo {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .footer-logo .logo-img {
        margin-left: 0;
        margin-bottom: 1rem;
        align-self: center;
    }
    
    .footer-logo .logo-text {
        align-self: center;
        text-align: center;
    }
}

/* تغيير الترتيب للهواتف أيضاً */
@media (max-width: 767.98px) {
    .footer-logo {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo .logo-img {
        margin-left: 0;
        margin-bottom: 0.8rem;
        align-self: center;
    }
    
    .footer-logo .logo-text {
        align-self: center;
        text-align: center;
    }
}

/* تحسينات إضافية للشاشات الكبيرة جداً */
@media (min-width: 1024px) {
    .footer-logo .logo-img {
        height: 90px;
        margin-bottom: 1.2rem;
    }
    
    .footer-logo .brand-name {
        font-size: 1.6rem;
    }
    
    .footer-logo .brand-slogan {
        font-size: 0.85rem;
        margin-top: 0.3rem;
    }
}

/* تحسينات للهواتف المتوسطة */
@media (min-width: 480px) and (max-width: 767.98px) {
    .footer-logo .logo-img {
        height: 70px;
        margin-bottom: 1rem;
    }
    
    .footer-logo .brand-name {
        font-size: 1.4rem;
    }
    
    .footer-logo .brand-slogan {
        font-size: 0.8rem;
        margin-top: 0.2rem;
    }
}

.footer-logo .logo-img {
    height: 80px;
    width: auto;
    margin-left: 0.8rem;
}

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

.footer-logo .brand-name {
    font-family: 'El Messiri', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--footer-text);
    line-height: 1.2;
}

.footer-logo .brand-slogan {
    font-size: 0.8rem;
    color: var(--footer-heading);
    margin-top: 0.2rem;
}

.footer-description {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-social .social-title {
    font-size: 1rem;
    color: var(--footer-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--footer-text);
    font-size: 1rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--footer-heading);
    color: var(--footer-bg);
    transform: translateY(-3px);
}

/* عناوين الفوتر */
.footer-heading {
    font-family: 'El Messiri', sans-serif;
    font-size: 1.3rem;
    color: var(--footer-heading);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--footer-heading);
}

/* روابط الفوتر */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.8rem;
}

.footer-link {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-link i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: var(--footer-heading);
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--footer-heading);
    padding-right: 5px;
}

.footer-link:hover i {
    margin-left: 0.8rem;
}

/* معلومات الاتصال */
.contact-info {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.contact-item i {
    color: var(--footer-heading);
    margin-left: 0.8rem;
    margin-top: 0.2rem;
    font-size: 1rem;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--footer-heading);
}

.working-hours {
    border-top: 1px solid var(--footer-border);
    padding-top: 1.5rem;
}

.hours-title {
    font-size: 1rem;
    color: var(--footer-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.hours-item .days {
    font-weight: 500;
}

/* النشرة البريدية */
.newsletter-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--footer-input-border);
    background-color: var(--footer-input-bg);
    color: var(--footer-text);
    border-radius: 30px 0 0 30px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--footer-heading);
    box-shadow: 0 0 0 3px var(--footer-input-focus);
}

.newsletter-btn {
    background-color: var(--footer-heading);
    color: var(--footer-bg);
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.newsletter-btn:hover {
    background-color: var(--footer-text);
}

.payment-methods {
    border-top: 1px solid var(--footer-border);
    padding-top: 1.5rem;
}

.payment-title {
    font-size: 1rem;
    color: var(--footer-text);
    margin-bottom: 1rem;
    font-weight: 600;
}

.payment-icons {
    display: flex;
    gap: 1rem;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* حقوق النشر */
.footer-bottom {
    background-color: var(--footer-copyright-bg);
    padding: 1.5rem 0;
    border-top: 1px solid var(--footer-border);
}

.copyright-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright-text {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--footer-heading);
}

/* زر العودة للأعلى */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--footer-heading);
    color: var(--footer-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--footer-text);
    transform: translateY(-5px);
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-grid > div {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

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

/* التجاوب مع الشاشات الصغيرة */

/* التابلت الكبير والشاشات المتوسطة (992px - 1199px) */
@media (max-width: 1199.98px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-top {
        padding: 3.5rem 0 2.5rem;
    }
    
    .container {
        padding: 0 20px;
    }
}

/* التابلت (768px - 991px) */
@media (max-width: 991.98px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-top {
        padding: 3rem 0 2rem;
    }
    
    .footer-heading {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }
    
    .footer-logo .brand-name {
        font-size: 1.3rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
    
    .social-links {
        gap: 0.6rem;
    }
    
    .social-link {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    
    .contact-item {
        margin-bottom: 0.8rem;
    }
    
    .newsletter-form input {
        padding: 0.7rem 0.9rem;
    }
    
    .newsletter-btn {
        padding: 0 1.3rem;
    }
}

/* الهواتف الكبيرة (576px - 767px) */
@media (max-width: 767.98px) {
    .footer-top {
        padding: 2.5rem 0 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-about {
        padding-right: 0;
    }
    
    .footer-heading::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-info {
        text-align: right;
    }
    
    .contact-item {
        justify-content: center;
        text-align: right;
    }
    
    .working-hours {
        text-align: right;
    }
    
    .copyright-content {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .footer-legal {
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        bottom: 20px;
        left: 20px;
    }
    
    .newsletter-form {
        max-width: 350px;
        margin: 0 auto 2rem;
    }
}

/* الهواتف العادية (360px - 575px) */
@media (max-width: 575.98px) {
    .footer-top {
        padding: 2rem 0 1rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-heading {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-logo .brand-name {
        font-size: 1.2rem;
    }
    
    .footer-logo .brand-slogan {
        font-size: 0.75rem;
    }
    
    .footer-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .footer-link {
        font-size: 0.9rem;
        justify-content: center;
    }
    
    .contact-item {
        font-size: 0.9rem;
        margin-bottom: 0.7rem;
    }
    
    .hours-item {
        font-size: 0.8rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .newsletter-form input {
        border-radius: 25px;
        margin-bottom: 0.8rem;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .newsletter-btn {
        border-radius: 25px;
        padding: 0.8rem 1.5rem;
        justify-content: center;
        font-size: 0.9rem;
    }
    
    .payment-icons {
        font-size: 1.5rem;
        gap: 0.8rem;
        justify-content: center;
    }
    
    .footer-bottom {
        padding: 1rem 0;
    }
    
    .copyright-text {
        font-size: 0.8rem;
    }
    
    .footer-legal a {
        font-size: 0.8rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 15px;
        left: 15px;
    }
}

/* الهواتف الصغيرة جداً (أقل من 360px) */
@media (max-width: 359.98px) {
    .footer-top {
        padding: 1.5rem 0 0.8rem;
    }
    
    /* ضمان أن الشعار يبقى في الترتيب الأفقي للشاشات الصغيرة */
    .footer-logo {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo .logo-img {
        margin-left: 0;
        margin-bottom: 0.6rem;
        align-self: center;
        height: 60px;
    }
    
    .footer-logo .logo-text {
        align-self: center;
        text-align: center;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .footer-grid {
        gap: 1rem;
    }
    
    .footer-heading {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-logo .brand-name {
        font-size: 1.1rem;
    }
    
    .footer-logo .brand-slogan {
        font-size: 0.7rem;
    }
    
    .footer-description {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .social-links {
        gap: 0.4rem;
    }
    
    .social-link {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .footer-link {
        font-size: 0.85rem;
    }
    
    .contact-item {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }
    
    .contact-item i {
        margin-left: 0.6rem;
        font-size: 0.9rem;
    }
    
    .hours-item {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .newsletter-form input {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .newsletter-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .payment-icons {
        font-size: 1.3rem;
        gap: 0.6rem;
    }
    
    .footer-bottom {
        padding: 0.8rem 0;
    }
    
    .copyright-text {
        font-size: 0.75rem;
    }
    
    .footer-legal {
        gap: 0.8rem;
    }
    
    .footer-legal a {
        font-size: 0.75rem;
    }
    
    .back-to-top {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        bottom: 10px;
        left: 10px;
    }
}