/* ==========================================================================
   Sainfoxiya Gift Cards - Footer Component Styles & Responsive Enhancements
   (assets/css/footerSection.css)
   ========================================================================== */

.site-footer {
    background: #0f172a;
    color: #f8fafc;
    padding: 4.5rem 0 2rem;
    border-top: 1px solid #1e293b;
    font-family: var(--font-primary);
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.footer-brand .brand-name {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
}

.footer-logo-img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.25));
}

.footer-desc {
    color: #94a3b8;
    font-size: 0.88rem;
    margin: 1.1rem 0 1.25rem;
    line-height: 1.65;
}

.footer-trust-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
}

.social-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.footer-links-col h4, .footer-newsletter h4 {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.accordion-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
}

.accordion-icon {
    display: none;
    font-size: 0.85rem;
    color: #64748b;
    transition: transform 0.3s ease;
}

.footer-links-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-col a {
    color: #94a3b8;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    padding: 0.2rem 0;
}

.link-arrow {
    font-size: 0.65rem;
    color: #475569;
    transition: var(--transition);
}

.footer-links-col a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.footer-links-col a:hover .link-arrow {
    color: var(--primary-light);
}

.footer-newsletter p {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.newsletter-box {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.newsletter-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.875rem;
    transition: var(--transition);
}

.newsletter-box input::placeholder {
    color: #64748b;
}

.newsletter-box input:focus {
    border-color: var(--primary);
    background: #0f172a;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.newsletter-box .btn {
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
}

.newsletter-status-msg {
    margin-top: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-weight: 600;
}

.newsletter-status-msg.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #34d399;
}

.newsletter-status-msg.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #f87171;
}

.newsletter-assurance {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.85rem;
}

/* Footer Bottom Bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 0.85rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-copyright {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-copyright strong {
    color: #cbd5e1;
}

.bottom-legal-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
}

.bottom-legal-links a {
    color: #94a3b8;
    transition: var(--transition);
}

.bottom-legal-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.dot-sep {
    color: #334155;
}

.payment-badges {
    display: flex;
    gap: 0.85rem;
    font-size: 1.6rem;
    color: #94a3b8;
    align-items: center;
    flex-wrap: wrap;
}

.payment-badges i {
    cursor: pointer;
    transition: var(--transition);
}

.payment-badges i:hover {
    color: #ffffff;
    transform: translateY(-3px);
}

.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #334155;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

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

.back-to-top-btn:hover {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

/* Legal Modals Styling */
.legal-modal-box {
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.legal-modal-box .modal-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.legal-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    scrollbar-width: thin;
}

.legal-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.legal-section p, .legal-section li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.legal-section ul, .legal-section ol {
    margin-left: 1.25rem;
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.legal-section ul { list-style: disc; }
.legal-section ol { list-style: decimal; }

.legal-modal-box .modal-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Responsive Breakpoints for Footer
   ========================================================================== */

@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 991px) {
    .site-footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 2rem;
    }

    /* Accordion styles on Mobile & Tablet */
    .footer-accordion .accordion-title {
        cursor: pointer;
        padding: 0.85rem 0;
        border-bottom: 1px solid #1e293b;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .footer-accordion .accordion-icon {
        display: block !important;
        font-size: 0.9rem;
        color: #64748b;
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .footer-accordion .accordion-content {
        display: none;
        padding-top: 0.85rem;
        padding-bottom: 0.5rem;
    }

    .footer-accordion.open .accordion-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.6rem !important;
    }

    .footer-accordion.open .accordion-icon {
        transform: rotate(180deg);
        color: var(--primary);
    }

    .footer-links-col a {
        padding: 0.4rem 0;
        font-size: 0.95rem;
    }

    .newsletter-box {
        flex-direction: column;
    }

    .newsletter-box .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding-top: 1.5rem;
    }

    .footer-copyright {
        align-items: center;
    }

    .bottom-legal-links {
        justify-content: center;
    }

    .payment-badges {
        justify-content: center;
        font-size: 1.8rem;
    }

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

@media (max-width: 480px) {
    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
    }

    .trust-pill {
        font-size: 0.725rem;
    }

    .legal-modal-box {
        padding: 1.25rem 1rem;
    }
}
