/* ==================== FOOTER STYLES ==================== */

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ==================== FOOTER CONTAINER ==================== */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    color: white;
    padding: 3.5rem 0 1rem;
    position: relative;
    overflow: hidden;
    margin-top: 3rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

.footer::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 12s ease-in-out infinite reverse;
}

.footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==================== FOOTER CONTENT GRID ==================== */
.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 {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.footer-section:nth-child(1) {
    animation-delay: 0s;
}

.footer-section:nth-child(2) {
    animation-delay: 0.1s;
}

.footer-section:nth-child(3) {
    animation-delay: 0.2s;
}

.footer-section:nth-child(4) {
    animation-delay: 0.3s;
}

/* ==================== FOOTER SECTION STYLES ==================== */
.footer-title {
    margin: 0 0 1rem 0;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

.footer-desc {
    opacity: 0.9;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==================== SOCIAL LINKS ==================== */
.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-link:active {
    transform: translateY(-2px) scale(1.05);
}

.social-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

/* Individual Social Media Colors */
.social-facebook:hover {
    background: linear-gradient(135deg, #1877f2 0%, #0d5dbf 100%);
    border-color: #1877f2;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.4);
}

.social-twitter:hover {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    border-color: #1da1f2;
    box-shadow: 0 8px 20px rgba(29, 161, 242, 0.4);
}

.social-linkedin:hover {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    border-color: #0077b5;
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.4);
}

.social-instagram:hover {
    background: linear-gradient(135deg, #e1306c 0%, #c13584 50%, #833ab4 100%);
    border-color: #e1306c;
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.4);
}

.social-youtube:hover {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border-color: #ff0000;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

/* ==================== FOOTER LISTS ==================== */
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0.75rem;
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

.footer-list li:nth-child(1) { animation-delay: 0.1s; }
.footer-list li:nth-child(2) { animation-delay: 0.2s; }
.footer-list li:nth-child(3) { animation-delay: 0.3s; }
.footer-list li:nth-child(4) { animation-delay: 0.4s; }

.footer-list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    padding: 0.35rem 0;
}

.footer-list a:hover {
    color: #60a5fa;
    transform: translateX(8px);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.footer-list a:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
}

.footer-list i {
    font-size: 0.75rem;
    flex-shrink: 0;
    color: #60a5fa;
    transition: transform 0.3s ease;
}

.footer-list a:hover i {
    transform: translateX(3px);
}

/* ==================== CONTACT INFO ==================== */
.footer-contact {
    opacity: 0.95;
    margin: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 1rem;
    line-height: 1.7;
    transition: all 0.3s ease;
}

.footer-contact:hover {
    opacity: 1;
    transform: translateX(5px);
}

.footer-contact i {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #60a5fa;
    font-size: 1.1rem;
    margin-top: 0.15rem;
    transition: all 0.3s ease;
}

.footer-contact:hover i {
    color: #93c5fd;
    transform: scale(1.2) rotate(5deg);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-contact a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.footer-contact span {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== FOOTER BOTTOM ==================== */
.footer-bottom {
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    padding-top: 2rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    gap: 2rem;
}

.footer-copyright {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 2px;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

/* ==================== DARK MODE SUPPORT ==================== */
html.dark-theme .footer,
body.dark-theme .footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

html.dark-theme .social-link,
body.dark-theme .social-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark-theme .footer-list a,
body.dark-theme .footer-list a {
    color: rgba(255, 255, 255, 0.9);
}

html.dark-theme .footer-list a:hover,
body.dark-theme .footer-list a:hover {
    color: #93c5fd;
}

html.dark-theme .footer-bottom,
body.dark-theme .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .footer {
        padding: 3rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 2.5rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-title {
        font-size: 1.15rem;
        margin-bottom: 1.25rem;
    }

    .footer-desc {
        font-size: 1rem;
    }

    .social-links {
        justify-content: center;
        gap: 1rem;
    }

    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .footer-list {
        text-align: center;
    }

    .footer-list a {
        justify-content: center;
        font-size: 1.05rem;
    }

    .footer-contact {
        justify-content: center;
        font-size: 1.05rem;
    }

    .footer-bottom {
        padding-top: 1.75rem;
        gap: 1.25rem;
    }

    .footer-copyright {
        font-size: 0.95rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .footer-links a {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 2rem 0 1rem;
        margin-top: 1.5rem;
    }

    .footer .container {
        padding: 0 1.25rem;
    }

    .footer-content {
        gap: 2rem;
    }

    .footer-title {
        font-size: 1.1rem;
    }

    .footer-desc {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .social-links {
        gap: 0.85rem;
    }

    .social-link {
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }

    .footer-list li {
        margin-bottom: 0.65rem;
    }

    .footer-list a {
        font-size: 0.98rem;
    }

    .footer-contact {
        font-size: 0.95rem;
        margin: 0.65rem 0;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        gap: 1rem;
    }

    .footer-copyright {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .footer-links {
        gap: 0.5rem;
    }

    .footer-links a {
        font-size: 0.88rem;
    }

    .footer::before,
    .footer::after {
        opacity: 0.5;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .footer {
        background: white;
        color: var(--text-color, #1e293b);
        border-top: 1px solid var(--border-color, #e2e8f0);
        padding: 1rem 0;
    }

    .footer::before {
        display: none;
    }

    .social-links {
        display: none;
    }

    .footer a {
        text-decoration: underline;
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .footer-section,
    .social-link,
    .footer-list a,
    .footer-list li {
        animation: none !important;
        transition: none !important;
    }

    .footer::before,
    .footer::after {
        animation: none !important;
    }
}

/* ==================== HIGH CONTRAST MODE ==================== */
@media (prefers-contrast: high) {
    .footer {
        border-top: 3px solid currentColor;
    }

    .social-link {
        border-width: 3px;
    }

    .footer-bottom {
        border-top-width: 3px;
    }

    .footer-links a::after {
        height: 3px;
    }
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
.footer a:focus,
.footer button:focus {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}

@media (hover: none) {
    .social-link:active {
        transform: scale(0.95);
    }
    
    .footer-list a:active {
        transform: translateX(5px);
    }
}

/* Ensure sufficient color contrast */
.footer-title {
    color: #ffffff;
    font-weight: 700;
}

.footer-desc,
.footer-contact,
.footer-copyright {
    color: rgba(255, 255, 255, 0.95);
}

/* Skip to content link for screen readers */
.skip-to-footer:focus {
    position: fixed;
    top: 0;
    left: 0;
    background: #3b82f6;
    color: white;
    padding: 1rem 2rem;
    z-index: 9999;
    text-decoration: none;
    font-weight: bold;
}

/* ==================== SCROLL TO TOP BUTTON ==================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.scroll-to-top i {
    font-size: 1.3rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure Font Awesome Icons Display */
.footer i,
.social-link i,
.footer-list i,
.footer-contact i,
.scroll-to-top i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* Social Icons Specific */
.social-link i {
    font-size: 1.2rem;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* Mobile Scroll to Top */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 1.1rem;
    }
}
