/* Footer Styles - Edited for Reusability */

/* Remove global reset to prevent conflicts with other pages */
/* Only reset footer-specific elements */
.footer * {
    box-sizing: border-box;
}

/* Main Footer */
.footer {
    background: linear-gradient(135deg, #1a365d 0%, #2e5c9a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-top: auto; /* Push footer to bottom */
}

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

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

/* Main Footer Content */
.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 1rem 2rem;
}

/* Company Info Section */
.company-info {
    grid-column: span 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.footer-logo .logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.company-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.company-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Footer Sections */
.footer-section {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #4a7bc8;
}

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

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.3rem 0;
    position: relative;
}

.footer-link:hover {
    color: #fff;
    padding-left: 1rem;
}

.footer-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: #4a7bc8;
    transition: width 0.3s ease;
}

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

/* Contact Section */
.contact-section {
    grid-column: span 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.contact-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #4a7bc8;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.contact-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.contact-value {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.contact-value:hover {
    color: #4a7bc8;
}

/* App Downloads */
.app-downloads {
    margin-top: 2rem;
}

.download-title {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.download-btn {
    display: block;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.download-btn:hover {
    transform: scale(1.05);
}

.store-badge {
    height: 40px;
    width: auto;
}

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

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

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.copyright p {
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bottom-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.bottom-link:hover {
    color: #fff;
}

.separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2e5c9a, #4a7bc8);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

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

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }
    
    .company-info {
        grid-column: span 1;
    }
    
    .contact-section {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2rem 1rem 1.5rem;
    }
    
    .company-info {
        grid-column: span 2;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .contact-section {
        grid-column: span 2;
        order: 4;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0.8rem 1rem;
    }
    
    .footer-container {
        padding: 0 0.5rem;
    }
    
    .company-info {
        grid-column: span 1;
    }
    
    .contact-section {
        grid-column: span 1;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .company-name {
        font-size: 1.3rem;
    }
    
    .footer-logo .logo {
        height: 35px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .social-link svg {
        width: 18px;
        height: 18px;
    }
    
    .download-buttons {
        align-items: center;
    }
    
    .store-badge {
        height: 35px;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .footer-main {
        padding: 1rem 0.5rem 0.8rem;
    }
    
    .company-name {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .footer-bottom {
        padding: 1rem 0.5rem;
    }
}

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

.footer-section {
    animation: fadeInUp 0.6s ease forwards;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

/* Focus styles for accessibility */
.footer-link:focus,
.social-link:focus,
.contact-value:focus,
.bottom-link:focus,
.download-btn:focus,
.back-to-top:focus {
    outline: 2px solid #4a7bc8;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}