:root {
    --blue: #206196;
    --blue-dark: #164a78;
    --orange: #da7a2c;
    --orange-dark: #d35f1a;
    --blue-tint: rgba(32, 97, 150, 0.07);
    --orange-tint: rgba(235, 111, 38, 0.08);
    --text: #444;
    --light: #f8fafc;
    --border: #e8eef3;
}

/* ================= FOOTER ================= */
footer {
    background: #f5f7fa;
    
    background-size: auto, auto, 22px 22px;
    margin-top: 80px;
    border-top: 1px solid var(--border);
    position: relative;
    padding: 60px 0 0;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--orange));
}

/* ================= LAYOUT ================= */
.footer-container {
    max-width: 1200px;
    margin: auto;
    padding: 0 24px 40px;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    align-items: stretch;
    padding-top: 58px;
}

/* ================= CARD ================= */
.footer-section {
    background: #fff;
    padding: 35px 32px;
    border-radius: 16px;
    border: none;
    border-right: 5px solid var(--blue);
    box-shadow: 0 2px 7px rgba(100, 100, 100, 0.15);
    min-height: 260px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.footer-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-section:nth-child(1) { transition-delay: 0.05s; }
.footer-section:nth-child(2) { transition-delay: 0.12s; }
.footer-section:nth-child(3) { transition-delay: 0.19s; }

@media (prefers-reduced-motion: reduce) {
    .footer-section {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.footer-section:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(21, 34, 66, 0.12);
    border-right-color: var(--orange);
}


.footer-section:hover::before {
    transform: scale(1.15);
}

.footer-section.logo-about-section {
    justify-content: space-between;
}

/* ================= BRAND BADGE ================= */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(235, 111, 38, 0.14), rgba(235, 111, 38, 0.05));
    border: 1.5px solid rgba(235, 111, 38, 0.35);
    color: var(--orange);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.brand-badge i {
    font-size: 14px;
}

@keyframes badge-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
    .brand-badge i { animation: none; }
}

/* ================= FOOTER TAGS (راهکارها) ================= */
.footer-tags {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    gap: 10px;
    padding-top: 6px;
}

.footer-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--blue);
    padding: 14px 4px;
    min-height: 68px;
    border-radius: 12px;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.footer-tag span {
    display: block;
    width: 100%;
    white-space: nowrap;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
}

/* ✅ آیکون‌ها دقیقاً هم‌سبک با «حوزه‌های تخصصی ما»: مربع گردشده،
   پس‌زمینه‌ی آبی کم‌رنگ، بردر نازک و آیکون توخالی (outline) آبی */
.footer-tag .expertise-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: transparent;
    background-color: #f5f7fa;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-tag .expertise-icon i {
    font-weight: 400;
}

.footer-tag:hover {
    background: var(--orange);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(235, 111, 38, 0.25);
}

.footer-tag:hover .expertise-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* ================= TITLE ================= */
.footer-section h3 {
    color: var(--blue);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    padding-bottom: 14px;
    position: relative;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    width: 42px;
    height: 3px;
    border-radius: 3px;
    background: var(--blue);
    transition: width 0.3s ease, background 0.3s ease;
}

.footer-section:hover h3 {
    color: var(--orange);
    letter-spacing: 0.3px;
}

.footer-section:hover h3::after {
    width: 64px;
    background: var(--orange);
}

/* ================= LOGO CARD HEADER (آرتا) ================= */
.logo-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
    transition: border-color 0.3s ease;
}

.logo-section::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    width: 42px;
    height: 3px;
    border-radius: 3px;
    background: var(--blue);
    transition: width 0.3s ease, background 0.3s ease;
}

.footer-section:hover .logo-section::after {
    width: 64px;
    background: var(--orange);
}

.logo-section h2 {
    color: var(--blue);
    font-size: 20px;
    margin: 0;
    font-weight: 800;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
    letter-spacing: 0;
}

.footer-section:hover .logo-section h2 {
    color: var(--orange);
    letter-spacing: 0.3px;
}

/* ================= ABOUT TEXT ================= */
.about-text {
    position: relative;
    z-index: 1;
    color: #2d3a4a;
    line-height: 2.05;
    font-size: 15px;
    font-weight: 500;
    max-width: 95%;
    text-align: justify;
    text-justify: inter-word;
}

/* ================= LINKS (دسترسی سریع) ================= */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li {
    border-radius: 12px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.footer-links li:hover {
    background: var(--light);
    transform: translateX(-4px);
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #444;
    font-size: 14.5px;
    font-weight: 500;
    padding: 12px 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-links a i {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #f5f7fa;
    border: none;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover i {
    background: var(--orange);
    color: #fff;
    transform: scale(1.08);
}

/* ================= CONTACT (تماس با ما) ================= */
.contact-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: transparent;
    border: none;
    transition: background 0.25s ease, transform 0.25s ease;
}

.contact-item:hover {
    background: var(--light);
    transform: translateX(-4px);
}

.contact-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #f5f7fa;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 19px;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.contact-item:hover .contact-icon {
    background: var(--orange);
    color: #fff;
    transform: scale(1.08);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    font-size: 12px;
    color: #555;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.contact-item:hover .contact-label {
    color: #444;
}

.contact-info a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.contact-item:hover .contact-info a {
    color: var(--orange);
}

/* ================= SOCIAL ================= */
.social-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
    max-width: 190px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
    align-items: center;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: transparent;
    background-color: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    font-size: 19px;
    line-height: 1;
    text-decoration: none;
}

.social-btn i {
    width: 19px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
    transform: translateY(-3px) rotate(-4deg);
    box-shadow: 0 8px 20px rgba(235, 111, 38, 0.3);
}

.icon-mask {
    position: relative;
    width: 20px;
    height: 20px;
    display: inline-block;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    background-color: var(--blue);
    transition: background-color 0.25s ease;
}

.social-btn:hover .icon-mask {
    background-color: #fff;
}

/* ================= ACCESSIBILITY ================= */
.footer-tag:focus-visible,
.footer-links a:focus-visible,
.contact-info a:focus-visible,
.social-btn:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-radius: 8px;
}

/* ================= COPYRIGHT ================= */
.footer-bottom {
    margin-top: 45px;
    padding: 25px 0;
    background: linear-gradient(180deg, #fdfdfe 0%, #f5f7fa 100%);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
}

.copyright {
    font-size: 13.5px;
    color: #777;
    text-align: center;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    footer {
        margin-top: 60px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        padding-top: 15px;
    }

    .footer-section.logo-about-section {
        grid-column: 1 / -1;
        min-height: unset;
    }

    .footer-section {
        min-height: unset;
        padding: 28px 24px;
    }

    .footer-tag {
        min-height: 60px;
        padding: 12px 4px;
    }

    .footer-tag .expertise-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .contact-item {
        padding: 10px 12px;
    }

    .contact-icon {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    footer {
        margin-top: 40px;
        padding-top: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-top: 10px;
    }

    .footer-section {
        padding: 22px 18px;
    }

    .footer-section:hover {
        transform: none;
    }

    .footer-tag {
        min-height: 56px;
        padding: 10px 4px;
        font-size: 11px;
    }

    .footer-tag .expertise-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .contact-item {
        padding: 10px 12px;
    }

    .contact-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .footer-bottom {
        margin-top: 30px;
        padding: 18px 0;
    }

    .copyright {
        font-size: 12px;
        padding: 0 15px;
    }
}