/**
 * Footer Widget Styles
 * RTL (Right-to-Left) layout for Persian/Farsi websites
 * Mobile-first responsive design
 */

/* ==========================================================================
   Base Container (Mobile First)
   ========================================================================== */

.footer-widget-container {
    margin-top: 2rem;
    position: relative;
    direction: rtl;
    text-align: right;
}

/* ==========================================================================
   Features Section - Mobile
   ========================================================================== */

.footer-features-mobile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.footer-features-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    padding: 0.875rem;
}

.footer-feature-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.footer-feature-icon-mobile {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.feature-icon-mobile {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-feature-title-mobile {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.footer-feature-description-mobile {
    font-size: 0.625rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Desktop Features - Hidden by default */
.footer-features-desktop {
    display: none;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.footer-about-section {
    padding: 2rem 0;
    background: #f9fafb;
}

.footer-about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-about-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-about-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.footer-about-text {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.75;
    margin: 0;
}

.footer-about-button {
    background: #9ca3af;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.75rem;
    transition: background 0.3s ease;
}

.footer-about-button:hover {
    background: #6b7280;
}

.footer-about-logos {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-logo-item {
    background: white;
    border-radius: 0.5rem;
    padding: 0.625rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.footer-logo {
    width: 3rem;
    height: auto;
    object-fit: contain;
}

/* ==========================================================================
   Social Media & App Download - Mobile
   ========================================================================== */

.footer-social-mobile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 1.5rem;
}

.footer-social-container-mobile {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-app-section-mobile,
.footer-social-section-mobile {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.footer-app-content-mobile,
.footer-social-content-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.footer-app-title-mobile,
.footer-social-title-mobile {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.footer-app-subtitle-mobile,
.footer-social-subtitle-mobile {
    font-size: 0.6875rem;
    color: #6b7280;
    margin: 0;
}

.footer-app-images-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
    justify-content: center;
    align-items: center;
}

.footer-app-image-mobile {
    width: 100%;
    max-width: 8rem;
    height: auto;
    object-fit: contain;
}

.footer-social-icons-mobile {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-social-icon-mobile {
    padding: 0.625rem;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social-icon-mobile:hover {
    background: #e5e7eb;
    transform: scale(1.1);
}

/* Desktop Social - Hidden by default */
.footer-social-desktop {
    display: none;
}

/* ==========================================================================
   Main Footer
   ========================================================================== */

.footer-main {
    padding: 2rem 0 1.5rem;
    color: white;
}

.footer-main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.footer-links-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0;
    margin-bottom: 0.5rem;
    color: white;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-link {
    font-size: 0.75rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
}

.footer-link:hover {
    color: white;
    padding-right: 0.25rem;
}

.footer-contact-item {
    font-size: 0.75rem;
    color: #d1d5db;
    margin: 0;
    line-height: 1.6;
    padding: 0.25rem 0;
}

.footer-logo-column {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.footer-company-logo {
    width: 3.5rem;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ==========================================================================
   Bottom Footer
   ========================================================================== */

.footer-bottom {
    padding: 1rem 0;
    color: white;
}

.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.6875rem;
    color: #d1d5db;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   Tablet Responsive (640px+)
   ========================================================================== */

@media (min-width: 640px) {
    .footer-widget-container {
        margin-top: 3rem;
    }
    
    .footer-features-grid-mobile {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .footer-feature-icon-mobile {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .footer-feature-title-mobile {
        font-size: 0.8125rem;
    }
    
    .footer-feature-description-mobile {
        font-size: 0.6875rem;
    }
    
    .footer-about-section {
        padding: 3rem 0;
    }
    
    .footer-about-title {
        font-size: 1.375rem;
    }
    
    .footer-about-text {
        font-size: 0.875rem;
    }
    
    .footer-logo {
        width: 3.5rem;
    }
    
    .footer-app-images-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
    
    .footer-app-image-mobile {
        max-width: 9rem;
    }
    
    .footer-app-title-mobile,
    .footer-social-title-mobile {
        font-size: 1.125rem;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-logo-column {
        grid-column: span 2;
        justify-content: flex-start;
    }
    
    .footer-company-logo {
        width: 4rem;
    }
    
    .footer-main {
        padding: 2.5rem 0 2rem;
    }
}

/* ==========================================================================
   Desktop Responsive (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
    .footer-widget-container {
        margin-top: 12rem;
    }
    
    /* Show desktop features, hide mobile */
    .footer-features-desktop {
        display: block;
        position: absolute;
        top: -160px;
        left: 0;
        right: 0;
        z-index: 10;
    }
    
    .footer-features-mobile {
        display: none;
    }
    
    .footer-features-grid {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        background: white;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
        border: 1px solid #e5e7eb;
        border-radius: 1.25rem;
        padding: 2.5rem;
    }
    
    .footer-feature-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .footer-feature-icon {
        width: 3.5rem;
        height: 3.5rem;
        flex-shrink: 0;
    }
    
    .feature-icon {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .footer-feature-title {
        font-size: 1rem;
        font-weight: 700;
        color: #1f2937;
        margin: 0;
        margin-bottom: 0.375rem;
        line-height: 1.4;
    }
    
    .footer-feature-description {
        font-size: 0.875rem;
        color: #6b7280;
        margin: 0;
        line-height: 1.5;
    }
    
    /* Show desktop social, hide mobile */
    .footer-social-desktop {
        display: block;
        position: relative;
        left: 0;
        right: 0;
        z-index: 10;
        margin-top: -120px;
        margin-bottom: -60px;
    }
    
    .footer-social-mobile {
        display: none;
    }
    
    .footer-social-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 3rem;
        background: white;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
        border: 1px solid #e5e7eb;
        border-radius: 1.25rem;
        padding: 2.5rem;
    }
    
    .footer-app-section,
    .footer-social-section {
        display: flex;
        align-items: center;
        gap: 2.5rem;
        flex: 1;
    }
    
    .footer-app-content,
    .footer-social-content {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        min-width: 140px;
    }
    
    .footer-app-title,
    .footer-social-title {
        font-size: 1.375rem;
        font-weight: 700;
        margin: 0;
        color: #1f2937;
        white-space: nowrap;
    }
    
    .footer-app-subtitle,
    .footer-social-subtitle {
        font-size: 0.875rem;
        color: #6b7280;
        margin: 0;
        white-space: nowrap;
    }
    
    .footer-app-images {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
        align-items: center;
    }
    
    .footer-app-image {
        width: 10rem;
        height: auto;
        object-fit: contain;
    }
    
    .footer-social-icons {
        display: flex;
        gap: 1rem;
        align-items: center;
    }
    
    .footer-social-icon {
        padding: 0.75rem;
        background: #f3f4f6;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        width: 48px;
        height: 48px;
    }
    
    .footer-social-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .footer-social-icon:hover {
        background: #e5e7eb;
        transform: scale(1.1);
    }
    
    /* About section */
    .footer-about-section {
        padding: 6rem 0;
        padding-bottom: 8rem;
        margin-top: 0;
        min-height: 400px;
    }
    
    .footer-about-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 4rem;
    }
    
    .footer-about-content {
        width: 55%;
        max-width: 700px;
    }
    
    .footer-about-title {
        font-size: 2.25rem;
        margin-bottom: 1.5rem;
        font-weight: 800;
    }
    
    .footer-about-text {
        font-size: 1.0625rem;
        line-height: 2.2;
    }
    
    .footer-about-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }
    
    .footer-about-logos {
        width: auto;
        margin-top: 0;
        justify-content: flex-end;
        gap: 1rem;
    }
    
    .footer-logo-item {
        padding: 1rem;
    }
    
    .footer-logo {
        width: 5.5rem;
    }
    
    /* Main footer */
    .footer-main {
        padding: 4rem 0 2.5rem;
        padding-top: 7rem;
        position: relative;
    }
    
    .footer-main-container {
        margin-top: 0;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 3rem;
        align-items: flex-start;
    }
    
    .footer-links-column {
        gap: 1rem;
    }
    
    .footer-links-title {
        font-size: 1rem;
        font-weight: 700;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 1.25rem;
    }
    
    .footer-links-list {
        gap: 0.75rem;
    }
    
    .footer-link {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    .footer-contact-item {
        font-size: 0.875rem;
        line-height: 1.8;
    }
    
    .footer-logo-column {
        grid-column: span 1;
        justify-content: center;
        align-items: center;
    }
    
    .footer-company-logo {
        width: 6rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 0;
    }
    
    .footer-copyright {
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Large Desktop (1280px+)
   ========================================================================== */

@media (min-width: 1280px) {
    .footer-widget-container {
        margin-top: 13rem;
    }
    
    .footer-features-desktop {
        top: -170px;
    }
    
    .footer-features-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 3rem 2.5rem;
        gap: 2.5rem;
    }
    
    .footer-feature-icon {
        width: 4rem;
        height: 4rem;
    }
    
    .footer-feature-title {
        font-size: 1.0625rem;
    }
    
    .footer-feature-description {
        font-size: 0.9375rem;
    }
    
    .footer-social-desktop {
        margin-top: -120px;
        margin-bottom: -70px;
    }
    
    .footer-social-container {
        padding: 3rem;
    }
    
    .footer-about-section {
        padding-bottom: 10rem;
    }
    
    .footer-main {
        padding-top: 8rem;
    }
    
    .footer-app-section,
    .footer-social-section {
        gap: 4rem;
    }
    
    .footer-app-title,
    .footer-social-title {
        font-size: 1.5rem;
    }
    
    .footer-app-subtitle,
    .footer-social-subtitle {
        font-size: 0.9375rem;
    }
    
    .footer-app-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .footer-app-image {
        width: 12rem;
    }
    
    .footer-social-icons {
        gap: 1.25rem;
    }
    
    .footer-social-icon {
        width: 52px;
        height: 52px;
        padding: 0.875rem;
    }
    
    .footer-about-section {
        padding: 7rem 0;
        min-height: 500px;
    }
    
    .footer-about-container {
        gap: 5rem;
    }
    
    .footer-about-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }
    
    .footer-about-text {
        font-size: 1.125rem;
        line-height: 2.4;
    }
    
    .footer-logo {
        width: 6rem;
    }
    
    .footer-links-grid {
        gap: 4rem;
    }
    
    .footer-links-title {
        font-size: 1.0625rem;
    }
    
    .footer-link,
    .footer-contact-item {
        font-size: 0.9375rem;
    }
}

/* ==========================================================================
   RTL Specific Adjustments
   ========================================================================== */

.footer-widget-container {
    direction: rtl;
}

.footer-features-grid,
.footer-features-grid-mobile {
    direction: rtl;
}

.footer-about-container {
    direction: rtl;
}

.footer-social-container,
.footer-social-container-mobile {
    direction: rtl;
}

.footer-links-grid {
    direction: rtl;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes featureSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-feature-item,
.footer-feature-item-mobile {
    animation: featureSlideIn 0.6s ease-out;
}

/* ==========================================================================
   Hover Effects
   ========================================================================== */

.footer-feature-item:hover,
.footer-feature-item-mobile:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.footer-logo-item:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.footer-link:focus,
.footer-social-icon:focus,
.footer-social-icon-mobile:focus,
.footer-about-button:focus {
    outline: 2px solid white;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .footer-widget-container {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-top: 2rem;
    }
    
    .footer-features-desktop,
    .footer-features-mobile,
    .footer-social-desktop,
    .footer-social-mobile {
        display: none !important;
    }
    
    .footer-main {
        padding: 1rem 0;
    }
}