/* ============================================================================
   SIGNALDESK - FOOTER COMPONENT
   Elegant, modern footer with creative animations and hover effects
   ============================================================================ */

/* Base Footer Styles */
.footer {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

/* Animated Background Pattern */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.08) 0%, transparent 50%);
    animation: backgroundPulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Footer Container */
.footer .container {
    position: relative;
    z-index: 1;
}

/* ============================================================================
   FOOTER LOGO & BRANDING
   ============================================================================ */

.footer-logo {
    height: 96px; /* increased so footer logo is clearly visible and balanced with navbar */
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    transition: all var(--transition-base);
    animation: fadeIn 0.8s ease-out;
}

@media (max-width: 991px) {
    .footer-logo { height: 72px; }
}

@media (max-width: 576px) {
    .footer-logo { height: 56px; }
}

.footer-logo:hover {
    transform: scale(1.08) rotate(-2deg);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(59, 130, 246, 0.6));
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-sm);
    margin-bottom: 1rem;
    line-height: var(--leading-relaxed);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-xs);
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

/* ============================================================================
   FOOTER HEADINGS
   ============================================================================ */

.footer-heading {
    color: var(--white);
    font-size: var(--font-lg);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Animated Underline for Headings */
.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: expandWidth 0.6s ease-out 0.4s backwards;
}

/* ============================================================================
   FOOTER LINKS
   ============================================================================ */

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

.footer-links li {
    margin-bottom: 0.75rem;
    animation: fadeInUp 0.6s ease-out backwards;
}

.footer-links li:nth-child(1) { animation-delay: 0.5s; }
.footer-links li:nth-child(2) { animation-delay: 0.6s; }
.footer-links li:nth-child(3) { animation-delay: 0.7s; }
.footer-links li:nth-child(4) { animation-delay: 0.8s; }

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-base);
    position: relative;
    padding: 0.25rem 0;
}

/* Hover Effect - Slide Right with Glow */
.footer-link::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all var(--transition-base);
    color: var(--primary-blue-light);
}

.footer-link:hover {
    color: var(--white);
    padding-left: 25px;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.footer-link:hover::before {
    left: 0;
    opacity: 1;
}

/* Link Icon Enhancement */
.footer-link i {
    margin-right: 0.5rem;
    transition: transform var(--transition-base);
}

.footer-link:hover i {
    transform: translateX(3px) rotate(5deg);
}

/* ============================================================================
   FOOTER CONTACT INFO
   ============================================================================ */

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

.footer-contact li {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    animation: fadeInUp 0.6s ease-out backwards;
    transition: all var(--transition-base);
}

.footer-contact li:nth-child(1) { animation-delay: 0.5s; }
.footer-contact li:nth-child(2) { animation-delay: 0.6s; }

.footer-contact li:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-contact i {
    color: var(--primary-blue-light);
    margin-right: 0.75rem;
    font-size: var(--font-lg);
    transition: all var(--transition-base);
}

.footer-contact li:hover i {
    transform: scale(1.2) rotate(360deg);
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
}

/* Email Link Special Effect */
.footer-contact a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: all var(--transition-base);
}

.footer-contact a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.footer-contact a:hover::after {
    width: 100%;
}

/* ============================================================================
   SOCIAL MEDIA LINKS
   ============================================================================ */

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    animation: fadeIn 0.8s ease-out 0.7s backwards;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

/* Ripple Effect on Hover */
.footer-social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.footer-social-link:hover::before {
    width: 100%;
    height: 100%;
}

.footer-social-link:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.footer-social-link i {
    position: relative;
    z-index: 1;
}

/* Individual Social Platform Colors (on hover) */
.footer-social-link.linkedin:hover {
    background: linear-gradient(135deg, #0077B5, #00A0DC);
}

.footer-social-link.twitter:hover {
    background: linear-gradient(135deg, #1DA1F2, #0C85D0);
}

.footer-social-link.facebook:hover {
    background: linear-gradient(135deg, #1877F2, #4267B2);
}

.footer-social-link.instagram:hover {
    background: linear-gradient(135deg, #E4405F, #F77737, #FCAF45);
}

/* ============================================================================
   FOOTER BOTTOM BAR
   ============================================================================ */

.footer .border-top {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.footer-bottom-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-sm);
    animation: fadeIn 1s ease-out 0.9s backwards;
}

/* Animated Heart Icon */
.footer-bottom-text i {
    display: inline-block;
    animation: heartBeat 1.5s ease-in-out infinite;
    color: var(--error);
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
}

/* ============================================================================
   BACK TO TOP BUTTON (Inside Footer)
   ============================================================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-xl);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.6);
}

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

/* Floating Animation */
.back-to-top {
    animation: float 3s ease-in-out infinite;
}

.back-to-top:hover {
    animation: none;
}

/* ============================================================================
   FOOTER DECORATIVE ELEMENTS
   ============================================================================ */

/* Gradient Divider Line */
.footer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.5) 50%,
        transparent 100%
    );
    margin: 2rem 0;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Floating Dots Background Effect */
.footer::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 2px, transparent 2px);
    background-size: 20px 20px;
    animation: floatDots 20s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes floatDots {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* ============================================================================
   NEWSLETTER SIGNUP (Optional - for future)
   ============================================================================ */

.footer-newsletter {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.footer-newsletter h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-sm);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: var(--font-sm);
    transition: all var(--transition-base);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-blue-light);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================ */

@media (max-width: 768px) {
    .footer .row {
        text-align: center;
    }
    
    .footer-logo {
        margin: 0 auto 1rem;
    }
    
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links,
    .footer-contact {
        text-align: center;
    }
    
    .footer-link::before {
        display: none;
    }
    
    .footer-link:hover {
        padding-left: 0;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .footer {
        background: var(--white) !important;
        color: var(--grey-dark) !important;
    }
    
    .footer::before,
    .footer::after {
        display: none;
    }
    
    .footer-social,
    .back-to-top {
        display: none;
    }
}

/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

.footer-link:focus-visible,
.footer-social-link:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .footer::before,
    .footer::after,
    .footer-logo,
    .footer-social-link,
    .back-to-top,
    .footer-link i,
    .footer-contact i {
        animation: none !important;
    }
    
    * {
        transition: none !important;
    }
}