/**
 * MyApps Theme - Footer Styles
 * Version: 1.0.0
 * Mobile-first responsive design
 */

/* ===============================================
   CSS Variables
   =============================================== */
:root {
    --footer-bg: #f8f9fa;
    --footer-main-bg: #ffffff;
    --footer-bottom-bg: #f3f4f6;
    --footer-text: #6b7280;
    --footer-heading: #374151;
    --footer-border: #e5e7eb;
    --footer-primary: #fe2f05;
    --footer-secondary: #ff6d10;
    --footer-gradient: linear-gradient(135deg, var(--footer-primary), var(--footer-secondary));
}

/* Dark mode disabled - always use light theme */

/* ===============================================
   Base Footer Structure
   =============================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-top: 1px solid var(--footer-border);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===============================================
   Newsletter Section
   =============================================== */
.footer-newsletter {
    background: var(--footer-gradient);
    padding: 2.5rem 0;
    margin-bottom: -1px;
}

.newsletter-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.newsletter-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 600;
}

.newsletter-content p {
    font-size: 0.9375rem;
    opacity: 0.95;
    color: #ffffff;
    margin: 0;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 400px;
}

.newsletter-form .form-group {
    position: relative;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--footer-heading);
    transition: all 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.newsletter-form input[type="email"]::placeholder {
    color: #9ca3af;
}

.btn-subscribe {
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    color: var(--footer-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-subscribe:hover:not(:disabled) {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-subscribe:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-subscribe.success {
    background: #10b981;
    color: #ffffff;
}

/* ===============================================
   Main Footer Content
   =============================================== */
.footer-main {
    padding: 3rem 0 2.5rem;
    background: var(--footer-main-bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Footer Column Styles */
.footer-column h3 {
    color: var(--footer-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: var(--footer-gradient);
}

/* Brand Column */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin-bottom: 1.25rem;
}

.footer-logo a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-logo .logo-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 0.5rem;
}

.footer-logo .logo-icon svg {
    display: block;
}

/* Footer cursor animation */
.footer-logo .cursor {
    animation: footer-blink 1s infinite;
}

@keyframes footer-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.footer-logo .logo-text {
    font-family: 'Courier New', monospace;
}

.footer-logo .brand-my {
    color: var(--footer-primary);
}

.footer-logo .brand-apps {
    color: #374151;
}

.footer-logo .brand-dot {
    color: var(--footer-text);
    margin: 0 1px;
}

.footer-logo .brand-vn {
    color: var(--footer-secondary);
}

.footer-description {
    color: var(--footer-text);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 320px;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: var(--footer-bottom-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text);
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--footer-gradient);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-social a:focus-visible {
    outline: 2px solid var(--footer-primary);
    outline-offset: 2px;
}

/* Footer Navigation Menus */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.75rem;
}

.footer-nav a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-nav a:hover {
    color: var(--footer-primary);
    transform: translateX(5px);
}

.footer-nav a:focus-visible {
    outline: 2px solid var(--footer-primary);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Contact Info */
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.footer-contact .icon {
    color: var(--footer-secondary);
    width: 16px;
    flex-shrink: 0;
}

/* Support Button */
.btn-support {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--footer-gradient);
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 47, 5, 0.3);
}

.btn-support:focus-visible {
    outline: 2px solid var(--footer-primary);
    outline-offset: 2px;
}

/* ===============================================
   Bottom Footer
   =============================================== */
.footer-bottom {
    padding: 1.5rem 0;
    background: var(--footer-bottom-bg);
    border-top: 1px solid var(--footer-border);
}

.footer-bottom-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.875rem;
    color: #1f2937; /* Dark gray for better contrast */
}

.footer-copyright p {
    margin: 0;
}

.footer-made-with {
    margin-top: 0.25rem;
    color: #1f2937; /* Dark gray for better contrast */
}

.heart-icon {
    color: var(--footer-primary);
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

/* Legal Links */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-legal a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--footer-primary);
}

/* ===============================================
   Back to Top Button
   =============================================== */
.back-to-top {
    position: fixed;
    bottom: 1.875rem;
    right: 1.875rem;
    width: 48px;
    height: 48px;
    background: var(--footer-gradient);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(254, 47, 5, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(254, 47, 5, 0.4);
}

.back-to-top:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

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

/* ===============================================
   Tablet Styles (768px+)
   =============================================== */
@media (min-width: 768px) {
    .footer-container {
        padding: 0 1.5rem;
    }

    .newsletter-wrapper {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .newsletter-form {
        flex-direction: row;
        width: auto;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        align-items: flex-start;
        text-align: left;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-bottom-wrapper {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ===============================================
   Desktop Styles (1024px+)
   =============================================== */
@media (min-width: 1024px) {
    .footer-container {
        padding: 0 2rem;
    }

    .footer-newsletter {
        padding: 3rem 0;
    }

    .footer-main {
        padding: 4rem 0 3rem;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
        gap: 3rem;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom {
        padding: 2rem 0;
    }
}

/* ===============================================
   Accessibility
   =============================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to footer link for screen readers */
.skip-to-footer {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--footer-primary);
    color: #ffffff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-to-footer:focus {
    top: 0;
}