@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/2_Vazir_Medium_Font.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Reset & Base Styles */
:root {
    --color-primary: #295c3b;
    --color-primary-dark: #1a4731;
    --color-primary-light: rgba(41, 92, 59, 0.1);
    --color-text: #21352b;
    --color-text-light: #5f6f64;
    --color-text-lighter: #6b7a70;
    --color-bg: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(247,243,233,0.92));
    --color-border: rgba(41, 92, 59, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 12px rgba(41, 92, 59, 0.08);
    --shadow-md: 0 10px 25px rgba(41, 92, 59, 0.12);
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Footer Core */
.sh-footer {
    padding: 56px 0 28px;
    background:
        radial-gradient(circle at top right, rgba(41, 92, 59, 0.12), transparent 45%),
        var(--color-bg);
    border-top: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.sh-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
}

/* Grid Layout */
.sh-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    padding: 0 50px;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* Brand Section */
.sh-footer__brand {
    padding-right: 12px;
}

.sh-footer__logo {
    display: inline-flex;
    margin-bottom: 16px;
    transition: var(--transition);
}

.sh-footer__logo:hover {
    transform: translateY(-2px);
}

.footer-icon {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    overflow: hidden;
    display: inline-flex;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.footer-icon:hover {
    box-shadow: var(--shadow-md), 0 0 0 4px var(--color-primary-light);
    transform: scale(1.05);
}

.footer-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sh-footer__brand p {
    margin: 0;
    max-width: 320px;
    color: var(--color-text-light);
    line-height: 1.85;
    font-size: 0.95rem;
    text-align: justify;
}

/* Columns */
.sh-footer__col h4 {
    margin: 0 0 18px;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--color-text);
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}

.sh-footer__col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40%;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sh-footer__col:hover h4::after {
    width: 100%;
}

.sh-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sh-footer__col li {
    margin-bottom: 12px;
    position: relative;
    padding-right: 12px;
}

.sh-footer__col li::before {
    content: '›';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    opacity: 0;
    transition: var(--transition);
}

.sh-footer__col li:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(-2px);
}

.sh-footer__col a,
.sh-footer__col span {
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    padding: 2px 0;
}

.sh-footer__col a:hover {
    color: var(--color-primary);
    transform: translateX(-4px);
}

/* Bottom Bar */
.sh-footer__bottom {
    margin-top: 48px;
    padding-top: 22px;
    text-align: center;
    border-top: 1px solid var(--color-border);
    position: relative;
}

.sh-footer__bottom::before {
    content: '';
    position: absolute;
    top: -1px;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.sh-footer__bottom p {
    margin: 0;
    color: var(--color-text-lighter);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Social Media - Redesigned */
.footer-socials {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-primary);
    opacity: 0;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    border-color: var(--color-primary);
}

.social-icon:hover::before {
    opacity: 0.05;
}

/* Social Icon Colors & Tooltips */
.social-icon.telegram {
    color: #0088cc;
}

.social-icon.telegram:hover {
    background: rgba(0, 136, 204, 0.05);
}

.social-icon.instagram {
    background: linear-gradient(135deg, 
        rgba(245, 133, 41, 0.05), 
        rgba(221, 42, 123, 0.05), 
        rgba(129, 52, 175, 0.05), 
        rgba(245, 96, 64, 0.05));
}

.social-icon.instagram:hover {
    border-color: #dd2a7b;
}

.social-icon.whatsapp {
    color: #25D366;
}

.social-icon.whatsapp:hover {
    background: rgba(37, 211, 102, 0.05);
}

.social-icon.bale {
    background-image: url("/static/images/bale-color.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
}

.social-icon.bale:hover {
    background-color: rgba(0, 164, 228, 0.05);
}

/* Modern Tooltip */
.social-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    right: 50%;
    transform: translateX(50%) translateY(5px);
    background: var(--color-text);
    color: white;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 10;
    font-weight: 500;
    box-shadow: var(--shadow-md);
}

.social-icon:hover::after {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

/* Responsive Design */
@media (max-width: 1100px) {
    .sh-footer__grid {
        grid-template-columns: 1.2fr repeat(3, 1fr);
        gap: 32px;
    }
}

@media (max-width: 980px) {
    .sh-footer {
        padding: 48px 0 24px;
    }
    
    .sh-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
    
    .sh-footer__brand {
        grid-column: 1 / -1;
        text-align: center;
        padding-right: 0;
    }
    
    .sh-footer__brand p {
        margin: 0 auto;
        text-align: center;
    }
    
    .sh-footer__logo {
        justify-content: center;
    }
    
    .footer-socials {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .sh-footer {
        margin-top: 48px;
        padding: 40px 0 20px;
    }
    
    .sh-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .sh-footer__col {
        text-align: center;
    }
    
    .sh-footer__col h4::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .sh-footer__col li::before {
        display: none;
    }
    
    .sh-footer__col a:hover {
        transform: translateX(0);
    }
    
    .footer-socials {
        gap: 12px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
    }
}

/* Animation for subtle entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sh-footer__grid > * {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.sh-footer__brand { animation-delay: 0.1s; }
.sh-footer__col:nth-child(2) { animation-delay: 0.2s; }
.sh-footer__col:nth-child(3) { animation-delay: 0.3s; }
.sh-footer__col:nth-child(4) { animation-delay: 0.4s; }
