/* 
 * Footer Styles - بهینه‌شده برای ریسپانسیو و performance
 * نام فایل: footer.css
 */

/* متغیرهای رنگی */
:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --dark-color: #1e2124;
    --light-color: #1e2124;
    --border-color: #dee2e6;
    --hover-color: #e9ecef;
    --text-color: #1e2124;
    --text-light:#1e2124;
    --white: #ffffff;
    --black: #000000;
}
 
.img-icon{
 
    width: 60px; /* فقط عرض را بده */
    height: auto; /* ارتفاع خودکار تنظیم شود */
 
}
/* ریست استایل‌ها */
.compact-footer * {
    box-sizing: border-box;
}

/* فوتر اصلی */
.compact-footer {
    background-color: var(--light-color);
    padding: 2.5rem 0 0;
    border-top: 3px solid var(--primary-color);
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
 
/* شبکه‌بندی ریسپانسیو */
.col-lg-4 { grid-column: span 4; }
.col-lg-2 { grid-column: span 2; }
.col-md-6 { grid-column: span 6; }
.col-sm-12 { grid-column: span 12; }

/* عنوان‌های فوتر */
.footer-title {
    color: #000000 !important;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    position: relative;
}

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

/* لوگو */
.footer-logo img {
    max-width: min(180px, 100%);
    height: auto;
    transition: transform var(--transition-speed, 0.3s) ease;
}

.footer-logo img:hover {
    transform: scale(1.05);
}

/* توضیحات شرکت */
.footer-description {
    color: var(--text-color)!important;
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* لیست‌های فوتر */
.compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.compact-list li {
    margin-bottom: 0.625rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px dashed var(--border-color);
}

.compact-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.compact-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
 
    padding: 0.125rem 0;
}

.compact-list a:hover {
    color: var(--primary-color);
    padding-right: 0.5rem;
}

.compact-list i {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    width: 1.125rem;
    text-align: center;
    color: var(--primary-color);
}

/* اطلاعات تماس */
.contact-compact {
    
   
  
}

.contact-item {
    display: flex;
    align-items: flex-start;
    padding:0.4rem;
    border-bottom: 1px solid var(--hover-color);
    transition: background-color 0.3s ease;
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-icon {
    background-color: var(--hover-color);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.75rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-icon i {
    color: var(--primary-color);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.contact-text {
    flex: 1;
}

.contact-text h6 {
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    font-weight: 700;
    margin-bottom: 0.3125rem;
    color: var(--dark-color);
}

.contact-text p {
    font-size: clamp(0.75rem, 1.5vw, 0.8rem);
    margin-bottom: 0;
    color: var(--text-light);
    line-height: 1.5;
}

/* گواهینامه‌ها */
.certificates-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.certificates-title {
    font-size: clamp(0.9rem, 1.5vw, 0.95rem);
    font-weight: 700;
    color: #000000 !important;
    margin-bottom: 0.9375rem;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.9375rem;
    margin-bottom: 0.9375rem;
}

.certificate-logo {
    background-color: var(--white);
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
}

.certificate-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    transition: all 0.3s ease;
}

/* شبکه‌های اجتماعی */
.social-compact {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-compact a {
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--hover-color);
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

/* کپی‌رایت */
.copyright-compact {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 0.9375rem 0;
    margin-top: 1.875rem;
}

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

.copyright-text {
    font-size: clamp(0.75rem, 1.5vw, 0.8rem);
    text-align: end;
    flex: 1;
    min-width: min-content;
}

/* ========== رسپانسیو ========== */

/* تبلت (768px به پایین) */
@media (max-width: 768px) {
    .compact-footer {
        padding: 1.875rem 0 0;
    }
    
   
    .col-md-6 {
        grid-column: span 3;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .copyright-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        text-align: center !important;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-icon {
        margin-left: 0;
        margin-bottom: 0.625rem;
    }
    
    .contact-text {
        text-align: center;
    }
}

/* تبلت کوچک (640px به پایین) */
@media (max-width: 640px) {
   
    
    .col-md-6 {
        grid-column: span 1;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 200px;
        margin: 0 auto 0.9375rem;
    }
}

/* موبایل (480px به پایین) */
@media (max-width: 480px) {
    .compact-footer {
        padding: 1.25rem 0 0;
    }
    
  
    
    .footer-section {
        grid-column: span 1 !important;
        margin-bottom: 1.5rem;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }
    
    .certificate-logo {
        padding: 0.5rem;
    }
    
    .social-compact a {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9rem;
    }
    
    .footer-logo img {
        max-width: 140px;
    }
      .compact-list a {
     
            justify-content:center;
    }
}

/* موبایل کوچک (360px به پایین) */
@media (max-width: 360px) {
    .compact-footer {
        padding: 1rem 0 0;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 180px;
    }
    
    .social-compact {
        gap: 0.5rem;
    }
    
    .social-compact a {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
    
    .footer-title {
        font-size: 0.9rem;
    }
    
    .compact-list a {
        font-size: 0.75rem;
            justify-content:center;
    }
}

/* ========== بهبود دسترسی ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus برای keyboard navigation */
.compact-list a:focus-visible,
.social-compact a:focus-visible,
.contact-text a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* حالت تاریک */
@media (prefers-color-scheme: dark) {
    .compact-footer {
        background-color: #1a1a1a;
        --light-color: #1a1a1a;
        --text-color: #1e2124;
        --text-light: #b0b0b0;
        --dark-color: #ffffff;
        --white: #2d2d2d;
        --hover-color: #333333;
        --border-color: #444444;
    }
    

    .copyright-compact {
        background-color: #121212;
    }
}

/* چاپ */
@media print {
    .compact-footer {
        border-top: 1px solid var(--black);
        background: none;
        padding: 1.25rem 0 0;
    }
    
    .social-compact,
    .certificates-grid {
        display: none;
    }
    
    .copyright-compact {
        background: none;
        color: var(--black);
        border-top: 1px solid var(--black);
        margin-top: 1.25rem;
    }
    
    .footer-logo img {
        filter: grayscale(100%);
    }
}