.medical-footer {
    background: linear-gradient(135deg, #0a1429 0%, #0f172a 100%);
    position: relative;
    margin-top: auto;
    border-top: 1px solid var(--medical-glass-border);
    overflow: hidden;
    padding-top: 4rem;
}

/* Wave Effect */
.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
    z-index: 1;
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.footer-wave .shape-fill {
    fill: rgba(37, 99, 235, 0.1);
}

/* Main Content */
.footer-content {
    padding: 3rem 0 2rem;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Brand Section */
.footer-brand-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Glass Square on Logo - مربع شیشه‌ای روی لوگو */
.footer-logo-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.footer-logo-container:hover .footer-logo-glass {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(37, 99, 235, 0.4);
    transform: scale(1.08);
    box-shadow:
        0 20px 40px rgba(37, 99, 235, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Logo Inside the Glass Square */
.footer-logo {
    width: 70%;
    height: 70%;
    object-fit: contain;
    position: relative;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.footer-logo-container:hover .footer-logo {
    transform: scale(1.15);
    filter: drop-shadow(0 8px 16px rgba(37, 99, 235, 0.4));
}

/* افکت درخشان دور شیشه */
.footer-logo-glass::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg,
        var(--medical-primary),
        var(--medical-accent),
        var(--medical-primary));
    border-radius: 28px;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.footer-logo-container:hover .footer-logo-glass::after {
    opacity: 0.5;
    animation: glowRotate 3s linear infinite;
}

@keyframes glowRotate {
    0% {
        opacity: 0.3;
        transform: rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: rotate(180deg);
    }
    100% {
        opacity: 0.3;
        transform: rotate(360deg);
    }
}

/* افکت نور پس‌زمینه */
.footer-logo-backglow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle at center,
        rgba(37, 99, 235, 0.2) 0%,
        rgba(37, 99, 235, 0.1) 30%,
        transparent 70%
    );
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.footer-logo-container:hover .footer-logo-backglow {
    opacity: 1;
}

/* Brand Info */
.footer-brand-info {
    text-align: center;
}

.footer-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

.footer-title .brand-accent {
    background: linear-gradient(135deg, var(--medical-primary), var(--medical-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 300px;
}

/* Links Section */
.footer-links-section {
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    width: 100%;
}

.footer-link-group {
    text-align: right;
}

.footer-group-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-group-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--medical-primary), var(--medical-accent));
    border-radius: 2px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--medical-primary), var(--medical-accent));
    border-radius: 1px;
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: white;
    padding-right: 10px;
}

.footer-link:hover::before {
    width: 25px;
}

.footer-link i {
    font-size: 1rem;
    color: var(--medical-accent);
    width: 20px;
    transition: all 0.3s ease;
}

.footer-link:hover i {
    color: var(--medical-primary);
}

/* Social Section */
.footer-social-section {
    text-align: right;
    padding-left: 1rem;
}

.social-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    padding-bottom: 0.8rem;
}

.social-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--medical-secondary), var(--medical-accent));
    border-radius: 2px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    transition: right 0.5s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    border-color: var(--medical-primary);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.social-link:hover::before {
    right: 100%;
}

.social-link i {
    font-size: 1.3rem;
    width: 24px;
    transition: all 0.3s ease;
}

.social-link:hover i {
    transform: scale(1.2);
}

/* رنگ‌های شبکه‌های اجتماعی */
.social-link.telegram {
    background: rgba(0, 136, 204, 0.1);
    border-color: rgba(0, 136, 204, 0.3);
}

.social-link.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

.social-link.telegram i {
    color: #0088cc;
}

.social-link.whatsapp i {
    color: #25d366;
}

.social-text {
    font-weight: 500;
    flex-grow: 1;
}

/* Footer Bottom */
.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.footer-copyright {
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-links-section {
        padding: 0;
    }

    .footer-social-section {
        padding-left: 0;
        text-align: center;
    }

    .social-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-link {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        padding: 2rem 0;
        gap: 2.5rem;
    }

    .footer-logo-container {
        width: 140px;
        height: 140px;
    }

    .footer-logo-glass {
        border-radius: 22px;
    }

    .footer-logo-glass::after {
        border-radius: 25px;
    }

    .footer-logo-backglow {
        border-radius: 27px;
    }

    .footer-title {
        font-size: 1.8rem;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-link-group {
        text-align: center;
    }

    .footer-group-title::after,
    .social-title::after {
        right: 50%;
        transform: translateX(50%);
    }

    .footer-link {
        justify-content: center;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }

    .social-link {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .footer-logo-container {
        width: 120px;
        height: 120px;
    }

    .footer-logo-glass {
        border-radius: 20px;
    }

    .footer-logo-glass::after {
        border-radius: 23px;
    }

    .footer-logo-backglow {
        border-radius: 25px;
    }

    .footer-title {
        font-size: 1.6rem;
    }

    .footer-description {
        font-size: 1rem;
    }

    .footer-group-title,
    .social-title {
        font-size: 1.2rem;
    }

    .social-link {
        padding: 0.8rem 1.2rem;
    }
}
/* ===== FOOTER LEGAL LINKS STYLES ===== */

/* آیتم قوانین با هایلایت ویژه */
.footer-link[href*="terms"] {
    position: relative;
}

.footer-link[href*="terms"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg,
        var(--medical-primary),
        var(--medical-accent));
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-link[href*="terms"]:hover::after {
    opacity: 1;
}

/* آیکون ویژه برای لینک قوانین */
.footer-link[href*="terms"] i {
    color: var(--medical-accent) !important;
    background: rgba(6, 182, 212, 0.1);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.footer-link[href*="terms"]:hover i {
    background: var(--medical-accent);
    color: white !important;
    transform: rotate(5deg);
}

/* ===== FOOTER BOTTOM LEGAL NOTICE ===== */
.footer-legal-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal-text {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
}

.footer-legal-link {
    color: var(--medical-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.1);
}

.footer-legal-link:hover {
    color: white;
    background: rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

.footer-legal-link i {
    font-size: 0.9rem;
}

/* ===== FOOTER LEGAL BADGE ===== */
.footer-legal-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg,
        var(--medical-primary),
        var(--medical-secondary));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    z-index: 3;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    }
}

/* ===== RESPONSIVE STYLES FOR LEGAL LINKS ===== */
@media (max-width: 768px) {
    .footer-link[href*="terms"]::after {
        left: -8px;
    }

    .footer-legal-notice {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        text-align: center;
    }

    .footer-legal-badge {
        position: relative;
        top: 0;
        right: 0;
        margin: 0 auto 1rem;
        width: fit-content;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .footer-legal-badge,
    .footer-legal-notice {
        display: none !important;
    }

    .footer-link[href*="terms"] i {
        background: transparent !important;
        color: #333 !important;
    }
}