/* Advanced Footer Styles - Professional Glassmorphism Design */
:root {
    --gradient-start: #1e3c72; /* Professional Blue */
    --gradient-end: #2a5298;   /* Professional Blue */
    --text-white: #ffffff;
    --text-muted: #cbd5e1;
    --accent-color: #60a5fa; /* Light Blue for hovers/icons */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-radius: 16px;
}

/* --- Main Footer Container --- */
.advanced-footer {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 30px;
}

/* --- Background Effects --- */
.footer-background {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

/* Enhanced Background with Multiple Gradients */
.footer-background::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(96, 165, 250, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(147, 51, 234, 0.08) 0%, transparent 40%);
    z-index: 1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.1) rotate(2deg); 
    }
}

/* Mesh Grid Pattern */
.footer-grid-pattern {
    position: absolute;
    width: 100%; 
    height: 100%;
    background-image: radial-gradient(var(--accent-color) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.05;
}

/* Floating Particles (Pure CSS Animation) */
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatUp 15s infinite linear;
}

.particle:nth-child(1) { 
    width: 10px; 
    height: 10px; 
    left: 10%; 
    bottom: -10%; 
    animation-duration: 12s; 
}

.particle:nth-child(2) { 
    width: 15px; 
    height: 15px; 
    left: 30%; 
    bottom: -10%; 
    animation-duration: 18s; 
    animation-delay: 2s; 
}

.particle:nth-child(3) { 
    width: 8px; 
    height: 8px; 
    left: 50%; 
    bottom: -10%; 
    animation-duration: 14s; 
    animation-delay: 4s; 
}

.particle:nth-child(4) { 
    width: 12px; 
    height: 12px; 
    left: 70%; 
    bottom: -10%; 
    animation-duration: 20s; 
    animation-delay: 1s; 
}

.particle:nth-child(5) { 
    width: 18px; 
    height: 18px; 
    left: 90%; 
    bottom: -10%; 
    animation-duration: 16s; 
    animation-delay: 3s; 
}

@keyframes floatUp {
    0% { 
        transform: translateY(0) rotate(0deg); 
        opacity: 0; 
    }
    20% { 
        opacity: 0.5; 
    }
    80% { 
        opacity: 0.5; 
    }
    100% { 
        transform: translateY(-100vh) rotate(360deg); 
        opacity: 0; 
    }
}

/* --- Layout Container --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.footer-content-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

/* --- Sections Styling --- */
.footer-section {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    width: 32px;
    height: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* --- Logo & Company Info --- */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
}

.footer-logo h3 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.company-description {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-weight: 300;
}

/* --- Stats Grid --- */
.company-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.1);
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Links Styling --- */
.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease, padding 0.3s ease;
    display: inline-block;
    position: relative;
}

/* Underline Animation */
.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    right: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: var(--text-white);
    padding-right: 5px;
}

.footer-link:hover::after {
    width: 100%;
}

/* --- Contact Styling --- */
.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(-5px);
}

.contact-item i {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
}

.contact-value:hover {
    color: var(--accent-color);
}

/* --- Newsletter Section --- */
.footer-newsletter {
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* Glow effect behind newsletter */
.footer-newsletter::before {
    content: '';
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; 
    height: 200px;
    background: var(--accent-color);
    filter: blur(80px);
    opacity: 0.2;
    z-index: 0;
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.newsletter-text h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.newsletter-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}

.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    color: white;
    outline: none;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s, background 0.3s;
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-input:focus {
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.15);
}

.newsletter-btn {
    background: white;
    color: var(--gradient-start);
    border: none;
    padding: 0 24px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background 0.2s;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
}

/* --- Footer Bottom --- */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.bottom-links {
    display: flex;
    gap: 20px;
}

.bottom-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.bottom-link:hover {
    color: var(--text-white);
}

/* --- WhatsApp Floating Button --- */
.whatsapp-contact-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25D366;
    opacity: 0.6;
    z-index: -1;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { 
        transform: scale(1); 
        opacity: 0.6; 
    }
    70% { 
        transform: scale(1.5); 
        opacity: 0; 
    }
    100% { 
        transform: scale(1); 
        opacity: 0; 
    }
}

/* --- Toast Notification --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #fff;
    color: #1e3c72;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 10000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* --- Responsive Queries --- */
@media (max-width: 1024px) {
    .footer-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newsletter-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .footer-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .whatsapp-contact-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .advanced-footer {
        padding-top: 60px;
        padding-bottom: 20px;
    }
    
    .footer-content-grid {
        gap: 30px;
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .footer-logo img {
        width: 40px;
        height: 40px;
    }
    
    .footer-logo h3 {
        font-size: 1.2rem;
    }
    
    .company-description {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .footer-link {
        font-size: 0.9rem;
    }
    
    .contact-value {
        font-size: 0.9rem;
    }
    
    .newsletter-text h4 {
        font-size: 1.1rem;
    }
    
    .newsletter-text p {
        font-size: 0.9rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-input {
        width: 100%;
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .newsletter-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
    }
    
    .bottom-link {
        font-size: 0.8rem;
    }
    
    .whatsapp-contact-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        left: 15px;
        font-size: 20px;
    }
}

/* --- Additional Effects --- */
@keyframes beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* --- Performance Optimizations --- */
.advanced-footer * {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .footer-background::before,
    .whatsapp-pulse {
        animation: none;
    }
    
    .footer-link,
    .contact-value,
    .bottom-link,
    .newsletter-btn,
    .whatsapp-contact-btn {
        transition: none;
    }
}
