/* ============================================
   SapCod - Ultra Premium Footer Section
   Author: SapCod Team
   Version: 2.0
   Description: Premium footer with light/dark
   theme support using CSS variables
   Compatible with: styles.css
   Namespace: sapcod-footer-v2
   ============================================ */

/* ===== Footer Container ===== */
.sapcod-footer-v2 {
    position: relative;
    background: #f8f9fc;
    color: #555;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.3s ease;
}

[data-theme="dark"] .sapcod-footer-v2 {
    background: #060610;
    color: #999;
}

/* ===== Background Effects ===== */
.footer-v2-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Top gradient line */
.footer-v2-top-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0066ff, #339966, #8b5cf6, #0066ff);
    background-size: 300% 100%;
    animation: footerLineShimmer 6s ease infinite;
}

@keyframes footerLineShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Glow orb */
.footer-v2-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.06;
    pointer-events: none;
}

.footer-v2-glow.fg1 {
    background: #0066ff;
    top: -150px;
    right: -100px;
}

.footer-v2-glow.fg2 {
    background: #339966;
    bottom: -100px;
    left: -80px;
}

[data-theme="dark"] .footer-v2-glow {
    opacity: 0.08;
}

/* ===== Main Container ===== */
.sapcod-footer-v2 .footer-container {
    position: relative;
    z-index: 1;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ===== Top CTA Section ===== */
.footer-v2-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 70px 0 60px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    align-items: center;
}

[data-theme="dark"] .footer-v2-cta {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.footer-v2-cta-left h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .footer-v2-cta-left h3 {
    color: #e8e8f0;
}

.footer-v2-cta-left p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

[data-theme="dark"] .footer-v2-cta-left p {
    color: #999;
}

/* Newsletter Form */
.footer-v2-newsletter {
    display: flex;
    gap: 10px;
}

.footer-v2-newsletter input {
    flex: 1;
    padding: 15px 20px;
    border-radius: 14px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    color: #333;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

[data-theme="dark"] .footer-v2-newsletter input {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #e0e0e0;
}

.footer-v2-newsletter input:focus {
    border-color: #0066ff;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.footer-v2-newsletter input::placeholder {
    color: #aaa;
}

[data-theme="dark"] .footer-v2-newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.footer-v2-newsletter button {
    padding: 15px 28px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #0066ff, #0044cc);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

.footer-v2-newsletter button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 102, 255, 0.45);
}

.footer-v2-newsletter-msg {
    font-size: 0.78rem;
    margin-top: 8px;
    display: none;
}

.footer-v2-newsletter-msg.show {
    display: block;
}

.footer-v2-newsletter-msg.success {
    color: #339966;
}

.footer-v2-newsletter-msg.error {
    color: #ff4757;
}

/* ===== Main Footer Grid ===== */
.footer-v2-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 50px;
    padding: 60px 0 50px;
}

/* ===== Company Column ===== */
.footer-v2-company h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .footer-v2-company h3 {
    color: #e8e8f0;
}

.footer-v2-company h3 span {
    background: linear-gradient(135deg, #0066ff, #339966);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-v2-company p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 22px;
}

[data-theme="dark"] .footer-v2-company p {
    color: #888;
}

/* Certifications */
.footer-v2-certs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.footer-v2-cert-badge {
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(0, 102, 255, 0.06);
    border: 1px solid rgba(0, 102, 255, 0.1);
    font-size: 0.7rem;
    color: #555;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .footer-v2-cert-badge {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #999;
}

.footer-v2-cert-badge:hover {
    background: rgba(0, 102, 255, 0.1);
    border-color: rgba(0, 102, 255, 0.3);
    color: #0066ff;
}

.footer-v2-cert-badge i {
    color: #339966;
    font-size: 0.65rem;
}

/* Social Links */
.footer-v2-social {
    display: flex;
    gap: 10px;
}

.footer-v2-social a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 102, 255, 0.06);
    border: 1px solid rgba(0, 102, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0066ff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .footer-v2-social a {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #4d94ff;
}

.footer-v2-social a:hover {
    background: #0066ff;
    color: #fff;
    border-color: #0066ff;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 102, 255, 0.3);
}

/* ===== Links Columns ===== */
.footer-v2-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

[data-theme="dark"] .footer-v2-links h4 {
    color: #e8e8f0;
}

.footer-v2-links h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #0066ff;
    border-radius: 2px;
}

