html {
    scroll-behavior: smooth;
}

/* Footer Styles */
.footer {
    background: #267099;
    color: white;
    font-family: 'Sahel', sans-serif;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-grid)"/></svg>');
    opacity: 0.5;
}

.footer-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Main Footer Content */
.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

/* Company Info */
.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    margin-left: 12px;
    filter: brightness(0) invert(1);
}

.footer-logo h3 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.footer-description {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    text-align: justify;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: #ffca28;
    color: #0d47a1;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 202, 40, 0.3);
}

/* Footer Titles */
.footer-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #ffca28, #ffc107);
    border-radius: 2px;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 0;
}

.footer-links a::before {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #ffca28;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #ffca28;
    padding-right: 20px;
}

.footer-links a:hover::before {
    width: 16px;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.contact-item svg {
    color: #ffca28;
    flex-shrink: 0;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-credits {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 30px;
}

.designer-credit {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 2;
}

.copyright {
    order: 2;
}

.designer-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.designer-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffca28;
    text-shadow: 0 0 10px rgba(255, 202, 40, 0.3);
    transition: all 0.3s ease;
}

.designer-name:hover {
    color: #ffc107;
    text-shadow: 0 0 15px rgba(255, 202, 40, 0.5);
    transform: scale(1.05);
}

.copyright p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #ffca28;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffca28 0%, #ffc107 100%);
    border: none;
    border-radius: 50%;
    color: #0d47a1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255, 202, 40, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 202, 40, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-main {
        padding: 50px 0 35px;
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-main {
        padding: 40px 0 30px;
    }
    
    .footer-logo {
        justify-content: center;
        text-align: center;
    }
    
    .footer-logo img {
        margin-left: 0;
        margin-bottom: 8px;
    }
    
    .footer-logo h3 {
        font-size: 22px;
    }
    
    .footer-description {
        text-align: center;
        font-size: 13px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-title {
        font-size: 16px;
        text-align: center;
    }
    
    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-links a {
        text-align: center;
    }
    
    .contact-info {
        align-items: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .footer-credits {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .designer-credit {
        justify-content: center;
        order: 1;
    }
    
    .copyright {
        order: 1;
    }
    
    .designer-name {
        font-size: 14px;
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 16px;
    }
    
    .footer-main {
        padding: 30px 0 25px;
    }
    
    .footer-logo img {
        width: 40px;
        height: 40px;
    }
    
    .footer-logo h3 {
        font-size: 20px;
        margin-right: 10px;
    }
    
    .footer-description {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .footer-title {
        font-size: 15px;
        margin-bottom: 16px;
    }
    
    .footer-links {
        gap: 10px;
    }
    
    .footer-links a {
        font-size: 13px;
    }
    
    .contact-item {
        font-size: 13px;
        max-width: 73%;
    }
    
    .copyright p {
        font-size: 12px;
    }
    
    .footer-bottom-links {
        gap: 16px;
    }
    
    .footer-bottom-links a {
        font-size: 12px;
    }
    
    .back-to-top {
        bottom: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
}

/* RTL Support */
[dir="rtl"] .footer-links a::before {
    right: auto;
    left: -20px;
}

[dir="rtl"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 20px;
}

[dir="rtl"] .footer-links a:hover::before {
    right: auto;
    left: 0;
}

[dir="rtl"] .footer-title::after {
    left: 0;
}

@media (max-width: 768px) {
    [dir="rtl"] .footer-title::after {
        right: 50%;
    }
}

/* Animation for footer elements */
.footer-column > *,
.social-link,
.footer-links li,
.contact-item,
.footer-bottom-content {
    opacity: 0;
}

.footer.visible-now .footer-column > *,
.footer.visible-now .social-link,
.footer.visible-now .footer-links li,
.footer.visible-now .contact-item,
.footer.visible-now .footer-bottom-content {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Base staggered delays for columns */
.footer.visible-now .footer-column:nth-child(1) > * { animation-delay: 0.1s; }
.footer.visible-now .footer-column:nth-child(2) > * { animation-delay: 0.2s; }
.footer.visible-now .footer-column:nth-child(3) > * { animation-delay: 0.3s; }
.footer.visible-now .footer-column:nth-child(4) > * { animation-delay: 0.4s; }

/* Staggered delays for nested items inside columns */
.footer.visible-now .footer-links li:nth-child(1) { animation-delay: 0.3s; }
.footer.visible-now .footer-links li:nth-child(2) { animation-delay: 0.4s; }
.footer.visible-now .footer-links li:nth-child(3) { animation-delay: 0.5s; }
.footer.visible-now .footer-links li:nth-child(4) { animation-delay: 0.6s; }

.footer.visible-now .contact-item:nth-child(1) { animation-delay: 0.5s; }
.footer.visible-now .contact-item:nth-child(2) { animation-delay: 0.6s; }
.footer.visible-now .contact-item:nth-child(3) { animation-delay: 0.7s; }

.footer.visible-now .social-link:nth-child(1) { animation-delay: 0.3s; }
.footer.visible-now .social-link:nth-child(2) { animation-delay: 0.4s; }
.footer.visible-now .social-link:nth-child(3) { animation-delay: 0.5s; }

/* Footer bottom animation */
.footer.visible-now .footer-bottom-content {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for footer columns */
.footer-column {
    transition: transform 0.3s ease;
}


/* Floating Circles in Footer */
.footer-floating-circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-circle {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}


