/* Footer & Social Media Styles */

.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(20, 184, 166, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Footer Content */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.footer-section {
    text-align: left;
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-purple);
    border-radius: 1px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-section ul li a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--accent-purple);
}

.footer-section ul li a:hover {
    color: var(--text-primary);
    padding-left: 25px;
    transform: translateX(5px);
}

.footer-section ul li a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section:hover p {
    color: var(--text-primary);
}

/* Social Media Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-teal));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-icons a:hover::before {
    opacity: 1;
}

.social-icons a img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(69%) sepia(25%) saturate(270%) hue-rotate(193deg) brightness(88%) contrast(86%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover img {
    filter: brightness(0) saturate(100%) invert(100%);
    transform: scale(1.2) rotate(10deg);
}

.social-icons a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* Individual Social Media Colors */
.social-icons a[href*="facebook"]:hover::before {
    background: #1877f2;
}

.social-icons a[href*="instagram"]:hover::before {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-icons a[href*="linkedin"]:hover::before {
    background: #0077b5;
}

.social-icons a[href*="mailto"]:hover::before {
    background: linear-gradient(45deg, #ea4335, #fbbc05, #34a853, #4285f4);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--glass-border);
}

.newsletter-form button {
    flex-shrink: 0;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Fun Extras Section */
.fun-extras {
    padding: 5rem 0;
    background: var(--primary-bg);
    position: relative;
}

.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.extra-card {
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px solid transparent;
}

.extra-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        var(--accent-purple),
        var(--accent-teal),
        var(--accent-pink),
        var(--accent-purple)
    );
    border-radius: 22px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    background-size: 300% 300%;
    animation: extraCardGradient 6s ease infinite;
}

.extra-card:hover::before {
    opacity: 1;
}

@keyframes extraCardGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.extra-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.extra-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.extra-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Animated Footer Elements */
.footer-wave {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: url('data:image/svg+xml,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23667eea"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23667eea"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23667eea"/></svg>') repeat-x;
    background-size: 1200px 50px;
    animation: waveAnimation 10s linear infinite;
    z-index: -1;
}

@keyframes waveAnimation {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

/* Footer Particles */
.footer-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-purple);
    border-radius: 50%;
    animation: floatParticle 15s linear infinite;
    opacity: 0.3;
}

.particle:nth-child(even) {
    background: var(--accent-teal);
    animation-duration: 12s;
}

.particle:nth-child(3n) {
    background: var(--accent-pink);
    animation-duration: 18s;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .social-icons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .newsletter-form input {
        min-width: 100%;
    }
    
    .extras-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section ul li a {
        padding-left: 0;
    }
    
    .footer-section ul li a:hover {
        padding-left: 0;
        transform: scale(1.05);
    }
    
    .footer-section ul li a::before {
        display: none;
    }
    
    .social-icons {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .social-icons a {
        width: 50px;
        height: 50px;
    }
    
    .social-icons a img {
        width: 24px;
        height: 24px;
    }
    
    .extras-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .extra-card {
        padding: 1.5rem;
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .footer {
        margin-top: 3rem;
        padding: 1.5rem 0 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section p {
        font-size: 0.85rem;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
        padding: 0 1rem;
    }
    
    .social-icons {
        gap: 1rem;
    }
    
    .social-icons a {
        width: 45px;
        height: 45px;
    }
    
    .newsletter-form input {
        font-size: 0.85rem;
        padding: 0.7rem 0.9rem;
    }
    
    .newsletter-form button {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .extra-card h3 {
        font-size: 1.1rem;
    }
    
    .extra-card p {
        font-size: 0.85rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .social-icons a,
    .extra-card,
    .particle {
        animation: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    
    .social-icons a:hover,
    .extra-card:hover {
        transform: none;
    }
    
    .footer-wave {
        animation: none;
    }
    
    .extra-card::before {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .footer {
        background: var(--primary-bg);
        border-top: 2px solid var(--text-primary);
    }
    
    .footer-section h3,
    .footer-section p,
    .footer-section ul li a {
        color: var(--text-primary);
    }
    
    .social-icons a {
        border: 2px solid var(--text-primary);
        background: var(--primary-bg);
    }
    
    .social-icons a img {
        filter: brightness(0) saturate(100%) invert(100%);
    }
    
    .newsletter-form input {
        border: 2px solid var(--text-primary);
        background: var(--primary-bg);
        color: var(--text-primary);
    }
    
    .extra-card {
        border: 2px solid var(--text-primary);
        background: var(--primary-bg);
    }
    
    .extra-card h3,
    .extra-card p {
        color: var(--text-primary);
        background: none;
        -webkit-text-fill-color: var(--text-primary);
    }
}

/* Print Styles */
@media print {
    .footer {
        background: white;
        border-top: 1px solid #ccc;
        padding: 1rem 0;
    }
    
    .footer-content {
        display: block;
    }
    
    .footer-section {
        margin-bottom: 1rem;
        break-inside: avoid;
    }
    
    .footer-section h3 {
        color: #000;
    }
    
    .footer-section p,
    .footer-section ul li a {
        color: #333;
    }
    
    .social-icons {
        display: none;
    }
    
    .newsletter-form {
        display: none;
    }
    
    .footer-bottom p {
        color: #666;
        text-align: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #ccc;
    }
    
    .footer::before,
    .footer::after,
    .footer-wave,
    .footer-particles,
    .extras-grid {
        display: none;
    }
}