.footer-v2-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-v2-links ul li {
    margin-bottom: 10px;
}

.footer-v2-links ul li a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .footer-v2-links ul li a {
    color: #888;
}

.footer-v2-links ul li a::before {
    content: '→';
    color: #0066ff;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.footer-v2-links ul li a:hover {
    color: #0066ff;
    transform: translateX(5px);
}

[data-theme="dark"] .footer-v2-links ul li a:hover {
    color: #4d94ff;
}

.footer-v2-links ul li a:hover::before {
    transform: translateX(3px);
}

/* ===== Contact Column ===== */
.footer-v2-contact h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

[data-theme="dark"] .footer-v2-contact h4 {
    color: #e8e8f0;
}

.footer-v2-contact h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #339966;
    border-radius: 2px;
}

.footer-v2-contact ul {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}

.footer-v2-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #666;
}

[data-theme="dark"] .footer-v2-contact ul li {
    color: #888;
}

.footer-v2-contact ul li i {
    color: #0066ff;
    font-size: 0.9rem;
    margin-top: 3px;
    width: 16px;
    text-align: center;
}

.footer-v2-contact ul li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

[data-theme="dark"] .footer-v2-contact ul li a {
    color: #888;
}

.footer-v2-contact ul li a:hover {
    color: #0066ff;
}

[data-theme="dark"] .footer-v2-contact ul li a:hover {
    color: #4d94ff;
}

/* Payment Methods */
.footer-v2-payment {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-v2-payment span {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(0, 102, 255, 0.04);
    border: 1px solid rgba(0, 102, 255, 0.08);
    font-size: 0.72rem;
    color: #777;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .footer-v2-payment span {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    color: #777;
}

.footer-v2-payment span:hover {
    border-color: rgba(0, 102, 255, 0.2);
    color: #0066ff;
}

/* ===== Bottom Bar ===== */
.footer-v2-bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

[data-theme="dark"] .footer-v2-bottom {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.footer-v2-bottom p {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

[data-theme="dark"] .footer-v2-bottom p {
    color: #666;
}

.footer-v2-bottom p strong {
    color: #1a1a2e;
}

[data-theme="dark"] .footer-v2-bottom p strong {
    color: #e0e0e0;
}

.footer-v2-bottom p a {
    color: #0066ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-v2-bottom p a:hover {
    color: #0044cc;
}

[data-theme="dark"] .footer-v2-bottom p a:hover {
    color: #4d94ff;
}

.footer-v2-bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-v2-bottom-links a {
    font-size: 0.78rem;
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

[data-theme="dark"] .footer-v2-bottom-links a {
    color: #666;
}

.footer-v2-bottom-links a:hover {
    color: #0066ff;
}

[data-theme="dark"] .footer-v2-bottom-links a:hover {
    color: #4d94ff;
}

/* ===== Back to Top Button ===== */
.footer-v2-back-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid rgba(0, 102, 255, 0.2);
    color: #0066ff;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .footer-v2-back-top {
    background: #1a1a30;
    border-color: rgba(0, 102, 255, 0.3);
    color: #4d94ff;
}

.footer-v2-back-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.footer-v2-back-top:hover {
    background: #0066ff;
    color: #fff;
    border-color: #0066ff;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
    transform: translateY(-3px);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .footer-v2-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .footer-v2-cta {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }
    
    .footer-v2-newsletter {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .footer-v2-main {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-v2-cta {
        padding: 45px 0 40px;
    }
    
    .footer-v2-cta-left h3 {
        font-size: 1.4rem;
    }
    
    .footer-v2-newsletter {
        flex-direction: column;
    }
    
    .footer-v2-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-v2-bottom-links {
        justify-content: center;
    }
    
    .footer-v2-back-top {
        bottom: 85px;
        right: 20px;
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .footer-v2-social {
        justify-content: center;
    }
    
    .footer-v2-company {
        text-align: center;
    }
    
    .footer-v2-certs {
        justify-content: center;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .footer-v2-top-line {
        animation: none;
    }
}